Index: vendor/subversion/dist/CHANGES =================================================================== --- vendor/subversion/dist/CHANGES (revision 339231) +++ vendor/subversion/dist/CHANGES (revision 339232) @@ -1,6802 +1,6867 @@ +Version 1.10.2 +(20 Jul 2018, from /branches/1.10.x) +http://svn.apache.org/repos/asf/subversion/tags/1.10.2 + + User-visible changes: + - Client-side bugfixes: + * Correctly claim to offer Gnome Keyring support with libsecret (r1831142) + * Fix segfault using Gnome Keyring with libsecret (r1835782) + * Fix JavaHL local refs capacity warning when unparsing externals (r1831143) + * Since on Windows Subversion does not handle symlinks, never check for reparse points (r1835701) + * Prune externals after 'update --set-depth=exclude' (r1835702) + * Fix issue #4740, "conflict resolver searches too far back ..." (r1835703) + - Server-side bugfixes: + * Fix regression issue #4741: authz group refers to multiple groups (r1831220) + + Developer-visible changes: + - General: + * Regression test and FSFS checksum test, part of issue #4722 (r1828043) + * Explicit error on configure --without-lz4 or --without-utf8proc (r1831604) + * configure.ac: Fix regression relating to path to 'rdoc' (r1833486) + * Ensure consistent use of $PYTHON during build and test (r1833487) + * Fix libsvn_auth_gnome_keyring.pc when built using libsecret (r1835781) + - Bindings: + * Fix regression in use of pre-generated Swig bindings in release builds (r1833488) + + +Version 1.10.1 +(Not released; see changes for 1.10.2.) + + Version 1.10.0 -(?? ??? 2018, from /branches/1.10.x) +(13 Apr 2018, from /branches/1.10.x) http://svn.apache.org/repos/asf/subversion/tags/1.10.0 See the 1.10 release notes for a more verbose overview of the changes since the 1.9 release: https://subversion.apache.org/docs/release-notes/1.10.html User-visible changes: - Major new features: * Better interactive conflict resolution for tree conflicts (r1687489 et al) * Wilcards and improved performance in path-based authorization (r1776832) * New experimental 'svn shelve' command (issue #3625) - Minor new features and improvements: * svnbench: Show time taken & bytes transferred (r1703383, r1710586) * New 'svnadmin dump' options to include/exclude paths (r1811992 et al) * New '--normalize-props' option for 'svnadmin dump' (r1807836 et al) * New 'svnadmin 'load-revprops', 'dump-revprops' subcommands (r1694191, -225) * New '--no-flush-to-disk' option for 'svnadmin load' (r1736357, -7357) * New '--file' option for several svnadmin subcommands (r1738021) * New '--max-request-size', '--max-response-size' options for svnserve (r1714330, -333) * New '-rN' option for 'svnadmin lstxns' (r1703699) * New '--search' option for fast 'svn ls' searches (r1767186 et al) * Add '--search' option support to 'svnbench null-list' (r1767202) * New '-M' option for 'svnlook tree' (r1708222) * New '--skip-unchanged' option for 'svnsync copy-revprops' (r1692655) * 'svn log --search' now ignores case and diacriticals (r1731300, r1735614) * Improved performance of server-side log processing (r1732768, r1731656) * diff3: Reduce processing time and memory usage (r1731659) * ra_serf: Adjustments for serf versions with HTTP/2 support (r1716400) * ra_serf: Send svndiff1 deltas during commit (r1704317, r1704613, r1791290) * ra_serf: Stream svndiff deltas w/o creating temporary files (r1803143 et al) * ra_serf: Don't necessarily request full MERGE reponses (r1806017 et al) * 'svn patch': Parse binary diffs in git-style patches (r1703925) * 'svnadmin info' now reports latest revision in the repository (r1697953) * ra_svn: Various performance-related tweaks (r1694490) * Optimize svndiff parser (r1685063) * 'svn status' without -v: Stop showing uninteresting deletions (r1664533) * Save a few cycles in svn_stringbuf_set() (r1759177) * windows: Use the Unicode Windows API (r1756193) * windows: Distinguish out-of-memory error from abort() (r1724784, -809) * windows: Explicitly release file locks (r1702089) * windows: Correctly check result from LoadLibrary() call (r1755983) * Remove Windows-specific slowdown during pristine cleanup (r1701641) * FSFS: Optionally cache node properties without full-text cache (r1723715) * FSFS: Open transaction's proto revision in write-only mode (r1759135) * FSFS: Avoid checksum calculations if logical addressing is used (r1756377) * FSFS: Do not read very long change lists in block read mode (r1746012) * FSFS: Avoid double DAG lookup (r1711582) * FSFS: Avoid double cache lookups (r1681974, r1710370) * FSFS: Increase default revprop pack size from 4k to 16k (r1709799) * FSFS: Speed up revprop access (r1707986 et al) * FSFS: Disable representation sharing for directories (r1706619) * FSFS: Speed up transaction processing for large directories (r1706617) * FSFS: Tune format 7 pack ordering heuristics (r1706615) * FSFS: Reduce I/O overhead during history traversal (r1703237) * FSFS: Use native Windows API to guarantee data is flushed (r1701053) * FSFS: Warn if a possible rep-cache SHA1 collision is detected (r1674673) * FSFS: Optimize revprop cache filling strategy under high load (r1795324) * FSFS: New "verify-before-commit" fsfs.conf option (r1795351) * FSFS: New format 8 with various performance improvements (r1801940 et al) * FSFS/FSX: Chunked read support for changed paths lists (r1746026, -4987) * FSFS/FSX: Improvements to cache implementation (r1694489) * FSX: Add checksums to packed revprop manifests and files (r1713132, -9717) * FSX: Significantly reduce size of packed revprop manifest data (r1713109) * FSX: Improved on-disk representation of property lists (r1717427) * FSX: New in-repository representation of directories (r1712967) * FSX: Make 'svnadmin recover' discard all transactions (r1712937) * FSX: Reduce number of fsync operations (r1711354 et al) * mod_dav_svn: Improve performance and memory usage of PROPFIND (r1721732) * mod_dav_svn: Show process-id on Windows in /svn-status page (r1718567) * mod_dav_svn: Advertise svndiff1 support to clients (r1704891, r1791285) * mod_dav_svn: Remove disk I/O to TMPDIR during first commit (r1716240) * svnsync: Fix assertion failure with up-to-date repositories (r1727140) * ra_serf: Parallel requests for text and property changes (r1716575) * svnserve: Remove disk I/O to TMPDIR during first commit (r1716240) * Triple performance of URI escaping (r1710099, -103) * 'svn blame': Optimize a bit on the server side (r1711666) * 'svn cleanup': Add --vacuum-pristines option (r1802787 et al) * 'svn diff --git': Show diffs of symlinks like git and hg (r1706372) * 'svn patch': Capable of handling git-like symlink changes (r1706446) * 'svn patch': Improve detection of additions and deletions (r1706623) * 'svn patch': Handle zero-byte files vs deleted files (r1705856) * 'svn diff --git': Produce 'rename from/to' headers (r1706855) * 'svn diff --git': Produce proper mode headers (r1706041) * 'svn lock', 'svn unlock': Take the -q option (r1796288) * 'svn help': improved wording and consistency (r1802989 et al) * 'svn': Add a new '--accept recommended' option. (r1805623) * 'svn': --non-interactive uses recommended tree conflict resolution (r1805620) * Evaluate 'old mode' and 'new mode' lines from git-syle diffs (r1705391) * svnrdump, svndumpfilter: Enable buffered stdin (r1703074) * ra_serf: Receive svndiff1 and gzip compressed deltas (r1791282, -3, -4) * svnadmin: 'lock', 'unlock', 'rmlocks': Take the -q option (r1796406) * New svndiff2 binary delta format using lz4 compression (r1801938, et al) * gpg-agent: Support gpg ≥2.1.13 and unset GPG_AGENT_INFO (r1795087) * Add 'http-compression=auto' client config option as default (r1803899 et al) * Speed up processing of mergeinfo (r1802470 et al) * Check for invalid 'xt' fields in x509 certs (r1809290) * New '--password-from-stdin' option for 'svn' (r1819093) - Client-side bugfixes: * svnbench: Honour the '--with-no-revprops' option (r1709593) * ra_serf: Fix segfault when running over HTTP v1 (r1766089) * ra_serf: Keep small svndiffs in memory during commit (r1724455) * ra_serf: Improve error messages related to lock operations (r1716450) * ra_serf: Work around a bug in serf bucket handling (r1714806) * ra_serf: Fix lock token handling for file-path commits (r1815799 et al) * Raise a malfunction instead of segfaulting with corrupt wc.db (r1749887) * Fix check for unversioned obstructions blocking file externals (r1735932) * 'svn patch' bugfixes: + Fix behaviour if a reject file can't be created (r1725948) + Describe adds and removes in reject file headers (r1707034) + Detect recorded moves that are already applied (r1706893) + Detect already applied patches in edge cases (r1706687) + Fix handling of missing trailing context (issue #4609) + Fix interaction of moves and property changes (r1706875) + Fix output for reordered hunks (issue #4533) + Prevent from overwriting existing reject files (r1706600) + Improve handling of added properties (r1706598) + Improve handling of rejected file deletions (r1706221) + Fix --dry-run with replaced files (r1706217) + Fix applying prop changes which should conflict (r1705733) + Fix duplicate notifications when adding directories (r1704883) + Fix duplicate notifications when patching svn:executable prop (r1706078) + Fix notifications when adding/removing properties (r1705698) + Make handle already applied property patches (r1705692) + Change some notifications to 'U' instead of 'G' (r1706693) + Don't create file if git-style patch indicates modification (r1706005) + Parse any properties following svn:mergeinfo (r1706825) + Fix potential unbounded memory usage in parser (r1705979) + Fix problems with --git diffs applied in reverse (r1704854, -88) + Fix removal of EOL if final patch context line has no EOL (#4315) * 'svn diff --git': Fix file permission modes to match git and hg (r1695384) * 'svn diff --git': added/deleted filenames are never /dev/null (issue #4689) * Fix a problem with relocating some externals (r1723385) * Fix 'svn diff URL@REV WC' wrongly looks up URL@HEAD (issue #4597) * Fix 'svn diff --no-diff-added' shows properties as added (issue #4596) * Properly raise text merge conflicts with file externals (r1680245) * Fix 'svn diff' with local directories marked incomplete (r1674413 et al) * ra_svn/ra_serf: Make negative log limits work as documented (r1665530) * ra_svn: Eliminate unnecessary URL reparenting (r1779611, r1779611) * ra_svn: Use svndiff2 deltas when supported on both ends (r1803269 et al) * Handle invalid revision numbers consistently across RA layers (r1665328) * Handle commits to revs > HEAD consistently across RA layers (r1664698) * Eliminate one client/server roundtrip from checkouts of HEAD (r1779620) * Expose some error messages generated by github's SVN server (r1707164) * 'svnfsfs stats': Show average lengths of delta chains (r1705739) * svnmucc: Fix crash during application teardown (r1795727) * Fix assertion when exporting a working copy containing relative externals (r1802316) - Server-side bugfixes: * Fix checksum validation error due to data eviction from cache (r1781694) * FSFS pack: Use unbuffered file streams in a couple of places (r1759405) * FSFS: Reduce excessive amount of read and seek syscalls (r1758979, -9399) * FSFS: Reduce memory footprint of cached directories (r1725179) * FSFS: Add various checks for integer overflows (r1714372, -32, -34) * FSFS: Detect a very unlikely case of item index corruption (r1716973) * FSFS: Make handling of revprop size information more resilient (r1716784) * FSFS: Don't re-parse a directory which just got committed (r1706679) * FSFS: Handle some known quirks in committed node revisions (r1673875) * FSFS format 7: Verify item types more thoroughly (r1796160) * FSFS: Fix false positive "Not a directory" error involving file moved and replaced by dir (issue #4677) * FSFS: Fix crash accessing revprops with --memory-cache-size=0 (r1795164) * FSFS: Fix issue #4623 for FSFS. (r1813794 et al) * mod_dav_svn: Omit Cache-Control HTTP header for HEAD URLs (issue #4514) * mod_dav_svn: Reduced memory consumption for DAV merge responses (r1727790) * mod_dav_svn: Don't set a Last-Modified header in GET responses (r1724790) * mod_dav_svn: Actually use FSFS transaction directory cache (r1723720) * mod_dav_svn: Do not insert newlines in base64 encoded responses (r1712223) * Fix insertion of very large items into the membuffer cache (r1717337, -8) * Fix capacity check of the membuffer cache's prefix pool (r1714356) * Prevent paths containing newlines from being committed (r1662585) * Fix for properties: Null updates break last-changed-revision (issue #4700) * 'svnfsfs stats': Fix false positive checksum errors reading old revisions (r1785904) * 'svnfsfs stats': Fix support for pre-v4 FSFS repositories. (r1816966) * svnadmin, svnfsfs: Detect invalid arguments to -M (r1787023, r1787045) * svnlook, svnserve: Detect invalid arguments to -M (r1787023, r1787045) * svnadmin: Output locked paths in canonical form (r1796420) * svnadmin: Output locked paths correctly encoded (r1797122) * svn: propdel, propset: Transcode property names on output (r1797186) * svnserve: Make use-sasl=true a fatal error in SASL-less builds. (r1803188) - Client-side and server-side bugfixes: * Fix integer overflow check with >= 1G mergeinfo ranges per path (r1714380) * Fix integer overflow checks on WoW64 platforms (r1714372) * Fix bug with canonicalizing Window-specific drive-relative URL (r1692262) * In file:// URLs, allow '\' directly after Windows drive letter (r1692259) * Fix segfault with recursive configuration value definitions (issue #4543) * FSFS: Improve error messages when DAG lookup fails (r1795120) * Transcode command-line arguments to UTF-8 (r1797190, r1797362, et al) * Fix segfault on x509 certificate with empty name (r1798157) * Fix segfault with invalid URLs in svn:externals (r1803471) * Windows: Failure to write files might remain undetected (r1806014) - Other tool improvements and bugfixes: * New svn-mergeinfo-normalizer tool (r1695992 et al) * Allow configuring mailer.py to use SMTP SSL (r1777846) * svnmucc can now delete directories with deleted children (issue #4666) * svn-vendor.py: Minor enhancements, mostly in treating symlinks (r1732669) * bash_completion: Better URL completion (r1701494) * bash_completion: Complete arguments to 'svn info --show-item' (r1698276) * fsfs-stats: New 1.8-compatible wrapper for 'svnfsfs stats' (r1802032) * Drop support for upgrading working copies created with Subversion 1.7 (r1807584 et al) Developer-visible changes: - General: * windows: Removed support for building with Visual Studio 6.0 (r1703419) * Fix .py scripts throughout the source tree for Python 3 (r1741723 et al) * Support memcached on Windows with APR-util 1.3 or later (r1674626 et al) * Don't require GNU-specific sed(1) extensions during the build (r1693159) * get-deps.sh: download Googlemock and Googletest from GitHub (r1746303) * windows: Add autodetection for 'zlibstat.lib' (r1783704) * windows: Compile libsvn_fs_* as DLLs (r1696758, -83) * windows: Allow building against OpenSSL 1.1.0 (r1814724 et al) * OS X: Silence compile-time deprecation warnings with SASL (r1739649) * OS X: Silence ranlib warnings about disabled WIN32 code (r1809792) * 'make check GLOBAL_SCHEDULER=1' will run many tests in parallel (r1716399) * unix: New '--enable-apache-whitelist' configure script option (r1732294) * OS X: Support 'configure --enable-runtime-module-search' (r1677273) * tests: Allow tests to be run over HTTP/2 (r1710707) * tests: httpd compile-time and run-time version may differ (r1808955 et al) * tests: Add pre-cooked repos for all FSFS versions. (r1816402 et al) * tests: Add FSFS_DIR_DELTIFICATION option. (r1813897) * Add basic tests for svn_xml_parser_t API (r1765214) * Unbreak the test suite on Python 3 (r1743034, -81, et al) * Make the test suite work when checked out of a git repository (r1771118) * Allow Apache HTTPD with mod_deflate in testsuite on Windows (r1758776) * Support modern utilities for finding free TCP ports for tests (r1684649) * The C test scheduler is more efficient in SMP environments (r1775555) * The C tests convert paths from/to UTF-8 more efficiently (r1775642) * Add INSTALL instructions for building with OpenSSL 1.1.0 (r1778313) * Improved INSTALL instructions for Windows (r1703470, -2, -3, -4, et al) * Updated INSTALL instructions (r1691712) * windows: Support Visual Studio 2017 (r1786653, r1786669) * gnome-keyring: Support libsecret in preference to libgnome-keyring (r1798004) * kwallet: Support KDE 5 in preference to KDE 4 (r1798731) * kwallet: Fix KDE5 support with clang 3.8 (r1802536 et al) * kwallet: Add --with-kwallet=INCDIR:LIBDIR build option (r1802646) * Rename cxxhl bindings 'make tests' to avoid confusion with 'make test' (r1800849) * 'make check': Allow testing with FSFS compression (r1801936) * svnserveautocheck.sh: Support out-of-tree builds when running a single test file (r1802081) * Distribution artifacts now prepared with swig 3.0.10 (r1802135) * SQLite: Use https:// links to download amalgamation sources (r1817043) * Create reproducible tarballs (r1804618 et al) * Disable static builds of the apache and auth provider modules (r1802612) * utf8proc: Update to version 2.1.0 (r1809090 et al) * utf8proc: Build against the system library by default (r1803210 et al) - API changes: * New svn_client_conflict_* API functions for the new conflict resolver. * New svn_repos_fs_get_mergeinfo2() with streamy access (r1780810 et al) * New streamy svn_repos_get_logs5() API function (r1730389, -1163) * New streamy svn_fs_paths_changed3() API function (r1727822, r1745055) * New svn_client_list4() API function (r1767186) * New svn_ra_list() API function (r1767190) * New svn_repos_list() API function (r1765088) * New svn_stream_contents_checksum() API function (r1755486, -6651) * New svn_io_file_get_offset() API function (r1719269) * New svn_base64_encode2 API function (r1711517) * New svn_fs_create2() API function (r1710631) * New svn_string_from_stream2() API function (r1710065) * New svn_io_write_atomic2() API function (r1703142) * New svn_stream_for_stdin2() API function (r1702983) * New svn_io_file_rename2() API function (r1701017) * New svn_error_quick_wrapf() API function (r1662668) * New svn_repos_path_change_t type (r1802114) * New svn_repos_log_entry_t type (r1802114) * New svn_cstring_join2() API (r1806041) * New svn_txdelta_to_svndiff_stream() API (r1803140 et al) * svn_repos_parse_dumpstream3() now accepts NULL pointers (r1700180) * Return resettable streams from svn_stream_checksummed2(). (r1804807) * Fix svnserveautocheck&davautocheck when time is only a built-in (r1665652) - Bindings: * Configure the swig bindings only if swig has been enabled (r1751167) * Error if 'configure --with-swig' is used and swig is not found (r1700844) * Perl: Fix build with libraries in non-standard LD_LIBRARY_PATH (r1781588) * JavaHL can now get revision properties along with log messages (r1780819) * JavaHL: Allow access to constructors of a couple JavaHL classes (r1739704) * JavaHL: Correct some JNIEntry method names (r1706738) * Allow swig bindings scripts to configure the FSFS cache (r1709922) * Disable some swig wrappers that aren't working (r1700966) * JavaHL: Make StringArray nullable (r1785429) * JavaHL: Add missing exception checks (r1801108) * Ruby: Fix handling of NULL MD5 digests (r1811786) * Ruby: Detect versions up to 2.4 (r1806570) +Version 1.9.9 +(20 Jul 2018, from /branches/1.9.x) +http://svn.apache.org/repos/asf/subversion/tags/1.9.9 + + User-visible changes: + - Client-side bugfixes: + * Fix SEGV for 'svn export -rN WC' with relative externals (r1803755) + * Fix issue #4677: 'svn up' after a directory replaced a file (r1814248) + * Fix segfault when no home directory is available (r1819199) + * Performance: Make 'svn info' fast on old repository revisions (r1827690) + * Fix RA-serf problem with proxy username and password (r1833571) + + - Server-side bugfixes: + * svnadmin: Fix false errors on some valid LOCK_PATH arguments (r1803754) + * Fix crash when exiting 'svnserve --config-file' (r1824405) + * Fix issue #4722: false "filesystem is corrupt" error on commit (r1827688) + * Reword confusing "nested" wording in an httpd.conf warning (r1835700) + + - Bindings bugfixes: + * swig-py: svn.core.Stream supports raw binary file-like objects (r1820620) + * swig-rb: Don't crash if svn_md5_digest_to_cstring returns NULL (r1823805) + + Developer-visible changes: + - General: + * Fix CVE-2017-9800: Malicious server can execute arbitrary command on client (r1804698) + * Fix test failure if compile- and run-time HTTPD versions differ (r1820523) + + - API changes: + (none) + + +Version 1.9.8 +(Not released; see changes for 1.9.9.) + + Version 1.9.7 (10 Aug 2017, from /branches/1.9.x) http://svn.apache.org/repos/asf/subversion/tags/1.9.7 User-visible changes: - Client-side bugfixes: * Fix arbitrary code execution vulnerability CVE-2017-9800 See for details. - Server-side bugfixes: (none) - Bindings bugfixes: (none) Developer-visible changes: - General: (none) - API changes: (none) Version 1.9.6 (5 Jul 2017, from /branches/1.9.x) http://svn.apache.org/repos/asf/subversion/tags/1.9.6 User-visible changes: - Client-side bugfixes: * cp/mv: improve error message when target is an unversioned dir (r1779948) * merge: reduce memory usage with large amounts of mergeinfo (issue #4667) - Server-side bugfixes: * 'svnadmin freeze': document the purpose more clearly (r1774109) * dump: fix segfault when a revision has no revprops (r1781507) * fsfs: improve error message upon failure to open rep-cache (r1781655) * fsfs: never attempt to share directory representations (r1785053) * fsfs: make consistency independent of hash algorithms (r1785737 et al) This change makes Subversion resilient to collision attacks, including SHA-1 collision attacks such as . See also our documentation at and . - Client-side and server-side bugfixes: * work around an APR bug related to file truncation (r1759116) - Bindings bugfixes: * javahl: follow redirects when opening a connection (r1667738, r1796720) Developer-visible changes: - General: * win_tests.py: make the --bin option work, rather than abort (r1706432) (regression introduced in 1.9.2) * windows: support building with 'zlibstat.lib' in install-layout (r1783704) - API changes: (none) Version 1.9.5 (29 Nov 2016, from /branches/1.9.x) http://svn.apache.org/repos/asf/subversion/tags/1.9.5 User-visible changes: - Client-side bugfixes: * fix accessing non-existent paths during reintegrate merge (r1766699 et al) * fix handling of newly secured subdirectories in working copy (r1724448) * info: remove trailing whitespace in --show-item=revision (issue #4660) * fix recording wrong revisions for tree conflicts (r1734106) * gpg-agent: improve discovery of gpg-agent sockets (r1766327) * gpg-agent: fix file descriptor leak (r1766323) * resolve: fix --accept=mine-full for binary files (issue #4647) * merge: fix possible crash (issue #4652) * resolve: fix possible crash (r1748514) * fix potential crash in Win32 crash reporter (r1663253 et al) - Server-side bugfixes: * fsfs: fix "offset too large" error during pack (issue #4657) * svnserve: enable hook script environments (r1769152) * fsfs: fix possible data reconstruction error (issue #4658) * fix source of spurious 'incoming edit' tree conflicts (r1760570) * fsfs: improve caching for large directories (r1721285) * fsfs: fix crash when encountering all-zero checksums (r1759686) * fsfs: fix potential source of repository corruptions (r1756266) * mod_dav_svn: fix excessive memory usage with mod_headers/mod_deflate (issue #3084) * mod_dav_svn: reduce memory usage during GET requests (r1757529 et al) * fsfs: fix unexpected "database is locked" errors (r1741096 et al) * fsfs: fix opening old repositories without db/format files (r1720015) - Client-side and server-side bugfixes: * fix possible crash when reading invalid configuration files (r1715777) - Bindings bugfixes: * swig-pl: do not corrupt "{DATE}" revision variable (r1767768) * javahl: fix temporarily accepting SSL server certificates (r1764851) * swig-pl: fix possible stack corruption (r1683266, r1683267) Developer-visible changes: - General: * add zlib discovery through pkg-config (issue #4655) * fix potential build issue with invalid SVN_LOCALE_DIR (issue #4653) * ruby: fix test failures with ruby >= 2.2 (r1766240) * fix link error with --disable-keychain on OS X (r1761755) * swig: enable building with SWIG >= 3.0.6 (r1721488 et al) * swig: fix building with -Wdate-time in $CPPFLAGS (r1722164) * update serf download URI in build scripts (r1700130 et al) * raise minimal httpd version from 2.0 to 2.2 (r1754190) Version 1.9.4 (28 Apr 2016, from /branches/1.9.x) http://svn.apache.org/repos/asf/subversion/tags/1.9.4 User-visible changes: - Client-side bugfixes: * diff: support '--summarize --ignore-properties' (part of issue #4567) * checkout: fix performance regression on NFS (r1710167) * gpg-agent: properly handle passwords with percent characters (issue #4611) * svn-graph.pl: fix assertion about a non-canonical path (r1729060 et al) * hot-backup.py: better input validation (r1721174, r1721175) * commit: abort on Ctrl-C in plaintext password prompt (issue #4624) * diff: produce proper forward binary diffs with --git (r1704292, r1704573) * ra_serf: fix deleting directories with many files (issue #4557) - Server-side bugfixes: * mod_authz_svn: fix crash in COPY/MOVE authorization check (CVE-2016-2168) * svnserve/sasl: fix authenticating users with wrong realm (CVE-2016-2167) * improve documentation for AuthzSVNGroupsFile and groups-db (r1730856) * fsfs: reduce peak memory usage when listing large directories (r1725180) * fsfs: fix a rare source of incomplete dump files and reports (r1717876) - Client-side and server-side bugfixes: * update INSTALL documentation file (r1703470 et al) * fix potential memory access bugs (r1722860 et al) * fix potential out of bounds read in svn_repos_get_logs5() (r1738259) - Bindings bugfixes: * ignore absent nodes in javahl version of svn status -u (r1720643) Developer-visible changes: - General: * fix ruby test suite to work with test-unit gem (r1714790) * allow building against KDE4 without conflict with KDE5 (r1734926) * fix update_tests.py#76 with SVNPathAuthz short_circuit (r1736432) * tweak getting symbolic error names in maintainer mode (r1735179) * fix inconsistent behavior of inherited property API (r1717874 et al) - API changes: * properly interpret parameters in svn_wc_get_diff_editor6() (r1728308) Version 1.9.3 (15 Dec 2015, from /branches/1.9.x) http://svn.apache.org/repos/asf/subversion/tags/1.9.3 User-visible changes: - Client-side bugfixes: * svn: fix possible crash in auth credentials cache (r1705328) * cleanup: avoid unneeded memory growth during pristine cleanup (r1706241) * diff: fix crash when repository is on server root (r1705060 et al) * fix translations for commit notifications (r1709389, r1709562) * ra_serf: fix crash in multistatus parser (r1706323, r1706324) * svn: report lock/unlock errors as failures (r1701598 et al) * svn: cleanup user deleted external registrations (r1705843, r1710558) * svn: allow simple resolving of binary file text conflicts (r1703581) * ra_serf: report built- and run-time versions of libserf (r1704847) * ra_serf: set Content-Type header in outgoing requests (r1715224 et al) * svn: fix merging deletes of svn:eol-style CRLF/CR files (r1703689 et al) * ra_local: disable zero-copy code path (r1718167) - Server-side bugfixes: * mod_dav_svn: fix heap overflow with skel-encoded requests (CVE-2015-5343) * mod_authz_svn: fix authz with mod_auth_kerb/mod_auth_ntlm (issue #4602) * mod_dav_svn: fix display of process ID in cache statistics (r1709553) * mod_dav_svn: use LimitXMLRequestBody for skel-encoded requests (r1687812) * svnadmin dump: preserve no-op changes (r1709388 et al, issue #4598) * fsfs: avoid unneeded I/O when opening transactions (r1715793) * svnlook: properly remove tempfiles on diff errors (r1711346) - Client-side and server-side bugfixes: * fix heap overflow in svn:// protocol parser (CVE-2015-5259) - Bindings bugfixes: * javahl: fix ABI incompatibilty with 1.8 (r1710104) * javahl: allow non-absolute paths in SVNClient.vacuum (r1710215, r1710290) Developer-visible changes: - General: * fix patch filter invocation in svn_client_patch() (r1706783) * add @since information to config defines (r1706983, r1706999) * fix running the tests in compatibility mode (r1706375) * clarify documentation of svn_fs_node_created_rev() (r1717154) - API changes: * fix overflow detection in svn_stringbuf_remove and _replace (r1714358) * don't ignore some of the parameters to svn_ra_svn_create_conn3 (r1714314) Version 1.9.2 (30 Sep 2015, from /branches/1.9.x) http://svn.apache.org/repos/asf/subversion/tags/1.9.2 User-visible changes: - Client-side bugfixes: * svn: fix crash when saving credentials in kwallet (r1700740, r1700951) * checkout/update: fix "access denied" error on Windows (r1701064 et al) * update: fix crash when updating a conflicted tree (r1702198, r1702200) * commit: fix possible crash (r1702231) * ra_serf: do not crash on unexpected 'X-SVN-VR-Base' headers (r1702288) * merge: fix crash when merging to a local add (r1702299 et al) * svnmucc: fix error during propset+put for existing file (r1702467 et al) * update: fix crash without .svn/tmp folder (r1701838, r1702203) * checkout: remove unnecessary I/O operation (r1701638) * merge: fix possible crash (r1701997) * update: fix crash with some of the incoming deletes (r1702247) * upgrade: fix crash for pre-1.3 wc with externals (r1702218 et al) * revert: fix crash when reverting the root of a move (r1702237 et al) * svn: do not crash upon specific database corruptions (r1702974, r1702991) * svn: show utf8proc version in svn --version --verbose (r1702533, r1702891) - Server-side bugfixes: * fix reporting for empty representations in svnfsfs stats (r1698312 et al) Developer-visible changes: - General: * fix svnfsfs_tests.py in fsfs-v4 and fsfs-v6 modes (r1700215 et al) - API changes: * disable unsupported operations for standard streams (r1701633 et al) Version 1.9.1 (02 Sep 2015, from /branches/1.9.x) http://svn.apache.org/repos/asf/subversion/tags/1.9.1 User-visible changes: - Client-side bugfixes: * Fix crash with GPG-agent with non-canonical $HOME (r1691928, issue #4584) * Fix checkout errors with svn+ssh:// on Windows (r1696222, r1696225) * svn: expose expat and zlib versions in svn --version --verbose (r1696387, r1697664) * svn: improve help text for 'svn info --show-item' (r1698106) - Server-side bugfixes: * svnserve: fixed minor typo in help text (r1694023) * Enable caching with memcached on Windows (1674626, r1674785) * Fix an error leak in FSFS verification (r1693886) * Fix incomplete membuffer cache initialization (r1695022) * svnfsfs: fix some bugs and inconsistencies in load-index (r1697381 et al.) - Client-side and server-side bugfixes: * Fix alignment fault in ra_svn on 32 bit SPARC machines (r1697914) - Bindings bugfixes: * Fix memory corruption in copy source SWIG bindings (r1694929) Developer-visible changes: * Better configure-time detection of httpd version and authz fix (r1687304 et al.) * Correct a parameter name in svn_repos_get_fs_build_parser5 (r1694194) * Resolve circular library reference in libsvn_fs_x (r1696695) * Fix Unix build on systems without GPG agent (r1694481, r1697824) Version 1.9.0 (5 Aug 2015, from /branches/1.9.x) http://svn.apache.org/repos/asf/subversion/tags/1.9.0 User-visible changes: - General: * make all commands provide brief description in help output (r1522518) * flush stdout before exiting to avoid information being lost (r1543868) - Major new features: * fsfs: new format 7 with more efficient on-disk layout (r1547045 et al) * blame: support showing prospective as well as previous changes * info: support printing of individual values with --show-item (r1662620) * svn auth: new subcommand to manage cached credentials and certs * svnserve: cache config and authz to lower resource usage and be able to serve large numbers of connections with a limited number of threads * membuffer: quadruple the maximum cacheable directory size (r1545948 et al) * new filesystem fsx (faster, smaller); experimental - see release notes - Minor new features and improvements: * new 'diff-ignore-content-type' runtime configuration option * new option for 'svnadmin verify': --check-normalization * new option for 'svnadmin verify': --keep-going * svnadmin info: new subcommand to print info about a repository * print summary of conflicts before/after interactive conflict resolution * import: reduce number of connections to the server needed (r1482962) * membuffer: rework cache eviction heuristics (r1476664 et at) * membuffer: improved cache usage statistics (r1489883) * mergeinfo: new '--log' option (r1492168) * svnadmin upgrade: progress and cancellation support (r1495545, r1495566) * cleanup: add '--remove-unversioned' and '--remove-ignored' (issue #3549) * cleanup: add '--include-externals' option (issue #2325) * cleanup: add '--quiet' option (r1498661) * svnadmin load: speedup by setting revprops in one call (r1504079) * svnadmin load: set svn:date revprop in the initial commit (r1504951) * reimplement UTF-8 fuzzy conversion using utf8proc (r1511676) * svnadmin verify: speed up for repos with large directories (r1520419) * svn merge: interactive conflict resolver tries external tools (r1524145) * minor speed up in string to time conversion (r1533387) * windows: speed up console output (r1533994) * update: optimize wc db usage when obtaining children (r1537065 et al) * decreased overhead for case-sensitive configuration access (r1538068) * avoid re-opening repo for in-repo authz if already open (r1538120) * svnserve: output errors in a more standard way (r1544250) * faster parsing of config file comments (r1544716) * avoid trying to open the hooks-env file when it doesn't exist (r1544721) * svnserve: provide the same logging detail in "run once" mode as provided in the log file (r1544731) * svnserve: reduce connection latency (r1544732) * wc: reduce the number of locks and transactions required (r1545127 et al) * cat: add '--ignore-keywords' option (r1547517) * merge and mergeinfo: use fewer RA sessions (r1552265) * fsfs: limit delta chains from crossing too many shards (r1554942) * fsfs: option to configure compression level in deltas (r1559748) * fsfs: enable dir and prop deltas by default for formats that support it (r1555286) * fsfs: avoid out of date errors from files in a directory changing when you change a property on the directory (issue #2118) * fsfs: temporary transaction properties are preserved when commit is interrupted (r1549907 et al) * fsfs: speed up transaction creation (r1544719) * fsfs: avoid trying to open lock digest files that don't exist (r1544721) * fsfs: reduce internal overhead by using sorted array instead of hash for directory representation (r1554711) * fsfs: skip decoding txdelta windows that are already cached (r1555284) * fsfs: avoid constructing fulltext when delta we need is stored (r1555297) * fsfs: improvements to format 6 reading/writing (r1517479) * fsfs: reduce overhead of parsing noderev structures (r1544717) * fsfs: speed up node relation comparison (r1554807) * fsfs: speed up critical open_path() call (r1483301 et al) * fsfs: speed up node verification (r1520421 et al) * fsfs: speed up serialization into cache buffer format (r1505056) * fsfs: avoid caching intermediate fulltexts (r1565100) * fsfs: reduce lock contention on txn-list-lock (r1569549) * svnadmin: don't display warnings as errors (r1556297) * ra_serf: avoid caching properties in the update editor (r1557538) * ra_serf: decrease latency of requests to get directory contents by pipelining requests, speeds up 'svn ls --include externals' and some cases of multi-url diff, including merge (r1557548) * ra_serf: spool small update reports in memory to avoid making temp files for small requests (r1557599) * ra_serf: allow the reuse of serf connections after an error (r1553341) * ra_serf: improve many error messages (r1551910 et al) * ra_serf: pipeline lock/unlock requests (r1551918, r1551993, r1552008) * ra_serf: pipeline requests for inherited properties against old servers that don't support the faster REPORT (r1552455, r1552475) * ra_serf: allow reuse of sessions after a canceled request (r1557686) * ra_serf: reduce memory usage when retrieving revision props (r1557689) * mod_dav_svn: make out of date error message consistent with generic repos logic (r1558247) * allow SQLite to optimize functions that are deterministic (r1559352) * speed up delta calculations on non-deltifyable sections (r1559767) * ra_serf: improve memory usage in commit processing (r1520028) * report progress as cumulative across all sessions (issue #3260) * ra_serf: don't send DAV headers with GET requests (r1517472) * mod_dav_svn: SVNCacheTextDeltas defaults to on (r1517479) * fs: improve scalability of fs_open and similar functions (r1523450 et al) * svnserve: improve performance and scalability (r1523465 et al) * svnadmin verify: output progress messages to stdout (r1471095) * svnadmin crashtest: make output less misleading (r1486046) * mod_dav_svn: discover copy to src earlier in some cases (r1537440) * speed up mergeinfo parsing (r1483292, r1483309 et al) * optimize hash lookups used in mergeinfo and caching (r1483434 et al) * log: optimize string handling in repos layer (r1483570, r1483572) * ask disk hardware to sync instead of only syncing to hardware buffers when OS supports it (r1484439, r1484445) * optimize diff code to avoid unneeded comparisons (r1485488) * optimize check if relpaths are canonical (r1485496, r1489828) * ra_svn: reduce protocol implementation overhead (r1485499, r1485504 et al) * optimize file translation without keyword substitution (r1486058) * optimize config file parsing by using unbuffered I/O (r1486897) * patch: apply ignore settings when deciding to delete dirs (r1490378) * use a cheaper RA operation for common client calculation (r1496468 et al) * ra_svn: avoid unnecessary work when doing a blame (r1503046) * optimize reading files into memory if size is known (r1505068) * copy: do not error on properties when doing a foreign copy (r1563361) * membuffer: reduce memory usage by using shorter lived pools (r1564217) * svnadmin load: add '--ignore-dates' option (r1564789) * update: reduce sessions used with '--parents' option (r1565920) * diff: report properties on deleted nodes (r1569320, r1570055) * diff: switch to diff processor APIs instead of old style callbacks, step towards resolving long standing bugs and feature requests (r1569551 et al) * diff: use the proper revision in headers for addition and deletion of files (r1570053) * svnadmin lslocks: add cancellation (r1571992) * svn --version: list available authentication credential caches (r1572106) * fs: improved detection of changes between two nodes, this should reduce the number of out of date errors clients see (r1572336) * allow the use of libmagic to be configured via subversion configuration file or SVN_CONFIG_OPTION_ENABLE_MAGIC_FILE env variable (r1572916) * new '--pin-externals' option for svn copy (issue #1258) * the '--strict' option was renamed '--no-newline' (r1662224) * merge/update: switch to three-way text conflict markers (r1591951, r1595522) * patch: handle renames in git formatted patches (r1594636) * svnfsfs: new expert tool (r1594860) * mod_dav_svn: allow server admin to GET the FSFS global cache stats (r1595160) * diff: support git-like binary file diffs with '--git' (r1599552) * diff: support arbitrary context size for internal diff tool with '-U' option (r1603847, 1603871) * commit: print progress notification between client finishing transmitting text deltas and asking server to commit (r1604179) * fsfs: optimize log commands for repos on Windows by not using a locale specific function to parse ids (r1605123) * fsfs: reduce memory usage of reading/writing changed paths caches (r1605188 et al) * mod_dav_svn: log post-commit errors to httpd error log as well as returning them to client (r1606004) * make server config groups work with svn:// URLs (issue #4512) * svnadmin hotcopy: report progress when copying revisions and packed shards for FSFS repositories (r1613339) * info: show revisions for missing tree conflicts (r1617932) * fsfs: avoid shared data clashes due to multiple distinct repositories having identical UUIDs (r1618138 et al) * status: ignore thumbs.db files by default (r1620955) * fsfs: harden parsers against data corruption (r1622931, r1622937, r1622942) * diff: respect svn:keywords and svn:eol-style when doing arbitrary diffs (r1623820) * ra_serf: reduce size of XML generated for reports (r1627333) * replace generic --trust-server-cert with more specific options to override specific certificate failures (r1630117 et al) * commit: improve speed of commits with many files (r1630312 et al) * svnadmin setrevprop: add '--transaction' option (r1631435) * svnadmin delrevprop: new subcommand (1592723) * svnadmin verify: validate the index data against checksums (r1631598) * svnadmin verify: new option '--metadata-only' (r1593753) * cp: improve performance of local copies (r1632284, et al) * fsfs: speed up operations that use revision properties (r1634875, r1634879) * checkout/update: use fewer RA sessions (r1635753 et al) * log: do less work when '--with-no-revprops' is used (r1642231) * patch: improve command to be more capable as compared to GNU patch (issue #4533) * limit server caches to avoid running out of memory if server admin configured caches larger than supported by the platform (r1645572) * mod_authz_svn: log implicit read access failures with INFO log level; Explicit read access failures are still logged with ERROR log level (r1653032) * ra_serf: reduce memory usage by removing some extra intermediary state (r1654681, r1654690) * revert: improve performance on large working copies without changes (r1657083) * ra_svn: improve efficiency of editor processing (r1658194 et al) * merge: provide different conflict reasons for local additions and unversioned obstructions (r1659381) * windows: improve checkout performance on windows by using sqlite truncate journal mode rather than delete (r1659426) * status: now accept '-r' argument (r1671164, 1672578, 1673228) * ls: improve performance of '-v' on tag directories (r1673153) * resolve: improve conflict prompts for binary files (r1667228 et al) * fsfs: improve error messages for parsing errors (r1678147, r1678149) * warn when the '--config-option' FILE:SECTION:OPTION combination may be invalid. (r1674301 et al) * ensure full key matching in membuffer cache (r1678950 et al) * mod_dav_svn: expose cache statistics via HTTP (r1595160) - Client-side bugfixes: * export: fix problem exporting symlinks on windows (r1476093) * fix non-ascii character handling of command line options (r1476461) * log: strip EOL marker only after converting to UTF-8 (r1476608) * ra_serf: avoid dropping errors when making a lock request (r1489526) * ra_serf: fix an error leak in update logic (r1499686) * windows: fix issues with wcs in symlinked folders (r1501251) * fix regression that broke parallel nested checkouts (issue #4390) * svnmucc: ignore leading r in revision number arguments to -r (r1502636) * mkdir: use absolute paths to avoid Windows path length limits (r1516816) * avoid encoding support code when C runtime doesn't support it (r1530582) * ra_svn: add check against dirents with path separators (r1533812) * properly delete temporary files when atomic write fails (r1537466) * wc: fix corner cases in move-update tree conflicts (r1538639 et al) * windows: fix crash report indentation for x64 reports (r1543589) * mergeinfo: allow to work on a moved target (issue #4301) * windows: avoid delay when no homedir is available (r1546814) * status: report externals in a deterministic way (r1550200) * copy: avoid an unneeded extra RA session for wc to repo case (r1551564) * ra_serf: show pre-revprop-change failure on revprop delete (issue #3086) * svnsync: avoid extra request at end of every revision sync (r1553370) * ra_serf: fix replace + propset of locked file failures (issue #3674) * ra_serf: prevent overwriting directory during copy (issue #3314) * commit: limit number of temporary files open at same time (issue #4172) * ra_serf: verify incoming integers are really integers (r1557709 et al) * log: -g --xml doesn't differentiate between forward and reverse merges (issue #4463) * windows: improve update and checkout speed (issue #4450) * log: reduce performance penalties of using -g (r1559912) * blame: reduce performance penalties of using -g (r1560112) * ra_local: set svn:txn-user-agent for consistency (r1498608) * ra_svn: use the stream API properly for communications (r1562072) * update: provide error when none of targets are wcs (r1565388) * wc: reduce dependence on unspecified SQLite behavior (r1567080 et al) * diff: fix diffing directory without permissions to read parent (r1569265, r1569290) * diff: improve resolving peg revisions (r1570205 et al) * diff: fix bug in calculating header paths (r1570584) * ra_serf: add SSL certificate issuers common name to output (r1573728) * updates keywords in files not modified during 'svn switch' (issue #1975) * svnmucc: Normalize line endings with '-F' and '-m' options (r1592148, r1592150) * fix problems with read-only authentication caches (issue #4504) * commit: don't bump just locked files (r1603617) * log: reduce memory with '-v' (r1604569 et al) * diff: fix diffing locally deleted nodes under copied directories (r1605832) * diff: fix missing node error when diffing a replaced node (r1605866) * propget: forbid using 'show-inherited-properties' with 'strict' (r1611698) * windows: avoid delay when user profile isn't writable (r1617926) * merge: display the correct node kinds for tree conflicts (r1618024, r1619418, r1619717) * diff: show the correct revisions in the header (r1619452) * diff: fix missing header for files with only property changes (r1619476) * update: raise a tree conflict rather than an obstruction when an incoming server-excluded node conflicts with a locally added node (r1619495) * update: improve tree conflict reason and action descriptions (r1619777) * ra_serf: fix stalls during checkout/update over http/https (r1621596) * svnmucc: don't crash when '--version' is used with other arguments (r1625496) * checkout: report svn:externals failures via the exit code as other commands already do (r1628398) * svn & svnlook: use the right error code when fputs() fails (r1630369) * export: reject peg specifiers on local destination path (r1635085) * don't reject command-line arguments in the form of ".@abc", where "abc" is a peg specifier that may be empty (r1635118) * fix directory externals not following history (issue #4529) * remove 'df' and 'm' options from the interactive conflict resolver for binary files (r1645578) * mergeinfo parsing: allow source path to be empty (issue #4537) * mkdir: when using '--parents' don't add entire contents recursively if target already exists (r1649951) * resolve errors with move of a nested delete (r1651980, r1651997) * update: prevent breaking a working copy when a directory is replaced with an external to a foreign repository (issue #4550) * update: prevent an invalid wc state when applying a move (r1652184 et al) * resolve: fix a segfault when breaking a move inside a delete (issue #4491) * ra_serf: don't handle a commit that didn't produce a new revision as a successful commit (r1653532) * export: fix the lack of notifications when starting to handle externals (issue #4527) * update: fix a case where we reported an error rather than a tree conflict (r1655017) * info: Use local platform style paths in all cases (r1659283) * handle lack of a configuration file properly (r1660369) * update: resolve issues with tree conflicts caused by an incoming delete removing a mixed revision tree (r1660742) * don't hold onto locks of deleted paths in the client on commit (r1661363) * info: fix url calculation for a few statuses (r1661476) * update: when using '--set-depth' avoid removing local changes (r1661585) * update: fix tree conflict detection on unversioned nodes that exist where there used to be a deleted node (r1661664) * status: display tree conflicts even if the node with the tree conflict is shadowed by a file (r1662331) * pre-1.6 wc compatibility: fix with obstructed working copies (r1662412) * resolve: allow directly resolving tree conflicts (r1658435) * copy: when copying from a wc to a url show all the changes (r1655729) * info: provide results in a stable order (r1662030) * revert: allow depth limited reverts of nodes that only have not-present and/or excluded child nodes (r1662091) * wc: fix calculating repo path after commits of nodes that shadow a switched (not-present) node (r1663991, r1666258, r1674032) * update: resolve assertion on bad update report involving incomplete status (r1663671, r1666832) * update: allow a real file to replace a file external (r1664035) * merge: raise a tree conflict on root of obstructing dir (r1666690) * cp: fix 'svn cp ^/A/D/H@1 ^/A' to properly create A (r1674455, r1674456) * status: fix incorrect output with file externals (issue #4580) * merge: fix part of issue #4582 (r1686175, r1687029, r1688258) - Server-side bugfixes: * svnserve: don't ignore socket initialization errors (r1544253) * svnserve: don't hide fatal errors in inetd and tunnel modes (r1544256) * fsfs: log repo path in local style for cache init failure (r1494314) * fsfs: fix potential transaction corruption (r1519624) * svnserve: fix logging in multi-threaded servers (r1523502) * fsfs: don't report out of date errors due to FS corruption (r1527084) * svnadmin verify: detect inconsistencies that prevent loading (r1536854) * mod_dav_svn: use 404 status for errors caused by invalid URIs (r1542063) * mod_dav_svn: use 404 when the repository doesn't exist (r1544259) * mod_dav_svn: use 'dav_svn:' prefix for filename instead of 'svn:' (r1544711) * mod_dav_svn: XML escape lock tokens (r1547427) * hotcopy: don't create config files when copying pre-1.5 repos (r1547454) * hotcopy: preserve the rep-cache.db permissions when hotcopying (r1547877) * mod_dav_svn: fix SVNCacheTextDeltas and SVNAdvertisV2Protocol directive merging (r1548124) * mod_dav_svn: always produce an error text even when text specifies the default message to make diagnosing issues easier (r1553441) * mod_dav_svn: fix some pool lifetime issues with error messages (r1553868) * mod_dav_svn: avoid setting option headers multiple times (r1557103) * fsfs: prevent some commits that could cause future corruption (r1560673) * cache: fix premature eviction due to 64-bit underflows (r1567996 et al) * svnserve: fix potential integer overflow in Cyrus SASL support (r1570434) * bdb: fix potential integer overflow and underflow (r1570701) * bdb: prevent silent propogation of some corruption (r1570778) * svnadmin hotcopy: do not corrupt db/current contents when copying old FSFS repos (r1603485) * svnadmin hotcopy: don't produce broken copies when a concurrent pack happens (r1605633) * log: reduce memory consumption of '-v' (r1605195) * mod_dav_svn: fix performance issue on Windows with named atomics (r1611379) * log: fix a segfault in handling changed paths (r1615364) * mod_dav_svn: properly forward post-lock/post-unlock failures (r1622235) * diff: fix handling of depth empty in added directories (r1622024) * fix a segfault with corrupted changed path lists that try to add root nodes (r1622944) * svnadmin verify: report errors nicely rather than possibly aborting (r1622955) * svnlook propget: report transaction name rather than revision number in errors if run with '-t' option (r1623317) * svnadmin verify: prevent stack overflow conditions in corrupted repositories (r1623398) * fsfs upgrade: fix an issue that could block an upgraded format 1 or 2 repository from being committed to (r1624011) * fs backends: fix memory lifetime issue (r1632646) * bdb: output correct checksum in error message about corruption (r1640707) * fsfs: fix a pool lifetime error related to transaction local caches (r1643139, 1643233) * fsfs: avoid "random DAG walks" during checkout over ra_serf (r1645567) * fsfs/bdb: reduce memory use during tree deletions (r1647820, r1655022) * mod_authz_svn: fix unbounded memory use when SVNPathAuthz short_circuit is used (r1647887) * fsfs: reduce memory use when walking back in history (r1648230) * dump: remove incorrect kind header on replaced nodes (issue #4553) * dump: remove duplicate headers for replace-with-copy (issue #4552) * mod_dav_svn: don't send XML-unsafe characters in svn:author (issue #4415) * dump: don't write broken dump files in some ambiguously encoded fsfs repositories (issue #4554) * mod_dav_svn: provide a more intuitive error message to the client when trying to create a directory that already exists (issue #2295) * fsfs: fix uninitialized memory use in lock/unlock code (r1657525) * fix a segfault executing a pre-commit hook with legacy locks (r1657893) * mod_dav_svn: do not ignore skel parsing errors (r1658168) * fsfs: fix multiple reporting of the same lock (r1658482) * fsfs: fix pool lifetime issue in lock handling (r1659314) * mod_dav_svn: properly log assertions and malfuctions (r1660480) * svnadmin load/dump: preserve deletion of svn:date from r0 (issue #4563) * svnrdump: don't provide HEAD+1 as base revision when loading deletes (r1664684) * mod_dav_svn: improve error message sent with a 405 status code (r1665195, r1666096, r1666379) * make detection of invalid base revision on commit behave the same on all RA layers (r1664664, r1664672, r1664674) * mod_dav_svn: emit the first few log items as soon as they are available (r1666965, r1667120) * mod_dav_svn: prevent a tree walk on copy sources (issue #4351) * fsfs: fix 'EOF found' error when reading repo (issue #4577) * svnadmin freeze: unlock rep-cache.db as part of unfreezing (r1679169, r1679287) * fsfs: improve stability in the presence of power or network disk failures during 'svnadmin pack' (r1683378) * detect invalid svndiff data earlier (r1684077) - Client-side and server-side bugfixes: * use less memory when retrieving extension from filename (r1548480) * use more optimal code path with old txdelta v1 data (r1485480) * windows: allow opening SQLite databases on long paths (r1564338) * fix an out-of-bounds read in the delta combiner (r1569415) * fix a number of cases of undefined behavior when passing invalid arguments to memcpy() (r1632530, et al) * windows: avoid a 12 second delay due to a retry loop in some error conditions when opening a file (r1657583) - Other tool improvements and bugfixes: * windows: add build-svn-deps-win.pl tool to build dependencies (r1467715) * svnpubsub: add support for revprop changes (r1486463) * svnpubsub: do not pass svn commands through shell (r148466, r1486467) * svnpubsub: hooks exit with an error if they fail (r1486500, r1486597) * svnpubsub: hooks use "--" to signal end of arguments (r1486513) * mailer: properly encode mail headers per RFC2047 (r1487532) * svnwcsub: add a pre-update hook, which can deny update (r1494542 et al) * fsfs-stats: count file nodes that are added without history (r1519283) * fsfs-stats: replaced by 'svnfsfs stats' (r1594860) * fsfs-access-map: count empty reads and unnecessary seeks (r1523441) * fsfs-access-map: generate scaled/rectangular heatmaps (r1505065) * fsfs-access-map: deal with strace format issues (r1505065) * fsfs-access-map: update to know about index files (r1505065) * svnbench: renamed from svn-bench (r1659226) * svnbench: add null-info command (r1532196) * svnlook.py: made usable as a library by adding getter methods (r1541558) * svnbench, svnraisetreeconflict, svnauthz, svn-rep-sharing-stats: More consistent error reporting, following pattern of core command-line programs (r1544194) * which-error.py: allow which-error.py to be run from symlink (r1547977) * bash_completion: add svnlook filesize command and options to svn cat, info, and mergeinfo commands (r1569021) * new '--conflict-style' option to standalone diff3 tool (r1591750) * update standalone diff3 tool so it can be used with --diff-cmd directly (r1591871, r1591876) * bash_completion: support for auth command (r1596841) * diff: support '-U' option (r1618618) * svn-rep-sharing-stats: replaced by 'svnfsfs stats' (r1618861) * add svn-vendor.py as an alternative to svn_load_dirs.pl that can auto-detect renames and copies (r1623660) * svnpredumpfilter.py: fix a scalability problem that made run time increase greatly on large repositories (r1625674 et al) * svnpredumpfilter.py: detect copies of copies and handle properly (r1626182) * bash_completion: add svnadmin delrevprop (r1631473) * showchange.pl: removed, obsoleted by 'svn log --diff' (r1631686) * bash_completion: add new trust options (r1660373) * bash_completion: add '--pin-externals' (r1662250) * bash_completion: stop offering deprecated options (r1662291) * bash_completion: add '--show-item' and '--no-newline' (r1662622) * svnbench: add null-blame command (r1673785, r1673803, r1674015) * svnbench: install with default 'make install' (r1685085) Developer-visible changes: - General: * require Python 2.7+ for development and testing (r1691712, r1691713, r1692448) * include symbolic names for error codes in maintainer mode (r1467643) * include symbolic names for warning codes in maintainer mode (r1469855) * support YouCompleteMe vim plugin (r1476374 et al) * cache: add pretend_empty mode for maintainers (r1461689, et al) * allow tests to be run with exclusive wc locks (r1496475) * fix check for Microsoft C/C++ compiler (r1503148) * improve windows build to use pre-built dependencies * optimize ramdrive usage in the windows test runner (r1504511) * SVN_CMDLINE_DISABLE_CRASH_HANDLER env var added for Windows (r1506507) * gen-make.py: support Visual Studio 2013 by --vsnet-version=2013 (r1533907) * windows: don't require APR source when building (r1534037, et al) * don't compile SQLite amalgamation twice (r1536364) * make C tests use same temp path as Python tests (r1536700) * davautocheck: access log logs the r->filename now (r1538048) * added test to detect duplicate SQL queries (r1538962) * windows test runner: copy additional apr dlls (r1539300) * support for debug logging that should be available in serf 1.4.0 (r1541561) * OS X: fix build when Gnome is installed (r1541698) * properly detect if expat is libexpat.lib or xml.lib on windows (r1541981) * doc-clean target works properly with separate build dir (r1542303) * don't break entire test run if cleaning temp directory failed but return an error anyway (r1542817) * windows tests: find java.exe via the sdk if not found via PATH (r1543876) * fix davautocheck with httpd 2.3.x+ and worker/prefork MPMs (r1544302-3) * add parallel mode for C tests (r1545334 et al) * use --bin path for svnrdump when running Python tests (r1548706) * remove unused --with-openssl option from configure (r1548714) * tests: stop rewriting shared authz file for every sandbox (r1552064 et al) * fix unnecessary aborts in maintainer mode on sqlite errors (r1536325) * new --sqlite-logging option for C tests (r1560409) * allow building with APR-2 (r1560586) * remove support for ASM Zlib from Windows build system (r1560864) * gen-make.py: new -D option (r1567046) * improve how we fetch the version of Windows (r1568798, 1568806) * move common code in python tests to library files to avoid side effects of having tests depending on each other (r1570654) * disable compiling on platforms where int is shorter than 32-bits and add the SVN_ALLOW_SHORT_INTS compile definition to override (r1570882) * disable building *.sbr files with Visual C++ 2010 or later (r1571020) * require serf 1.3.4 (r1572261) * require APR and APR-Util 1.3.x (r1572261) * add mod_dontdothat to davautocheck.sh (r1572312) * require Apache httpd 2.2.x (r1572339) * support pkg-config for serf when using a prefix (r1572762) * don't depend on stdbool.h and inttypes.h for utf8proc (r1573069 et al) * avoid non-portable find extensions so the build works on Solaris (r1573780) * Allow PARALLEL value to specify the number of threads to run tests with, PARALLEL=1 means to use the default (r1573320) * pkg-config support for libsvn_* libraries (issue #4435) * binaries built on Mac OS X 10.6+ will not run on older versions (r1651549) * fix random failure of Makefile-based parallel builds on Unix when the amalgamated SQLite is being used (r1658357) * C tests only run with ra_local to avoid duplicate testing (r1609477) * allow skipping the C tests for any RA method (r1609489) * new tools for benchmarking on Windows (r1610264) * svnbench: no longer part of tools but main subversion (r1618860) * improve detection for libtool (r1627276) * check the runtime version of the fs_util library in the fs backends (r1651567) * properly initialize the src_kind value to avoid problems for other API users during a copy (r1655723) * try to improve reliability of applications that do not call svn_dso_initialize2() right after apr_initialize() (r1659604) * add svn-wc-db-tester tool for testing working copies (r1660874) * fix bugs and performance issues using svn_wc_walk_entries3() (r1661110) * support using Python 3 for building (r1661247) * don't add -lstdc++ on FreeBSD 10 (r1662329) * add build support for Visual Studio 2015 (r1663183, r1663184, r1689721 et al.) * fix test failures when running from a directory whose name contains characters that must be escaped when used in a URL. (r1664997) * fix breakage of the serf ra session with svn_ra_get_dir2() and svn_ra_get_log2(). (r1665213, r1665259, r1665609) * resolve a race condition in some test suite cleanup code (r1683303) * fix some tests on non-US default locale on Windows (r1684034) * document the meaning of "XFAIL" for users building from source (r1683071) - API changes: * new RA callbacks for managing ra_svn tunnels: svn_ra_callbacks2_t::check_tunnel_func, svn_ra_callbacks2_t::open_tunnel_func and svn_ra_callbacks2_t::close_tunnel_func * new API for retrieving info about a file system: svn_fs_info() * new API svn_io_file_flush() that wraps apr_file_flush() * new API svn_io_write_atomic(), that writes, sync and renames a file * new API svn_compat_log_revprops_out_string() * deprecate unused datatype svn_ra_get_latest_revnum_func_t * new API svn_client_cleanup2() (r1496954 et al) * new API svn_stringbuf_create_wrap() (r1502248) * new API svn_io_file_aligned_seek() (r1502539) * ra_svn: fix svn_ra_get_log*() to apply limit when server can't (r1503043) * svn_client_commit6: notify which path prevents a mv commit (r1503662) * new APIs svn_io_file_create_empty() and svn_io_file_create_bytes() (r1505006) * new API svn_ver_check_list2() (r1502267) * new API svn_stringbuf_from_stream() (r1532193) * svn_auth_get_platform_specific_client_providers() now includes ssl providers (r1534153) * change dav_svn_split_uri() repos_path argument (r1537812) * new API svn_repos_fs_type() returns filesystem type (r1538585) * svn_client__get_inheritable_props() clears wcroot_iprops when revision is not valid (r1538602) * SVN_VA_NULL: New macro which is null-pointer constant (r1536307) * SVN_NEEDS_SENTINEL_NULL: New macro to mark functions that require final NULL sentinel value, so compilers can warn when missing (r1543394) * platform specific svn_auth_get_* functions are deprecated, use the svn_auth_get_platform_specific_provider() function instead (r1543992) * SVN_INT_ERR macro is deprecated; use svn_handle_error2() or svn_cmdline_handle_exit_error() instead (r1544142) * new API svn_client_cat3() allow disabling keyword expansion and retrieving props (r1544182) * svn_auth_first_credentials(): provides an error rather than crashing if auth_baton is NULL (r1544320) * svn_auth_set_parameter(): Do nothing if auth_baton is NULL (r1544320) * new API svn_relpath_prefix which returns a relpath with a maximum number of path components (r1545123, r1673282) * svn_fs_initialize() is now threadsafe (r1546409) * svn_checksum_kind_t has two new FNV-1a checksums (r1546699) * svn_fs_lock: control characters are not allowed in lock tokens (r1547445) * new API svn_wc_cleanup4() makes some functionality optional and adds notifications (r1548075 et al) * new API svn_client_info4() supports walking externals (r1550206 et al) * new flag for svn_fs_begin_txn2() SVN_FS_TXN_CLIENT_DATE to allow client to set the final svn:date (r1550228) * new APIs for easier RA commits svn_client_mtcc_* (r1550758 et al) * new API svn_ra_session_dup() (r1552324 et al) * svn_ra_stat() now handles compatibility with 1.0-1.1 svnserve (r1552441) * new error code SVN_ERR_COMPOSED_ERROR added to allow detection of composed errors by API consumers (r1553266) * new error code SVN_ERR_RA_DAV_PRECONDITION_FAILED (r1553668) * new error code SVN_ERR_RA_CANNOT_CREATE_SESSION (r1554027) * new API svn_fs_node_relation() (r1554800) * SVN_EXPERIMENTAL to mark functions that might change in future (r1526012) * fix bug in svn_client_get_merging_summary() with some params (r1532396) * new error code SVN_ERR_XML_UNEXPECTED_ELEMENT (r1498938) * extend stream API to also support incomplete reads (r1561688 et al) * new API svn_wc_add_from_disk3() (r1563361) * new API svn_client_revert3() to allow clearing changelists and to have a metadata_only flag (r1568635, r1657026) * svn_rangelist_inheritable2(): don't change inheritabilty of remaining ranges (r1569731) * svn_rangelist_inheritable2() and svn_mergeinfo_inheritable2(): fix a pool lifetime issue (r1569764) * new APIs to support cancelation during unified diff output and allow the context size to be specified (r1570149 et al) * APIs related to retrieving logs are now documented to be unlimited when a negative value is passed for the limit (r1570330, 1570335) * new APIs: svn_fs_props_different() and svn_fs_contents_different() (r1572363, r1573111) * expose SVN_CONFIG_AUTHN_* macros in public API (r1572640) * add SVN_CONFIG_OPTION_SQLITE_TIMEOUT to allow SQLite busy timeout to be configured by clients (r1592093) * add new notification between transmitting deltas and finalizing commit as svn_wc_notify_commit_finalizing (r1603388) * svn_client_cat3() API no longer returns entry or WC props (r1603501) * properly handle canonical paths in svn_io_start_cmd3() (r1604761) * add SVN_FS_CONFIG_FSFS_BLOCK_READ to control FSFS format 7 block read feature (r1604933) * new API svn_cstring_skip_prefix() (r1612823) * new API svn_diff_mem_string_output_merge3() (r1618599) * extend svn_wc_info_t with conflicts2 (r1618643) * new API svn_diff_mem_string_output_unified3() (r1618839) * new API svn_diff_file_output_merge3() (r1618857) * svn_fs_props_changed() and svn_fs_contents_changed() no longer return false positives (r1618880) * new API svn_wc_conflict_description2_dup() (r1618883) * extend svn_wc_conflict_description2_t with prop_reject_abspath field (r1619096) * extend svn_wc_conflict_description2_t with property values as svn_string_t's (r1619122) * fix svn_client_import5() to use absolute paths (r1623974) * fix a few cases of invalid filling of svn_client_commit_item3_t (r1623981) * add SVN_FS_CONFIG_FSFS_SHARD_SIZE to allow creation of repositories with a custom shard size (r1624512) * new API svn_cmdline_create_auth_baton2 (r1630117) * make svn_string_*() and svn_stringbuf_*() functions handle C strings of NULL with 0 length (r1632530, et al) * fix svn_stream_compressed() for streams without partial read support (r1639626) * do not segfault on svn_stream_read_full() or svn_stream_skip() are called for a no-op stream created via svn_stream_create() (r1639637) * add SVN_FS_CONFIG_FSFS_LOG_ADDRESSING to control logical addressing feature of fsfs format 7 (r1640915) * rename the 'parent_directory' parameter of svn_wc_parse_externals_description3() to 'defining_directory' and improve the documentation (r1642690) * new API svn_repos_get_fs_build_parser5() (r1647563) * SVN_VERSION_BODY changed so that it is embedded into libraries, ultimately allowing SVN_VER_TAG constant to be modified by patches (r1651565) * rename repos_url to repos_url_deocded argument to svn_repos_get_commit_editor5() to clairfy usage (r1653609) * make svn_io_set_file_read_only() and svn_io_remove_dir2() ignore ENOTDIR when ignore_enoent argument is set so the behavior is consistent across platforms (r1653680) * make svn_ra_open4() return the documented error when a repository should be opened in a different location (r1655648) * no longer return an error when using svn_ra_get_lock() and the path does not exist (r1656875) * svn_string_dup() will accept a NULL pointer and return a NULL (r1657254) * svn_ra_get_file_revs2() now handles SVN_INVALID_REVNUM as HEAD (r1660463) * new API svn_error_quick_wrapf() (r1662668) * new API svn_fs_node_has_props() (r1673170, r1673172, r1673692, r1673746) * new API svn_repos_verify_fs3() (r1492651 ... r1687769) - Bindings: * javahl: add support for the RA layer (r1494650 et al) * javahl: add ignore-keywords knob to ISVNCLient.doExport (r1494936) * javahl: improve performance of rev_range_vector_to_apr_array (r1496243) * javahl: provide whole stack of errors from native exceptions (r1496353) * javahl: new framework for manipulating in-memory config data (r1497746) * javahl: add methods to set config change handler callback (r1497753) * javahl: add inheritance info to JavaHL's RevisionRange type (r1499308) * swig-rb: fixes to building on Windows (1505406 et al) * libsvn_swig_*libraries now work as proper shared librares (r1506520 et al) * swig-py: 'import svn.core.*' imports libsvn_subr public symbols (r1507860) * javahl: expose the svn_rangelist operations (r1509025) * javahl: new utility class SVNUtil (r1512354) * javahl: serialize init of native library (r1519803) * javahl: fix value truncation checks (r1519913) * javahl: add ISVNClient.info which exposes svn_client_info4 (r1603481) * javahl: include name of exception class in error messages (r1532117) * javahl: simplify JNI environment handling (r1533804) * javahl: Revsion.UNSPECIFIED added as alias to Revision.START (r1533928) * javahl: do not require JUnit to build javahl; only to test (r1535603) * javahl: update Action enum with new entries added in 1.9 (r1536319) * javahl: expose node property validation utility (r1538133) * javahl: new style JNI wrapper (r1539114 et al) * javahl: new utility API to parse/unparse svn:externals (r1539130 et al) * javahl: allow tests to be run from a RAM disk (r1539215 et al) * javahl: expose and use the url member of svn_wc_notify_t (r1539601) * javahl: expose a utility API to resolve relative externals (r1540921) * javahl: new utility API for file content translation (r1542401) * javahl: throw NullPointerException when sources is empty (r1543328) * swig-pl: fix compilation against perl 5.18 on Windows (r1543980) * javahl: implement streamed file contents translation (r1543985) * javahl: enable warnings with javac (r1544163, r1544169) * javahl: cleanup warnings (r1544578 et al) * javahl: add common utilities for new-style map iterations (r1545925) * javahl: add an API to get runtime version of native libs (r1545945) * javahl: use default cache size instead of no cache (r1547248) * swig-py: add typemap for hunks field of svn_patch_t (r1548379) * javahl: don't ignore difference between NULL and empty changelist in ISVNClient.getChangelists (r1553254) * swig-pl: fix pool issues with setting dates as revisions (r1553822) * swig-pl: make svn_auth_set_parameter() usable (r1553823) * javahl: expose inheritiable property names (r1560338) * javahl: fix bug in parsing single revision merginfo data (r1563140) * javahl: create JVM crashlogs from svn malfunctions (r1563927, r1564252) * javahl: avoid problems when building without NLS support (r1566578 et al) * javahl: expose --alow-mixed-revisions merge option (r1567602) * javahl: support incomplete reads from streams (r1569631) * javahl: allow revert API to take a set of paths (r1571461) * javahl: improve authentication callback (r1597758 et al) * javahl: load (most) classes on demand (r1602822) * javahl: expose confg file keys in JavaHL (r1604448) * javahl: update ISVNClient.info, ISVnClient.cleanup and add ISvnClient.vacuum (r1604449) * javahl: update ISVNRepos.hotcopy (r1618894) * swig-py: Add close to the core.Stream class (r1619077) * javahl: add example clients that use the authn API (r1640533) * swig-py: implement dump stream parser (r1642813) * swig-pl: remove some unneded cleanup code that triggered a cleanup failure on windows (r1643072) * swig-pl: make cancel_func, cancel_baton parameter pairs work (r1648852) * javahl: expose whitespace diff parameters to blame method (issue #4475) * javahl: update ConflictDescriptor (r1655842) * javahl: update FileRevision to provide textDelta (r1656911) * swig-pl: install into prefix (r1658459) * javahl: expose the metadataOnly option to copy support (r1661451) * swig-py: add support for svn_fs_lock_many(), svn_fs_unlock_many(), svn_repos_fs_lock_many() and svn_repos_fs_unlock_many() (r1662867) * swig-py: fix support for svn_ra_lock() and svn_ra_unlock() (r1662891) * javahl: allow java callbacks to throw errors back to the svn code (r1664938, r1664939, r1664940, r1664978, r1664984) * swig-pl: fix some stack memory problems (r1668618, 1671388) * swig: warn on using SWIG 3.x as we have compatibility problems with newer versions of SWIG (1675149) * javahl: requires Java 1.6 (r1677003) * javahl: on OS X use /usr/libexec/java_home to find the JDK (r1675774) * javahl: allow compiling with a C++11 compiler (r1684412) Version 1.8.19 (10 Aug 2017, from /branches/1.8.x) http://svn.apache.org/repos/asf/subversion/tags/1.8.19 User-visible changes: - Client-side bugfixes: * Fix arbitrary code execution vulnerability CVE-2017-9800 See for details. - Server-side bugfixes: (none) - Bindings bugfixes: (none) Developer-visible changes: - General: (none) - API changes: (none) Version 1.8.18 (10 Jul 2017, from /branches/1.8.x) http://svn.apache.org/repos/asf/subversion/tags/1.8.18 User-visible changes: - Server-side bugfixes: * fsfs: never attempt to share directory representations (r1785053) * fsfs: make consistency independent of hash algorithms (r1785737 et al) This change makes Subversion resilient to collision attacks, including SHA-1 collision attacks such as . See also our documentation at and . - Client-side and server-side bugfixes: * work around an APR bug related to file truncation (r1759116) Developer-visible changes: - General: * update serf download URI in build scripts (r1700130 et al) Version 1.8.17 (29 Nov 2016, from /branches/1.8.x) http://svn.apache.org/repos/asf/subversion/tags/1.8.17 User-visible changes: - Client-side bugfixes: * fix handling of newly secured subdirectories in working copy (r1724448) * ra_serf: fix deleting directories with many files (issue #4557) * gpg-agent: properly handle passwords with percent characters (issue #4611) * merge: fix crash when merging to a local add (r1702299 et al) - Server-side bugfixes: * fsfs: fix possible data reconstruction error (issue #4658) * svnlook: properly remove tempfiles on diff errors (r1711346) - Client-side and server-side bugfixes: * fix potential memory access bugs (r1722860 et al) - Bindings bugfixes: * javahl: fix temporarily accepting SSL server certificates (r1764851) * swig-pl: do not corrupt "{DATE}" revision variable (r1767768) * swig-pl: fix possible stack corruption (r1683266) Developer-visible changes: - General: * fix inconsistent behavior of inherited property API (r1717875, r1717878) * fix patch filter invocation in svn_client_patch() (r1706783) * fix potential build issue with invalid SVN_LOCALE_DIR (issue #4653) Version 1.8.16 (28 Apr 2016, from /branches/1.8.x) http://svn.apache.org/repos/asf/subversion/tags/1.8.16 User-visible changes: - Server-side bugfixes: * mod_authz_svn: fix crash in COPY/MOVE authorization check (CVE-2016-2168) * svnserve/sasl: fix authenticating users with wrong realm (CVE-2016-2167) * mod_authz_svn: fix authz with mod_auth_kerb/mod_auth_ntlm (issue #4602) * dump: don't write broken dump files in some ambiguously encoded fsfs repositories (issue #4554) - Client-side and server-side bugfixes: * update INSTALL documentation file (r1703470, r1703475) Developer-visible changes: - General: * fix javahl test suite to work on a symlinked RAM disk (r1539230) * fix ruby test suite to work with test-unit gem (r1714790) Version 1.8.15 (15 Dec 2015, from /branches/1.8.x) http://svn.apache.org/repos/asf/subversion/tags/1.8.15 User-visible changes: - Client-side bugfixes: * gpg-agent: fix crash with non-canonical $HOME (r1691928, issue #4584) - Client-side and server-side bugfixes: * fix a segfault with old style text delta (r1618472 et al) - Server-side bugfixes: * mod_dav_svn: fix heap overflow with skel-encoded requests (CVE-2015-5343) * fsfs: reduce memory allocation with Apache (r1591005 et al) * mod_dav_svn: emit first log items as soon as possible (r1666965 et al) * mod_dav_svn: use LimitXMLRequestBody for skel-encoded requests (r1687812) - Bindings bugfixes: * swig: fix memory corruption in svn_client_copy_source_t (r1694929) Developer-visible changes: - General: * better configure-time detection of httpd authz fix (r1687304 et al) * fix compilation with apr 1.2.x (r1701237) Version 1.8.14 (5 Aug 2015, from /branches/1.8.x) http://svn.apache.org/repos/asf/subversion/tags/1.8.14 User-visible changes: - Client-side bugfixes: * document svn:autoprops (r1678494 et al.) * cp: fix 'svn cp ^/A/D/H@1 ^/A' to properly create A (r1674455, r1674456) * resolve: improve conflict prompts for binary files (r1667228 et al.) * ls: improve performance of '-v' on tag directories (r1673153) * improved Sqlite 3.8.9 query performance regression on externals (r1672295 et al.) * fixed issue #4580: 'svn -v st' on file externals reports "?" instead of user and revision after 'svn up' (r1680242) - Server-side bugfixes: * mod_authz_svn: do not leak information in mixed anonymous/authenticated httpd (dav) configurations (CVE-2015-3184) * do not leak paths that were hidden by path-based authz (CVE-2015-3187) * mod_dav_svn: do not ignore skel parsing errors (r1658168) * detect invalid svndiff data earlier (r1684077) * prevent possible repository corruption on power/disk failures (r1680819) * fixed issue #4577: Read error with nodes whose DELTA chain starts with a PLAIN rep (r1676667, r1677267) * fixed issue #4531: server-side copy (over dav) is slow and uses too much memory (r1674627) Developer-visible changes: - General: * support building on Windows with Visual Studio 2015 (r1692785) * avoid failing some tests on versions of Python with a very old sqlite (r1674522) * fix Ruby tests so they don't use the users real configuration (r1597884) - Bindings: * swig-pl: fix some stack memory problems (r1668618, 1671388) Version 1.8.13 (31 Mar 2015, from /branches/1.8.x) http://svn.apache.org/repos/asf/subversion/tags/1.8.13 User-visible changes: - Client-side bugfixes: * ra_serf: prevent abort of commits that have already succeeded (r1659867) * ra_serf: support case-insensitivity in HTTP headers (r1650481, r1650489) * better error message if an external is shadowed (r1655712, r1655738) * ra_svn: fix reporting of directory read errors (r1656713) * fix a redirect handling bug in 'svn log' over HTTP (r1650531) * properly copy tree conflict information (r1658115, r1659553, r1659554) * fix 'svn patch' output for reordered hunks (issue #4533) * svnrdump load: don't load wrong props with no-deltas dump (issue #4551) * fix working copy corruption with relative file external (issue #4411) * don't crash if config file is unreadable (r1590751, r1660350) * svn resolve: don't ask a question with only one answer (r1658417) * fix assertion failure in svn move (r1651963 et al) * working copy performance improvements (r1664531, r1664476, et al) * handle existing working copies which become externals (r1660071) * fix recording of WC meta-data for foreign repos copies (r1660593) * fix calculating repository path of replaced directories (r1660646) * fix calculating repository path after commit of switched nodes (r1663991) * svnrdump: don't provide HEAD+1 as base revision for deletes (r1664684) * don't leave conflict markers on files that are moved (r1660220, r1665874) * avoid unnecessary subtree mergeinfo recording (r1666690) * fix diff of a locally copied directory with props (r1619380 et al) - Server-side bugfixes: * fsfs: fix a problem verifying pre-1.4 repos used with 1.8 (r1561419) * svnadmin freeze: fix memory allocation error (r1653039) * svnadmin load: tolerate invalid mergeinfo at r0 (r1643074, issue #4476) * svnadmin load: strip references to r1 from mergeinfo (issue #4538) * svnsync: strip any r0 references from mergeinfo (issue #4476) * fsfs: reduce memory consumption when operating on dag nodes (r1655651) * reject invalid get-location-segments requests in mod_dav_svn and svnserve (r1667233) * mod_dav_svn: reject invalid txnprop change requests (r1667235) - Client-side and server-side bugfixes: * fix undefined behaviour in string buffer routines (r1650834) * fix consistency issues with APR r/w locks on Windows (r1611380 et al) * fix occasional SEGV if threads load DSOs in parallel (r1659013, r1659315) * properly duplicate svn error objects (r1651759) * fix use-after-free in config parser (1646785, r1646786, r1646797) Developer-visible changes: * add lock file config for testing against HTTPD 2.4+ (r1544302, r1544303) * make sqlite amalgamated build work with sqlite 3.8.x+ (r1659399) * fix build with Ruby 2 (r1596882) * process 'svnadmin dump' output as binary in the test suite (r1592987) * simplify Windows resource compilation to avoid warnings (r1532287) Version 1.8.12 (Not released, see changes for 1.8.13.) Version 1.8.11 (15 Dec 2014, from /branches/1.8.x) http://svn.apache.org/repos/asf/subversion/tags/1.8.11 User-visible changes: - Client-side bugfixes: * checkout/update: fix file externals failing to follow history and subsequently silently failing (issue #4185) * patch: don't skip targets in valid --git difs (r1592014, r1592034) * diff: make property output in diffs stable (r1589360) * diff: fix diff of local copied directory with props (r1619380, r1619393) * diff: fix changelist filter for repos-WC and WC-WC (r1621978, r1621981) * remove broken conflict resolver menu options that always error out (r1620332) * improve gpg-agent support (r1600331, r1600348, 1600368, r1600563, r1600781) * fix crash in eclipse IDE with GNOME Keyring (issue #3498) * fix externals shadowing a versioned directory (issue #4085) * fix problems working on unix file systems that don't support permissions (r1612225) * upgrade: keep external registrations (issue #4519) * cleanup: iprove performance of recorded timestamp fixups (r1633126) * translation updates for German - Server-side bugfixes: * disable revprop caching feature due to cache invalidation problems (r1543594, r1619774, r1619105, r1619118, r1619153, r1619802) * skip generating uniquifiers if rep-sharing is not supported (r1561426) * mod_dav_svn: reject requests with missing repository paths (r1643409) * mod_dav_svn: reject requests with invalid virtual transaction names (r1643437) * mod_dav_svn: avoid unneeded memory growth in resource walking (issue #4531) Developer-visible changes: - General: * make sure all members of the repos layer notify struct are valid, fixes crashes in API users using all members (r1616131) * properly generate a version resource when building on Windows (r1542610, r1564576, r1568180) * fix LIBTOOL_M4 and LIBTOOL_CONFIG variable not be evaluated properly during a unix build (r1637826) * allow the use of libtool 2.4.3 (r1640862, r1640873, r1643793) Version 1.8.10 (11 Aug 2014, from /branches/1.8.x) http://svn.apache.org/repos/asf/subversion/tags/1.8.10 User-visible changes: - Client-side bugfixes: * guard against md5 hash collisions when finding cached credentials (r1550691, r1550772, r1600909) * ra_serf: properly match wildcards in SSL certs. (r1615211, 1615219) * ra_serf: ignore the CommonName in SSL certs where there are Subject Alt Names (r1565531, r1566503, r1568349, r1568361) * ra_serf: fix a URI escaping bug that prevented deleting locked paths (r1594223, r1553501, r1553556, r1559197, issue #3674) * rm: Display the proper URL when deleting a URL in the commit log editor (r1591123) * log: Fix another instance of broken pipe error (r1596866, issue #3014) * copy: Properly handle props not present or excluded on cross wc copy (r1589184, r1589188) * copy: Fix copying parents of locally deleted nodes between wcs (r1589460, r1589486) * externals: Properly delete ancestor directories of externals when removing the external by changing svn:externals. (r1600311, 1600315, r1600323, r1600393) * ra_serf: fix memory lifetime of some hash values (r1606009) - Server-side bugfixes: * fsfs: omit config file when creating pre-1.5 format repos (r1547454, r1561703) Developer-visible changes: - General: * fix improper linking when serf is in the same prefix as existing svn libraries. (r1609004) * use proper intermediate directory when building with VS 2003-2008 (r1595431) * support generating VS 2013 and later project files. - Bindings: * ruby: removing warning about Ruby 1.9 support being new. (r1593992) * python: fix notify_func callbacks (r1594794, r1594814, r1594834, r1595061) Version 1.8.9 (07 May 2014, from /branches/1.8.x) http://svn.apache.org/repos/asf/subversion/tags/1.8.9 User-visible changes: - Client-side bugfixes: * log: use proper peg revision over DAV (r1568872) * upgrade: allow upgrading from 1.7 with exclusive locks (r1572102 et al) * proplist: resolve inconsitent inherited property results (r1575270 et al) * increase minimal timestamp sleep from 1ms to 10ms (r1581305 et al) * merge: automatic merge confused by subtree merge (issue #4481) * propget: report proper error on invalid revision for url (r1586255) * commit: fix an assertion when committing a deleted descendant (r1571747, r1571787, r1571795) * merge: resolve segfault when '--force' merges a directory delete (r1577812, r1577813, r1579429) * resolve: prevent interactive conflict resolution when nothing has been done to resolve the conflict (r1577294) * update: fix locks lost from wc with pre-1.6.17 servers (issue #4412) * merge: honor the 'preserved-conflict-file-exts' setting (r1577151) * list: fix '--verbose' against older servers (r1591111) * unlock: fix ability to remove locks with timeouts (r1579588) * copy: fix 'svn copy URL WC' on relocated working copies (r1580626, r1580650) * export: allow file externals to be exported (issue #4427) * move: fix working copy db inconsistency in cert scenarios (issue #4437) * commit: fix an issue where mixed revision copy with non copy descendants that shadow a not present node couldn't be committed (r1518942 et al) * delete: properly remove move_to info when the node in its original location is removed (r1538812 et al) * status; fix an issue where output would vary based on if the target was the node itself or its parent (r1544597 et al) - Server-side bugfixes: * ensure proper access synchronization in fsfs on Windows (r1568953 et al) * svnadmin dump: don't let invalid mergeinfo stop dump (r1574868 et al) * svnserve: resolve performance regression caused by iprops (r1578853 et al) * reduce size of memory buffer when reading config files (r1581296) * remove dead transaction if commit was blocked by hook (r1583977) * svnrdump load: fix crash when svn:* normalization (issue #4490) * fix memcached support (issue #4470) * svndumpfilter: fix order of node record headers (r1578670 et al) * mod_dav_svn: blacklist building with broken versions of httpd; 2.2.25, 2.4.5 and 2.4.6 (r1545835) * mod_dav_svn: allow generic DAV clients to refresh locks (issue #3515) * mod_dav_svn: detect out of dateness correctly during commit (issue #4480) Developer-visible changes: - General: * improve consistency checks of DAV inherited property requests (r1498000) * fix ocassional failure in autoprop_tests.py (r1567752) * avoid duplicate sqlite analyze information rows (r1571214) * add Mavericks to our sysinfo output (r1573088) * bump copyright years to 2014 (r1555403) * unbreak test suite when running as root (r1583580) * resolve buffer overflow in testcode (r1481782) * fix libmagic detection with custom LDFLAGS (r1577200) * fix an out of scope variable use in merge (r1587946) * javahl: fix crash from resolve callback throwing an exception (r1586439) * ruby: fix two memory lifetime bugs (r1586052, r1586467) * fix a missing null byte when handling old pre-1.4 deltas (r1587968) * fix building with APR 0.9.x (r1585499) * make svn_ra_get_locks() and svn_ra_get_lock() report not locked nodes with a NULL svn_lock_t *, as documented (r1578273, r1578311, r1578326) * fix tests for compiler flags (r1573106) Version 1.8.8 (19 Feb 2014, from /branches/1.8.x) http://svn.apache.org/repos/asf/subversion/tags/1.8.8 User-visible changes: - Client-side bugfixes: * use CryptoAPI to validate intermediary certificates on Windows (r1564623) * fix automatic relocate for wcs not at repository root (r1541638 et al) * diff: fix when target is a drive root on Windows (r1541635) * wc: improve performance when used with SQLite 3.8 (r1542765) * copy: fix some scenarios that broke the working copy (r1560690) * move: fix errors when moving files between an external and the parent working copy (r1551524, r1551579) * log: resolve performance regression in certain scenarios (r1553101 et al) * merge: decrease work to detect differences between 3 files (r1548486) * checkout: don't require flush support for symlinks on Windows (r1547774) * commit: don't change file permissions inappropriately (issue #4440) * commit: fix assertion due to invalid pool lifetime (r1553376 et al) * version: don't cut off the distribution version on Linux (r1544878 et al) * flush stdout before exiting to avoid information being lost (r1499470) * status: fix missing sentinel value on warning codes (r1543145) * update/switch: improve some WC db queries that may return incorrect results depending on how SQLite is built (r1567109) - Server-side bugfixes: * reduce memory usage during checkout and export (r1564215) * fsfs: create rep-cache.db with proper permissions (issue #3437) * mod_dav_svn: prevent crashes with SVNListParentPath on (CVE-2014-0032) * mod_dav_svn: fix SVNAllowBulkUpdates directive merging (r1548105) * mod_dav_svn: include requested property changes in reports (r1557522) * svnserve: correct default cache size in help text (r1563110) * svnadmin dump: reduce size of dump files with '--deltas' (r1554978) * resolve integer underflow that resulted in infinite loops (r1567985) Developer-visible changes: - General: * fix ocassional failure of check_tests.py 12 (r1496127 et al) * fix failure with SQLite 3.8.1-3.8.3 when built with SQLITE_ENABLE_STAT3/4 due to bug in SQLite (r1567286, r1567392) * specify SQLite defaults that can be changed when SQLite is built to avoid unexpected behavior with Subversion (r1567064) - API changes: * numerous documentation fixes * svn_client_commit_item3_dup() fix pool lifetime issues (r1550803) * ra_serf: properly ask multiple certificate validation providers for acceptance of certificate failures (r1535532) * release internal fs objects when closing commit editor (r1555499) * svn_client_proplist4() don't call the callback multiple times for the same path in order to deliver inherited properties (r1549858 et al) - Bindings: * javahl: make test suite run without installing on OS X (r1535115) * swig: fix building out of tarball on OS X (r1555654) * swig-pl: fix with --enable-sqlite-compatibility-version (r1559009) * swig: fix building bindings on OS X when APR has the -no-cpp-precomp flag in the apr-config --cppflags output. (r1535610) * swig: fix building from tarball with an out-of-tree build (r1543187) Version 1.8.7 (Not released, see changes for 1.8.8.) Version 1.8.6 (Not released, see changes for 1.8.8.) Version 1.8.5 (25 November 2013, from /branches/1.8.x) http://svn.apache.org/repos/asf/subversion/tags/1.8.5 User-visible changes: - Client-side bugfixes: * fix externals that point at redirected locations (issues #4428, #4429) * diff: fix assertion with move inside a copy (issue #4444) - Server-side bugfixes: * mod_dav_svn: Prevent crashes with some 3rd party modules (r1537360 et al) * mod_dav_svn: canonicalize paths properly (r1542071) * mod_authz_svn: fix crash of mod_authz_svn with invalid config (r1541432) * hotcopy: fix hotcopy losing revprop files in packed repos (issue #4448) - Other tool improvements and bugfixes: * mod_dontdothat: Fix the uri parser (r1542069 et al) Developer-visible changes: - General: * fix compilation with '--enable-optimize' with clang (r1534860) * fix compilation with debug build of BDB on Windows (r1501656, r1501702) * fix '--with-openssl' option when building on Windows (r1535139) * add test to fail when built against broken ZLib (r1537193 et al) - Bindings: * swig-rb: fix tests to run without installing on OS X (r1535161) * ctypes-python: build with compiler selected via configure (r1536537) Version 1.8.4 (29 October 2013, from /branches/1.8.x) http://svn.apache.org/repos/asf/subversion/tags/1.8.4 User-visible changes: - Client- and server-side bugfixes: * fix assertion on urls of the form 'file://./' (r1516806) * stop linking against psapi.dll on Windows (r1534102) * translation updates for Swedish - Client-side bugfixes: * revert: fix problems reverting moves (issue #4436) * update: fix assertion when file external access is denied (issue #4422) * merge: reduce network connections for automatic merge (r1468980 et al) * merge: fix path corruption during reintegration (r1523666) * mergeinfo: fix crash (r1519955) * ra_serf: verify the result of xml parsing (r1501199 et al) * ra_serf: improve error messages during commit (r1526439) * ra_local: fix error with repository in Windows drive root (r1518184) * fix crash on windows when piped command is interrupted (r1522892) * fix crash in the crash handler on windows (r1532023) * fix assertion when upgrading old working copies (r1520529) - Server-side bugfixes: * hotcopy: cleanup unpacked revprops with '--incremental' (r1512300 et al) * fix OOM on concurrent requests at threaded server start (r1527103 et al) * fsfs: improve error message when unsupported fsfs format found (r1534158) * fix memory problem in 3rd party FS module loader (r1519615 et al) Developer-visible changes: - General: * allow compiling against serf 1.3 and later on Windows (r1517123) - Bindings: * javahl: canonicalize path for streamFileContent method (r1524869) Version 1.8.3 (29 August 2013, from /branches/1.8.x) http://svn.apache.org/repos/asf/subversion/tags/1.8.3 User-visible changes: - Client- and server-side bugfixes: * translation updates for Swedish * enforce strict version equality between tools and libraries (r1502267) * consistently output revisions as "r%ld" in error messags (r1499044 et al) - Client-side bugfixes: * status: always use absolute paths in XML output (issue #4398) * ra_serf: 'svn log -v' fails with a 1.2.x server (issue #4044) * ra_serf: fix crash when committing cp with deep deletion (issue #4400) * diff: issue an error for files that can't fit in memory (r1513119 et al) * svnmucc: generate proper error for mismatched URLs (r1511353) * update: fix a crash when a temp file doesn't exist (r1513156) * commit & update: improve sleep for timestamps performance (r1508438) * diff: continue on missing or obstructing files (issue #4396) * ra_serf: use runtime serf version for User-Agent (r1514315, r1514628) * ra_serf: ignore case when checking certificate common names (r1514763) * ra_serf: format distinguished names properly (r1514804) * ra_serf: do not retry HTTP requests if we started to parse them (r1503318) * ra_serf: output ssl cert verification failure reason (r1514785 et al) * ra_serf: allow session reuse after SVN_ERR_CEASE_INVOCATION (r1502901) * ra_serf: include library version in '--version' output (r1514295 et al) * info: fix spurious error on wc root with child in conflict (r1515366) - Server-side bugfixes: * svnserve: fix creation of pid files (r1516556) * svnadmin: fix output encoding in non-UTF8 environments (r1506966) * svnsync: fix high memory usage when running over ra_serf (r1515249 et al) * mod_dav_svn: do not map requests to filesystem (r1512432 et al) * svnauthz: improve help strings (r1511272) * fsfs: fixed manifest file growth with revprop changes (r1513874) * fsfs: fix packed revprops causing loss of revprops (r1513879 et al) - Other tool improvements and bugfixes: * svnwcsub/irkerbridge: fix symlink attack via pid file (r175 from upstream) Developer-visible changes: - General: * describe APR unimplemented errors as coming from APR (r1503010 et al) * mod_dav_svn: update INSTALL to reflect configure defaults (r1515141) * davautocheck: use the correct apxs binary by default (r1507889, r1507891) - API changes: * svn_config_walk_auth_data() config_dir arg: permit NULL (r1507382 et al) - Bindings: * swig-pl: fix SVN::Client not honoring config file settings (r150744) * swig-pl & swig-py: disable unusable svn_fs_set_warning_func (r1515119) Version 1.8.2 (Not released, see changes for 1.8.3.) Version 1.8.1 (23 July 2013, from /branches/1.8.x) http://svn.apache.org/repos/asf/subversion/tags/1.8.1 User-visible changes: - Client- and server-side bugfixes: * translation updates for German and Simplified Chinese * improve sqlite error message output (r1497804) * support platforms lacking mmap (r1498136) * allow configuration files to start with UTF-8 BOM (r1499100 et al) * don't fail on UTF-8 data when encoding conversion not available (r1503009) * improve error messages when encoding conversion fails (r1503010) - Client-side bugfixes: * merge: rename 'automatic merge' to 'complete merge' (r1491432) * mergeinfo: reduce network usage for '--show-revs' (r1492005) * ra_serf: improve http status handling (r1495104) * merge: avoid unneeded RA session (r1493475) * merge: reduce network usage (r1478987) * merge: remove duplicated ancestry check (r1493424, r1495597) * ra_serf: fix 'Accept-Encoding' header for IIS interoperability (r1497551) * svn status: improve documentation for lock columns (r1497318, r1497319) * ra_serf: fix support for 'get-file-revs-reversed' capability (r1498456) * log: reduce network usage on repository roots (r1496957) * diff: avoid temporary files when calling external diff (issue #4382) * upgrade: fix notification of 1.7.x working copies (r1493703, r1494171) * fix crash during tree conflict resolution (issue #4388) * interactive file merge: add two additional choices (r1491816, r1494089) * diff: use local style paths in error messages (r1500680) * resolve: improve the interactive conflict resolution menu (r1491739 et al) * switch: use local style path in error message (r1500074) * ra_serf: improve error output when receiving invalid XML (r1498851) * svn cleanup: explain what the command does in help output (r1497310) * blame: error on -r M:N where M>N unless server supports (r1498449 et al) * gpg-agent auth: don't try to use agent when unavailable (r1500762 et al) * gpg-agent auth: don't require GPG_TTY or TERM env vars (r1500801) * update: fix some tree conflicts not triggering resolver (r1491868 et al) * commit: remove stale entries from wc lock table when deleting (r1491756) * merge: fix --record-only erroring out on renamed path (issue #4387) * svnmucc: fix 'make install' symlink to work when DESTDIR is set (r1501072) * wc: fix crash when target is symlink to a working copy root (issue #4383) * ra_serf: change "internal malfunction" errors to normal errors (r1502577) * ra_serf: handle proxies not supporting chunked requests (r1502401 et al) - Server-side bugfixes: * fsfs: resolve endless loop problem when repos/db/uuid has \r\n (r1492145) * fsfs: remove revision property buffer limit (r1491770) * mod_dav_svn: better status codes for anonymous user errors (r1495918) * mod_dav_svn: better status codes for commit failures (r1490684) * fix performance regression in 'svn log' against root (r1494913) * allow deleting non-user-visible 'svn:' properties (r1495432) * fsfs: fix crash on strict-alignment architectures (r1495806, r1495985) * svnadmin upgrade: fix error of non-sharded fsfs repositories (r1494287) * svnadmin create: deny '--fs-type=fsfs --compatible-version=1.0' (r1494223) * svnadmin upgrade: fix data loss when cancelling in last stage (r1494298) * mod_dav_svn: fix incorrect path canonicalization (r1503528) See CVE-2013-4131, and descriptive advisory at http://subversion.apache.org/security/CVE-2013-4131-advisory.txt - Other tool improvements and bugfixes: * fsfs-stats (tool): resolve segfault when passing invalid path (r1492164) * svn-bench: fix help output (r1493951) * svnpubsub: add version header to server (r1491707) Developer-visible changes - General: * ra_serf: fix some test runner issues on Windows (r1490679) * fix two issues in reverse svn_ra_get_file_revs() (r1492148, et al) * handle --compatible-version=1.8 in the C tests (r1494342) * improve clang compatibility (r1480080 et al) * use proper cancel baton when handling conflicts (r1495850) * fs: BDB: provide proper error value from BDB (r1495428) * ra_serf: tweak connection failed error value (r1496132, et al) * svn_client_log5: resolve possible segfault (r1496110) * fix metadata_only move to work when target is unversioned node (r1498564) * ra_svn: fix segfault with a NULL commit message (r1498550, r1499727) * Ev2: correctly initialize node kind in shims' change table (r1501058) * Ev2: fix copyfrom URL construction in shims (r1500226) * fs: improve test against newlines in filenames (r1498483 et al) * make building with BDB 6 an opt-in feature (r1499438) * sqlite: allow placing amalgamation in build dir (r1499034, r1500175) * ra_svn: make sessions usable after log callback early out (r1503554) - Bindings: * swig-rb: fix tests with out-of-tree-builds (r1492295) * javahl: fix encoding of error messages produced by javahl (r1492264) * swig-pl: silence compiler warnings (r1487094) * swig-pl: improve documentation (r1488693, r1490721, r1500904) Version 1.8.0 (18 Jun 2013, from /branches/1.8.x) http://svn.apache.org/repos/asf/subversion/tags/1.8.0 User-visible changes: - General: * require serf as client-side http library (neon support removed) (r1349694) * deprecate the Berkeley DB FS backend (libsvn_fs_base) (r1464985 et al) - Major new features: * working copy records moves as first-class operation (issue #3631, #4232) * merge uses reintegrate mode automatically when needed (r1369896 et al) * FSFS: Packing of revision property shards (issue #3944) * support inheritable properties (r1395109) * repository can suggest config for autoprops and ignores (r1401908) * support gpg-agent for password caching (r1151069) * authz rules can be stored inside the repository (r1424780) - Minor new features and improvements (client-side): * doubled svn:// protocol throughput (r1325899) * optimize file/dir truename checks on Windows (r1435527) * new 'commit --include-externals' option (related to issues #1167, #3563) * new --include-externals option for 'svn list' (issue #4225) * remove extraneous externals output from 'svn status -q' (issue #1935) * reject some attempts to merge between unrelated branches (r1215273) * new --ignore-properties option for 'svn diff' (r1239553, -617) * new --properties-only option for 'svn diff' (r1336110) * new --patch-compatible option for 'svn diff' (r1239561) * new --no-diff-added option for 'svn diff' (r1433958) * new w/c subtree duplication tool (tools/client-side/detach.py) * new mergeinfo fixup tool (tools/client-side/mergeinfo-sanitizer.py) * 'svn diff' can compare arbitrary files and directories (r1310291, et al) * ra_serf avoids re-downloading content present in pristine store (r1333936) * 'svn mergeinfo' now honors the --revision (-r) option (issue #4199) * 'svn mergeinfo' now shows a summary graph by default (issue #4239) * new --search and --search-and options for 'svn log' (r1354666, -83518) * 'svn log' reports the node kind even for pre-1.6 revision files (r1242958) * sort path list generated by "svn log -v --xml" (r1299323) * new built-in interactive text conflict merge tool (r1357864, et al) * 'svn --version' shows build system info (r1368662) * 'svn --version --verbose' shows runtime environment info (r1370813 et al) * 'svn' is now non-interactive when not run in a terminal device (r1424037) * 'svn propset' checks spelling of reserved property names (r1470781) * improve working copy performance on network disks (issue #4176) * support for custom keyword definitions in svn:keywords (issue #890) * svn:ignore __pycache__ directories by default (r1150073) * 'svn diff --git' include copyfrom revision in "copied" headers (r1155279) * svn:mergeinfo related operations now use much less memory (r1149519 et al) * get list of supported schemes for RA libraries (r1148134) * 'svn checkout' skips file externals from other repositories (r1153110) * 'svn resolve' exits non-zero if conflicts could not be resolved (r1150439) * let HTTPv2-aware clients fetch v2-style resources (r1161202) * 'svn status' with better NLS support (r1157537, -682) * better tracking of shallow-yet-complete merges (issues #4056, #4057) * make 'svn status --quiet' w/ externals quieter still (issue #1935) * ensure that conflict paths are shown relative-ized (r1337520) * improve performance of local multi-target deletions (r1195873) * various interactive conflict resolver improvements in 'svn' (r1440421 etc) * improved tree diff implementation for diff and merge (r1440599 et al) * tree conflicts on directories detected better during merges (issue #3150) * allow reverting unmodified copies with 'svn remove' (r1442611) * make 'svn diff' with mixed URL and local path targets work (r1442640) * make 'svn patch' re-add deleted directories if needed (r1445333) * make repos-wc diffs fully ancestry-aware (r1445904) * 'svn diff --git' now implies 'svn diff --show-copies-as-adds' (r1446279) * 'svn diff --show-copies-as-adds' now implies --notice-ancestry (r1446279) * improved tree-conflict detection for 'svn switch' (r1449413, r1450582) * allow up to 8 revision number digits in 'svn status -v' output (r1428637) * show node kind (file or dir) in tree conflict descriptions (r1429907) * restore deleted switched paths upon next update (issue #4295) * add support for copying paths from foreign repositories (issue #3590) * fix merge -cA,B with --accept option aborts if rA conflicts (issue #4238) * 'svn resolve' interactive support; no longer requires --accept (r1336929) * notify when removing externals leaves behind modified files (r1366021) * new 'http-max-connections' configuration option for serf (r1421559) * new 'http-bulk-updates' configuration option for serf (r1421490) * 'svn cleanup' now runs SQLite "vacuum" to reclaim space (r1418459) * 'svn info' displays repository-relative URL (r1415365) * fix serf memory leak on checkout (issue #4194) * detect duplicate paths setting svn:externals (issue #4227) * make ra_serf work over HTTP/1.0 proxies (issue #3979) * make ra_serf accept gzip compression for all responses (r1407454) * double ra_serf performance for checkout and export (r1407545) * improve network and disk i/o interleaving in ra_serf (r1407934) * avoid assert in ra_serf when REPORT response was truncated (r1407935) * rewrite ra_serf XML parser (r1409259 et al) * ra_serf can create transaction with inline txnprops (r1375167) * partially fix replace+propset of locked file fails over DAV (issue #3674) * fix ra_serf doesn't handle bad baseline error from server (issue #4127) * decreased default http timeout for ra_serf (issue #3968) * prevent ra_serf from corrupting the working copy (issue #3993) * ra_serf transmits property changes inline to reduce requests (r1378927) * by default avoid SSL certificate prompts in client (issue #2410) * improve interactive resolution of property conflicts (r1387678 et al) * make ra_serf raise an error upon delta-base mismatch (issue #4235) * tune ra_svn transmit buffer handling (r1391788) * make 'svnrdump' work with serf (issue #4116) * fix 'svnrdump' on path below repository root (issue #4101) * support ipv6 in URLs (e.g. http://[::1]/svn/repos) (r1454047) * conflict resolver now iterates paths in a sorted order (r1461820) * mod_dav_svn does keyword expansion with 'kw=1' query arg (r1466055) - Minor new features and improvements (server-side): * improve performance of config file parsing (r1344347 et al) * new 'svnadmin load --revision' load filtering support (issue #3734) * new 'svnadmin hotcopy --incremental' support for FSFS (issue #3815) * new 'svnadmin lock' / 'svnadmin unlock' subcommands (issue #3942, #4092) * new SVNUseUTF8 configuration option for mod_dav_svn (issue #2487) * new SVNHooksEnv configuration option for mod_dav_svn (r1239966) * new SvnPubSub distributed commit hooks (tools/server-side/svnpubsub) * new light-weight benchmarking client (tools/client-side/svn-bench) * svndumpfilter dependency analysis (tools/server-side/svnpredumpfilter.py) * new automatic working copy updater (tools/server-side/svnpubsub) * new 'svnadmin freeze' subcommand (r1376228) * 'svndumpfilter' now supports --delta dumpfiles (r1351009, -3745) * new --drop-all-emtpy-revs option for 'svndumpfilter' (issue #3681) * client version info now reported to commit hooks (issue #4124) * txn name now reported to post-commit hooks (r1240856) * support for server-side keyword expansion in mod_dav_svn (r1466055) * FSFS now able to cache revision properties (r1326307) * FSFS cache for changed-paths increases 'svn log' performance (r1378358) * FSFS cache mergeinfo requested during 'log -g' (r1395439) * many FSFS caching improvements (r1390435, r1390447) * directory and property deltification option in FSFS (issue #4084) * fine-grained control deltification behavior via fsfs.conf (r1311476) * FSFS de-duplication ("rep sharing") now works within a revision (r1397773) * FSFS de-duplication now works for properties as well (r1243312) * read FSFS data using fewer fopen calls (issue #3372) * 'svnadmin verify' will now check meta data (issues #3956, #4211) * 'svnadmin verify' now checks for issue #4129 style corruption (r1304656) * new --client-speed option for svnserve (r1391788) * new --single-threaded option in svnserve (r1296018) * hook script templates are now marked as executable (r1153414) * error out on non-canonical fspaths in the authz file (r1166111) * improve path lookup performance in FSFS (r1442088) * svnserve now logs explicit path and reason for authz failures (r1446542) * validate offsets from rep-cache to prevent FSFS corruption (issue #4277) * new AuthzSVNGroupsFile option to store authz groups separately (r1438407) * new 'SVNAllowBulkUpdates prefer' option for mod_dav_svn (r1417642, et al) * new 'SVNMasterVersion' option for mod_dav_svn (r1398962) * added virtual-host support to 'svnserve' (r1401296) * new fsfs-stats tool which prints FSFS repository stats (r1410995) * new fsfs-reorg tool to optimize FSFS packing (r1383214, r1385395) * new --compatible-version option for 'svnadmin create' (r1407279 ) * new --ignore-properties option for 'svnlook diff' (r1407905) * new --properties-only option for 'svnlook diff' (r1407905) * new --diff-cmd option for 'svnlook diff' (r1413449) * allow leading "r"'s in http: ?p= and ?r= query parameters (r1221463) * faster 'svn ls' for large directories (r1296627) * mod_dav_svn now advertises supported POST types (r1375123) * mod_dav_svn can create transaction with inline txnprops (r1375167) * run start-commit hook after transaction creation (r1376201) * avoid byte-for-byte comparison where it can be avoided (r1390641) * various server-side performance improvements for 'log -g' (r1395442 et al) * allow up to 10Gbit throughput with svnserve (r1391788) * install mod_dontdothat correctly (r1454450) * svnadmin verify can now verify transactions (r1462353) * FSFS verifies revisions as they are added (r1462409) - Client-side bugfixes: * fix inconsistent 'svn log' output for empty revisions (issue #3964) * fix mis-ordered text output of 'svn log --diff' on Windows (r1220783) * fix 'svn log --diff' on moved file (issue #4153). * fix 'svn revert' of 'svn move' (issue #876) * fix file externals wrongly "resurrecting" a deleted file (#4017) * fix reporting of corrupted 1.6 w/cs by 'svn upgrade' (r1182904, -9) * fix bug caused by URI-decoding local merge source paths (r1210539) * fix properties out of sync with repos after merge and revert (issue #4305) * fix merge of replacement on local delete fails (issue #4011) * fix replacements on deletes produce wrong tree conflicts (issue #3806) * made ra_serf handle location headers that are not RFC-compliant (r1443906) * merge no longer errors out after resolving all conflicts (issue #4316) * fix svn blame mis-categorizing file type as binary (issue #2089) * fix externals not removed when working copy is made shallow (issue #3741) * fix update under add with not-present parent (issue #4111) * fix revert of files with svn:needs-lock under copied dirs (r1343168) * fix repos->wc diff of local copied/moved-here directories (r1341927) * fix repos->wc diff of local copied/moved-here files (r1341544) * fix "svn diff -cN PATH" where PATH was deleted in rN (r1338708) * fix dependency on APR hash order in several logic paths (r1338350 et al) * fix path inconsistencies in 'svn diff' output (r1338291) * fix misleading error message printed by 'svn switch' (issue #2337) * fix bug in mergeinfo recording during foreign-repos merge (r1430310) * fix spurious merge conflicts for binary files with keywords (issue #4221) * fix patching symlinks with 'svn patch' (issue #4273) * make 'svn switch' refresh lock information (issue #3378) * fix 'svn diff' output doesn't apply as patch without fuzz (issue #3362) * fix mergeinfo recording for multiple-revision-range merge (issue #4306) * fix diffs shown by 'show-diff' conflict prompt option (r1438879) * don't print an update summary header with no content (r1439480) * make 'svn rm' remove externals registrations below its targets (r1361256) * fix crashes in ra_serf where AVG 2012 Surf-Shield is in use (issue #4175) * don't raise conflicts on identical binary files (issue #4128) * improve error messages when wc.db missing (issue #4118) * fix 'svn diff' showing wrong text change (issue #4270) * fix 'svn diff -rN' failing to show local replace (issue #3797) * fix 'svn diff' showing wrong revision (issue #4010) * fix 'svn merge' showing spurious notifications (issue #2910) * parse '.@HEAD' correctly (issue #3606) * fix 'svn revert' after conflict in sparse working copy (issue #4168) * fix bug in global/per-server config handling in serf (r1421516) * properly display errors from serf (r1398742) * fix crash in ra_serf (r1408291) * fixed svnmucc propset and propdel on repository root (issue #3663) * fix 'svn info' output with ancient svnserve servers (pre-1.2) (r1409732) * ra_serf shows error message for 408 Request Timeout response (r1410983) * fix handling of "\ No newline ..." in diff/patch (r1411723, r1412382) * allow infinite http timeout in ra_serf (r1411976) * using unknown svn: property names now requires --force (issue #4261) * fix handling of case insensitive configuration files (r1215089) * properly handle errors during password caching (r1380695) * fix svnversion output not always a number (issue #4226) * fix conflict resolver losing executable bit of a file (r1391019) * fix redundant notifications when merging with ra_serf (issue #3802) * fix 'svn add --force /path/to/wcroot' should work (issue #4241) * fix file permissions changed after commit (issue #4331) * improve handling of http errors in ra_serf (1452792, 1452870) * include checksum of missing pristines in error message (r1452800) * fix an assert when merging against a replaced source (issue #4132) * fix replacement in merge source has incorrect notification (issue #4138) * improve performance of checkout (r1453791) * fixed documentation regarding merge source (issue #3247) * fix merge errors out after resolving conflicts (issue #4316) * fix delete/move with file external in unversioned dir (issue #4293) * fix resolving tree conflict with local node missing (r1461848) * fix invalid read during diff suffix scanning (issue #4339) * fix assertion when running 'svn log @PREV' (r1462134) * optimize enumerating configuration options (r1464478) * revert will now sleep for timestamps if using commit times (r1464769) * don't allow externals to be deleted with 'svn rm' (r1464992) * improved memory usage in ra_serf and ra_local (r1465280) * replace some assertions with more helpful error messages (r1465975) * fixed long keyword expansion truncated (issue #4349) - Server-side bugfixes: * SVNParentPath / repository listing now authz-filtered (r1408184) * user/group names in the authz config file are case-sensitive (r1475772) * limit commit runtime for nodes with very deep histories (r1224836) * 'svnadmin recover' truncates rep-cache at the right point (issue #4077) * fix crashes in dumpstream loading with skipped revs (r1214202, r1214216) * fix 'svn log -g' incorrectly treating rename as merge (issue #4022) * fix bug where fsfs file-hinting fails (issue #4320) * don't leak path of repository on server's disk to clients (r1330906) * remove spurious is-fresh-txn-root from empty revision files (issue #4031) * fix a stdout handling problem in 'svnlook diff' (r1411971) * fix erratic behaviour in 'svnlook diff' showing property diffs (r1412224) * fix inconsistent authz error messages in 'svn log' in svnserve (r1292462) * fix svndumpfilter for empty paths in included or excluded lists (r1294583) * make fsfs packing threadsafe (r1376011) * don't error out on intermittent memcached failures (r1394470) * fix a ra_svn deadlock with zero-copy server option (r1465622) - Other tool improvements and bugfixes: * 'svnmucc' promoted to first-class supported utility (issue #3308, #4279) * make 'svnmucc' prompt for log messages (issue #3418) * rename 'svnauthz-validate' to 'svnauthz' (issue #4284) * make 'svnauthz' optionally validate user/path access (r1197588) * fix mailer.py test suite problems (r1449582) * fix mailer.py not showing dirs with property deletions (r1449582) * make mailer.py generate Date and Message-ID headers (r1449592) * new '-?' option support for 'svnmucc' (r1339428) * provide the repository name to mailer.py (r1439592) * add '--force-interactive' to svnmucc (r1457789) * add '--trust-server-cert' to svnmucc (r1458995) Developer-visible changes: - General: * now require Python 2.5 for tests and dev tools (r1243627) * now require bzip2 for tests and dev tools (r1148512) * configure defaults to --without-apache-libexecdir (r1469862) * support builds with APR pool debugging (r1176894) * 'make extraclean' is more thorough now (r1149460) * support for Serf 2 (r1147538) * introduction of editor v2 (via private APIs only) (r1166332 et al) * improve SQLite setup for compatibility with OS X 10.7. (r1181666) * rework switch statement to accommodate OWC compiler limitations (r1204407) * new --enable-sqlite-compatibility-version configure option (r1201421) * make test suite LD_LIBRARY_PATH include just-built auth plugins (r1200474) * packages/ directory removed, contents were outdated and unused (r1442167) * rename 'makefile.ezt' to 'build-outputs.mk.ezt' (r1444822) * use expensive compiler optimizations with --enable-optimize (r1445063) * in Visual C++ builds, move temp files to different directory (r1446416) * remove --with-ssl and --with-gssapi configure options (r1449023) * require at least serf 1.2.0 as build dependency (issue #4296) * fix error tracing to record file/line properly (r1331242) * add --log-level argument to win-tests.py (r1335461) * improve GDB pretty-printing of svn types (r1351336, r1364750, r1365035) * load third-party FS modules (if --enable-runtime-module-search) (r1362434) * enable running the regression tests over https (r1349699) * support 'make davautocheck' on OS X (r1421583) * new '--enable-gcov' configure option (r1416646) * fix build with Apache HTTPD 2.5 (r1408985) * allow running the test suite through a http proxy (r1410195) * don't use non-constant initializers in struct variables (r1412911) * allow generation of Visual Studio 2012 compatible projects (r1245152) * nicer pretty-printing of Subversion data types in gdb (r1367262 et al) * teach serf build on Windows to use static APR/Util and OpenSSL (r1371338) * add --ssl-cert option to win-tests.py to run tests over https (r1372760) * don't strip Content-Type header form .po files on Windows (r1380056) * configure now script auto-detects GNOME keyring (r1387230) * allow configure to detect BDB on Debian-based Linux distros (r1390633) * auto-detect serf via pkg-config (r1391662) * improve queries for compatibility with SQLite 3.7.16 (r1455239) * remove support for in-tree apr, apr-util and apr-memcache (r1456924) * FSFS caching supports prefixes now (r1462436) * maintainer mode now prints symbolic error codes (r1465157) * don't require NLS support for kwallet support (r1466445) * make Julian happy (r1413030) - API changes: * fix inconsistent handling of log revs without changed paths (issue #3694) * deprecated SVN_ERR_SQLITE_UNSUPPORTED_SCHEMA (r1173240) * provide API to clear cached auth credentials (issue #2775) * improve repository location information in various APIs (issue #4170) * major rewrite of conflict storage and handling APIs (r1354973 et al) * hide (deprecate) svn_wc APIs that use editors (r1243339) * svn_stringbuf_ensure() allocates an extra byte for terminator (r1308966) * switch and update apis are now more consistent (r1465292) * deprecated svn_client_merge_reintegrate (r1466742) * deprecated low level ra_svn apis (r1466907) - Bindings: * star-imports in swig-py only import 'svn_*' symbols (r1303375) * fix compilation of Perl bindings on Mandriva 2007 (issue #2617) * new JavaHL testing targets (r1182983) * enable returning an error on malfunctions for JavaHL (r1366215) * MacOS X build fix to cope with missing GNOME keyring (r1397844) * fix swig bindings tests on MacOS X (r1397846) * fix assertion failure in JavaHL error reporting (r1405922) * support ruby 1.9 (r1407206) * JavaHL: Include OSGI Manifest information in svn-javahl.jar (r1234864) * new svn_auth_set_gnome_keyring_unlock_prompt_func function (r1241554) * fix svn_txdelta window ops for python bindings (r1389054) * fix build of Perl bindings with newer versions of SWIG (r1389658) * add missing API functions to Perl bindings (issue #2646) * add missing API functions to Python bindings (r1392038 et al) * add missing API functions to JavaHL bindings (issue #4326) * fix some reference counting bugs in swig-py bindings (r1464899, r1466524) Version 1.7.22 (12 Aug 2015, from /branches/1.7.x) http://svn.apache.org/repos/asf/subversion/tags/1.7.22 Developer-visible changes: - General: * fix the regression test suite which was broken in 1.7.21 (r1694012) Version 1.7.21 (5 Aug 2015, from /branches/1.7.x) http://svn.apache.org/repos/asf/subversion/tags/1.7.21 User-visible changes: - Client-side bugfixes: * cp: fix 'svn cp ^/A/D/H@1 ^/A' to properly create A (r1674455, r1674456) * fix issue #4551: svnrdump load commits wrong properties, or fails, on a non-deltas dumpfile (r1652182 et al.) - Server-side bugfixes: * mod_authz_svn: do not leak information in mixed anonymous/authenticated httpd (dav) configurations (CVE-2015-3184) * do not leak paths that were hidden by path-based authz (CVE-2015-3187) * fix 'svnadmin recover' for pre-1.4 FSFS repositories (r1561419) Developer-visible changes: - General: * support building on Windows with Visual Studio 2012, 2013 and 2015 (r1687158, r1692783) - Bindings: * swig-pl: fix some stack memory problems (r1668618, 1671388) Version 1.7.20 (31 Mar 2015, from /branches/1.7.x) http://svn.apache.org/repos/asf/subversion/tags/1.7.20 User-visible changes: - Client-side bugfixes: * fix 'svn patch' output for reordered hunks (issue #4533) - Server-side bugfixes: * reject invalid get-location-segments requests in mod_dav_svn and svnserve (r1667233) * mod_dav_svn: reject invalid txnprop change requests (r1667235) - Client-side and server-side bugfixes: * properly duplicate svn error objects (r1651759) * fix use-after-free in config parser (1646785, r1646786, r1646797) Developer-visible changes: * add lock file config for testing against HTTPD 2.4+ (r1544302, r1544303) * fix build with absolute path to neon install (r1664789) Version 1.7.19 (15 Dec 2014, from /branches/1.7.x) http://svn.apache.org/repos/asf/subversion/tags/1.7.19 User-visible changes: - Client-side bugfixes: * rm: display the proper URL in commit log editor (r1591123) * diff: fix invalid read during suffix scanning (issue #4339) * fix crash in eclipse IDE with GNOME Keyring (issue #3498) * checkout/update: fix file externals failing to follow history and subsequently silently failing (issue #4185) - Server-side bugfixes: * svnadmin dump: don't let invalid mergeinfo prevent a dump (issue #4476) * mod_dav_svn: reject requests with missing repository paths (r1643409) * mod_dav_svn: reject requests with invalid virtual transaction names (r1643437) * mod_dav_svn: avoid unneeded memory growth in resource walking (issue #4531) Developer-visible changes: - General: * properly generate a version resource when building on Windows (r1542610, r1564576, r1568180) * fix a problem with the unix build that could result in linking to the wrong Subversion libraries at build or at run time (r1594157) * use a proper intermediate directory when building with Visual Studio 2003-2008 (r1595431) * fix LIBTOOL_M4 and LIBTOOL_CONFIG variable not be evaluated properly during a unix build (r1637826) * allow the use of libtool 2.4.3 (r1640862, r1640873, r1643793) Version 1.7.18 (11 Aug 2014, from /branches/1.7.x) http://svn.apache.org/repos/asf/subversion/tags/1.7.18 User-visible changes: - Client-side bugfixes: * guard against md5 hash collisions when finding cached credentials (r1550691, r1550772, r1600909) * ra_serf: properly match wildcards in SSL certs. (r1615211, 1615219) * ra_serf: ignore the CommonName in SSL certs where there are Subject Alt Names (r1565531, r1566503, r1568349) Developer-visible changes: - General: * fix ocassional failure in checkout_tests.py test 12. (r1496127) * disable building ZLib's assembly optimizations on Windows. Version 1.7.17 (07 May 2014, from /branches/1.7.x) http://svn.apache.org/repos/asf/subversion/tags/1.7.17 User-visible changes: - Client-side bugfixes: * log: use proper peg revision over DAV (r1568872) * move: fix errors when moving files between an external and the parent working copy (r1551579) * copy: fix 'svn copy URL WC' on relocated working copies (r1580626, r1580650) - Server-side bugfixes: * mod_dav_svn: blacklist building with broken versions of httpd; 2.2.25, 2.4.5 and 2.4.6 (r1545835) * mod_dav_svn: detect out of dateness correctly during commit (issue #4480) Developer-visible changes: - General: * fix libmagic detection with custom LDFLAGS (r1577200) * fix a missing null byte when handling old pre-1.4 deltas (r1587968) * support building with Serf 1.3.x (r1517123, r1535139) - Bindings: * javahl: fix crash from resolve callback throwing an exception (r1586439) Version 1.7.16 (26 Feb 2014, from /branches/1.7.x) http://svn.apache.org/repos/asf/subversion/tags/1.7.16 User-visible changes: - Client-side bugfixes: * copy: fix some scenarios that broke the working copy (r1560690) * diff: fix regressions due to fixes in 1.7.14 (issue #4460) - Server-side bugfixes: * mod_dav_svn: prevent crashes with SVNListParentPath on (CVE-2014-0032) * reduce memory usage during checkout and export (r1564215) Developer-visible changes: - General: * fix failure in checkout_tests.py * support compiling against Cyrus sasl 2.1.25 (r1404912, r1413402) * support compiling against neon 0.30.x (r1566320) Version 1.7.15 (Not released, see changes for 1.7.16.) Version 1.7.14 (25 Nov 2013, from /branches/1.7.x) http://svn.apache.org/repos/asf/subversion/tags/1.7.14 User-visible changes: - Client- and server-side bugfixes: * fix assertion on urls of the form 'file://./' (r1516806) - Client-side bugfixes: * upgrade: fix an assertion when used with pre-1.3 wcs (r1530849) * ra_local: fix error with repository in Windows drive root (r1518184) * fix crash on windows when piped command is interrupted (r1522892) * fix externals that point at redirected locations (issues #4428, #4429) * diff: fix incorrect calculation of changes in some cases (issue #4283) * diff: fix errors with added/deleted targets (issues #4153, #4421) - Server-side bugfixes: * mod_dav_svn: Prevent crashes with some 3rd party modules (r1537360 et al) * fix OOM on concurrent requests at threaded server start (r1527103 et al) * fsfs: limit commit time of files with deep change histories (r1536790) * mod_dav_svn: canonicalize paths properly (r1542071) - Other tool improvements and bugfixes: * mod_dontdothat: Fix the uri parser (r1542069 et al) Developer-visible changes: - Bindings: * javahl: canonicalize path for streamFileContent method (r1524869) Version 1.7.13 (29 Aug 2013, from /branches/1.7.x) http://svn.apache.org/repos/asf/subversion/tags/1.7.13 User-visible changes: - General * merge: fix bogus mergeinfo with conflicting file merges (issue #4306) * diff: fix duplicated path component in '--summarize' output (issue #4408) * ra_serf: ignore case when checking certificate common names (r1514763) - Server-side bugfixes: * svnserve: fix creation of pid files (r1516556) * mod_dav_svn: better status codes for commit failures (r1490684) * mod_dav_svn: do not map requests to filesystem (r1512432 et al) Developer-visible changes: - General: * support linking against gssapi on Solaris 10 (r1515068) * don't use uninitialized variable to produce an error code (r1482282) - Bindings: * swig-pl: fix SVN::Client not honoring config file settings (r150744) * swig-pl & swig-py: disable unusable svn_fs_set_warning_func (r1515119) Version 1.7.12 (Not released, see changes for 1.7.13.) Version 1.7.11 (23 Jul 2013, from /branches/1.7.x) http://svn.apache.org/repos/asf/subversion/tags/1.7.11 User-visible changes: - General * translation updates for Simplified Chinese - Server-side bugfixes: * mod_dav_svn: fix incorrect path canonicalization (r1503528) See CVE-2013-4131, and descriptive advisory at http://subversion.apache.org/security/CVE-2013-4131-advisory.txt - Other tool improvements and bugfixes: * fix argument processing in contrib hook scripts (r1485350) See CVE-2013-2088, and descriptive advisory at http://subversion.apache.org/security/CVE-2013-2088-advisory.txt Developer-visible changes: - Bindings: * javahl: fix bug in error constructing code (r1405922) Version 1.7.10 (30 May 2013, from /branches/1.7.x) http://svn.apache.org/repos/asf/subversion/tags/1.7.10 User-visible changes: - Client-side bugfixes: * fix 'svn revert' "no such table: revert_list" spurious error (issue #4168) * fix 'svn diff' doesn't show some locally added files (issue #3797) * fix changelist filtering when --changelist values aren't UTF8 (r1475724) * fix 'svn diff --git' shows wrong copyfrom (issue #4294) * fix 'svn diff -x-w' shows wrong changes (issues #4133 and #4270, r1427278) * fix 'svn blame' sometimes shows every line as modified (issue #4034) * fix regression in 'svn status -u' output for externals (r1434750) * fix file permissions change on commit of file with keywords (issue #4331) * improve some fatal error messages (r1465975) * fix externals not removed when working copy is made shallow (issue #3741) - Server-side bugfixes: * fix FSFS repository corruption due to newline in filename (issue #4340) See CVE-2013-1968, and descriptive advisory at http://subversion.apache.org/security/CVE-2013-1968-advisory.txt * fix svnserve exiting when a client connection is aborted (r1482759) See CVE-2013-2112, and descriptive advisory at http://subversion.apache.org/security/CVE-2013-2112-advisory.txt * fix svnserve memory use after clear (issue #4365) * fix repository corruption on power/disk failure on Windows (r1483781) Developer-visible changes - General: * make get-deps.sh compatible with Solaris /bin/sh (r1451678) * fix infinite recursion bug in get-deps.sh (r1421541, r1424977) * fix uninitialised output parameter of svn_fs_commit_txn() (r1461743) - Bindings: * fix JavaHL thread-safety bug (r1476359) Version 1.7.9 (04 Apr 2013, from /branches/1.7.x) http://svn.apache.org/repos/asf/subversion/tags/1.7.9 User-visible changes - Client-side bugfixes: * improved error messages about svn:date and svn:author props. (r1440620) * fix local_relpath assertion (issue #4257) * fix memory leak in `svn log` over svn:// (r1458341) * fix incorrect authz failure when using neon http library (issue #4332) * fix segfault when using kwallet (r1421103) - Server-side bugfixes: See CVE-2013-1845, CVE-2013-1846, CVE-2013-1847, CVE-2013-1849, and CVE-2013-1884, and descriptive advisories at http://subversion.apache.org/security/ * svnserve will log the replayed rev not the low-water rev. (r1461278) * mod_dav_svn will omit some property values for activity urls (r1453780) * fix an assertion in mod_dav_svn when acting as a proxy on / (issue #4272) * improve memory usage when committing properties in mod_dav_svn (r1443929) * fix svnrdump to load dump files with non-LF line endings (issue #4263) * fix assertion when rep-cache is inaccessible (r1422100) * improved logic in mod_dav_svn's implementation of lock. (r1455352) * avoid executing unnecessary code in log with limit (r1459599) Developer-visible changes: - General: * fix an assertion in dav_svn_get_repos_path() on Windows (r1425368) * fix get-deps.sh to correctly download zlib (r13520131) * doxygen docs will now ignore prefixes when producing the index (r1429201) * fix get-deps.sh on freebsd (r1423646) - Bindings: * javahl status api now respects the ignoreExternals boolean (r1435361) Version 1.7.8 (17 Dec 2012, from /branches/1.7.x) http://svn.apache.org/repos/asf/subversion/tags/1.7.8 User-visible changes - Client- and server-side bugfixes: * Fix typos in pt_BR, es and zh_TW translations (r1402417, r1402421) - Client-side bugfixes: * fix crash with --username option on Windows (r1396285) * add missing attributes to "svn log -v --xml" output (r1398100) * fix svn patch ignoring hunks after no trailing newline (r1399174) * fix hang with ra_serf during error processing (r1403583) * ignore file externals with mergeinfo when merging (r1401915) * fix "svnmucc cp" segfault with a missing last argument (issue #4079) * fix conflict handling on symlinks (issue #4091) - Server-side bugfixes: * properly detect threading availability (r1398325) * fix "svnadmin load --bypass-prop-validation" (r1237779) * fix parsing of [groupsfoo] sections in authz file (issue #3531) * add Vary: header to GET responses to improve cacheability (r1390653) * fix fs_fs to cleanup after failed rep transmission (r1403964, et al) * fix mod_dav_svn to complain about revisions > HEAD (r1403588) Developer-visible changes: - General: * fix incorrect status returned by 1.6 API (r1403258) * fix compilation with g++ 4.7 (r1345740) * fix svn_uri_get_file_url_from_dirent on Windows (r1409146) Version 1.7.7 (09 Oct 2012, from /branches/1.7.x) http://svn.apache.org/repos/asf/subversion/tags/1.7.7 User-visible changes - Client- and server-side bugfixes: * fix memory read bug (r137614) * update Chinese translation - Client-side bugfixes: * fix issues with applying Git patch files (r1374800, et al) * fix status does not descend into dir externals after upgrade (issue #4016) * fix file externals don't update with old mod_dav_svn (issue #4224) * fix external diff tool duplicates Index: lines with 'svn diff' (r1380697) * fix GNOME keyring library fails with very old glib (r1378847) * fix unknown password stores in config file cause error (r1375052) * fix assertions in ra_serf running against server root (r1365519, et al) * fix ra_serf checkout/export aborts early on Windows (issue #4174) - Server-side bugfixes: * fix an assert with SVNAutoVersioning in mod_dav_svn (issue #4231) * fix unbounded memory use with SVNPathAuthz short_circuit (r1387943) * fix svndumpfilter exclude --targets requires leading slash (issue #4234) * fix connection ttl for memcache should be 50 seconds (r1391641) * stabilize order of paths in dumpfiles with APR 1.4.6 (r1344864, et al) Developer-visible changes: - General: * print "All tests successful" at the end of 'make check' (r1375089) * fix sandbox violation in a test (r1371282) * fix tests fail when running within a format 30 WC (r1391188, et al) * fix return value of svn_client_update4() incorrect (r1380295) * fix make check summary missing test failures (r1390965) * fix build does not fail when apache httpd is not available (r1374198) - Bindings: * fix swig-pl build fails with swig 2.0.7 and newer. (r1389658) * fix swig-py runtime problems with swig 2.0.5 and newer (r1351117) Version 1.7.6 (15 Aug 2012, from /branches/1.7.x) http://svn.apache.org/repos/asf/subversion/tags/1.7.6 User-visible changes: - Client- and server-side bugfixes: - Client-side bugfixes: * Fix "svn status -u --depth empty FILE" (r1348822, r1349215) * Fix example output of 'svn help status' (issue #3962) * propset of svn:eol-style might not notice related text changes (r1353572) * sort output of 'svn propget -R' (r1355699) * sort output of 'svn proplist' (r1355698) * sort output of 'svn status' (r1341012) * avoid a filestat per working copy find operation (r1340556) * optimize 'svn upgrade' performance on large working copies (r1342984) * allow 'file:///C:\repos' style arguments on Windows, like 1.6 (r1346765) * fix ra_serf against Subversion 1.2 servers (r1349367) * fix 'svn upgrade' on working copies with certain tree conflicts (r1345482) * avoid workqueue references to system temp dir (r1367854) * allow non-existent canonical paths (r1367853) * fix 'svn revert --depth files' to operate on files (r1365554) * fix ra_serf XML namespace handling against malicious server (r1337441) * fix relocate with server-relative externals (issue 4216) * change two asserts into errors for TortoiseSVN (r1368128, r1368065) * don't attempt to anchor an operation outside a wc root (r1361341) - Server-side bugfixes: * partial sync drops properties when converting to adds (issue #4184) * replaying a copy and delete of an unreadable child fails (issue #4121) * allow svnlook to operate on r0 (r1362508) * make FSFS revision files independent of APR hash order (r1367498) - Other tool improvements and bugfixes: * move mod_dontdothat to install-tools (r1307177) Developer-visible changes: - General: * fix running tests against httpd 2.4 (r1291594) * use constant struct initialisers for C89 compatibility (r1352068) - Bindings: * JavaHL: Don't assert on some invalid input (r1354626, r1354652) * JavaHL: Add missing new in 1.7 notifications (r1351772) Version 1.7.5 (17 May 2012, from /branches/1.7.x) http://svn.apache.org/repos/asf/subversion/tags/1.7.5 User-visible changes: - Client- and server-side bugfixes: * http: report deleted-revision upon delete during update (r1327474) - Client-side bugfixes: * avoid potential segfault when canonicalizing properties (r1296369) * improve memory and file-handle management with externals (issue #4130) * serf: convert assertions to "MERGE failed" errors (r1302417) * fix undefined behaviour during multi-segment reverse merges (issue #4144) * fix potential use of already freed memory during diff operation (r1311935) * improve performance of scan for the working copy root (r1306334) * cmdline: fix segfault during 'svn diff' argument processing (r1311702) * fix regression from 1.6 in update with --depth option (issue #4136) * propset: avoid undefined behaviour in error path (r1325361) * reset sqlite statements, partly for sqlite-3.7.11 compat (r1328846, et al) * fix assertion during 'svn diff -r BASE:HEAD ^/trunk' (issue #4161) * notify upon 'update' just removing locks on files (r1329876) * neon: fix potential use of freed memory during commits (r1329388) * 'status --xml' doesn't show repository deletes correctly (issue #4167) * fix assert on svn:externals with drive letter on Windows (issue #4073) * fix 'svn update --depth=empty' against 1.4 servers (issue #4046) * handle missing svn:date reported by svnserve gracefully (r1306111) * fix merges which first add a subtree and then delete it (issue #4166) * fix a regression with checkout of file externals (issue #4087) * don't add spurious mergeinfo to subtrees in edge-case merge (issue #4169) * improve performance of status on large working copies (issue #4178) - Server-side bugfixes: * fix non-fatal FSFS corruption bug with concurrent commits (issue #4129) * mod_dav_svn: raise an error on MERGE of non-existent resource (r1298343) * mod_dav_svn: support compiling/running under httpd-2.4 (r1232267) * mod_dav_svn: forbid BDB repositories under httpd's event MPM (issue #4157) - Other tool improvements and bugfixes: * emacs support: updates to dsvn.el and vc-svn.el (r1200896, et al) Developer-visible changes: - General: * windows example distribution scripts: include svnrdump (r1295007) * fix running the test suite with jsvn (r1335555) - Bindings: * swig-py tests: avoid FAILs on APR hash order (r1296137, r1292248) * swig-rb tests: avoid FAILs on APR hash order (r1310535, r1310594) * swig-pl: Improved perl detection in gen-make.py (r1291797, r1291810) Version 1.7.4 (08 Mar 2012, from /branches/1.7.x) http://svn.apache.org/repos/asf/subversion/tags/1.7.4 User-visible changes: * fix 'svn log --diff' for moved paths (r1210147, et al) * fix ra_serf problem with reading directory entries via HTTPv2 (r1238121) * prepend "sqlite:" to error messages from SQLite (r1245738, -817) * fix randomly missing "Merged via" notifications in 'svn log -g' (r1293229) * fix spurious conflict when merging deleted symbolic link (issue #4052) * fix URL-to-WC copy of externals on Windows (issue #4123) * improve an FSFS sanity-check error message (r1294470) * fix regressions with symlinks pointing at externals (issue #4102) * fix 'svn log --diff' output ordering issue on Windows (r1295671) Developer-visible changes: * don't build mod_dontdothat if not building with httpd (r1243976) * fix the testsuite to avoid FAILs on APR hash order (r1230714, et al) Version 1.7.3 (14 Feb 2012, from /branches/1.7.x) http://svn.apache.org/repos/asf/subversion/tags/1.7.3 General: * ship mod_dontdothat with the standard release User-visible changes: * fix segfault on 'svn rm $ROOT_URL' (issue #4074) * replace a couple of assertions in favor of errors (r1207858, -949) * fix a server assert after being upgraded (r1210195) * fix segfault on 'svn mkdir svn://localhost' (r1211483) * make 'svnadmin recover' prune the rep cache (r1213331, et al) * make svnmucc use values from --config-dir option * update and clarify the merge help text (r1154121, et al) * replace wc assertion with informative error (r1222521, -693) * copy permissions correctly for FSFS dirs (r1229252) * improve 'svn log --with-all-revprops' over ra-dav (issue #4082) * fix segfault when remapping a file external (issue #4093) * fix segfault caused by obstructing unversioned dir (r1229677) * fix regression on first update of external dir with '-r' (issue #4053) * fix various EOL-handling problems in 'svn patch' (issues #3814, #3991) * fix segfault in 'svn revert' (r1229303) * improve correctness of 'svn patch --dry-run' (r1231944, -5) * enforce revisions given in 'svn:externals' (issue #4053) * fix potential corruption on 32-bit FSFS with large files (r1230212) * make 'svn status --xml' show new files (issue #4097) * fix 'svn mergeinfo' correctness (issue #4050) * return the correct status for non-present nodes (r1232202, -07, -21, -22) * improve SASL error messages (r1236343, et al) * improve server cert error code for ra_serf (r1232413) * fix SVNParentPath listings for parent path symlinks (r1221767, -80) * fix mod_dav_svn's handling of POST errors (issue #4086) * log some mod_dav_svn errors, rather than ignoring them (r1237720, -9596) * relax requirements for canonicalization in mod_dav_svn (r1236173) * fix a rare source of FSFS corruption (r1240752) * allow committing the result of some copy operations (issue #4059) * prevent one-byte buffer overflow in base64 decoding (r1242337) Developer-visible changes: * JavaHL: Add missing notify action, fixing an exception (r1221793) * fix swig-py memory leak (r1235264, -296, -302, -736) * fix spurious test suite failure (r1220742, -50) * allow running tests on UNC shares (r1225491) * bindings: see platform-specific password providers (r1242660, -1) * skip 'svnrdump dump' tests over ra_serf (r1242537) * convert a few ra_serf assertions to errors (r1242607) Version 1.7.2 (02 Dec 2011, from /branches/1.7.x) http://svn.apache.org/repos/asf/subversion/tags/1.7.2 User-visible changes: * fix working copy corruption after interrupted update/switch (issue #4040) * avoid segfaults against pre-1.5 servers (r1186928) * improve configure error message if apr-util uses old or no bdb (r1186784) * make 'svn patch' ignore '/dev/null' targets for compat with git (r1197998) * fix 'svn patch' segfault on patch that skips and deletes files (r1199950) * omit "Committed revision N." output from 'svn commit --quiet' (r1200837) * fix authz denial when svnserve root is a repository (issue #4060) * fix uninitialized memory read in client diff code (r1201002) * avoid potential segfault during merges (r1202807) * fix an assertion failure when a symlink is updated (r1186944, -81, -83) * make working copy operations fail if nodes have no base checksum (r1202630) * fix nested s when using v2 protocol (r1203546, -651, -653) * make mod_dav_svn ignore non-Subversion POST requests (r1187695) * avoid reading freed memory (r1204478) * recognize empty (only byte order mark) UTF-8 files as text (issue #4064) * fix 1.7 client regression when operating against a 1.0.x server (r1199876) * remove empty parent dirs of removed externals on update (issue #4044) * make 'svn diff -c N' work for files added in rN (issue #2873) * plug a memory leak in the bdb backend (r1205726) * fix 'svn import' with native eol-style and inconsistent EOLs (r1205193) * fix reading beyond the end of a string in bdb backend (r1205839, -48) * don't assert when committing an incomplete directory (issue #4042) Developer-visible changes: * JavaHL: allow 'status -u' to function properly (r1189190, -395) * don't put '\r' characters in our generate sql headers (r1189580) * properly define WIN64 on Windows x64 builds (r1188609) * better adherence to C89 in enum definitions (r1189665) * bump copyright year in Windows DLLs (r1189261) * log a better error when opening rep-cache.db fails (r1204610, -73) Version 1.7.1 (24 Oct 2011, from /branches/1.7.x) http://svn.apache.org/repos/asf/subversion/tags/1.7.1 User-visible changes: * improve performance of 'svn info' (r1164386) * improve hash table sorting performance (r1167659) * update bash completion for 1.7 (r1177001) * make 'svn ls' continue to work with 1.0-1.3 repos (r1154278, -379, -82) * improve handling of error messages generated by Cyrus SASL (r1179767) * update INSTALL documentation file (r1182115, and others) * error instead of assert when upgrading corrupt WCs (r1182904, -9) * improve memory usage in merge (r1176915) * fix an invalid assertion in merge (r1149103, -35) * improve performance of 'merge --reintegrate' in edge-case (r1167681) * fixed: 'svn mergeinfo' shows wrong revisions for added nodes (issue #3791) * make 'svn add --parents D/file' work if D is deleted (r1185222) * improve performance of trivial text file merges (issue #4009) * add FSFS sanity check to prevent corruption seen in the wild (r1178280) * improve correctness/performance of recursive info and proplist (r1164426) * fix memory leak in 'merge --reintegrate' (r1180154) * fix handling of directories after 'update --set-depth=empty' (r1185911) * fix 'checksum != NULL' assertions in some upgraded WCs (r1177732) * fix upgrading of WCs containing authz-restricted dirs (r1185738) * make the server tolerate svn:mergeinfo with malformed paths (r1182771) * fix some erroneous warning messages from the svn client (r1185746) * fix WC upgrade with replaced nodes in edge-case (issue #4033) Developer-visible changes: * fix object lifetime issues in the JavaHL bindings (r1175888) * fix org.tigris JavaHL wrappers to avoid double finalize (r1179680) * don't write to const memory (r1177492) * improve zlib configuration (r1174761, -98, -806) * improve SQLite runtime init for OS X 10.7 compat (r1181666) * improve test suite correctness (r1174111) * fix potential segfault seen by TSVN (r1183263) * fix backward compat crashes in JavaHL (r1183054, -347) * fill in repos_* fields of svn_wc_status3_t for repos-only nodes (r1181609) * disable the SQLite shared process cache (r1185242, r1185280) Version 1.7.0 (11 Oct 2011, from /branches/1.7.x) http://svn.apache.org/repos/asf/subversion/tags/1.7.0 See the 1.7 release notes for a more verbose overview of the changes since the 1.6 release: http://subversion.apache.org/docs/release-notes/1.7.html User-visible changes: - General: * No longer including contrib/ in the release tarballs (r877798) - Major new features: * Less verbose HTTP-based repository access protocol (issue #1161, #3371) * Rewritten working copy metadata storage (issue #3357) * New 'svn patch' subcommand (issue #511) * Rewritten FSFS in-memory caching for better performance * New remote repository dump/load client 'svnrdump' - Minor new features and improvements: * Better handling of HTTP redirects (issue #2779) * Improved and much more consistent path handling (issue #2028, and others) * 'svnadmin load' rewrites changed revnums in mergeinfo (issue #3020) * Error message and help text improvements * 'svn log' can print unidiff of changes made in a revision (issue #2909) * 'svn diff' can print git-style unidiff annotations * svnsync can now steal locks on a mirror repository (issue #3309) * display the wc root in the output of 'svn info' (issue #3355) * add 'svnlook filesize' (issue #3509) * add 'svn upgrade' command for upgrading working copies (r877675) * add 'svnsync --disable-locking' (issue #3545) * subtree merges don't unconditionally stop reintegrate merge (issue #3577) * 'svn relocate' replaces 'svn switch --relocate' (r1026475) * 'svn relocate' updates relative externals (issue #3597) * allow svnsync users to specify the source repo (issue #3637) * remove redundant mergeinfo notifications for 2-URL merges (issue #3671) * 'svn export' into the current directory (issue #3727) * added '--parents' to 'svn update' (issue #3748) * allow configurable connection timeout in ra_serf (r876161) * add digest authentication in ra_serf (r876405) * add extensive caching support to servers (r1067669, -75, -72302) * add configurable caching to svnadmin (r1078357) * make server-side network data compression rate configurable (r1072288) * added support for auto-detecting mime-types with libmagic (r1131120) * 'svn rm url1 url2 url3' uses single txn per repo (issue #1199) * don't leave unversioned files when reverting copies (issue #3101) - Client-side bugfixes: * 'svn cp A B; svn mv B C' is equivalent to 'svn cp A C' (issue #756) * revert fetches missing directories from the server (issue #1040) * allow subdirs of moved dirs to be moved and committed (issue #1259) * improved performance of 'svn mv' with whole directories (issue #1284) * 'svn rm B; svn cp A B' now works (issue #1516) * 'svn diff URL1 URL2' now reverse of 'svn diff URL2 URL1' (issue #2333) * error if relocating to an unused URL (issue #2531) * 'svn blame -rWORKING' is now supported (issue #2544) * improve correctness of commit on a relocated wc over ra_dav (issue #2578) * add early error to 'svn add --auto-props' with mixed eols (issue #2713) * allow 'svn diff' to accept symlinks as targets (issue #2716) * don't lose props for replaced items (issue #2743) * handle mergeinfo for subtrees removed outside of svn (issue #2915) * add ability to force 'svn diff' to use internal diff (issue #3701) * correctly recover a schedule-for-delete rm'd outside of svn (issue #3106) * don't create self-referential mergeinfo from own history (issue #3157) * improve 'svn log -g' handling of bad mergeinfo source paths (issue #3270) * better conflict stat printing (issue #3342, issue #3594) * 'svn update' restores excluded files (issue #3544) * allow reintegrate merges into WCs with missing subtrees (issue #3603) * more gracefully error when given back cmdline input (issue #3620) * update exit codes to reflect command failure (issue #3622) * don't double-update file externals (issue #3665) * improve output of multi-target update (issue #3693, #3746) * make 'svn up --set-depth=exclude FILE' work (issue #3736) * return correct error code for 'svn cat' on nonexisting file (issue #3713) * support svn:externals on locally added directories (issue #2267) * use installed GSSAPI lib for Kerberos in ra_serf (r877381) * allow 'svn info' to run on an excluded item (issue #3792) * improve 'log -g' output with reverse merges (issue #3176) * don't print error message if stdout is a pipe and is closed (issue #3014) * removed special copy-handling during updates added in 1.5.0 (issue #3711) * fix warning about copies committed with non-infinity depth (issue #3752) * can now commit multiple wc paths lacking a common parent (issue #2381) * 'svn export --depth $WC' now works correctly (issue #3800) * added support for case-only renames on Windows (issue #3702) * 'svn delete --force' removes tree conflicts (issue #3805) * don't throw an error when skipping tree conflicts in update (issue #3329) * don't break commits of wc->wc copies with file externals (issue #3589) * allow 'svn info' to work on symlinks to working copies (issue #2305) * allow 'svn st --show-updates' to work across symlinks (issue #3117) * 'svn revert' shouldn't loop on symlinks (issue #3972) * fixed: wc-to-wc copy of a switch source (issue #1802) * fixed: 'svn st' reports symlinks as obstructed items (issue #2284) * fixed: 'cd e:\; svn up e:\' fails (issue #2556) * fixed: svn aborts on commiting from root dir on windows (issue #3346) * fixed: removing a dir scheduled for deletion corrupts wc (issue #2741) * fixed: 'svn cleanup' fails on obstructed paths (issue #2867) * fixed: case-only renames resulting from merges don't work (issue #3115) * fixed: 'svn mergeinfo' ignores peg rev for wc target (issue #3180) * fixed: unable to merge to wc of deleted branch (issue #3221) * fixed: move via merge leaves behind versioned move source (issue #3324) * fixed: ra_serf does not honor http-proxy-exceptions (issue #3428) * fixed: 'svn mv A B; svn mv B A' loses history (issue #3429) * fixed: ra_serf doesn't support http-auth-types config (issue #3435) * fixed: merge sets incorrect mergeinfo on skipped paths (issue #3440) * fixed: ra_serf inconsistent handling of cached authn creds (issue #3450) * fixed: ra_serf segfault with using NTLM or Negotiate auth (r876910) * fixed: excluded subtrees are not detected by svnversion (issue #3461) * fixed: submitting a changelist while obstructed item exists (issue #3484) * fixed: crash when changing an external's URL (issue #3530) * fixed: target moved after branching breaks reintegrate (issue #3640) * fixed: potential race condition in svnsync (issue #3546) * fixed: spurious merge conflicts with pre-1.7 mod_dav_svn (issue #3657) * fixed: repeat merge is not a no-op (issue #3564) * fixed: inheritance results in self-referential mergeinfo (issue #3668) * fixed: inheritance results in nonexistent mergeinfo sources (issue #3669) * fixed: memory leaks in ra_serf (issue #3684) * fixed: corruption of 'svn pg' output for large properties (issue #3721) * fixed: 'svnsync copy-revprops' doesn't sync revprop dels (issue #3728) * fixed: executable flag not correctly set on merge (issue #3686) * fixed: 'svn rm' fails on multiple URLs with encoded spaces (issue #3839) * fixed: children of replaced dirs cannot be deleted (issue #3468) * fixed: executable flag of binary file lost during merge (issue #3686) * fixed: merging a symlink-turned-regular-file breaks the wc (issue #2530) * fixed: can't remove file externals (issue #3351) * fixed: 'svn unlock' attempts to unlock wrong token on DAV (issue #3794) * fixed: forced DAV 'svn unlock' results in 403, not warning (issue #3801) * fixed: rm -> ci -> cp = missing directory (issue #2763) * fixed: 'svn info' returns parent info on missing dirs (issue #3178) * fixed: spurious prop conflict with 'merge --reintegrate' (issue #3919) * fixed: 'svn --version' fails with non-existent $HOME (issue #3947) * fixed: unforced export silently overwites existing file (issue #3799) * fixed: reverse merge which adds subtree mergeinfo fails (issue #3978) * fixed: 'svn up -r{R>HEAD}' hangs client over ra_svn (issue #3963) * fixed: 'svn up' updates file externals in target siblings (issue #3819) * many other minor bugfixes, optimizations, plugs of memory leaks, etc - Server-side bugfixes: * mod_dav_svn is less strict about auto-merging for commits (issue #1704) * allow SVNListParentPath to be used with authz (issue #2753) * allow nav to repo list from repo top with SVNListParentPath (issue #3159) * allow repositories in the root of a drive on windows (issue #3535) * don't destroy mergeinfo with 'svnadmin load --parent-dir' (issue #3547) * fixed: 'svnadmin hotcopy' does not duplicate symlinks (issue #2591) * fixed: post-revprop-change errors cancel commit (issue #2990) * fixed: mod_dav_svn runs pre-revprop-change hook twice (issue #3085) * fixed: mod_dav_svn doesn't return stderr to user on failure (issue #3112) * fixed: hotcopy may corrupt target rep-cache.db (issue #3596) * fixed: mod_dav_svn can cause spurious merge conflicts (issue #3657) * fixed: DAV can overwrite directories during copy (issue #3314) * fixed: 'svn log' returns log of unrelated path (issue #3931) * match paths against authz rules in case sensitive way (issue #3781) * svnserve can now force usernames to upper/lower case (issue #3726) * reduce duplicate log messages in 'log -g' (issue #3650) * svnserve: don't crash on shutdown with SASL in inetd mode (issue #3664) * disallow arbitrary HTTP headers from committers (issue #2872) * limit FSFS memory consumption (issue #3478, #3593) * many other minor bugfixes too numerous to list here - Other tool improvements and bugfixes: * svnsync now takes the '--config-option' argument (issue #2027) * svnsync can translate non-UTF-8 properties to UTF-8 (issue #3817) * svnadmin now errors on non-UTF-8 revision properties (issue #3755) * svnadmin verify now errors on non-UTF-8 paths (r1129641) Developer-visible changes: - General: * improved output of 'make check' * introduce scratch_pool/result_pool parameter paradigm * improved error tracing (r877208, -736) * improve building with sqlite on Windows (issue #3364) * allow mod_dav_svn to compile against Apache 2.4 (issue #3548) * support running tests against older servers (r876016) * notification of unversioned obstructions (r877344) * removed virtually all abort() calls (issue #2780) * don't include client-specific suggestions in error msgs (issue #3887) - API changes: * don't crash svn_client_copy if ctx->log_msg_func is NULL (issue #3234) * much improved ra_serf error handling (issue #3375) * provide clients with old and new revision on update (r876515) * close both files, even on error in svn_stream_copy3() (r887262) * added 'work-in-progress' XFail test status (r876549) * notifications sent when mergeinfo changes (r877588) * add information on text and property mods in log APIs (r877688) * fixed: svn_ra_local__get_file() leaks file descriptors (issue #3290) * svn_ra_neon__get_dir() returns correct dir set for URLs (issue #3093) * swig-py: always set ChangedPath.path (also for deletes) (issue #2630) * improve conflict resolver API for a specific direction (issue #3049) - Bindings: * New JavaHL package: org.apache.subversion * Deprecate the SVNClientSynchronized class in JavaHL (issue #2755) * fixed setting binary properties in JavaHL (issue #3770) * fix type mapping of svn_txdelta_window_t in python bindings (issue #3688) Version 1.6.23 (30 May 2013, from /branches/1.6.x) http://svn.apache.org/repos/asf/subversion/tags/1.6.23 User-visible changes - Server-side bugfixes: * fix FSFS repository corruption due to newline in filename (issue #4340) * fix svnserve exiting when a client connection is aborted (r1482759) See CVE-2013-2112, and descriptive advisory at http://subversion.apache.org/security/CVE-2013-2112-advisory.txt - Other tool improvements and bugfixes: * fix argument processing in contrib hook scripts (r1485350) Version 1.6.22 (Not released, see changes for 1.6.23.) Version 1.6.21 (04 Apr 2013, from /branches/1.6.x) http://svn.apache.org/repos/asf/subversion/tags/1.6.21 User-visible changes - Server-side bugfixes: * mod_dav_svn will omit some property values for activity urls (r1453780) * improve memory usage when committing properties in mod_dav_svn (r1443929) * fix mod_dav_svn runs pre-revprop-change twice (issue #3085) * fixed: post-revprop-change errors cancel commit (issue #2990) * improved logic in mod_dav_svn's implementation of lock. (r1455352) Developer-visible changes: - General: * fix a compatibility issue with g++ 4.7 (r1345740) Version 1.6.20 (04 Jan 2013, from /branches/1.6.x) http://svn.apache.org/repos/asf/subversion/tags/1.6.20 User-visible changes - Client- and server-side bugfixes: * Fix typos in pt_BR, es and zh_TW translations (r1402417) - Server-side bugfixes: * add Vary: header to GET responses to improve cacheability (r1390653) * fix fs_fs to cleanup after failed rep transmission (r1403964, et al) * fix an assert with SVNAutoVersioning in mod_dav_svn (issue #4231) Version 1.6.19 (10 Sep 2012, from /branches/1.6.x) http://svn.apache.org/repos/asf/subversion/tags/1.6.19 - Client-side bugfixes: * handle missing svn:date reported by svnserve gracefully (r1306111) - Server-side bugfixes: * fix possible server hang if a hook script fails to start (r1330410) * fix write-through proxy commit regression introduced in 1.6.17 (r1088602) * partial sync drops properties when converting to adds (issue #4184) - Developer-visible changes: * fix the testsuite to avoid FAILs on APR hash order (r1230714, et al) Version 1.6.18 (29 Mar 2012, from /branches/1.6.x) http://svn.apache.org/repos/asf/subversion/tags/1.6.18 User-visible changes: * reject invalid svn:mergeinfo at commit time over DAV (issue #3953) * fix reintegrate merge regression introduced in 1.6.13 (issue #3957) * make the stderr output of the post-commit hook XML-safe (r893478) * fix a rare source of FSFS corruption (r1240752) * plug a memory leak in the bdb backend (r1205726) * server-side performance fix for "log -g" (r1152282) * fix description of svndumpfilter's --targets option (r1151911) * fix datastream corruption during resumed transfer in ra_serf (r1154733) * fix a crash in ra_svn SASL authentication (r1166555, -678) * fix potential corruption on 32-bit FSFS with large files (r1230212) * make website links point to subversion.apache.org (r896893, -901, r915036) * fix non-fatal FSFS corruption bug with concurrent commits (issue #4129) Developer-visible changes: * fix sqlite distfile retrieval in get-deps.sh (r1134734) * fix swig-py memory leak (r1235264, -296, -302, -736) * allow passing --with-jdk to gen-make.py on Windows (r966167) Version 1.6.17 (01 Jun 2011, from /branches/1.6.x) http://svn.apache.org/repos/asf/subversion/tags/1.6.17 User-visible changes: * improve checkout speed on Windows (issue #3719) * make 'blame -g' more efficient with large mergeinfo (r1094692) * avoid some invalid handle exceptions on Windows (r1095654) * preserve log message with a non-zero editor exit (r1072084) * fix FSFS cache performance on 64-bit platforms (r1103665) * make svn cleanup tolerate obstructed directories (r1091881) * fix deadlock in multithreaded servers serving FSFS repositories (r1104093) * detect very occasional corruption and abort commit (issue #3845) * fixed: file externals cause non-inheritable mergeinfo (issue #3843) * fixed: file externals cause mixed-revision working copies (issue #3816) * fix crash in mod_dav_svn with GETs of baselined resources (r1104126) See CVE-2011-1752, and descriptive advisory at http://subversion.apache.org/security/CVE-2011-1752-advisory.txt * fixed: write-through proxy could directly commit to slave (r917523) * detect a particular corruption condition in FSFS (r1100213) * improve error message when clients refer to unknown revisions (r939000) * bugfixes and optimizations to the DAV mirroring code (r878607) * fixed: locked and deleted file causes tree conflict (issue #3525) * fixed: update touches locked file with svn:keywords property (issue #3471) * fix svnsync handling of directory copyfrom (issue #3641) * fix 'log -g' excessive duplicate output (issue #3650) * fix svnsync copyfrom handling bug with BDB (r1036429) * server-side validation of svn:mergeinfo syntax during commit (issue #3895) * fix remotely triggerable mod_dav_svn DoS (r1130303) See CVE-2011-1783, and descriptive advisory at http://subversion.apache.org/security/CVE-2011-1783-advisory.txt * fix potential leak of authz-protected file contents (r1130303) See CVE-2011-1921, and descriptive advisory at http://subversion.apache.org/security/CVE-2011-1921-advisory.txt Developer-visible changes: * fix reporting FS-level post-commit processing errors (r1104098) * fix JVM recognition on OS X Snow Leopard (10.6) (r1028084) * allow building on Windows with recent Expat (r1074572) Version 1.6.16 (02 Mar 2011, from /branches/1.6.x) http://svn.apache.org/repos/asf/subversion/tags/1.6.16 User-visible changes: * more improvement to the 'blame -g' memory leak from 1.6.15 (r1041438) * avoid a crash in mod_dav_svn when using locks (r1071239, -307) See CVE-2011-0715, and descriptive advisory at http://subversion.apache.org/security/CVE-2011-0715-advisory.txt * avoid unnecessary globbing for performance (r1068988) * don't add tree conflicts when one already exists (issue #3486) * fix potential crash when requesting mergeinfo (r902467) * don't attempt to resolve prop conflicts in 'merge --dry-run' (r880146) * more fixes for issue #3270. Developer-visible changes: * ensure report_info_t is properly initialized by ra_serf (r1058722) * locate errors properly on a malfunction (r1053208) * fix output param timing of svn_fs_commit_txn() on fsfs (r1051751) * for svn_fs_commit_txn(), set invalid rev on failed commit (r1051632, -8) * fix sporadic Ruby bindings test failures (r1038792) * fix JavaHL JVM object leak when dumping large revisions (r947006) * use Perl to resolve symlinks when building swig-pl (r1039040) * allow Perl bindings to build within a symlinked working copy (r1036534) * don't overwrite the LD_LIBRARY_PATH during make check-swig-pl (r946355) * improve unit tests for some fs functions (r1051744, -5, -3185, -241) Version 1.6.15 (26 Nov 2010, from /branches/1.6.x) http://svn.apache.org/repos/asf/subversion/tags/1.6.15 User-visible changes: * hide unreadable dirs in mod_dav_svn's GET response (r996884) * make 'svnmucc propsetf' actually work (r1005446) * limit memory fragmentation in svnserve (r1022675) * fix 'svn export' regression from 1.6.13 (r1032970) * fix 'svn export' mistakenly uri-encodes paths (issue #3745) * fix server-side memory leaks triggered by 'blame -g' (r1032808) This has been tracked as CVE-2010-4644 * prevent crash in mod_dav_svn when using SVNParentPath (r1033166) This has been tracked as CVE-2010-4539 * allow 'log -g' to continue in the face of invalid mergeinfo (issue #3270) * filter unreadable paths for 'svn ls' and 'svn co' (r997026, -070, -474) * fix abort in 'svn blame -g' (issue #3666) * fix file handle leak in ruby bindings (issue #3512) * remove check for 1.7-style working copies (issue #3729) Developer-visible changes: * improve some swig parameter mapping (r984565, r1035745) * improve test accuracy over dav (r991534, r877814) * create fails.log for test runs (r964349) * improve detection of 'svnversion' when building (r877219, et al) * don't violate API layering in dumpstream logic (issue #3733) * don't report working copy installs as switched (r1033921) Version 1.6.14 (Not released, see changes for 1.6.15.) Version 1.6.13 (01 Oct 2010, from /branches/1.6.x) http://svn.apache.org/repos/asf/subversion/tags/1.6.13 User-visible changes: * don't drop properties during foreign-repo merges (issue #3623) * improve auto-props failure error message (r961970) * improve error message for 403 status with ra_neon (r876615) * don't allow 'merge --reintegrate' for 2-url merges (r959004) * improve handling of missing fsfs.conf during hotcopy (r980811, -1449) * escape unsafe characters in a URL during export (issue #3683) * don't leak stale locks in FSFS (r959760) * better detect broken working copies during update over ra_neon (r979045) * fsfs: make rev files read-only (r981921) * properly canonicalize a URL (r984928, -31) * fix wc corruption with 'commit --depth=empty' (issue #3700) * permissions fixes when doing reintegrate merges (related to issue #3242) * fix mergeinfo miscalculation during 2-url merges (issue #3648) * fix error transmission problems in svnserve (r997457, -66) * fixed: record-only merges create self-referential mergeinfo (issue #3646) * fixed: 'SVNPathAuthz short_circuit' unsolicited read access (issue #3695) See CVE-2010-3315, and descriptive advisory at http://subversion.apache.org/security/CVE-2010-3315-advisory.txt * make 'svnmucc propset' handle existing and non-existing URLs (r1000607) * add new 'propsetf' subcommand to svnmucc (r1000612) * warn about copied dirs during 'svn ci' with limited depth (r1002094) Developer-visible changes: * make ruby bindings compatible with Ruby 1.9 (r957507) * use the repos verify API in JavaHL (r948916) * teach ra_serf to parse md5 checksums with update editors (r979429) * let ra_serf work with current serf releases (r879757, r880320, r943796) Version 1.6.12 (21 Jun 2010, from /branches/1.6.x) http://svn.apache.org/repos/asf/subversion/tags/1.6.12 User-visible changes: * further improvements for issue #3242 * allow deletion of uris which need character escaping (issue #3636) * fix errors with 'svn mkdir --parents' (issue #3649) * update address to which crash reports are sent (r901304) * check for server certificate revocation on Windows (r898048) * disable custom file mutexes on Windows (r879902, -16) * fix handling of peg revision'd copy targets (issue #3651) * more improvements to 'svn merge --reintegrate' (r935631) * allow copying of broken symlinks (issue #3303) * improve rep-sharing performance on high-concurrency repos (issue #3506) * fixed: added subtrees with mergeinfo break reintegrate (issue #3654) * fixed: assertion triggered by tree-conflicted externals (issue #3469) Developer-visible changes: * give windows devs more flexibility with sqlite versions (r944635) * allow the pack tests to work with low file descriptor limits (r937610) * improve exception handling on Windows Vista and 7 (r878447, -910, -916) Version 1.6.11 (19 Apr 2010, from /branches/1.6.x) http://svn.apache.org/repos/asf/subversion/tags/1.6.11 User-visible changes: * fix for repositories mounted via NFS (issue #3501) * enable TCP keep-alives in svnserve (r880552) * tighten restrictions on revprops for 'svnadmin verify' (r904594) * make ra_serf give better out-of-date information (issue #3561) * improve error message upon connection failure with svn+ssh:// (r922516) * allow 'svn log' on an uncommitted copy/move destination (r901752) * make 'svnadmin hotcopy' copy the fsfs config file (r905303) * mergeinfo improvements with non-inheritable mergeinfo (issue #3573) * make mergeinfo queries not require access to the repo root (issue #3242) * update URLs to refer the new apache.org repository (r904301, -94) * update relative externals during a switch (issue #3390) * fix 'merge --reintegrate' with self-referential mergeinfo (r892050, -85) * improve wc-ng working copy detection (r929382) * improve handling of mergeinfo when using serf (r880461) * fixed: 'svnlook plist --revprop' with '-t TXN_NAME' (r917640, -8211) * fixed: file external from URL cannot overwrite existing item (issue #3552) * fixed: potential memory error in 'svn status' (r923674, -9) * fixed: merge records mergeinfo from natural history gaps (issue #3432) * fixed: theoretical possibility of DB corruption (r926151, -67) Developer-visible changes: * disable checks for wc-ng working copies when running the test suite * on Windows, don't ignore move operation error codes (r896915) * more precise reporting of errors occuring with sqlite init (r927323, -8) * ensure rangelist APIs are commutative (r923389, -91) Version 1.6.10 (Not released, see changes for 1.6.11.) Version 1.6.9 (25 Jan 2010, from /branches/1.6.x) http://svn.apache.org/repos/asf/subversion/tags/1.6.9 User-visible changes: * allow multiple external updates over ra_svn (issue #3487) * fix a segmentation fault when using FSFS (r881905) * support Berkeley DB 4.8 (r879688) * various autoprop improvements (r880274, -5) * improve usage of svn+ssh:// on Windows (issue #2580) * teach 1.6.x to recognize 1.7 working copies (1.6.x-future-proof branch) * update help text for 'svn update' and 'svn switch' (r886164, -97) * make 'svnadmin load --parent-dir' create valid mergeinfo (r888979, -9081) * tolerate relative merge source paths in mergeinfo (r889840) * teach mod_dav_svn to support the Label header (issue #3519) * fixed: svnsync leaves stale sync-locks on mirrors (r884842) * fix applicability of 'svn resolve --accept=theirs-conflict' (r880525, -6) * fixed: segfault in 'svn resolve' (r896522, -47) * fix commit failure against an out-of-date mirror (r900797) Developer-visible changes: * update ruby bindings test expectation (r880162) * don't allow rangelist and mergeinfo API to modify input args (r879093) Version 1.6.8 (Not released, see changes for 1.6.9.) Version 1.6.7 (Not released, see changes for 1.6.9.) [ Note: All revision numbers for versions prior to 1.6.7 reference the original repository on svn.collab.net. For more information see: http://svn.apache.org/repos/asf/subversion/README ] Version 1.6.6 (22 Oct 2009, from /branches/1.6.x) http://svn.apache.org/repos/asf/subversion/tags/1.6.6 User-visible changes: * fix crash during 'svn update' (r39673) * respect Apache's ServerSignature directive (r40008, -21, -31) * don't add a file with mixed line endings, and then abort (issue #2713) * support Neon 0.29. * fix a crash in 'svn rm --force' (r37953) * handle tree conflicts involving replacements (issue #3486) * allow non-threadsafe sqlite if APR has no threads (r39301) * print newline before plaintext SSL cert / password prompts (r38982, r39302) * improve merge performance with implicit subtree mergeinfo (issue #3443) * fix "libsvn_ra_svn/marshal.c assertion failed (opt || cstr)" (issue #3485) * make file externals work for binary files (issue #3368) * perform MIME type matching case-insensitively (issue #3479) * do not treat non-existent revisions as HEAD in 'svn export' (issue #3400) * revert r36720's default MIME type change back to "text/plain" (issue #3508) * improve "tree conflict already exists" error message (r38872) * fix failure to commit replacement of a directory (issue #3281) * fix mod_dav_svn parent dir links to preserve peg revisions (issue #3425) Developer-visible changes: * fix 2 failing tests in ruby bindings (r38886) * do not require GNU grep for build (issue #3453) * use '$SED' instead of 'sed' in build scripts (issue #3458) * add svn.client.{log5,merge_peg3} to python bindings (r39635, -6, -7) * include the time of a test run in tests.log (r39887) Version 1.6.5 (22 Aug 2009, from /branches/1.6.x) http://svn.apache.org/repos/asf/subversion/tags/1.6.5 User-visible changes: * fix mod_dav_svn directory view links to preserve peg revisions (r38021) * do not error on Windows when ALLUSERPROFILE dir nonexistent (r38053, -5, -7) * properly escape lock comments over ra_neon (r38101, -2) * allow syncing copies of '/' over ra_neon and ra_serf (issue #3438) * make 'svnlook diff' show empty added or deleted files (r38458) * fix building with Apache 2.4 (r36720) * fix possible data loss on ext4 and GPFS filesystems (issue #3442) * resolve symlinks when checking for ~/.subversion (r36023) * don't let svn+ssh SIGKILL ssh processes (issue #2580) * allow PLAIN and LOGIN mechanisms with SASL in svnserve (r38205) * fix peg revision parsing in filenames like 'dir/@file.txt' (issue #3416) * fix detection of Apache <2.0.56 (r38290, -3, -4) * don't pretend to do tree conflict resolution (r38799, -801, -805) * fix data corruption when syncing from svnserve to mod_dav_svn (r38686, -7) * fix GNOME Keyring with '--non-interactive' option (r38222, -3, -61, -410) * fixed: false "File '...' already exists" error during commit (issue #3119) Developer-visible changes: * avoid referencing uninitialized variables (r38388) * plug a couple of error leaks (r38572) * improve windows test output (r38616, -7, -9, -49) Version 1.6.4 (06 Aug 2009, from /branches/1.6.x) http://svn.apache.org/repos/asf/subversion/tags/1.6.4 User-visible changes: * fixed: heap overflow vulnerability on server and client See CVE-2009-2411, and descriptive advisory at http://subversion.apache.org/security/CVE-2009-2411-advisory.txt Version 1.6.3 (22 Jun 2009, from /branches/1.6.x) http://svn.apache.org/repos/asf/subversion/tags/1.6.3 User-visible changes: * fix segfault in WC->URL copy (r37646, -56) * let 'svnadmin load' tolerate mergeinfo with "\r\n" (r37768) * make svnsync normalize svn:* props to LF line endings (issue #3404) * better integration with external merge tools (r36178) * return a friendly error message for 'svn diff' (r37735) * update dsvn.el for 1.6 (r37774) * don't allow setting of props on out-of-date dirs under neon (r37745) * improve BASH completion (r36450, -52, -70, -79, -538) * always show tree conflicts with 'svn st' (issue #3382) * improve correctness of 'svn mergeinfo' (issue #3126) * decrease the amount of memory needed for large commits (r37894, -6) * work around an APR buffer overflow seen by svnsync (r37622) * ra_svn clients now use TCP keep-alives if available (issue #3347) * improve 'svn merge' perf by reducing server contact (r37491, -593, -618) * stop propagating self-referential mergeinfo in reintegrate merges (r37931) * fix NLS detection where -liconv is required for bindtextdomain() (r37827) * don't delete unversioned files with 'rm --keep-local' (r38015, -17, -19) * bump apr and apr-util versions included in deps to latest. (r37941) * avoid temp file name collisions with ra_serf, ra_neon (r37972) * fixed: potential segfault with noop file merges (r37779) * fixed: incorrect output with 'svn blame -g' (r37719, -23, -41) * fixed: bindings don't load FS libs when module search enabled (issue #3413) * fixed: DAV RA layers not properly handling update/switch working copy directory to revision/place in which it doesn't exist (issue #3414) * fixed: potential abort() in the working copy library (r37857) * fixed: memory leak in hash reading functions (r37868, -979) Developer-visible changes: * improve memory usage in file-to-stringbuf APIs (r37907) * reduce memory usage for temp string manipulation (r38010) Version 1.6.2 (11 May 2009, from /branches/1.6.x) http://svn.apache.org/repos/asf/subversion/tags/1.6.2 User-visible changes: * vastly improve memory usage with 'svn merge' (issue #3393) * make default depth for merge 'infinity' (r37156) * make 'status --quiet' show tree conflicts (issue #3396) * allow '--set-depth infinity' to expand shallow subtrees (r37169) * return an error if attempting to reintegrate from/to the repo root (r37385) * don't store bogus mergeinfo for '--ignore-ancestry', foreign merges (r37333) * don't allow merge of difference between two repos (r37519) * avoid potential segfault with subtree mergeinfo (r36613, -15, -31, -41) * recommend sqlite 3.6.13 (r37245) * avoid unnecessary server query for implicit mergeinfo (r36509) * avoid unnecessary server query during reverse merges (r36527) * set depth=infinity on 'svn add' items with restricted depth (r37607) * fixed: commit log message template missing paths (issue #3399) * fixed: segfault on merge with servers < 1.6 (r37363, -67, -68, -79) * fixed: repeat merge failures with non-inheritable mergeinfo (issue #3392) * fixed: another memory leak when performing mergeinfo-aware merges (r37398) * fixed: incorrect mergeinfo on children of shallow merges (issue #3407) * fixed: pool lifetime issues in the BDB backend (r37137) Developer-visible changes: * don't fail if an embedding app has already initialized SQLite (issue #3387) * resolve naming collisions with static stat() function in svnserve (r37527) * fix an expectation for a failing dirent windows test (r37121) Version 1.6.1 (9 Apr 2009, from /branches/1.6.x) http://svn.apache.org/repos/asf/subversion/tags/1.6.1 User-visible changes: * recommend Neon 0.28.4. (r36388) * improve performance of 'svn merge --ignore-ancestry' (r36256) * improve 'svn merge' performance with subtree mergeinfo (r36444) * correctly proxy LOCK and UNLOCK requests (r36159) * prevent a crash when updating old working copies (r36751) * don't let svnmerge.py delete a nonexistent property (r36086, -767, -769) * don't fail when upgrading pre-1.2 repositories (r36851, -7) * allow escaping of separator characters in autoprops (r36763, -84) * improve tempfile creation robustness on Windows (r36442, -3) * fix change-svn-wc-format.py for 1.6.x working copies (r36874, -5) * improve configure's detection of Berkeley DB (r36741, -2) * don't allow foreign merges to add foreign mergeinfo (issue #3383) * improve performance of 'svn update' on large files (r36389, et. al.) * fixed: error leak and potential crash (r36860) * fixed: parent directory handling on Windows (r36049, -50, -51, -131) * fixed: uninitialized memory errors (r36252, -3) * fixed: potential working copy corruption (r36714) * fixed: working copy upgrade error (r36302) * fixed: pointer dereference error (r36783) * fixed: error diff'ing large data with ignored whitespace (r36816) * fixed: potential hang in ra_serf (r36913) * fixed: problem with merge and non-inheritable mergeinfo (r36879) * fixed: repeated merging of conflicted properties fails (issue #3250) * fixed: excluding an absent directory segfaults (issue #3391) Developer-visible changes: * ensure svn_subst_translate_cstring2() properly flushes data (r36747) * make serf report a base checksum to apply_textdelta (r36890) * syntax updates for strict C89 compilers (r36799) * update RPM scripts for RHEL4 (r36834) * allow tests to be run with Python 2.6.1 on Windows (r36149, -50, -51, -56) * allow building JavaHL with Visual Studio 2008 (r36954) * stop setting default translation domain in JavaHL (r36955) * fixed: warning with Python 2.6 and ctypes bindings (r36559) * fixed: undefined references to svn_fs_path_change2_create() (r36823) Version 1.6.0 (20 Mar 2009, from /branches/1.6.x) http://svn.apache.org/repos/asf/subversion/tags/1.6.0 User-visible changes: - General: * Now require Windows 2000 or newer on Windows (r33170) - Major new features: * identical files share storage space in repository (issue #2286) * file-externals support for intra-repository files (issue #937) * "tree" conflicts now handled more gracefully (issue #2282, #2908) * repository root relative URL support on most commands (issue #3193) - Minor new features and improvements: * pre-lock hook can now specify lock tokens via stdout (r32778) * svnmucc: support '--with-revprop' (r29492) * merge: log include-descendants in operational log (r30426, r30428) * improved operational logging for 'svn switch' (r30517) * new 'Header' keyword, similar to 'Id' but with full URL (r35386) * warn/disallow when storing plain-text passwords (r31046) * support KWallet and GNOME keyring for password storage (r31241, -337) * client now caches SSL client cert passphrases (issue #2489) * add '--prefix-file' option to 'svndumpfilter' (issue #2697) * add '--ignore-externals' option to 'svn cp' (issue #3365) * add '--with-no-revprops' to 'svn log' (issue #3286) * new 'svnadmin pack' command to compress FSFS filesystems * new SVNAllowBulkUpdates mod_dav_svn directive (issue #3121) * new public mod_dav_svn URI syntax: path?[p=PEG][&r=REV] (r34076) * new 'svnsync info' command to show synchronization information (r35053) * conflict resolver supports display-conflict, mine-conflict and theirs-conflict - Client-side bugfixes: * faulty reflexive merges (issue #2897) * buffer overflow on a 0 byte string buffer (r35968, -74) * conflict resolver needed more useful 'diff' option (issue #3048) * disable username assumption (issue #2324) * more accurate usage message for 'svn log' (r30449) * do not repeat merge if target has explicit mergeinfo (issue #2821) * corruption when filtering self-referential mergeinfo (r30467) * filter empty mergeinfo with self-referential mergeinfo (r30510) * pay attention to partial replay from the server in svnsync (r30440) * improved property name handling in svnsync (r30480) * properly recognize the file:/// in repository with svnsync (r30482) * svn+ssh SIGKILLs ssh processes (issue #2580) * 'svn up'/'svn co' early abort with svn:externals (issue #3148) * improve tempfile names for conflict resolver (issue #3166) * ra_serf: 'svn merge' aborts (issue #3212) * 'svn cleanup' failed on non-ASCII characters (issue #3313) * 'svn update' fails on moved, modified file with local mods (issue #3354) * easier use of NTLM for proxy with ra_neon (r29874) * 2-url merge from DAV-accessed foreign repo makes bad wcprops (issue #3118) * can't add .svn (and children) to your wc via '--parents' (r35819) * improved performance removing unversioned directories (r36111) * 'svn cp --parents' had path URL encoding issues (issue #3374) * support shell quoting rules in externals definitions (issue #2461) * new SVN_LOCALE_DIR environment variable for localization (issue #2879) * scheme and domain name in urls handled case insensitive (issue #2475) * merge: pick default revisions with peg revision in single url (r30455) * many other minor bugfixes, optimizations, plugs of memory leaks, etc - Server-side bugfixes: * mod_dav_svn runs pre-revprop-change twice (issue #3085) * mod_dav_svn ignores pre-revprop-change failure on delete (issue #3086) * mod_dav_svn prevented lock breaks from being propagated to client (r29914) * non-UTF8 filenames could enter repository (issue #2748) * 'svnlook proplist' xml output (issue #2809) * don't let mod_dav_svn hide errors from client (issue #3102) * ra_serf failure during update (issue #3113) * ra_serf comply with RFC 2617 in handling authentication headers (r35981) * use both SHA1 and MD5 in the FS backends (r34388) * many other minor bugfixes too numerous to list here - Contributed tools improvements and bugfixes: * commit-email.pl: Deprecated; use mailer.py instead (r31755, -67) * svnmerge.py migration tool munged svn:mergeinfo ordering (issue #3302) * And other random sundry stuff Developer-visible changes: - General: * serf 0.3.0 required, when building with serf (r35586) * require SQLite 3.4.0 or newer (r33520) * allow the use of an in-tree SQLite amalgamation (r35263) * svn_log_changed_path_t now includes a 'kind' field (issue #1967) * BDB `changes' table inconsistency when APIs are misused (issue #3349) * configure should prefer apr-1 over apr-0 if both are present (issue #2671) * make 'Not Found' errors consistent between RA layers (issue #3137) * fix a potential buffer overrun (r34374) * many bug fixes and improvements to the test suite - API changes: * notification system for properties and revision properties (issue #783) * make ra_svn's merge commit-revprops public (r30462, r30453) * mod_dav_svn operational logging compatible with svnserve logging (r30518) * improve speed of svn_client__get_copy_source() (issue #3356) * if fsfs commit fails return SVN_INVALID_REVNUM (r35950) - Bindings: * new: ctypes python bindings * many improvements to all bindings (Java, Perl, Python, and Ruby) * respect CFLAGS in SWIG bindings (r35879) * fix building Ruby bindings with Ruby 1.9 (r35852, r35883) Version 1.5.9 (06 Dec 2010, from /branches/1.5.x) http://svn.apache.org/repos/asf/subversion/tags/1.5.9 User-visible changes: * fix proxying of LOCK and UNLOCK requests with WebDAV proxies (r36159) * improve performance of --ignore-ancestry merges (r36256) * avoid crash with when using subtree mergeinfo (r36613, -13, -31, -41) * improve merge correctness with non-inheritable mergeinfo (r36789) * fixed: repeated mergeinfo of conflicting properties fails (issue #3250) * fix segfault in wc->URL copy (r37646, -56) * make 'svn up --set-depth infinity' expand shallow subtrees (r37169) * resolve symlinks when checking for ~/.subversion (r36023) * make default depth of 'svn merge' infinity (r37156) * don't allow foreign merges to add foreign mergeinfo (issue #3383) * error if attempting to reintegrate to/from the repo root (r37385) * let 'svnadmin load' tolerate mergeinfo with "\r\n" (r37768) * improve memory performance in 'svn merge' (issue #3393) * fixed: 'SVNPathAuthz short_circuit' unsolicited read access (issue #3695) See CVE-2010-3315, and descriptive advisory at http://subversion.apache.org/security/CVE-2010-3315-advisory.txt * prevent crash in mod_dav_svn when using SVNParentPath (r1033166) * limit memory fragmentation in svnserve (r1022675) * fix server-side memory leaks triggered by 'blame -g' (r1032808) * perform MIME type matching case-insensitively (issue #3479) * respect Apache's ServerSignature directive (r880082) * error early if attempting to use Serf >= 0.4.0 (r1041545) Developer-visible changes: * fix pointer dereference (r36783) * fix error leak (r36860) * make basic_tests 12 compatible with Windows and Python 2.5+ (r35930) Version 1.5.8 (Not released, see changes for 1.5.9.) Version 1.5.7 (06 Aug 2009, from /branches/1.5.x) http://svn.apache.org/repos/asf/subversion/tags/1.5.7 User-visible changes: * fixed: heap overflow vulnerability on server and client See CVE-2009-2411, and descriptive advisory at http://subversion.apache.org/security/CVE-2009-2411-advisory.txt Version 1.5.6 (26 Feb 2009, from /branches/1.5.x) http://svn.apache.org/repos/asf/subversion/tags/1.5.6 User-visible changes: * allow colons within mergeinfo path names (r35040) * make it impossible to add .svn to wc via 'svn add --parents' (r35143, -5) * copy properties of added but uncommitted files (r32448) * speedup JavaHL bindings on Windows (r35733) * improve performance of log operation on < 1.5 servers (r35566) * allow commits over Neon of files >2GB (POSIX only) (r34919, -24) * allow serf from behind MS ISA proxy servers (r35981) * prevent svnmerge-migrate-history.py from committing bogus mergeinfo (r35516) Developer-visible changes: * fix error handling in mod_dav_svn (r35250, -86) * support --server-minor-version in windows testsuite (r31393) * fix depth_tests.py 23 on Windows with a BDB repo (r34875) * allow svn_mergeinfo_parse() to tolerate unordered mergeinfo (r35297, -367) * allow overlapping rangelists into svn_mergeinfo_parse() (r35466, -712, -713) Version 1.5.5 (22 Dec 2008, from /branches/1.5.x) http://svn.apache.org/repos/asf/subversion/tags/1.5.5 User-visible changes: * allow prop commits on dirs with modified children (r34487, -92, -94) * make Cyrus auth implementation always prefer EXTERNAL to ANONYMOUS (r33866) * do not create mergeinfo for wc-wc moves or copies (r34184, -585) * do not autoupgrade old BDB filesystems to 1.5 or 1.4 format (r34653, -6) * return mergeinfo to prior state during reverse merges (r30257, r33024, -6) * remove mergeinfo deleted by merge (issue #3323) * make proxy slaves pass through txn GET and PROPFIND requests (issue #3275) * merge can now use targets with inconsistent newlines (issue #3262) * don't allow empty-string changelists (issue #3344) * remove false positive ra_neon mergeinfo errors (r34822) * improve performance of 'svn merge --reintegrate' (r34091, -4, and others) * fixed: foreign merges keep UUID of foreign repository (r34050, -1, -3) * fixed: properly encode diff headers used in conflict resolution (r34171) * fixed: segfault in 'svn cp --parents' (r31311, -4) * fixed: mergeinfo for '...' maps to empty revision range (issue #3312) * fixed: segfault in BDB backend node-origins cache (r34506) * fixed: broken merge if target's history includes resurrections (r34385, -93) * fixed: invalid mergeinfo created on a subtree during merge (r34560, -2) Developer-visible changes: * fixed: svn_repos_get_logs() chokes on some revision arguments (r33873, -4) Version 1.5.4 (24 Oct 2008, from /branches/1.5.x) http://svn.apache.org/repos/asf/subversion/tags/1.5.4 User-visible changes: * Properly handle explicit mergeinfo added in merge source (r32968, -75) * fixed: merging of paths containing spaces (r33641, -44) * fixed: regression in mergeinfo-aware merges against 1.5.3 (r33693, -704) Version 1.5.3 (10 Oct 2008, from /branches/1.5.x) http://svn.apache.org/repos/asf/subversion/tags/1.5.3 User-visible changes: * Allow switch to continue after deleting locally modified dirs (issue #2505) * Update bash_completion to be compatible with 1.5 (r32900, -11, -12) * Improve 'svn merge' execution time by 30% on Windows (r33447) * Reuse network sessions during 'svn merge', improving performance (r33476) * Improve temp file creation time on Windows (r33464) * Greatly improve merge performance (r29969, r32463, r33013, -016, -022, -112) * Improve file IO performance on Windows (r33178, -85) * fixed: merging files with spaces in name (r33109, -121, -369) * fixed: incorrect relative externals expansion (r33109, -121, -369) * fixed: 'svn mv' hangs and consumes infinite memory (r33201, -12) * fixed: correctness regression in 'svn log -g' (issue #3285) * fixed: current early bailout of 'svn log -g' (r32977) Developer-visible changes: * Allow the tests to run as non-administrator on Windows Vista (r31203) * Allow out-of-tree build of bindings on BSD (r32409) * Translate messages in svn_fs_util.h (r32771) * fixed: bindings test for Perl 5.10 (r31546) * fixed: building bindings and C API tests with VS2008 (r32012) * fixed: svn_ra_replay API over ra_serf (r33173) Version 1.5.2 (30 Aug 2008, from /branches/1.5.x) http://svn.apache.org/repos/asf/subversion/tags/1.5.2 User-visible changes: * Set correct permissions on created fsfs shards (r32355, -7) * Pass client capabilities to start-commit hook (issue #3255) * Disallow creating nested repositories (issue #3269) * Support Neon 0.28.3 * Properly canonicalize URIs with an empty hostname (issue #2116) * Improved merge performance for superfluous ranges (r32643) * Better error message for 'Malformed URL for repository' (r31867, r32365) * Improved svn:externals parsing (r32672, -673, -674, -739) * fixed: improper ordering in 'svnlook diff' output (r32019) * fixed: mod_dav_svn memory leak with 'SVNPathAuthz short_circuit' (r32360) * fixed: duplicate svn:externals targets fail on co/up (issue #3246) * fixed: 'svn merge --depth' inconsistencies (issue #2825) * fixed: ra_serf test failures (1.5.x-ra_serf-backports branch) * fixed: memory leak and crashes in FS (r32545, -58, -82) * fixed: core dump with relative externals (issue #3237) * fixed: 'svn copy' working copy corruption (r32467, -70) * fixed: perl bindings errors in non-English locale (issue #3258) * fixed: 'svn merge' incorrectly reverses previous merges (r32494, -522, -523) * fixed: 'svn merge' errors with subtree mergeinfo (issue #3067) Developer-visible changes: * make libsvn_ra_neon initialization thread-safe (r32497, r32510) * respect LDFLAGS in SWIG bindings (r32416, r32421, r32442) * fixed: test failures in non-English locales (r32491) Version 1.5.1 (26 Jul 2008, from /branches/1.5.x) http://svn.apache.org/repos/asf/subversion/tags/1.5.1 User-visible changes: * mergeinfo on switched subtrees should elide in repos (issue #3188) * Add support for --config-dir to svnmerge.py (r31727) * improve performance of bdb post-commit deltification (r31820, -59) * return faster when there is nothing to be merged (r30748) * don't commit an add of a missing item (issue #3198) * don't create unneeded self-referential mergeinfo (issue #3157) * support 'http-library' (if --enable-runtime-module-search) (r31425, -722) * support Berkeley DB 4.7 (r32017, -29) * fixed: make serf usable with root-level authz (r31464) * fixed: 'svndumpfilter' partial-path matching bug (r31833) * fixed: crash on invalid dates in 'log' and 'blame' (issue #2721) * fixed: 'svn status --xml' outputting invalid XML (issue #2887) * fixed: 'svn merge' prints incorrect range (r30746, -47) * fixed: using neon/serf, can not replace branch (issue #2939) * fixed: 'file not found' error when merging to a broken symlink (r31159, -79) * fixed: using serf, crash or endless loop fetching authn data (r31619) * fixed: ArrayIndexOutOfBoundsException in JavaHL bindings (r31719, -806) * fixed: authn password lookup used wrong username (issue #2242) * fixed: unbounded memory usage in wc-to-wc copy and move (r31868) * fixed: subtree merges broken for non-intersecting ranges (issue #3199) * fixed: invalid XML from 'svn log --xml' against pre-1.2 servers (r31875) * fixed: 'svnlook diff' ignores --diff-copy-from for properties (issue #3248) * fixed: 'svnlook diff' doesn't report that binary files differ (issue #3249) * fixed: bogus results from commits to subtrees added by merge (issue #3240) * fixed: non-existent subtree in destination breaks the merge (issue #3067) * fixed: serf merge bug too complex to describe here (r32056) * fixed: 'svn log -g' correctness and speed (issue #3220, issue #3235) * fixed: merge chokes on renamed subtrees (issue #3174) Developer-visible changes: * export svn_path_is_url() to the bindings (r31603) * don't clobber LDFLAGS in configure when given '--with-zlib' (r31825) * make libsvn_ra depend on libsvn_delta unconditionally (r31852) * correctly set the peg revision for copy in JavaHL (r31994) * 'svn mergeinfo' handles wc paths (r31023, -873, -874, -929, -930, -038) * fixed: crash when when svn_ra_open3() is passed a bogus URL (r31223) * fixed: JavaHL compilation on Windows (r31737) * fixed: crash in calling apr_pstrcat (affects TortoiseSVN) (r32080) Version 1.5.0 (19 Jun 2008, from /branches/1.5.x) http://svn.apache.org/repos/asf/subversion/tags/1.5.0 User-visible changes: - Major new features: * Merge Tracking [foundational] (issue #820) * Sparse checkouts (see new '--depth' option) (issue #695) * Interactive conflict resolution (r25670 et al) * svn:externals handles relative URLs (issue #1336) and peg URLs * Changelist support * WebDAV transparent write-through proxy * Better support for large FSFS deployments (via sharding & partitioning) * Cyrus SASL support for ra_svn and svnserve (issue #1144) - Minor new features and improvements: * 'svn resolve' (with '--accept' option) replaces "resolved" (issue #2784) * 'svn move file1 file2 ... dir' now moves the files into dir (issue #747) * 'svn mkdir' and 'svn copy' now take '--parents' option (issue #1776) * 'svn delete' now takes '--keep-local' to not remove working copy files * 'svn copy', 'move' now support peg revisions (issue #2546; also r26484) * 'svn copy A B ; svn move B C' now the same as 'svn copy A C' (issue #756) * 'svn copy -rBASE' now works in a working copy (issue #1643) * 'svn import' now takes '--force' (issue #2806) * 'svn status -u' now shows of locally deleted directories (issue #2420) * 'svn switch' now takes '--force' (issue #2392) * 'svn switch' now takes '--ignore-externals' option (issue #2189) * 'svn switch' now supports peg revisions (issue #2545) * 'svn checkout' now takes '--force' option (issue #1328) * 'svn proplist' and 'svn propget' now support peg revisions (issue #3070) * 'svn propget' now takes '--xml' option (issue #2696) * 'svn propedit' now support URLs (issue #2238, but see issue #2923) * 'svn proplist --quiet' no longer prints extra info (issue #1547) * 'svn diff --summarize' now takes '--xml' option (issue #2967) * 'svn diff -x' now takes '-p' extension option (issue #2995) * 'svn log' now takes '-c' option (r27933) * 'svn log' now takes '-l' as short form of '--limit' (r25829) * 'svn log --xml' now takes '--with-revprop' option (issue #2850) * 'svn diff'/'svnlook diff' now show property actions better (issue #3019) * 'svn merge' now has informative messages on reverse merges (issue #2848) * 'svn merge FILE' now honors '--ignore-ancestry' (issue #2853, r25891) * 'svn merge' handles multiple notifications for single items (issue #2828) * 'svn merge' handles skipped path better (issue #2829) * 'svn merge' handles merges from foreign repositories more completely * 'update', 'checkout', 'switch' now handle obstructions gracefully (r22257) * 'svn update' now takes '--force' (issue #2392) * 'svn update' now sometimes copies or moves local files, for efficiency * 'svnadmin lslocks' now accepts path within repository (issue #2965) * 'svnadmin recover' now supports FSFS repositories (issue #2992) * 'svnadmin verify' now has '-q' and '-r' options (r22103) * 'svnadmin setrevprop' command added (r21736) * 'svnadmin setuuid' command added (r28511) * 'svnsync sync' now shows commit progress like 'svn commit' * 'svnsync' now takes '-q, --quiet' option (r26465) * 'svnsync' now supports separate authn for source/target (issue #2717) * 'svnsync copy-revprops' now supports revision ranges (r23498) * 'svnsync copy-revprops' now supports "HEAD" revision alias (r23500) * 'svnmucc' is new name for contrib tool formerly called 'mucc' * 'svnmucc' now has propset and propdel subcommands (issue #2758) * 'svnmucc' now has more authentication options * 'svnmucc' now now takes '--non-interactive' option (r25977) * 'svnmucc' now takes a global base revision, for extra safety (r23764) * 'svnlook' now takes '--extensions' option (issue #2912) * 'svnlook' now takes '-N' option (issue #2663) * 'svnlook history' now takes '-l' / '--limit' option (r25843) * 'svnserve' now takes '--config-file' option (r24119) * 'mod_dav_svn' now uses Apache default mime-type for files (issue #2304) * new '--with-revprop' option on all commands that commit (issue #1976) * now accept "peg dates" (URL@{DATE}), behaving like peg revs (issue #2602) * easier to try out experimental ra_serf http:// access module * select ra_neon vs ra_serf on a site-by-site basis in config (r25535) * client-side post-commit processing now more efficient (issue #2607) * windows binaries now use a custom crash handler (issue #1628) * add vim swap file patterns to default global-ignores (r24348) * add "*.pyc" and "*.pyo" patterns to default global-ignores (issue #2415) * add unix/libtool library patterns to default global-ignores (issue #2415) * naming scheme for conflict files is now configurable (issue #2474) * removed svn-ref.tex as it's extremely out of date (issue #2762) * improved cancellation response in many situations * support Neon up to 0.28 * character set conversion now uses native API on Windows (r25650) * HTTP authn protocol now configurable (for Neon 0.26 and higher) (r21531) * http:// (over Neon) supports HTTP redirection / relocation (issue #660) * support PKCS#11-provided (smartcard) SSL client certs with Neon (r29421) * authz now supports aliases (r21982) * authz token rules for authenticated-only, anonymous, and inverse (r23750) * mailer.py now supports properties in commit messages (r21684) * ra_serf now supports NTLM/SSPI authentication (issue #2900) * warn if try to turn off boolean property via propset/propedit (r25486) * display repository basename in XML and HTML index views (r25837, r25838) * config 'http-auth-type' can be overridden to force BASIC auth (r23900) * translation updates for all languages, as usual * Revamp mod_dav_svn logging; see tools/server-side/svn_dav_log_parse.py * misleading configure arg --enable-dso now --enable-runtime-module-search - Client-side bugfixes: * 'svn revert' of missing scheduled addition broke wc (issue #2425) * 'svn export' should export svn:externals from local copies (issue #2429) * 'svn status -uN' should show status of files (issue #2468) * 'svn update' overwrote if local timestamp unchanged (issue #2746) * 'svn update -N' errored when receiving a deletion (issue #3039) * 'svn merge' would delete locally modified props (issue #2857) * 'svn log --xml' could output invalid XML (issue #2866) * 'svn copy' on URL with spaces made wrong WC file name (issue #2955) * 'svn diff' was failing w/ large diffs on Windows (issue #1789) * 'svn delete' no longer deletes locally-modified files (issue #1808) * 'svn move' moved files to wrong directory on Windows (issue #1869) * 'svn revert' mistakenly used leftover .svn-revert files (issue #2927) * 'svn diff' output now shows relative paths (issue #2723) * 'svn diff' wasn't ignoring all EOLs (issue #2920) * 'svn cleanup' no longer fails on a missing .svn/tmp dir (r23370) * infinite loop in UTF conversion in non-C locale (issue #2577) * interrupting "svn status" could make svn crash (issue #2623) * commit-email.pl date header output now RFC2822-compliant (issue #2633) * authz write access to folder wasn't permitting locking (issue #2700) * stop complaining just because $HOME is unreadable (issue #2363) * do not display unescaped characters in error message (issue #2471) * propchange received on subdir merge causes conflict (issue #2969) * revert replaced-with-history files should restore checksum (issue #2928) * catch improper arguments to diff (issue #2996) * handle URLs like http://hostname (i.e. no path part) (issue #1851) * config autoprops honored regardless of case of entry (issue #2036) * "Cannot replace a directory from within" error now rarer (issue #2047) * handle _svn/.svn as part of a path (issue #3026) * make permissions changes on symlinks a no-op (issue #2581) * error usefully if asked to update a URL (r22296) * fixed infinite loop on Windows if fail to find repository root (r22483) * 'svn info $REPO_ROOT' now supports pre-1.2 svn:// servers (r26264) * be more resilient in the face of faulty .svn/entries files (r26482) * 'svn diff -x --ignore-eol-style' failed to ignore all EOLs (r27094) * rare property dataloss bug now fixed (issue #2986, see also r29538) * fixed faulty status reporting for some missing directories (issue #2804) * 'svn diff --summarize' showed wrong output paths (issue #2765) * propset and move interaction could cause property weirdness (r25833) * 'svn propget .@HEAD' now works (issue #3012) * 'svnsync' had bug with replaced+modified rev over serf (issue #2904) * 'svnsync --config-dir' sometimes ignored, thus tunnel agent bug (r27056) * update/merge safely receives file on top of schedule-add file (r23506) * http:// (over Neon) reports progress while disk-spooling delta (r26271) * print "Out of memory" before dying from memory shortage (issue #2167) * warn when used on old checkout without a repository root entry (r25168) * merge to missing file target wrongly appeared to succeed (issue #2782) * 'svn merge URL PATH -cX' could cause property corruption (issue #2781) * URL parsing now consistently checks for error earlier (issue #2207) * security hole: files could be created above cwd (r26047, CVE-2007-3846) * local property mods to replaced-with-history file could be lost (r26364) * revert of replaced-with-history path left copyfrom info (r23452) * character encoding translation could hang (r23492) * un-substituting keywords was buggy ($Id$ vs. $Id:$) (issue #2640) * ra_neon and ra_serf lost pre-revprop-change hook output (issue #443) * merge of non-empty subdir could be committed incorrectly (issue #1962) * many other minor bugfixes, optimizations, plugs of memory leaks, etc - Server-side bugfixes: * segfault in svnserve and svnversion commands fixed (issue #2757) * segfault when stopping httpd (if BDB repository) fixed (issue #2732) * 'svnadmin dump' had a path ordering bug (issue #2641) * better FSFS support for NFS v3 and lower (r24470) * better FSFS support for some buggy NFS clients (r29448) * authentication and authz bugs w.r.t. anonymous access (issue #2712) * inconclusive authz result should deny, not allow (r23815) * better reporting of problems parsing authz files (r22329) * set svn:date revprop even if dumpstream does not (issue #2729) * http:// commit can now create empty files properly (r25471, r25474) * squelch not-a-directory errors in both FS backends (issue #2549) * segfault on update-report response without base revision (issue #3023) * 'svnserve --root PATH' checks that PATH exists (r22580, r22701) * 'svnlook propget -t TXN_NAME' reports errors better (r22772) * make location of mod_dav_svn activity database configurable (r24873) * select only paths that are proper children of requested path (r25231) * http:// commit error could leave empty transactions behind (r23594) * 'svn switch --relocate' now works against unreadable repos root (r23848) * many other minor bugfixes too numerous to list here - Contributed tools improvements and bugfixes: * svn_load_dirs.pl: - Support global-ignores list (issue #2470) - Allow "@" in filenames (r22203, Debian bug 359145) - Add -no_auto_exe option (r26399) * svnmerge.py: - fixed: Always get end_rev from source instead of target (issue #2863) - fixed: 'init' now chooses a better default revision range (issue #2810) - fixed: Consider revs changing blocking status as reflected (issue #2814) - Performance inmprovement (issue #2812) - initialized revisions can be excluded (issue #2851) * new 'svn-populate-node-origins-index' tool (issue #3024) * new 'svn-merge-vendor.py' to assist in merging vendor branches (r23030) * 'svn2rss.py' is now called 'svn2feed.py' * svn2cl: New release 0.9 (r24498) * commit-email.pl: various improvements (r22971, r22589) * commit-email.rb: various improvements * psvn.el: too many improvements and new features to list them all here * dsvn.el: improve XEmacs compatibility (r24337) * svn-tweak-author.py: make NEWAUTHOR argument optional (r24387) * And more stuff that we just didn't have time to list. Enjoy. Developer-visible changes: * General: - libsvn_ra_neon is new name for libsvn_ra_dav (to accommodate ra_serf) - many abort() calls removed, replaced with error returns - client and server now do capabilities exchange (r29358 et al) - gen_win.py: auto-detect the path to the JDK on Windows (r24333) * API changes: - many, many new APIs and types as part of the new features in 1.5.0 - APIs to allow retrieving multiple revprops in one fetch (issue #2850) - basic progress reporting for ra_svn (issue #901) - new APIs for creating and using iterators (r26533) - svn_fs_node_origin_rev finds line of history origin (issue #3017, #3024) - svn_revnum_parse for parsing revision numbers (r26195) - svn_path_is_canonical for validating paths (r26481) - new API svn_fs_txn_root_base_revision() (r22610) - pass individual arguments rather than config objects (r25182, r25190) - clients can now extend HTTP User-Agent header (r28613) - SVN_ERR_RA_DAV_PATH_NOT_FOUND is deprecated and no longer raised * Bindings: - Many improvements to all bindings (Java, Perl, Python, and Ruby) Version 1.4.6 (21 Dec 2007, from /branches/1.4.x) http://svn.apache.org/repos/asf/subversion/tags/1.4.6 User-visible changes: - Client: * fixed: unbounded memory use in "svn cat" over ra_svn (r26964, -8) * fixed: 'svn diff --summarize file' displays erroneous output (issue #2765) * fixed: 'svn status' wrong on previously-reverted deleted dir (issue #2804) * fixed: 'svn up' can delete unversioned symlinks (issue #1808) * fixed: use correct properties for locally replaced files (issue #2743) * fixed: 'svn info -R $REPO_ROOT' w/ pre-1.2 svnserve broken (r26264) * fixed: svnsync ignores '--config-dir' (r27056) * datestamps can be localized (r26156) * fixed: text base not updated when merging a replaced file (issue #2698) * fixed: inverted 'switch --relocate' error message (r22355) * fixed: sporadically failing file and directory removal on Windows (r25520) * fixed: property file handling for schedule-delete files (r25833) * fixed: allow invalid svn:eol-style values (r28331) * fixed: 'svnadmin rmlocks' should error when no path provided (r28431) * support neon 0.26.4 (r26077) - Server: * fixed: authz granted if calculation inconclusive (r23815) * fixed: svndumpfilter crashes on Windows (r23494) * fixed: wrong pointer type used for memset (r27263) * fixed: invalid FSFS directory cache can corrupt repository (r27256) * fixed: dir props on FSFS filesystem root never conflict (issue #2608) - Client and Server: * fixed: "No newline at end of file" message translated (issue #2906) * use compressed delta encoding for 'svn blame' in svnserve (r26115) * translation updates for Simplified Chinese Developer-visible changes: * svnserveautocheck.sh script is executable (r23942) * add RHEL5 RPM (r25593) * test suite passes with trunk servers (forwards-compatibility) (r25607) * javahl bindings: - improve error reporting from native code (r25208) Version 1.4.5 (27 Aug 2007, from /branches/1.4.5) http://svn.apache.org/repos/asf/subversion/tags/1.4.5 User-visible changes: * fixed: file placement vulnerability (Win32 clients only) See CVE-2007-3846, and descriptive advisory at http://subversion.apache.org/security/CVE-2007-3846-advisory.txt Version 1.4.4 (30 May 2007, from /branches/1.4.x) http://svn.apache.org/repos/asf/subversion/tags/1.4.4 User-visible changes: - Client: * fixed: 'svn up' of replaced file without history fails (issue #2618) * fixed: 'svn export' succeeds on non-existent URL (r23191, -3, -5, -200) * fixed: 'svn diff' fails writing large hunks to Win console (issue #1789) * fixed: 'svn merge' shows 'G' notifications for unchanged files (r24483) * fixed: svnsync cannot sync unreadable modified dir copies (issue #2705) * fixed: ra_dav litters empty transactions if initial setup fails (r23594) * fixed: inconsistent expansion of revision number keywords (issue #1743) - Server: * fixed: rare dirprop dataloss leading to BDB repo corruption (issue #2751) * fixed: race condition when changing FSFS revprops (r23439, r23440) * fixed: 'svnadmin load' invents svn:date if none exists (issue #2729) * fixed: svnserve can't commit locked file if root unwritable (issue #2700) * fixed: 'svnadmin dump' output invalid for non-ASCII paths (issue #2641) * fixed: security flaw in 'svn prop*' commands [CVE-2007-2448] (r25095, -099, -104, -105, -10) - Client and Server: * fixed: hang during character translation (r23491, r23492) * translation updates for Simplified Chinese, Japanese, and Norwegian Developer-visible changes: * new "make svnserveautocheck" testing target (r23558) * fixed: ra_serf fails checkout if access to repos root is forbidden (r23846) * fixed: svn_client_cat2() doesn't accept WORKING as a revision (r23556) * javahl bindings: - fixed: potential segfault in initialisation (r23383) - fixed: SVNClientSynchronized.logMessages() isn't synchronised (r23978) - fixed: SVNClient.info2() misreports itself as unlock in errors (r24219) * SWIG/perl bindings: - fixed: ra_do_{update,switch,status} don't work with Perl delta editors (r20667, r22311) * SWIG/python bindings: - fixed: memory leak whenever C APIs returned errors (r23521) * SWIG/ruby bindings: - fixed: typos in method Svn::Wc#merge_prop_diffs and docs (r23405, -6) Version 1.4.3 (18 January 2007, from /branches/1.4.x) http://svn.apache.org/repos/asf/subversion/tags/1.4.3 User-visible changes: - Client: * fixed: crash using automatic auth protocols with Neon 0.26 (r22440, -61) * fixed: svn_load_dirs.pl cannot import file names containing '@' (r22203) * fixed: error when committing replaced directories (r22991, -8) * fixed: inability to change file perms due to existing file perms (r23018) * include newest version of svn-graph.pl (r22969) - Server: * fixed: incorrectly reporting authz circular dependencies (issue #2684) * fixed: potential filesystem memory leak in commit finalisation (r22729) - Client and Server: * fixed: crash in character translation, particularly on Windows (r22417) * fixed: potential string corruption when resizing string buffers (r22689) * translation updates for Korean, Spanish, Italian, Simplified Chinese, and Japanese (fixing issues #2649 and #2681) Developer-visible changes: * support Neon 0.26.2 (issue #2666) * update (experimental) ra_serf repository access module for DAV (r22872) * Windows installer improvements (r21516, r22155, r22224) * fixed: svn_{ra,repos}_replay() doesn't send checksums (r22346, -51, -52) * fixed: error when calling svn_repos_replay2() with a txn root (r22609) * fixed: Solaris packaging script broken (issue #2669) * javahl bindings: - fixed: auth cache is created in the current directory (r22780) - fixed: SVNAdmin's setLog() method always fails (r22387) - fixed: target dependency order in generated build scripts (r22209) * SWIG/perl bindings: - fixed: memory leak when calling methods on a Perl commit editor (r22332) Version 1.4.2 (2 November 2006, from /branches/1.4.x) http://svn.apache.org/repos/asf/subversion/tags/1.4.2 User-visible changes: - Client: * new "notes/svnsync.txt" file explains common svnsync usage * install a manpage for svnsync (r21403) * install/package svnsync on Windows (r21387, r21424) * translation updates for all languages * dramatically speed up commit of wc-to-wc copy (r21471) * fixed: support 'svn co URL@{DATE}' (issue #2602) * fixed: cannot access repositories with spaces via svn:// (issue #2612) * fixed: passing full URL in some DAV requests, breaking proxies (r21526) * fixed: history-tracing can fail for renamed directories (issue #2600) * fixed: crash if interrupted while opening a working copy (r21792) * fixed: 'svn merge' should notify about conflicted files (issue #2584) * fixed: 'svn revert' should notify about prop-only reverts (issue #2517) * fixed: 'svn status -u' not showing props changed on wc root (issue #2533) * fixed: 'svn status -u' fails in a read-only working copy (r21904, -19) * fixed: 'svn up' failing with checksum mismatch error (issue #2618) * fixed: 'svnsync sync' copying missing implicit revprops (issue #2613) * fixed: svnsync unable to synchronise copies of URL-unsafe paths (r22092) * svnshell tool: support "setrev head" (r20992) * include newest version of svnmerge.py - Server: * FSFS: improve detection of disk write errors (r21346) * FSFS: prevent API violation from corrupting repository (issue #2467) * improved error checking when running hook scripts, etc (r21483) * mailer.py: new commit_url option links to web page for a commit (r21333) Developer-visible changes: * support Neon 0.26.0 and 0.26.1 (r21289, r21293, r21956) * support current CVS versions of libtool (post-1.5.22) (r22120) * now compiles on architectures without APR_HAS_DSO (e.g. RISC OS) (r21473) * fixed: build error on FreeBSD due to missing svnsync manpage (r21403) * RHEL3 RPM package requires correct version of Apache httpd (r21974) * numerous improvements to coverage of the test suite * javahl bindings: - compile Java bytecode for Java 1.2 VM (r21765, -7, r21814) - fixed: crash if using 1.4.x bindings with older libraries (r21316, -429) - fixed: crash when empty destination path passed to checkout (r21770) * SWIG/ruby bindings: - fixed: accept nil for Svn::Repos#load_fs's parent_dir argument (r21793) * SWIG/python bindings: - fixed: crash when using an apr_hash_t typemap (issue #2606) - fixed: in tests, use URLs that work on Windows (r21392) * SWIG/perl bindings: - fixed: ra_replay works with Perl delta editors (r20666) Version 1.4.1 (Not released, see changes for 1.4.2.) Version 1.4.0 (10 September 2006, from /branches/1.4.x) http://svn.apache.org/repos/asf/subversion/tags/1.4.0 User-visible changes: - Client: * new 'svnsync' commandline tool for repository replication * numerous working copy improvements (WARNING! upgrades to new format!): - improved performance when detecting modified files (r18628 -56) - new property storage is faster and uses less disk space (r17583) - internal wcprops take up less space (r19433 -37) - large file commit speedups (r17861 -73 18867 -918 -29 -44 -45 -48 -49) - reduce memory usage for large working copies (r19183 -538) - increased working copy stability with merge, copy and move: (fixes issues #845, #1516, #1553, #2135, #2144, #2148) * new switches added: - 'svn blame --force' (issue #2509) - 'svn diff/merge -c/--change' (r17054 -6 -68 18568 -741) - 'svn diff --summarize' (issue #2015) - 'svn merge/blame -x' (r18716 -20) (r18602 -857) * 'svn log' now supports peg revisions (issue #2287) * 'svn export' now creates intermediate directories if needed (r20030) * use switch/relocate when svn:externals updated (issue #2209) * internal diff can ignore whitespace and eol style changes (issue #2121) * conflict markers now match the file's eol style (issue #1325) * new svn2cl, svn-viewdiff and svn-resolve contrib scripts * numerous improvements to svnmerge.py, vc-svn and psvn * translation updates for all languages * Mac OS X: store cached passwords encrypted in Keychain (r17619 -43) * fixed: 'svn ls' slow over ra_dav (issue #2151) * fixed: 'svn import' not handling eol-style correctly (issue #2433) * fixed: 'svn blame' should default operative rev range to peg rev (r18400) * fixed: 'svn blame' ignores eol-style (issue #2431) * fixed: 'svn checkout' should default operative rev to peg rev (r18422) * fixed: 'svn diff' supports all eol styles (r17624 -8 -61 18195 -392) * fixed: 'svn diff' multi-target memory leak (r17518) * fixed: 'svn merge' showing wrong status with external diff3 (issue #1914) * fixed: 'svn merge' not merging added dir into deleted dir (issue #2515) * fixed: 'svn rm' of non-existent item should fail (issue #2440) * fixed: 'svn status' should skip unversioned files (issue #2030) * fixed: 'svn status' shows added and conflicted files as added (r20382) * fixed: 'svn switch --relocate' may set wrong repos root (r17031) * fixed: 'svn switch --relocate' memory leak (r19535) * fixed: 'svn switch --relocate' not caching passwords (issue #2360) * fixed: 'svn info' not showing locks sometimes (r19777) * fixed: incorrect merge of add of binary file already in WC (issue #2403) * fixed: possible dataloss if editing immediately after merge (r20609 -12) * fixed: lots of diff wc<->repos bugs * fixed: unfriendly error message on propget on nonexistent path (r19399) * fixed: spurious revert report after manual conflict removal (issue #2517) * fixed: don't allow -rPREV on schedule add path (issue #2315) * fixed: keywords with dollar signs cause badness (issue #1780) * fixed: really revert file with locally modified keywords (issue #1663) * fixed: deleting schedule add file leaves working props file (issue #2419) * fixed: svn:needs-lock and read-only-ness not always in sync (issue #2306) * fixed: post-commit error output not sent to the client (issue #443) * fixed: not locked error on commit of switched path (issue #2353) * fixed: svn_apply_autoprops.py should trim whitespace from props (r20790) * fixed: show locking notifications in local path style (r20927) * fixed: encoding error on error messages from invalid options (r20883) - Server: * support for new 'svnsync' repository mirroring utility * support for BDB 4.4, including automatic recovery (issue #2449) * new contrib hook scripts: - enforcer - detect-merge-conflict.sh - case-insensitive.py * new tools script svn-backup-dumps.py * new tools hook script log-police.py * svnserve improvements: - can now run as a native Windows service (r18855) - new option --pid-file (r17836) - allow the password database to be read-only (r16840) * mod_dav_svn improvements: - fixed: error conversion crash (r19516) - fixed: unfriendly error when locking already locked path (issue #2275) - fixed: xml escaping bugs (r19760 -85 -86) * authorization improvements: - new mod_dontdothat apache module (r19531) - new mod_authz_svn directive AuthzSVNNoAuthWhenAnonymousAllowed (r18680) - error out when authz rules contain unexpected characters (r19471) * support .wsf hook scripts on Windows (r18972, 19076) * lots of improvements to mailer.py and commit-email.pl * FSFS back-end performance improvements (r17125 19119 -456 -58 -59) * fixed: 'svnadmin verify' output not in native encoding (issue #1997) * fixed: uuid file in FSFS could be destroyed on write error (issue #2193) * fixed: FSFS path encoding bug (r17774) * fixed: don't crash on corrupt repositories (r17625) * fixed: expect error output from hook scripts in native encoding (r17101) * fixed: catch errors starting hook scripts (r16891 17041 -81) * fixed: svnserve and authz can cause broken WCs (issue #2566) * fixed: the default hook script templates should be vanilla sh (r20796) - Both: * delta compression improvements: - new delta encoding reduces size (r18363 -94 -66 -78 -98 -99 -457 -950) - xdelta algorithm speed improvements (r18986, 19047) * don't bail on invalid locale (r19445) * improve speed of non-verbose svn ls (r17067 -71) * fixed: delta combiner reading past EOF (r17743) Developer-visible changes: * require APR >= 0.9.7 to improve error detection for FSFS repos (r19915) * require zlib, for svndiff1 delta encoding (r18363) * support SWIG 1.3.29 (r19968) * support autoconf 2.60-dev (r19919 20632 -36) * removed no-longer-supported Red Hat 7.x RPMs (r20462) * add support for building RPMs for x86-64 architecture (r20548 -552) * numerous improvements to gen-make.py build system, especially on win32 * removed Visual Studio.NET APR 0.9 project files (r20170) * numerous improvements to the test suite * new public APIs: - keyword / eol translation helpers and generic streams (see svn_subst.h) - new generic stream helpers (see svn_io.h) - authn providers made available to other clients (see svn_auth.h) - svn_cmdline_setup_auth_baton - svn_dso_initialize, svn_dso_load - svn_client_diff_summarize and svn_client_diff_summarize_peg - svn_client_list - svn_config_has_section - svn_txdelta_compose_windows and svn_txdelta_apply_instructions - svn_txdelta_stream_create - svn_diff_file_options_create and svn_diff_file_options_parse - svn_err_best_message - svn_compat_wrap_commit_callback - svn_uuid_generate - svn_user_get_name and svn_user_get_homedir - svn_io_get_dir_filenames - svn_ra_reparent - svn_ra_replay - svn_wc_revision_status - several rev'd APIs, see doxygen docs * flush stdout after each status/notification line (r19476 -656) * new (experimental) ra_serf repository access module for pipelined DAV * .svn/entries use a less verbose non-xml format (r19420) * make recursive 'svn ls' streamy (issue #1809) * remove svn-config script * empty-file and README.txt removed from WC admin areas (r17181 -268 -364) * replace cmdline client XML DTDs with RNG schemas (r16379 -80 -93 -571 17248) * fixed: log --limit against old svnserve leaves unusable session (r19638) * fixed: Solaris build problems (r19636) * fixed: blame of WORKING revision shouldn't give BASE (r19558) * fixed: svn_client_copy and _move should fail if target exists (issue #2188) * fixed: svn_io_file_rename and readonlyness on Windows and UNIX (r17366 -69) * fixed: ra_dav memory leak when reusing session (issue #2247) * fixed: console character encoding problems when built with VS2005 (r20108) * fixed: various problems with --enable-dso and global pools (r20996, r20999) * fixed: installer file syntax error in new versions of Inno Setup (r21022) * SWIG bindings: - SWIG/python bindings: - new support for svn_client_info (r19413) - SWIG/ruby bindings: - full support for Subversion 1.4 APIs, including : svn_ra_replay and svn_diff_summarize - numerous bug fixes - add ruby documentation (make install-swig-rb-doc) (r20166) - add APIs for adding a provider (r21079) - SWIG/perl bindings: - new support for svn_client_info (r18758) - minor corrections to SVN::Fs (r19312) * javahl bindings: - APIs to get version info for the native libraries (r17604 -07) - API for path validation (r18989, r19079) - C++/Java code refactoring, cleanup, and consolidation - fixed: handle possible errors from date/time conversions (r17213) - fixed: SVNClient username/password JVM crash on null input (r19803 -13) - fixed: specify default UUID load action (r18030) - fixed: compile error on Visual Studio 2005 (r18054) Version 1.3.2 (23 May 2006, from /branches/1.3.x) http://svn.apache.org/repos/asf/subversion/tags/1.3.2 User-visible changes: - Client: * fixed: 'svn st -u' crash on missing subdirs (r19348, -71, issue #2551) * fixed: leaving stray working copy locks on cancellation (r18893) * fixed: svn_load_dirs.pl trying to import .svn and _svn dirs (r18549) * svn_load_dirs.pl symlink support (issue #2478) * translation updates to Japanese, Traditional Chinese. - Server: * fixed: mod_dav_svn memory leak when listing large dirs (r19528) * fixed: mod_dav_svn crash on valid request (r19520) * fixed: svnserve protocol error in lock, causing client hang (issue #2548) * mailer.py: add Content-Transfer-Encoding header (r19319) * mailer.py: fixed: named substitutions incorrectly ignored (r18114, -681) * fixed: authz requires read access for root for writes (issue #2486) * svnauthz-validate: add config file validation tool (r18504, -09) Developer-visible changes: * fixed: tests don't catch repository creation failure properly (r19149,-51) * support SWIG 1.3.28 * support APR 0.9.x >= 0.9.10 (r19039, -57, -60) * python bindings: - fixed: link error on OpenBSD (r18983) * ruby bindings: - fixed: memory leak (r19493) - fixed: NULL argument conversion bug (r19543) Version 1.3.1 (25 March 2006, from /branches/1.3.x) http://svn.apache.org/repos/asf/subversion/tags/1.3.1 User-visible changes: - Client: * fixed: segfault moving unversioned files (issue #2436) * fixed: verbose list broken over ra_dav (issue #2442) * fixed: 'svn ci -m path_name' not requiring '--force-log' (r17956) * fixed: crash on mixed-case https URL scheme (r18042) * fixed: crash in status with ignored directories (r18291) * fixed: strip peg rev from default checkout directory (r18416) * fixed: diff crash with non-recursive checkout (r17231, 18539, -41) * fixed: 'svn ls' URL encoding bug with locks (r18665, -68) * fixed: unlock circumvents lock token check (r18691, -94) * fixed: repos-to-repos copy crash (r18451) * fixed: 'svnmerge' utility improvements (r18811) * translation updates for German, Swedish and Norwegian - Server: * fixed: set svn:date at the end of commit in fsfs (r18078) * fixed: don't wait for hook script background jobs (r18146) * fixed: mod_dav_svn should log the whole error chain (r18211) * fixed: uncomment section headers in repos config files (r18247, -50) * fixed: log scalability issues with many paths (r18395, -404) * fixed: better path input validation in mod_dav_svn (r18660) * fixed: assert in copy in fsfs and bdb (issue #2398) * fixed: RPM package bad interaction with NFS servers (issue #1456) - Both: * fixed: copyright years updated to include 2006 (r18021, -127) Developer-visible changes: * fixed: missing #include (r18065) * fixed: allow building with Neon 0.25.5 (r18215) * fixed: error leaks (18196, -249) * javahl bindings: - fixed: compile error on Visual Studio 2005 (r18054, -55) * python bindings: - fixed: libsvn_swig_py link problem on Solaris 10 (r17910) - fixed: pool lifetime bug (r17992) - fixed: memory leak (r18230) - fixed: race condition during application pool initialization (r18721) - fixed: Make pool parameters optional (issue #2444) * ruby bindings: - fixed: pool management issue (r17795, -811) - fixed: protect baton from garbage collection (r17627) - fixed: conversion bug (r17726, -925) - fixed: compile errors with SWIG 1.3.24 (r18456, -58) Version 1.3.0 (30 December 2005, from /branches/1.3.x) http://svn.apache.org/repos/asf/subversion/tags/1.3.0 User-visible changes: - Client: * 'svn ls -v' now shows remote locks (issue #2291) * 'svn status' speedup (r15061, r15103) * 'svn blame' speedup on files with long history (issue #1970) * 'svnversion' now assumes default argument of '.' (r14892) * support for neon 0.25.x, which fixes http:// control-c bug (issue #2297) * support for more ISO-8601 date formats, compatible with GNU date (r14428) * support for single-digit date components (r15459) * on Windows, '_svn' admin dir now toggled by runtime env. variable (r16244) * working copy size with empty propfiles reduced (r16855, see releasenotes) * new switches added: - 'svn blame --xml [--incremental]' (r14690) - 'svn status --xml [--incremental]' (issue #2069) - 'svn info --xml [--incremental]' - 'svn add/import --no-ignore' (issue #2105) - 'svnlook tree --full-paths' (r13976) - 'svnlook diff --diff-copy-from' (r14855) - 'svnlook changed --copy-info' (r16681) * fixed: 'svn copy wc URL' might include deleted items (issue #2153) * fixed: 'svn copy wc wc' allows cross-repository copies (issue #2404) * fixed: 'svn up/merge' major property-merging bugs (issue #2035) * fixed: 'svn merge' insisting on write access to '.' (issue #2411) * fixed: 'svn merge' cross-device move problems (r16293, -329, -330) * fixed: 'svn diff' outputs headers in wrong encoding (issue #1533) * fixed: 'svn proplist/add/cat' dies on unversioned items (issue #2030) * fixed: 'svn add' not honoring svn:ignore property (issue #2243) * fixed: 'svn log -rN:M --limit X' error over http:// (issue #2396) * fixed: 'svn switch --relocate' failure on 'deleted' dir (r16673) * fixed: 'svn info' not always showing repos lock (issue #2276) * fixed: 'svn info' might show lock on wrong path (r16626) * fixed: 'svnlook' chokes on logs with inconsistent newlines (r14573) * fixed: 'svnlook propget --revprop -t' failure (r15203) * fixed: 'svnversion' wrongly traverses into externals (r15161) * fixed: incorrect URI encoding passed to svn+ssh:// (issue #2406) * fixed: properly handle filenames containing '@' (issue #2317) * fixed: '--non-interactive' now suppresses launch of $EDITOR (r15277) * fixed: conflict markers not in current encoding (r14621) * fixed: commands ignoring extraneous -m or -F switches (issue #2285) * fixed: poor error-checking when using revprops (r15542) * fixed: stack-smashing bugs (r15948, r16037) * fixed: incorrect parsing of mod_dav_svn XML responses (r17589) * translation updates for all languages - Server: * svnserve improvements: - can now restrict read/write access by path (see releasenotes) - undeprecation of the --read-only (-R) option (r17614) * mod_dav_svn improvements: - 'SVNListParentPath on' shows all repositories in web browser (r16158) - ability to log high-level client operations (see releasenotes) - sets svn:mime-type on autoversioning commits (r14359) * 'svn log' performance improvement (r14722) * fixed: fs history algorithm might return wrong objects (issue #1970) * fixed: repos deadlock when hooks output too much (issue #2078) * fixed: mod_dav_svn displays errors with sensitive paths (r14792) * fixed: anonymous reader could create empty commits (issue #2388) * fixed: possible segfault to callers of trace_node_locations() (r16188) * fixed: BDB-style locking actions on FSFS repositories (r16295, r16297) * fixed: numerous bugs running BDB commands on FSFS (issue #2361, r16388) * fixed: svndumpfilter incorrectly remapping dropped revs (issue #1911) - Both: * faster multiple (un)locks in a single svn:// request (issue #2264) * the Subversion Book is no longer bundled (r17466) Developer-visible changes: * reorganization of automated tests, including ability to run on ramdisk * lots of Doxygen/API documentation cleanup * numerous improvements to gen-make.py build system, especially on win32 * working copy is now storing repos_root as separate field (issue #960) * keywords are now stored in an internal hash (issue #890) * client status APIs now makes more server-side info available (r16344) * new public APIs: - new transfer progress callback for DAV (r15948) - svn_ra_initialize(), svn_client_open_ra_session() - svn_fs_closest_copy(), svn_fs_type() - several rev'd APIs, see doxygen docs * SWIG bindings: No more compile-time or runtime SWIG dependencies - SWIG/python bindings: - automatic memory management: APIs no longer require pool arguments! - improved stability, as shown by our new testsuite - better error messages - SWIG/ruby bindings: - complete API coverage! - automatic memory management - greatly expanded test suite - SWIG/perl bindings: - new accessors for svn_lock_t, svn_fs_access_t - a number of bugfixes * javahl bindings: - add streamy API for fetching file contents (r15584) - fixed: let tests run before bindings are installed (issue #2040) - fixed: lock command not raising errors properly (issue #2394) - fixed: ignored errors from svn_client_blame2() (r16434) Version 1.2.3 (19 August 2005, from /branches/1.2.x) http://svn.apache.org/repos/asf/subversion/tags/1.2.3 User-visible changes: - Client: * fixed: 'svn status -u' fails against pre-1.2 mod_dav_svn (r15359, r15423) * fixed: 'svn export' segfault (r15516) * fixed: 'svn merge' memory leak (r15233) * fixed: horrible rename-tracing performance against 1.0 servers (r15315) * fixed: 'svn cat' over file:// -- small leak (r15253) * fixed: crash with "svn lock" and authentication (r15703) * improvements to 'svnmerge' utility (r14008,-458,-587,-632, r15329,-340) * translation updates for French, German, Polish, Norwegian, Swedish, Korean - Server: * fixed: mod_authz_svn being overly restrictive (r15463) * fixed: fsfs directory caching bug (r15705, r15742) - Both: * fixed: crash when >50 options passed to any commandline app (r15251) * fixed: memory leak in character translation handle caching (r15379,-398) Developer-visible changes: * fixed: crash when calling svn_client_(un)lock with no targets (r15734) * rhel-4 RPM bugfix for python bindings (r15616) * missing #include in SWIG bindings (r15683) * javahl bindings: - fixed: JNI library loading bug (r15552) - fixed: JNI stack-name cut and paste error (r15337) - fixed: crash when revisions have no dates (r15737) * perl bindings: - now compatible with SWIG 1.3.25 (r15248) - allow SVN::Pool to be used as pool parameter (r15450) - make SVN::Delta::Editor friendlier for debugging (r15609) - fixed: wrap svn_ra_stat properly (r15713) - fixed: bug in SVN::Core::Stream's read function (r15698, r15700) * ruby bindings: - now compatible with SWIG 1.3.25 (r14980, r15361) Version 1.2.2 (Not released, see changes for 1.2.3.) Version 1.2.1 (5 July 2005, from /branches/1.2.x) http://svn.apache.org/repos/asf/subversion/tags/1.2.1 User-visible changes: - Client: * fixed: 'svn lock' on switched file locks wrong thing (issue #2307) * fixed: 'svn (un)lock' errors on multiple targets (r14736, 14775) * fixed: 'svn (un)lock' problems with URI-unsafe names (issue #2314) * fixed: 'svn (un)lock' not caching authentication (r15088) * fixed: 'svn unlock' loses executable bit (r14859, r14923, r14939) * fixed: 'svn unlock URL' segfault (r14893) * fixed: 'svn commit' failure on XML-unsafe locked paths (issue #2335) * fixed: recursive directory copy bug (issue #2343) * fixed: don't initialize RA library in 'svnversion' (r14755) * fixed: svn-push segfault (r14732) * various translation updates for localized client messages - Server: * fixed: 'svn log' performance regression, general (r14116, 14772, 14759) * fixed: 'svn log -v' performance regression, FSFS-specific (r15016) * fixed: mod_dav_svn bug sets content-type incorrectly (r15046) Developer-visible changes: * fixed: win32 innosetup's add/repair/remove features (r14830) * fixed: OBOE with 'limit' parameter of svn_repos_get_logs3(). (r15119) * redhat RPM fixes (r15050) * perl bindings: - accessors for svn_lock_t (r15082) - call utf_initialize, adjust global pool usage (r15076, r15080, r15081, r15117) Version 1.2.0 (21 May 2005, from /branches/1.2.x) http://svn.apache.org/repos/asf/subversion/tags/1.2.0 See the 1.2 release notes for a more verbose overview of the changes since the 1.1 release: http://subversion.apache.org/docs/release-notes/1.2.html User-visible changes: - Client: * add peg-rev syntax to co/blame/cat/ls/pget/plist/export (issue #1093) * 'svn info' now works on URLs (r13123, 13144) * 'svn* --version' now shows available repository back-ends (r13761) * new fixed-length keywords (for placement in binary files) (issue #2095) * on Windows, disk-cached passwords are now encrypted (r13888) * performance improvements: - 'svn status' does much less disk parsing (r11677, 11704) - 'svn st -u' no longer asks server to generate textdeltas (issue #2259) - 'svn revert -R' doing much less work (r13883) - utf8<->native conversions are faster now (issue #2016) * new switches added: - 'svn commit --no-unlock - retain lock in wc upon commit - 'svn log --limit N' - show only first N log messages - 'svn info --revision' - show info on older object (r13265) - 'svn list --xml' - output listing in XML - 'svn propset --force' - allow unusual propsets (#2065) - 'svn diff --force' - show diffs on binary files (#2099) - 'svn co/up/st --ignore-externals' - skip over externals (#2189) - 'svn export --non-recursive' - don't export subdirs (issue #2228) - 'svnversion --help' - show help (r13128) * fixed: 'svn merge' fails to add symlinks or expand keywords (issue #2064) * fixed: 'svn merge --dry-run' shows spurious 'skip' messages (issue #1943) * fixed: 'svn merge' file-not-found' error (issue #1673) * fixed: 'svn merge' of propchanges into deleted file (issue #2132) * fixed: 'svn merge' on implicit target with space (r13010) * fixed: 'svn merge/diff URL URL' can cause httpd timeout (issue #2048) * fixed: 'svn switch/update' failure might corrupt wc (issue #1825) * fixed: 'svn up' should rm before add, helps case-insensitivity (r12616) * fixed: 'svn up -rX' causes file to be unrestorable (issue #2250) * fixed: 'svn copy wc wc' should keep .svn/ hidden (issue #1739) * fixed: 'svn copy wc wc' of deleted=true doesn't delete (issue #2101) * fixed: 'svn copy' shouldn't copy into schedule-delete area (issue #2020) * fixed: 'svn copy dir dir' infinite recursion (issue #2224) * fixed: 'svn log' throws error on unversioned target (issue #1551) * fixed: 'svn log' in r0 working copy shows r1 log msg (issue #1950) * fixed: 'svn export' bugs on deleted dirs or nonexistents (#2226, r13226) * fixed: 'svn export' on single file from working copy (issue #1708) * fixed: 'svn import' creating an empty revision (r14293) * fixed: 'svn commit' ignores --encoding when editing externally (#2244) * fixed: 'svn commit' log message lost if utf8-conversion failure (r13230) * fixed: 'svn diff' output encoding bug (r11461) * fixed: 'svn diff' showing prop-diffs on repos root dir (r13381-2) * fixed: 'svn diff' label reversal (issue #2033) * fixed: 'svn propget' prints extra newline in --strict mode (r14505) * fixed: 'svn propset' should skip unversioned files (#2030) * fixed: 'svn rm URL1 URL2 URL3...' huge memory usage (issue #2218) * fixed: 'svn mkdir' cleanup after failure (r11883) * fixed: 'svn status -u' crash in non-recursive wc's (issue #2122) * fixed: 'svn revert' should skip unversioned items (issues #2030, 2133) * fixed: 'svn revert' should suggest --recursive (issue #2114) * fixed: 'svn add/import' better detects invalid paths (issue #1954) * fixed: 'svn cleanup' should repair timestamps (r12012) * fixed: 'svn cat -rBASE' contacts repository (issue #1361) * fixed: fuzzily escape control-characters when sending over dav (#2147) * fixed: prevent client from manipulating svn:wc:* properties (r12523) * fixed: allow portnumber in svn+ssh://user@host:port/ URLs (r14373) * fixed: xml-escaping bugs over dav (r11090) * fixed: store symlinks as utf8, always work in non-utf8 locale (r11358-9) * fixed: bug in special-file detranslation (r11441) * fixed: show paths in local-style where we weren't (issue #1538) * fixed: detect invalid propnames better (issue #1832) * fixed: entire error stack not being printed (issue #1822) * fixed: improper utf8 conversion of revision strings (issue #1999) * fixed: use-commit-times timestamp bug (r12906) * fixed: don't comment out section-names in default config file (r11771) * more support for user-cancellation (r13083-4, 13086) * improved error messages (r12920, 11392, 11599, 11913, #2154, #2214) - Server: * mod_dav_svn autoversioning feature now complete (see release notes) * 'svnadmin create' now creates FSFS repositories by default (r13624) * new pre/post-revprop hook argument to describe propchange (r12162) * mod_authz_svn groups can now contain other groups (issue #2085) * 'svnadmin recover' now creates default svnserve passwd file (r11589) * increase default BDB cache size in DB_CONFIG (r13030) * new switches added: - 'svnlook diff --no-diff-added' - suppress added files (#2180) - 'svnlook propget/proplist --revprop' - show revision props (#2181) - 'svnadmin load --use-pre-commit-hook' 'svnadmin load --use-post-commit-hook'- invoke hooks when loading * fixed: FSFS race condition on posix platforms (issue #2265) * fixed: change FSFS revprops atomically and safely (issue #2193) * fixed: FSFS should verify checksums (issue #2253) * fixed: FSFS crash bug (r14333) * fixed: 'svnadmin create' should clean up when it fails (r13200) * fixed: 'svnadmin load' compatibility on pre-0.14 dumpfiles (r12075) * fixed: 'svnadmin load' crashes on contentful rev 0 (issue #1674) * fixed: 'svnadmin dump' should write in console encoding (issue #1997) * fixed: check for null-streams in dump/load code (r10510) * fixed: hook script ignored when symlink is broken (issue #1700) * fixed: hook script may inherit server's stdin stream (r12155) * fixed: potential svnserve segfault (r13199) * fixed: svnserve handling mutually-exclusive options (issue #2251) * fixed: mod_authz_svn should log errors to httpd errorlog (issue #2182) * fixed: 'svnadmin hotcopy' failed to copy format files (r14678, r14683) * mailer.py: add win32 compatibility, plus other bugfixes - Both: * new 'locking' feature (issue #1478, see release notes for details): - new: 'svn lock/unlock', 'svnadmin lslocks/rmlocks', 'svnlook lock' - new: 'svn:needs-lock' property to enable communication - 'svn st [-u]' shows local or remote lock overview - 'svn info wc | URL' shows local or remote lock details - 'svn commit' sends locks, 'svn up' removes stale locks - new hook scripts: pre-lock, pre-unlock, post-lock, post-unlock * speedups for 'svn blame' and other commands (see xdelta in release notes) * fixed: make both svnserve and svn:// urls work with IPv6 (r13235-6) * fixed: updating xml-unsafe dirname over http (issue #2268) * new translation of localized messages: French * continued improvement of localized message translations: - German, Spanish, Polish, Brazilian Portuguese, Norwegian Bokmål, Swedish, Traditional Chinese, Simplified Chinese, Korean, Japanese - more localized messages in all svn-related binaries Developer-visible changes: * binary diff algorithm now defaults to xdelta instead of vdelta * huge number of new APIs: - new locking APIs in svn_client.h, svn_ra.h, svn_repos.h, svn_fs.h - new 'flattened' svn_ra.h API, which imitates svn_fs.h (issue #1931) - new notification API in svn_client.h, svn_wc.h - http://svn.haxx.se/dev/archive-2005-04/0319.shtml has all API changes * fs now has its own 'format' file, independent of repos 'format' (r13387) * improve efficiency of delta combining algorithm (r13016, r13063) * make all BDB apis take explicit pool parameters (r13198, r13205) * remove libsvn_fs_base caching of node revisions (r13299) * libsvn_repos commit editor can now take incoming txn (r13733) * fixed: mod_dav_svn sending illegal editor-drive (issue #2258) * pool usage improvements (r12954, 12852, r13386, issue #1310) * SWIG bindings: better API coverage overall. - new ruby bindings! - remove bitrotting swig-java bindings - perl and python bindings: numerous improvements, see their own logs. - bindings tests now within svntest framework * javahl bindings: numerous improvements, see its own logs. * many improvements to mailer.py and commit-email.pl * rewrite/improvements to gen-make build system, including VS.NET support * many improvements to the automated python testsuite (issue #2257) * book moved to separate repository (http://svn.red-bean.com/svnbook) Version 1.1.4 (1 April 2005, from /branches/1.1.x) http://svn.apache.org/repos/asf/subversion/tags/1.1.4 User-visible changes: - Client: * fixed: win32 not ignoring versioned symlinks (issue #2173) * fixed: 'svn merge' can cause broken working copy (issue #2222) * fixed: 'svn commit' fails when schedule-delete dir has local mod (r11980) * fixed: 'svn st -u nonexistent_file' segfault (issue #2127) * fixed: 'svn cp wc wc' utf8 conversion error (r13111) * fixed: confusing error message about "wc not locked" (issue #2174) * many translation updates for localized client messages - Server: * fixed: nasty (though unusual) performance bug in FSFS commits (r13222-3) * fixed: FSFS memory leak when auto-merging large tree (r13193) * fixed: FSFS memory leak in 'svnadmin hotcopy' (r13218, 13465, 13468) * fixed: FSFS segfault when encountering empty data reps (r13683) * fixed: two dataloss bugs in svndumpfilter (r12630, r12636) * fixed: wasteful memory usage in svndumpfilter (r12637, r12640) * fixed: mod_dav_svn segfaults when client sends bogus paths (issue #2199) * make mailer.py work on win32 (r12499, r12542, r12670) - Both: * fixed: (win32) retry file operation if sharing violation (r12983, r12986) Developer-visible changes: * add SWIG 1.3.24 and .25 compatibility (r12551, r12717-9, r12722, r13504) * fixed: JavaHL run-time link error (r12576), path/url cleanups (r13090) * fixed: python bindings log_receiver failure with SWIG 1.3.24 (r13487) * build system tweaks: add install dependencies for fs & fs_base (r11050) Version 1.1.3 (14 January 2005, from /branches/1.1.x) http://svn.apache.org/repos/asf/subversion/tags/1.1.3 User-visible changes: - Client: * translation updates for localized client messages. Developer-visible changes: * Fix a compile error in the Perl bindings. Version 1.1.2 (20 December 2004, from /branches/1.1.x) http://svn.apache.org/repos/asf/subversion/tags/1.1.2 User-visible changes: - Client: * fixed: 'svn switch' interruption can break working copy (issue #1826) * fixed: 'svn switch' memleak over ra_dav (issue #2106) * fixed: 'svn blame' algorithm bug (r11527) * fixed: invoke external diff/diff3 with local-style paths (r11689) * fixed: 'svn status' handling of missing subdirs (r11936) * fixed: 'svn ls -v' encoding bug (r11740) * fixed: 'svn ls "file with space"' bug (r12273, r12393) * fixed: 'svn merge' should URI-encode copyfrom URLs (issue #1905) * fixed: 'svn merge' deletion output formatting (r12100, r12111, r12114) * fixed: 'svnversion --version .' crash (r11438) * fixed: UNC paths on Cygwin (issue #2108) * fixed: win98 iconv bug -- uninitialized variable (issue #2091) * improved 'svn status' performance: - do fewer check_path calls (r11592) - 'svn status file' shouldn't recursively lock tree (r11439, r11669) * translation updates for localized client messages. - Server: * fixed: 'svnadmin load' race condition (r12327) * fixed: fsfs memleak in commit finalization (r11706) * fixed: fsfs memleak in inefficient directory removal (r11701) * fixed: fsfs commits use insert-only perms on db/revs/ (r11665) * fixed: fsfs creates lockfile at creation time, not at 1st commit (r12172) * fixed: svndumpfilter mislabeling output as version 3 (issue #2142) * fixed: 'svnserve -h' encoding bug (part of issue #1997) * fixed: prevent cross-repository copies (r12003) * fixed: increase log-region max size in default DB_CONFIG (issue #2159) - Both: * fixed: 'svn switch' quietly corrupting working copy (issue #2124) * fixed: canonicalize paths sent by ra_svn/svnserve (issue #2119) * fixed: memleak into UTF8 translation routines (r11689) Developer-visible changes: * add support for BerkeleyDB 4.3 (if using a compatible apr-util) * add support for any apr/apr-util 1.X * disallow incompatible SWIG versions (r12450) * fixed: slight API/ABI incompatibility between 1.0.9 and 1.1.x (r12102) * fixed: perl bindings pool usage & object refcounts (r11451, r11630) * fixed: perl bindings pool usage and potential memleak (r12397) * fixed: javahl crash trying to fetch nonexistent property (r12184) * fixed: javahl build can fail due to missing dirs (issue #2032) * fixed: RPM build breakage (issue #2111) * fixed: i18n issues for windows installer (r11685) * allow build system to update single .po file (r11763) Version 1.1.1 (22 October 2004, from /branches/1.1.x) http://svn.apache.org/repos/asf/subversion/tags/1.1.1 User-visible changes: - Client: * fixed: 'svn status' win32 performance regression (issue #2016) * fixed: 'svn ls' dying on non-ascii paths over DAV (issue #2060) * fixed: allow URI-encoded colon or pipe on win32 (issue #2012) * fixed: broken win32 UNC paths (issue #2011) * fixed: memory bloat when committing many files over DAV (r11284, -321) * fixed: eol-style translation error for 'svn propget' (r11202, -243) * fixed: 'svn propedit' does EOL conversion properly (issue #2063) * fixed: 'svn log --xml' shouldn't be locale-dependent. (r11181) * fixed: 'svn export' of symlinks with 'use-commit-times' (r11224) * fixed: 'svn export -rBASE' when WC has added items (r11296, -415) * many translation updates for localized client messages. - Server: * fixed: 'svn ls' HTTP performance regression (r11211, -232, -285) * fixed: make it possible to set "SVNPathAuthz off" in httpd.conf (r11190) * fixed: fsfs validating revisions when accessing revprops (issue #2076) * fixed: 'svn log -v' hiding too much info on 'empty' revisions. (r11137) * fixed: encoding bug with 'svnlook log'/'svnlook author' (r11172) * fixed: allow mod_authz_svn to return '403 Forbidden', not 500 (r11064) * fixed: XML-escape author and date strings before sending (issue #2071) * fixed: invalid XML being sent over DAV (issue #2090) Developer-visible changes: * fixed: IRIX compile error (issue #2082) * fixed: error in perl bindings (r11290) * fixed: error leaks in mod_dav_svn (r11458) * fixed: javahl should use default config directory (r11394) Version 1.0.9 (13 October 2004, from /branches/1.0.9) http://svn.apache.org/repos/asf/subversion/tags/1.0.9 User-visible changes: - Server: * fixed: 'svn ls' HTTP performance regression (r11211, -232, -285) * fixed: 'svn log -v' hiding too much info on 'empty' revisions. (r11137) Developer-visible changes: * fixed: make redhat 7/8 rpm scripts build the book correctly (11143) Version 1.1.0 (29 September 2004, from /branches/1.1.x) http://svn.apache.org/repos/asf/subversion/tags/1.1.0 See the 1.1 release notes for a more verbose overview of the changes since 1.0.x: http://subversion.apache.org/docs/release-notes/1.1.html User-visible changes: * new non-database repository back-end (libsvn_fs_fs) * symlinks can now be placed under version control (unix systems only) * cmdline client now supports psuedo-IRIs and autoescapes chars (issue #1910) * 'svnadmin recover' no longer waits forever for a lock (new '--wait' option) * new $Revision$ synonym for $Rev$ and $LastChangedRevision$ * new runtime option 'store-passwords = ' gives finer control (r10794)x * fixed: working copies now shareable by multiple users (issue #1509) * fixed: diff and other subcommands correctly follow renames (issue #1093) - new 'peg' syntax for diff/merge: 'svn diff -r X:Y TARGET@REV' - now able to compare working copy with URL: 'svn diff --old WC --new URL' * new framework for localized error/info/help messages, initial translations: - German, Polish, Swedish, Norwegian Bokmål, Traditional Chinese, Japanese, Brazilian Portuguese. * speed improvements: - faster 'svn up' on complex working copies -- no more repos txns (r8840) - faster 'svn status' -- fewer stat() calls (r9182) - faster 'svn checkout' -- fewer sleep() calls (r9123) - faster 'svn blame' -- new RA->get_file_revs() func (issue #1715) * new switches added: - 'svn blame --verbose' - show extra annotation info - 'svn export --native-eol TYPE' - export using TYPE line-endings - 'svn add --force' - recurse into version-controlled dirs - 'svnadmin dump --deltas' - include binary diffs in dumpfile - 'svnadmin create --fs-type fsfs' - create fs_fs repos (default is bdb) - 'svnserve --tunnel-user=NAME' - assume authenticated NAME over tunnel - 'svndumpfilter [cmd] --quiet' - less chatty dumpfiltering - 'svnserve --version' - show program's version 'svnversion --version' 'svndumpfilter --version' * svnadmin dump/deltify now understand -r{DATE} (r9805) * allow update of non-existent target entry (partial issue #1902 fix) * 'svnadmin create' now sets sgid bit on repos/db/ (unix systems only) * increase default neon (ra_dav) timeout from 120 to 3600 seconds (r9568) * print verbose BDB error messages (r10557, r10566) * fixed: don't bail when 'svn up' refuses to delete local mods (issue #1806) * fixed: process svn:externals in defined order (issue #1788) * fixed: pass new propval to stdin of pre-revprop-change hook (issue #952) * fixed: svndumpfilter logic/memory/display bugs (r8691, 8831, 9061) * fixed: 'svnadmin hotcopy PATH .' (r8659) * fixed: copy crash bug (r8863) * fixed: 'svn st -u' crash bug (r10841) * fixed: 'svn commit' segfault (r10676) * fixed: allow cleanup on .svn/ dirs containing KILLME file (r8891) * fixed: 'svn revert' detects corrupted text-base (r8897) * fixed: 'svn status -N' no longer locks entire tree (r8906) * fixed: several different 'svn switch' bugs (r9192, 9203, 9238, 9698) * fixed: some 'svn copy' bugs (r9193, 9274) * fixed: obscure update-deletion bug (r8976) * fixed: utf8 conversion 'hang' (r9233) * fixed: missing UTF8->native recoding in 'svn log' output (r10652, 10673) * fixed: 'svn blame' now defaults to rev (r9440) * fixed: 'svn blame' closing files before deleting them (issue #1969) * fixed: 'svn diff' shows truncated paths (r9693) * fixed: 'svn diff --notice-ancestry' bug (r9699) * fixed: 'svn subcommand -r{DATE} URL' works if URL not in HEAD (issue #1840) * fixed: 'svn blame' on non-ascii path truncation (issue #1770) * fixed: svn:external 'wc not locked' bug (issue #1897) * fixed: proper mod_dav_svn html/xml escaping (issue #1209) * fixed: memleak in 'svn propset -R URL' (issue #1928) * fixed: stop 'svn up' from deleting schedule-add target dir (issue #1793) * fixed: 'svn merge' adding a directory already 'deleted' (issue #1769) * fixed: excessive memory use when fs deltifies revision 2^N (r10070) * fixed: disallow non-recursive directory commit (issue #1797) * fixed: allow propget of props with colon in name (issue #1807) * fixed: 'svnadmin load' computation of copyfrom-rev (issue #1795) * fixed: runtime config files created with proper line-endings (issue #1803) * fixed: make svnserve's authn work on usernames with spaces (r10385) * fixed: have svnserve use repos UUID as default authn realm (r10394) * fixed: segfault when history-following hits 'empty' revision (r10368) * fixed: overzealous out-of-dateness checks in 'svn cp wc URL' (issue 1994) * fixed: don't URI-encode path in mod_dav_svn XML listings (r10461) * fixed: 'svn info' should refuse URL targets (r10760) * fixed: incomplete-directory handling bug (r10956) * fixed: allow cancellation between files during recursive dir add (r10894) * general improvement and normalization of error messages * many improvements to contributed tools: mailer.py, psvn.el, etc. Developer-visible changes: * libsvn_fs now loads either bdb (libsvn_fs_base) or fsfs (libsvn_fs_fs) * new console-printing API: svn_cmdline_printf() family checks for errors. * new library-version querying API: - new svn_[libname]_version() in each library - svn_ver_*() family of functions * 2nd generation APIs, from svn_foo() --> svn_foo2(). old APIs deprecated. - svn_wc_adm_open2() & friends, svn_wc_export2(), svn_client_add2() svn_wc_parse_externals_description2(), svn_hash_read/write2(), svn_repos_dump/load_fs2() & friends, svn_wc_diff2(), svn_subst_copy_and_translate2() * other new APIs: - svn_stream_copy(), svn_txdelta_target_push(), svn_opt_parse_path(), svn_io_file_flush_to_disk, svn_repos_trace_node_locations(), svn_repos_get_file_revs(), RA->get_locations(), RA->get_file_revs, RA->get_version(), svn_sort_compare_paths(), svn_utf_initialize() * SVN_REVNUM_FMT_T usage replaced with %ld (r9691) * cache mod_authz_svn authz file per connection (r8867) * validate hex digits in % escape (issue #1947) * hashes now written to disk in sorted order (r9910) * do cancellation checks before loops, not after (r8918) * fixed: bug in svn_repos_dir_delta replacement logic (r8078) * fixed: tiny memory access bugs (r8229, 8230, 8313) * fixed: several commit buglets (r8955, 9658, 9757, 9855) * fixed: don't recursively lock all prop commands (r9172) * fixed: svnserve memory usage on many-file commits (r9185) * fixed: close svnserve child's listen-socket after forking (r10050) * fixed: 'svnadmin hotcopy' integrity improvements (issues #1817, #1818) * fixed: only verify media type of svn:mime-type, not encoding (r10126) * fixed: handle '//' and '..' in svn_path_canonicalize (issue #1779) * fixed: double URI escaping (issue #1814) * fixed: editor-driver bug (don't delete before every copy) (r10851) * fixed: potential mod_dav_svn crashes/memleaks (r10478) * fixed: better 'svnadmin verify verification (r10508, r10509) * fixed: encoding of get_repos_url_result (r10353, 10375) * fixed: prevent canonicalized URIs from ending in '/' (r10317) * stop using -std=c89 gcc flag (r11054) * sync with apr 1.0's find_apr.m4 and find_apu.m4 files (r10560) * win32 installer improvements (r10978) * huge improvements to python, perl, java bindings * huge changes to win32 build system Version 1.0.8 (22 September 2004, from /branches/1.0.8) http://svn.apache.org/repos/asf/subversion/tags/1.0.8 User-visible changes: * fixed: mod_authz_svn path and log-message metadata leaks. See CAN-2004-0749, and descriptive advisory at http://subversion.apache.org/security/CAN-2004-0749-advisory.txt Version 1.0.7 (17 September 2004, from /branches/1.0.x) http://svn.apache.org/repos/asf/subversion/tags/1.0.7 User-visible changes: * fixed: win32 'file not found' error [issue #1862] * fixed: 'svn st -u' crash (r10841) * fixed: potential repos corruption; ensure stdin/out/err always open (r10819) * fixed: allow propnames containing ":" to be fetched via http:// (r10190) * fixed: allow user to interrupt between authentication prompts (see r11014) * fixed: work around +t directory-creation bug in APR (r10616, 10638, 10642) * various small fixes to Book Developer-visible changes: * fix library dependencies for bindings (r9338, 9340) * java bindings: fix a crash and other bugs (r9883, 9905, 8027) * perl bindings: various fixes (see r11023) Version 1.0.6 (19 July 2004, from /branches/1.0.x) http://svn.apache.org/repos/asf/subversion/tags/1.0.6 User-visible changes: * fixed: crash in status command, caused by race (r10144) * fixed: crashes when deleting a revision-prop (r10148, r10185, r10192) * fixed: mod_authz_svn allows COPY method on repos with space in name (#1837) * fixed: mod_authz_svn COPY security hole: authorize whole tree (issue #1949) Developer-visible changes: * neon 0.24.7 now required (fixes wire compression bugs) (r10159, 10176) Version 1.0.5 (10 Jun 2004, from /branches/1.0.5) http://svn.apache.org/repos/asf/subversion/tags/1.0.5 User-visible changes: * fixed: security bug in svn protocol string parsing. (CAN-2004-0413) Version 1.0.4 (21 May 2004, from /branches/1.0.x) http://svn.apache.org/repos/asf/subversion/tags/1.0.4 User-visible changes: * fixed: 'svn up' can delete unversioned data on win32 fs (issue #1854) * fixed: pool leaks in 'svnlook diff/changed/dirs-changed' * fixed: insecure script example in pre-commit-hook template * fixed: inability to do a checkout to '/' * officially recommend neon 0.24.6 in all docs. Developer-visible changes: * fixed: RPM build for Fedora & WBEL3/RHEL3 * fixed: SWIG-java building problem * fixed: javahl bug which can crash JVM * fixed: change formatting codes in svn_swig_pl_callback_thunk * fixed: properly wrap svn_txdelta_parse_svndiff for perl Version 1.0.3 (19 May 2004, from /branches/1.0.3) http://svn.apache.org/repos/asf/subversion/tags/1.0.3 User-visible changes: * fixed: security bug in date parsing. (CAN-2004-0397) Version 1.0.2 (15 April 2004, from /branches/1.0.x) http://svn.apache.org/repos/asf/subversion/tags/1.0.2 User-visible changes: * fixed: segfault when remotely deleting svn:author property. * fixed: mod_dav_svn accepting too many authors. (issue #1786) * fixed: create runtime config files with native EOLs. (Issue #1802) * fixed: recursive propset can corrupt .svn/entries (issue #1794) * fixed: allow shared working copies [mostly working now] (issue #1509) * fixed: mod_authz_svn should ignore uri on MERGE request (partial #1821) * fixed: svnserve assertion failure on empty error messages * fixed: commit/update memory leaks when working on many targets (issue #1635) * fixed: don't display repos-paths or URLs with '\' on win32. * new example script: svnserve 'sgid' wrapper. * minor book fixes, new 'best-practices' doc. Developer-visible changes: * fixed: deprecation warning from SWIG 1.3.20_ * fixed: broken win32 python-swig bindings compilation. * fixed: bug in libsvn_fs changes-table change-folding code. * fixed: perl bindings: wrap root->paths_changed, apply_txdelta return values * added VC7 support and defines for including debug symbol files. Version 1.0.1 (12 March 2004, from /branches/1.0.x) http://svn.apache.org/repos/asf/subversion/tags/1.0.1 User-visible changes: * allow anonymous access checking in mod_authz_svn * fixed: mod_authz_svn now works with SVNParentPath (issue #1588) * fixed: potential segfault in mod_dav_svn. * fixed: improper BDB cursor shutdown in libsvn_fs, which can wedge repos. * fixed: allow checkout of repository with space in path. (issue #1694) * fixed: make 'svn propget URL' work correctly over svn://. (issue #1752) * fixed: failed 'svn merge URL' when URL contains user@host. (issue #1759) * fixed: invalid REPORT response when updating a deleted wc. (issue #1721) * fixed: allow deletes below copied wc dirs. * fixed: merge --dry-run bug on added-files with props. (issue #1738) * fixed: svnlook no longer requires write access to '.' * fixed: ensure 'svn blame' fails on files marked as binary. (issue #1733) * fixed: make failed direct-URL commits clean up their fs txns. (issue #1726) * fixed: obscure bugs in time/date string formatting. (issue #1692) * fixed: svn export doesn't export svn:externals. (issue #1750) * fixed: svn import doesn't handle EOL or keyword translation. (issue #1756) * fixed: svn status -v shows unwanted status of externals (issue #1741) * fixed: allow revert of schedule-replace file that has no props (issue #1775) * fixed: svnserve segfault on invalid --listen-host argument. * fixed: switch bug which caused wrong URL to be left in wc. * detect invalid UTF8 filenames when native locale is UTF8. * improve presentation of directory property conflicts. * improve presentation of errors from svnadmin & svnlook. * clarify output of 'svnadmin help deltify'. * augment copyright notice to --version output. * more book updates. Developer-visible changes: * remove obsolete auth provider examples. * prevent potential ra_dav commit race-condition. * fix svn_io_dir_walk 'dot-first' ordering required by 'svnadmin hotcopy'. * fix error leaks in dav_svn_convert_err() * upgrade win32 innosettup tools and redhat RPMs. * fix compile warning: compressed streams on LP64 architecture. * use cpio to generate tarballs instead of GNU tar. * tweaks to dist.sh. * fix bindings on win32. * fix perl bindings build on OS X. * fix perl bindings: bug which rejects string revnums. Version 1.0.0 (branching 23 February 2004, from /branches/1.0.x) http://svn.apache.org/repos/asf/subversion/tags/1.0.0 User-visible changes: * fixes to the shbang lines in tools/hook-scripts/. * vast improvements to cvs2svn.py (NOTE: now a separate project!) * general documentation cleanup: - clarify built-in help text for 'svn switch' and 'svn status'. - fix docs within the hook templates. - cleanups to README, INSTALL, HACKING, svn-ref.tex, bash_completion. - bring www/ pages up-to-date for 1.0. - many changes to the Book Developer-visible changes: * updates to the win32 installer packaging code. * cleanups to SWIG bindings: - disable svn_io_* functions. - svn_filesize_t and apr_time_t fixes. - remove debugging print statements and various warnings. - make svn_repos_dir_delta() function correctly - add support for repos authz callback. Version 0.37.0 [Beta Interim 2] (branching 24 January 2004, from /branches/1.0-stabilization) http://svn.apache.org/repos/asf/subversion/tags/0.37.0 User-visible changes: * bugfix: buffer overflow for AIX client * 'svn merge' now notices ancestry by default. (r8390) * bugfix: double Ctrl-C on windows no longer wedges repository. * New date formats (see API change: Rewrite of date parser below) * bugfix: Errors in authentication when --no-interactive is turned on (r8139) * bugfix: Fix some 'access denied' errors on Windows (r8341, r8352) Developer-visible changes: * API change: Rewrite of date parser (r8327, r8328, r8329) (issue #408) * bugfix: svn_fs__bdb_changes_fetch() fouls up change ordering (issue #1695) * require SWIG >=1.3.19 (issue #1690) * numerous changes to language bindings, to keep up with C API. * fix: apr build issues (r8279, r8280, r8318) (issue #1666) * changed the auth-provider C API to use 'realmstring' on all funcs * check the ra plugin ABI versions. * fix: ABI problem with blame. (r8494) (issue #1705) * remove svn_io_file_printf from public API. (r8492) (issue #1653) * extensive changes in the perl client bindings. (r8270) * too many big and small internal code cleanups and fixes to mention here Version 0.36.0 [Beta Interim 1] (branching 13 January 2004, from /branches/1.0-stabilization) http://svn.apache.org/repos/asf/subversion/tags/0.36.0 User-visible changes: * add cancellation support to svnadmin and svnlook (r8222) * runtime 'store-password' option renamed to 'store-auth-creds' (r8014) * 'svn blame' changes: - now shows correct revision info (r8035-6) - responds to cancellation better (r8129) * svnserve changes: - added '--inetd' option; now required to speak with stdin/stdout (r8205) - added '--listen-port' and '--listen-host' options (r8001-2) - removed '-u' option (r8003) - ignore SIGPIPE (no more repos lockups when you terminate a pipe) (r8140) * lots of Book work (many newly-documented Apache and svnserve topics) Developer-visible changes: * bugfix: svnserve network crash (r8142) * bugfix: return result_rev from svn_client_checkout correctly (r8096) * bugfix: fs history harvesting code (r8154) * bugfix: memory leak in mod_dav_svn (r8223) * bugfixes in edge-cases of status and update (r8114-5) * make 'svn blame' work with 18n and uri-escaped filenames (r8023, 8030, 8040) * small bugfixes to authentication system (r8006, r8235) * standardize error message formatting (r8218) * load RA modules as foo.so.0, not foo.so (r8098) * various core API changes: - use constructor for svn_client_cxt_t (r8053-4) - anchor/target may use NULL for target (r8216) - stop using apr_ symbols (r8219) - rename to 'svn_repos_authz_func_t' (r8213) - add pool parameter to finish_report and abort_report (r8215) * numerous changes to Perl and Java bindings, to keep up with C API. Version 0.35.1 [Beta] (branching 19 December 2003, from /tags/0.35.0) http://svn.apache.org/repos/asf/subversion/tags/0.35.1 NOTICES: This release is to correct for the problems in the 0.35.0 release and affects Windows users only: * fix: file handle leak (r8048) * fix: UTF-8 path problem (issue #1660) Version 0.35.0 (branching 12 December 2003, from revision 7994) http://svn.apache.org/repos/asf/subversion/branches/0.35.0 NOTICES: 1. As of this release, Subversion once again does deltification automatically. This means that the deltification step most repositories introduced into their post-commit hooks as of release 0.33.0 should now be reverted. Look for a line with "svnadmin deltify" in hooks/post-commit, and remove it. 2. We now recommend using Berkeley DB 4.2.52 or higher for SVN repositories. See http://sleepycat.com/download/index.shtml. User-visible changes: * BDB log files are automatically pruned, with BDB 4.2.50 and higher (#1615) * deltification is automatic again (issue #1601) * fix: svn diff -rX:Y wcpath' may lie (issue #1616) * fix: URI-decoding problem on 'svn import' (issue #1622) * many other enhancements, minor features, and bugfixes not listed here Developer-visible changes: * misc. improvements on Perl and Java bindings * improved diff handling (r7985) * many other changes not listed here Merged revisions after release branching: * r8009, r8010 and r8011 - Java bindings * r8041 - typo/bugfix Version 0.34.0 (released 3 December 2003, from revision r7859) http://svn.apache.org/repos/asf/subversion/tags/0.34.0 ##################################################################### ## WARNING WARNING WARNING WARNING WARNING WARNING WARNING ## ##################################################################### ## ## ## This release makes an incompatible change to the Subversion ## ## database. Repositories created with versions of Subversion ## ## prior to 0.34 will not work with Subversion 0.34. ## ## To upgrade, first use 'svnadmin dump' with your existing ## ## Subversion binaries. Then upgrade your binaries to 0.34, and ## ## use 'svnadmin load' to create a new repository from your ## ## dumpfile. ## ## Don't forget to copy any custom configuration/hooks from the ## ## old to the new repository. ## ## ## ##################################################################### Please see notes/repos_upgrade_HOWTO for documentation on migrating pre-0.34.0 repos to 0.34.0. That document is also located here: http://svn.apache.org/repos/asf/subversion/trunk/notes/repos_upgrade_HOWTO User-visible changes: * fs schema change (#1578, #1595) **NOTE: repos dump/load cycle required!** * Berkeley DB 4.2.50 is now the recommended Berkeley version * Fix: 'svn status' thought replaced items were unversioned (#1609) * SSL server cert error prompt improvement (r7849) * many error message improvements (r7745, r7763, r7824 and 7827 - #897) * don't show update-completion message until all wc work completes (#1556) * many other enhancements, minor features, and bugfixes not listed here Developer-visible changes: * public client APIs changes (r7799) after fixing #1556 * many improvements and fixes on Perl bindings (perl => 5.8.0 are required) * improvements, fixes on misc. test scripts * many other changes not listed here Merged revisions after release branching: * r7868 - Java bindings * r7888 - Security fix for svnserve Version 0.33.1 (released 17 November 2003, revision r7782) http://svn.apache.org/repos/asf/subversion/tags/0.33.1 NOTICE: This is a bugfix release. The bug is fixed if *either* the client or server uses the new code. User-visible changes: * major performance fix for updates Version 0.33.0 (released 13 November 2003, revision r7737) http://svn.apache.org/repos/asf/subversion/tags/0.33.0 NOTICES: 1. This client may be incompatible with ra_dav servers <= 0.31. 2. In order to make commits more responsive, repository deltification is no longer automatic. However, you may want to run deltification as a background process in your repository post-commit hook. For example, the new post-commit.tmpl file recommends 'nice -2 svnadmin deltify "$REPOS" -r "$REV" &'. User-visible changes: * now require APR/APU 0.9.5 (ships in Apache 2.0.48) * lose automatic deltification, but recommend it in post-commit (r7695, #1573) * new configuration and authn/authz support in ra_svn (r7604, r7601) * much faster checkouts and updates, over both svn:// and http:// (#1429) * new partial-authz feature: checkouts/updates just skip unauthorized items * new 'use-commit-times = yes' config option to use commit-time timestamps * new 'svnadmin hotcopy' command, like hot-backup.py (#1567) * fix Win32 "access denied" error in renames (r7598, #1576) * unnecessary working copy tree locks now avoided, to save time (#1245) * Compatibility changes: - lose ra_dav compatibility with servers 0.31 and earlier - lose support for working copy format "1" (not created for over a year) * 'svn diff' and other read-only actions now work in read-only working copies * 'svn blame -rX' now does the intuitive thing * 'svn log' output headers now say "rXXXX | " instead of "rev XXXX: " * 'svnversion' no longer stymied by svn:externals * new 'svn pd' alias for 'svn propdel' * '-rCOMMITTED' keyword now works on more commands * minor changes to output of 'svn ls -v' and 'svn st -v' (r7530) * 'svn log --xml' now obeys the '-q' flag (r7555) * cvs2svn.py bugfixes, especially issue #1440 * book and documentation updates * removed server config options ssl-ignore-invalid-date and ssl-override-cert-hostname (r7644) * many other enhancements, minor features, and bugfixes not listed here Developer-visible changes: * repair text- and prop-time in .svn/entries if spuriously wrong (r7565) * speed up keyword translation (r7502) * two new editor functions, absent_file() and absent_directory() * ra_dav checkouts/updates no longer do O(n) number of GET, PROPFIND requests * new svn_io_temp_dir function, will morph to apr_temp_dir_get soon * new svn_io_file_close wrapper for apr_file_close * tools/test-scripts/svntest/ scripts now support ra_dav and ramdisk * many other changes not listed here Version 0.32.1 (released 23 October 2003, revision 7497) http://svn.apache.org/repos/asf/subversion/tags/0.32.1 NOTICE: This release is to correct for the problems in the 0.32.0 release. There are no user or developer changes in this release other than the subversion/include/svn_version.h now reflects the correct version number. NOTICE: This release of Subversion causes an ra_dav client/server compatibility break with Subversions older than 0.28.0. Version 0.32.0 (released 22 October 2003, revision 7480) http://svn.apache.org/repos/asf/subversion/tags/0.32.0 NOTICE: This release of Subversion causes an ra_dav client/server compatibility break with Subversions older than 0.28.0. User-visible changes: * new 'svn blame' subcommand. (r7389, 7438, #508) * fix huge ra_dav 'svn import' memory leak. (r7381) * other bugfixes: proper line endings in diff headers (r7450, #1533), stop auto-props from removing all whitespace (r7358), 'svn st' UI consistency fix (r7364), various 'svn switch' fixes (r7366), mini-manpages for svnadmin, svnserve, svnversion (r7421), remove 'P' field from 'svn ls -v' (r7432), 'svn merge' double-notification bug (r7447), prevent 'svn:externals' infinite loop (r7459), 'svn merge' segfault (r7458). Developer-visible changes: * 'svn diff' is now reasonably streamy. (r7393, 7439, #1481) * fix many ra_dav pool abuses. (r7370-3, 7380, 7368, 7400, ...) * fix mini leaks: clear unused svn_error_t's. (r7378-9, 7405, 7408, 7429) * tons of code, doc, API cleanup. (from julianfoad!) * new RA->get_repos_root() API. (r7428) * swig/python, swig/perl and native JNI updates and improvements. * more work on build depenedency generator. (r7412-8) * svn_repos_finish_report() now aborts txns on error. (r7424) * remove crufty old ra_dav compatibility code (r7466, 7468) * other changes: new SVN_DEBUG_ERROR tool macro, new 'davautocheck' and 'contrib' makefile targets, new --enable-gprof configure option (r7437), new scramble-tree.py testing tool, auth provider reorganization, make RA->get_dir fetch props correctly over ra_dav (r7431), notice permission error when creating unique tmpfile (r7434). Version 0.31.0 (released 08 October 2003, revision 7355) http://svn.apache.org/repos/asf/subversion/tags/0.31.0 User-visible changes: * new 'svnlook history' command (and removal of 'svnadmin lscr'). * new 'auto-props' feature can set file properties during 'svn add/import' * win32 client now properly converts UTF8 to console-locale. (r7168, #872) * 'svn up' now notices when svn:externals value changes. (r7256, #1519) * authentication changes: - client caches auth-creds in memory for a single session (r7292, #1526) - SSL cert caches keyed on host+port, not any SSL connection. (r7174) * faster 'svn log' (see new fs-history algorithm) (#1499) * faster repos read-operations (caching gives ~20% speedup) (rXXXX, #1499) * faster updates (fewer entries-file writes gives ~20% speedup) (r7170, #1490) * more work on psvn.el and svn_load_dirs.pl * more cvs2svn bugfixes * obsolete manpages truncated to point to 'help' and book URLs. (r7340, #1508) * other bugfixes: no more revision keywords "FIRST" or "CHANGED" (r7250), fix 'svn cp URL URL' $EDITOR msg generation (r7264), fix regression bug in 'svnadmin load' (r7273), 'svnadmin setlog' now triggers repository hooks (r7322), 'svn cp -rHEAD wc' now works correctly (r7331), post-commit-hook failures correctly ignored by client (r7342, #906) Developer-visible changes: * tons of filesystem improvements (#1499): - new fast fs-history algorithm: allows stable VR urls (r7283, #1499) - new dag-node caching (r7163) - skip-deltas now run in individual trails (r7138) - no-op svn_fs_copy()s don't write to the database (r7158) * mod_dav_svn MERGE response is faster (using svn_repos_replay()) (r7191) * ensure consistent wc 'dead entry' cleanup (r7197, r7204, #1075) * lots of work on gen_win.py, gen_make.py, gen_base.py tools * lots of work on making SWIG-java bindings build. * updates/improvements to javahl bindings and SWIG-perl bindings * updates/improvements to Mandrake RPM builds * other bugfixes: python testsuite now uses local path separators (r7224), svn:externals no longer keeps connections open (r7312, #1448), UTF8-to-local date conversion (r7316, #1534), API consistification changes (r7298, r7302, r7304, r7307). Version 0.30.0 (released 24 Sep 2003, revision 7178) http://svn.apache.org/repos/asf/subversion/tags/0.30.0 User-visible changes: * SSL changes: (r7134, #1330) - client now prompts to cache server certificates - no more 'ssl-ignore-unknown-ca' option - 'ssl-ignore-host-mismatch' is renamed to 'ssl-override-cert-hostname' - new 'ssl-trust-default-ca' option to trust 'default' openssl CAs * 'svn log' no longer dies on unversioned args (r6989, #777) * local mods now obstruct 'svn up' deletions (r7050, #1196) * 'svnserve' now notices (unauthenticated) --username arg (r7060) * no more 'svnadmin createtxn' subcommand. (r7062) * 'svn ls -v' shows years when appropriate * document some new things in Book (r7014), plus minor technical fixes * website changes: new sidebar, new 'svn links' page, new tigris.org!! * other bugfixes: hooks use proper stdout handles on win32 (r7001), prevent copies of copies in wc (r7077, #1259), display failed revprop change over ra_dav (r7081, #1520), 'svn st -u' throws RA error properly (r7094, #1506) Developer-visible changes: * ra_dav now requires neon-0.24.X * many gen_make.py/gen-base.py improvements, especially for win32 builds * many improvements to swig/perl bindings * improvements to contrib/: psvn.el, and new svn-push program. * more cvs2svn bugfixes: issue #1504, #1421, #1514, and new --username arg. * python testsuite only raises exceptions, never status codes. (#1192) * various libsvn_fs re-org (prepwork) for issue #1499. * other bugfixes: code-complete timestamp feature (r6983, #1445), add op-counting features to trails (r6984, #655), fs UUID caching (r7037), almost finish win32 iconv issues (#872), restored-file entry-timestamp bugfix (r7090, #1523), always print CWD as '.' (r7097) Version 0.29.0 (released 05 Sep 2003, revision 6976) http://svn.apache.org/repos/asf/subversion/tags/0.29.0 User-visible changes: * 'svn status' now streams its response. (r6913, #1426) * 'svn status' now recurses into externals (r6913, #1428) * new 'svnadmin verify' command to verify repository data (r6851, #1074) * SSL changes: (r6958, #1371) - dropped support for PEM-encoded client certs, only accept PKCS12 now. - 'ssl-authority-files' is now a list of CA files - no more 'ssl-client-cert-type' and 'ssl-client-key-file' variables. * new svndumpfilter option: '--preserve-revprops' to keep props on empty revs * mailer.py improvement: handle multiple match groups (r6940) * remove in-repos/on-disk repository template features, till post-1.0 (r6965) * various cleanups to the Book * other bugfixes: switch deletion bug (r6890, #1496), status repos-delete bug (r6913, #1469), reversion of '.' (r6953, #854). Developer-visible changes: * GUI developers take note: prompting API changed (r6928, #1214) * now compile against neon-0.24; 0.23.9 support to be dropped soon. (r6958) * various improvements to Perl/SWIG bindings * tree re-org: non-core utilities split into 'tools' and 'contrib' areas. * some gen_make.py/gen-base.py improvements * configure.in CFLAGS bugfix (r6963) * stop calling deprecated APIs in APR, in preparation for upcoming APR-1.0. Version 0.28.2 (released 29 Aug 2003, revision 6946) http://svn.apache.org/repos/asf/subversion/tags/0.28.2 User-visible changes: * MAJOR BUGFIX: revert revision 6764. The new history-searching code was over-stressing our use of BerkeleyDB transactions, causing checkouts to go twice as slow and lose all concurrent-client scalability. This is a temporary fix for a larger design problem. See issue - http://subversion.tigris.org/issues/show_bug.cgi?id=1499 + https://issues.apache.org/jira/browse/SVN-1499 Version 0.28.1 (released 28 Aug 2003,http://svn.apache.org/repos/asf/subversion/tags/0.28.1) There are no changes in this release. It is strictly an updated release, build with the correct version of autoconf; autconf-2.57 Version 0.28.0 (released 27 August 2003, rev 6894, branches/release-0.28) (http://svn.apache.org/repos/asf/subversion/tags/0.28) ##################################################################### ## WARNING WARNING WARNING WARNING WARNING WARNING WARNING ## ##################################################################### ## ## ## This release makes an incompatible change to the Subversion ## ## repository filesystem schema. Repositories created with ## ## Subversion code prior to this release will unable to operate ## ## with this new code. To maintain the ability to use said ## ## repositories, you must use a version 'svnadmin dump' prior to ## ## this change to dump your repository to a dumpfile, then use ## ## this new Subversion code to create, and load your dumpfile ## ## a new repository using 'svnadmin load'. And don't forget to ## ## copy over any custom configuration/hooks from the old to the ## ## new repository. ## ## ## ##################################################################### Please see notes/repos_upgrade_HOWTO for documentation on migrating pre-0.28.0 repos to 0.28.0. That document is also located here: http://svn.apache.org/repos/asf/subversion/trunk/notes/repos_upgrade_HOWTO User-visible changes: * fs schema change, see issue #1003 **NOTE: repos dump/load cycle required!** * command-line options - changed 'lsdblogs' is now 2 commands 'list-dblogs', 'list-unused-dblogs' - removed '--only-unread' option - new 'list-unused-dblogs' - new '--config-dir' allows svn config to live outside ~/.subversion - new (r6811) - svn-status-get-specific-revision (interface to svn cat) - svn-ediff-with-revision (run ediff w/ a file wc and a specified rev) * fixed 'mod_dav_svn' segfault bug caused by foreign DeltaV requests (r6725) * fixed 'svn switch' bug which could result in corrupted repo (#1316,r6746) * fixed items now marked as 'deleted' if they no longer exist (#919,r6748) * fixed 'merge' no longer adds file/dir if scheme differs from wc. (#1321) * fixed Handle \r correctly when prompting on Windows. (r6792,#1307) * 'svn merge' now 'skip's when it hits unversioned obstructions (r6810,#1425) * fixed repos->wc of file w/ svn:keywords set caused segfault (r6818,#1473) * fixed 'svn diff -r PREV:HEAD' failed if tmp/ exists in cwd (r6838,#1487) Developer-visible changes: * database schema changed (see warning above!) (r6752,#1003,#1248,#1438) * svn Perl bindings are ready - see swig/INSTALL * internal changes to treat swig libraries more like normal libraries (r6761) * improved handling of errors opening a repository over ra_svn (r6841) Version 0.27.0 (released 12 August 2003, rev 6707, branches/release-0.27.0) User-visible changes: * fixed ra_svn: - (r6588) avoid hangs due to ra_svn tunnel creation errors - (r6696, r6697, #1465) svnserve crash due to pre-commit hook failure * fixed 'svn log': - (r6642, #1423) log on a deleted path over ra-dav - (r6684, #1438) log performance bug * fixed 'svn diff' and 'svn merge': - (r6604, #1311) diff URL URL on files now works - (r6668, #1142) diff comparing wc to repos branch - (r6687, #1297) diff/merge interaction in file adds - (r6703, #1319) merge problem with adding subtrees - (#6607) new default ancestry-following behavior for diff, merge * fixed 'svn status': - (r6688, r6691, r6692, #1289) status on nodes deleted in repos - (r6637) status now always uses "I" for ignored directories * fixed 'svn copy': - (r6704, #1313) copy between 2 repositories errors cleanly now - (r6649, #1444) seg fault when copying empty dir from repos to wc * fixed 'svn export': - (r6652, #1461) exporting an empty directory - (r6664, #1296) path->path exports * fixed - gracefully handle failure to get uid on Win98 (r6695, #1470) * fixed - avoid spurious conflicts when merging binary files (r6621, #1319) * fixed - merge of a single file into implicit '.' (r6630, #1150) * fixed - various Win32 innosetup improvements/fixes (r6693, r6656, #1133) * fixed - disallow ".." in svn:externals target paths (r6639, #1449) * fixed - use 'env' instead of hard-coded paths in scripts (r6626, #1413) * fixed - bug in loading incremental dumpfiles (r6595) * fixed - performance issue in svn_load_dirs.pl fixed (r6623, r6627, #1455) * fixed - handle IPv6 addresses in URLs (r6638, r6654, #1338) * changed - 'svn resolve' renamed to 'svn resolved' (r6597) * changed - 'svnlook tree' takes new optional path-in-repos argument (r6583) * changed - renamed 'svnadmin archive' to 'svnadmin lsdblogs'; offer either all logs, or just the unused ones (r6661) * changed - now offer full-text search in Windows documentation file (r6658) * changed - much documentation updated, especially the book * Many other fixes and changes, too numerous to mention individually. Developer-visible changes: * fixed - many improvements to Perl and Python bindings, including some Win32-specific improvements (r6619, r6686, r6590, r6580, r6579) * All other important dev changes are implied by the user-visible changes. Version 0.26.0 (released 24 July 2003, revision 6550, branches/release-0.26.0) User-visible changes: * fixed - --parent-dir option to svnadmin load (r6436) * fixed - 'svnlook diff' now properly displays diffs (r6408, #1241) * fixed - 'svn cat' no longer expands values from the wrong revision. * fixed 'svn merge': - (r6447,#1402) -r FOO:PREV works correctly - (r6452,#1379) no longer prints confusing no-op lines - (r6500/6503,#1399) warn user when a tree-delta chunk can't be applied * turn compression off to work around to mod_deflate timeouts (r6509) Developer-visible changes: * cvs2svn.py: lots of bugfixing related to branch/tag support * diff code refactored to allow use by other tools (r6407) * make 'svn export' set commit-timestamps (not ready yet) (r6420) * fixed - memory leaks in libsvn_ra_dav commits (r6422) * fixed - cvs2svn.py handles branch files rooted in dead revs (r6482,#1417) * fixed - new lines now detected in svn:author property (r6497,#1401) * fixed - svn_load_dirs works w/ absolute paths (r6507, Debian bug #187331) * changed - build infrastructure now supports Perl SWIG bindings (r6441) * removed - PORTING document no longer necessary (r6472) Version 0.25.0 (released 11 July 2003, revision 6394, branches/release-0.25.0) User-visible changes: * command line options: - new --force option for svn export (r6327,#1296) - new --force-log for commit, copy, delete, import, mkdir, move (r6294) - no longer need --force for commit * commands - new - svnadmin archive (r6310) - changed - svn import syntax now 'svn import [PATH] URL' (r6288,#933,#735) - fixed - Search PATH for external diff commands (r6373) - fixed - 'svn switch' memory bug (r6296) - fixed - 'svn mkdir' coredump (r6388,#1369) * python bindings now in -tools rpm for Mandrake 9.1 (r6374) * allow parent-into-child copies, provided they are not WC->WC. (r6348,#1367) * fixed - Apache module installation order (r6382-6,#1381) * now require apache 2.0.47 (and apr 0.9.4) * fix 2 commit leaks * fix mod_dav_svn path-escaping bug Developer-visible changes: * Win32 build system - new - .vcproj files for svn_config project and APR (r6311) - fixed - SWIG bindings for Win32 (r6304) - vcproj generator now works (r6316) - swig's generated .c files now dependent on headers in .i files (r6379) - refactored code common to dsp & vcproj into gen_win.py (r6328) * fixed - SEGFAULTs in SWIG bindings (r6339) - potential SEGFAULTs in 'REPORT vcc' backward-compatibility code (r6377) - mod_dav_svn's autoversioning failure on PUT (r6312) - 'svn switch' memory bug (r6296) * changed - mailer.py now uses svn_repos_replay() Version 0.24.2 (released 18 June 2003, revision 6284, branches/release-0.24.2) User-visible changes: * fix 'svn export' potential segfault * fix occasional diff test failures * fix 'svnadmin dump' memory hog * fix new-dir-with-spaces bug Developer-visible changes: * none Version 0.24.1 (released 16 June 2003, revision 6249, branches/release-0.24.1) User-visible changes: * Fix bug in 'svn log'. Developer-visible changes: * none Version 0.24.0 (released 15 June 2003, revision 6234, branches/release-0.24.0) User-visible changes: * new 'svn diff [--old OLD] [--new NEW]' syntax (#1142) * new --relocate option for svn switch (#951) * new --version option for svnadmin and svnlook * new path-based authorization module for apache * make 'svn checkout' and not just 'svn update' resume a checkout * .svn directories now hidden on Windows * config variable 'store-password = no' now actually works * fix 'svn merge --dry-run' * fix 'properties hanging after a rename' issue (#1303) * fix odd behavior of 'svn up -r PREV filename' (#1304) * fix delete-tracking bug (#1348) * fix dump and load corner cases (#1290) * ra_dav server more resilient for foreign deltaV clients * numerous ra_svn changes - must update clients and servers * fix export over ra_svn (#1318) * fix ra_svn error transmission bug (#1146) * fix ra_svn corruption in tunnel mode (#1145) * make svnserve multi-threaded on non-fork platforms (now works on Windows) * remove svnserve -F and -S options * various memory use improvements (#1323) * various performance improvements for all protocols * various performance improvements for 'svnadmin dump' and svnlook * various subversion book updates (you have read the book right?) * more cvs2svn.py improvements (and more to follow) * new debugging script normalize-dump.py to normalize dump output Developer-visible changes: * path-based editor drivers * no more RA->do_checkout() * update python and java bindings * various windows build fixes Version 0.23.0 (released 16 May 2003, revision 5962, branches/release-0.23.0) User-visible changes: * 'svn cat' now performs keyword expansion (#399) * 'svn export' keyword expansion fixed * checkouts are now restartable (#730) * ssh ra_svn tunnel agent specified with svn+ssh://hostname/path syntax. * remove dependency on external diff program * don't error out early on unversioned files (#774) * fix commands where REPORT fails if item isn't in HEAD (#891) * updates now receive checksums like checkouts (#1101) * 'svn revert dir' now resets property timestamp (#1163) * fix instances of client showing help instead of error message (#1265) * fix incorrect path in 'not a working copy' error messages (#1291) * fix cvs2svn.py file added on branch problem (#1302) * fix various vc-svn.el problems (#1257, #1268) * fix various psvn problems (#1270) * various Win32 build fixes Developer-visible changes: * fix various gcc 3.3 warnings (#1031) * fix various memory errors/leaks * remove java/jni bindings Version 0.22.2 (released 13 May 2003, revision 5918, branches/release-0.22.2) User-visible changes: * fix Win32 build * properly handle on-disk template errors * fix bogus uuid bug in cvs2svn.py Developer-visible changes: * none Version 0.22.1 (released 9 May 2003, revision 5874, branches/release-0.22.1) User-visible changes: * fix shared library installation problem * update cvs2svn.py script Developer-visible changes: * none Version 0.22.0 (released 7 May 2003, revision 5842, branches/release-0.22) User-visible changes: * svn diff -r BASE:HEAD and other edge cases fixed (#977) * svn diff and merge now have --ignore-ancestry option (#1034) * svn ci -N DIR no longer errors during post-commit (#1239) * ra_dav now optional (#617) * update vn-svn.el (#1250, #1253) * improvements to svn_load_dirs.pl (#1223, #1215) * misc ra_svn bug fixes and protocol change * log-encoding option now properly only applied to logs * fix mmap failures on HP-UX * fix some client memory leaks Developer-visible changes: * finish transition to new xml prop namespaces for mod_dav_svn (#840) * minimize full tree locks and number of system calls (#1245) * auto-generated .dsp files (#850) * fix ETag of directory (#1251) * added export editor (#1230) Version 0.21.0 (released 15 Apr 2003, revision 5639, branches/release-0.21) User-visible changes: * SSL client and server certificate verification * authentication info now stored in ~/.subversion/auth/ * svn diff on a copied file only shows local mods, not the whole file * svn propget now takes a --strict option to control output * svnadmin load now takes a --parent-dir option * added the new 'svndumpfilter' program * svnlook now has 'cat', 'propget', and 'proplist' commands to enable viewing this information on transactions * 'svn copy' from another repository now adds without history * tag/branch conversion disabled in cvs2svn until it gets fixed * the 'anonymous' user is no longer used; we simply avoid attaching an author property when an author is not available * improvements to ignored-file handling * Python ConfigParser-style variable expansion for config file (#1165) Developer-visible changes: * introduced the svn_filesize_t type (#639) * realmstring added to the svn_auth framework * the "result checksum" moved to the editor.close_file function * more checksumming here and there * initial work to enable binary properties via ra_dav * initial, internal support for compressed streams * test framework shifting to exception-based failure recording (#1193) * improved options and handling in the C test framework * java and python binding work * libsvn_auth folded into libsvn_subr * bug fixes: 'svnadmin load' parse bug; ra_svn crashes (#1160); 'svn log' on a switched wc (#1108); 'svn ci -N' on named files (#1195) Version 0.20.1 (released 26 Mar 2003, revision 5467, branches/release-0.20.1) User-visible changes: * fix svnadmin load bug so that property deletions actually occur * fix checksum compatibility issue for older repositories Developer-visible changes: * none Version 0.20.0 (released 20 Mar 2003, revision 5410, branches/release-0.20) User-visible changes: * new compatibility rule: require only that each interim release be compatible with the one before it (see HACKING) * ra_svn is still new so above rule doesn't yet apply (i.e. 0.20 over ra_svn is NOT compatible with previous releases) * merge infers the target path (see book chapters 4 & 8) * merge continues in presence of missing target file * merge's add notifications are no longer duplicated * commands can be safely interrupted (Ctrl-C) * --encoding global default in ~/.subversion/config * new option --editor-cmd * begin multi-release transition to escape binary properties over DAV * misc performance improvements Developer-visible changes: * RA vtable functions take pool argument * svn-config --includes path fixed * uuid at creation now complete * start having test failures throw exceptions rather than return errors * test suite option --cleanup with --verbose being default mode * continued diff library development * minor revprop hook changes * bug fixes: no diff on binary files (#1019), consistent error messages (#1181), version numbers in hook scripts (#1182), win98 codepage (#1186) Version 0.19.1 (released 12 Mar 2003, revision 5303, branches/release-0.19.1) User-visible changes: * fix svnserve tunnel mode pipe close bug Developer-visible changes: * none Version 0.19.0 (released 10 Mar 2003, revision 5262, branches/release-0.19) User-visible changes: * svn ls works on wc paths (#1130) * new cvs2svn.py features and bug fixes (1105) * new svnlook subcommand 'uuid' * new svnadmin create option '--bdb-txn-nosync' (use with care) * fix svnserve help output * SVN_EDITOR now overrides svn-editor in ~/.subversion/config * miscellaneous performance improvements (memory and speed) * more work on the Book Developer-visible changes: * start implementing cancellation of long-running functions * misc windows build fixes and features (DSP generator) * -W and -P options to stress.pl * start adding support for multiple fs backends * work on bindings and bindings build system (#1132, #1149) * bug fixes: ra_dav import/checkout memory usage (#995), control chars in commit messages (#1025), svn merge memory usage (#1069, #1077), pre-existing ~/.subversion (#1121), keyword expansion (#1151), line number in config error message (#1157), svn-tunnel-agent in [default] (#1158), RA->close RIP (#1164), config-test non-source (#1172) Version 0.18.1 (released 26 Feb 2003, revision 5118, branches/release-0.18.1) User-visible changes: * editor environment variables no longer incorrectly required * 'svn help import' now displays correct usage * fix crashes in the internal diff library and ra_dav * fix Win9x/Me console issue * cvs2svn.py api fix * hot_backup.py now correctly removes old backups Developer-visible changes: * various rpm package fixes Version 0.18.0 (released 19 Feb 2003, revision 4968, branches/release-0.18) User-visible changes: * renamed the [default] section to [global] in the servers config file * compression option is now http-compression and lives in servers file * use internal diff by default rather than external program (#405 in progress) * symlinked hook scripts now run * read-only access flag (-R) for svnserve * quiet flag (--quiet) for svnadmin dump * --ignore-uuid and --force-uuid for svnadmin load * miscellaneous performance improvements * more work on the Book Developer-visible changes: * new authentication library libsvn_auth (#724) * new bdb table uuids * client context object in libsvn_client * more work on java and other language bindings * test framework now has a quiet option (-q) * miscellaneous small code cleanups * bug fixes: more valgrind memory bugs, apr xlate i18n mess (#872), non-existent URL checkout (#946), props on to-be-deleted files (#1066), ra_svn move/copy (#1084), eol translation (#1085), ra_svn checksumming (#1099), cat command corrupt output (#1104), cvs2svn memory consumption (#1107), merge of property add (#1109), '..' relative path (#1111), commit/cleanup/diff3 (#1119), .svn/entries checksum (#1120), svn commit in / (#1122), status on uncontrolled directory (#1124), commit message eol characters (#1126), cat -r PREV (#1134), ra_dav wcprops (#1136) split XML cdata/attribute encoding (#1118) Version 0.17.1 (released 22 Jan 2003, revision 4503, branches/0.17.1) User-visible changes: * changed non-baseline build version number display. * compatibility change: make sure old clients can talk to newest servers. * some changes to the Book Developer-visible changes: * dumper/loader now use checksums (#1102) * miscellaneous small code cleanups * bug fixes: eol-style timestamp changes (#1086), valgrind mem bug, better checksum error reporting, Version 0.17.0 (released 20 Jan 2003, revision 4468, branches/0.17) User-visible changes: * 'svn add' is now recursive by default, -N to disable (#1073) * new 'svnversion' program summarizes mixed-revs of a working copy * huge improvements to the mailer.py tool * more work on the Book and man page * default global-ignores now built-in, new runtime-config file commented out Developer-visible changes: * checksums, checksums everywhere (issues #649, #689): - filesystem stores them, and verifies them when reading/writing - working copy stores them, and verifies them when reading/writing - checksums transferred both ways over network, RA layers verify them * finish draft of internal diff/diff3 library -- ready for testing/optimizing * more utf8<->apr conversion work (#872) * more work on swig/python and ruby bindings * improvements to win32-innosetup package * 'svnserve' now has an official IANA-assigned portnumber. * mod_dav_svn now only sends/understands new xml prop namespaces (#840) * bug fixes: stop needless fs rep data copies (#1067), wc auth caching bugs (#1064), use APR_BUFFERED to open files (#1071), lots of wc 'missing dir' edge-case bugs (#962), prevent wc from receiving '.svn' (#1068), don't commit symlinks (#1081), better diff labels (#1080), better fulltext tmpfile names in conflicts (#1079), prevent ra_dav from deleting out-of-date items (#1017), segfault (#1092), don't attempt checksum on missing tmp textbase (#1091), allow diffs during update again (yikes!) Version 0.16.1 (released 6 Jan 2003, revision 4276) User-visible changes: * ra_svn network layer (apache alternative) now tested & ssh-tunnelable * new (experimental) mod_dav_svn autoversioning feature (SVNAutoversioning) * reorganization of the ~/.subversion/ run-time config files. * more entry caching: approx. 3x speedup on checkouts & updates. * option rename: --non-recursive instead of --nonrecursive * option rename: --no-diff-deleted instead of --no-diff-on-delete * new 'svn log --quiet' * new 'svn diff --no-diff-deleted' * fix keyword expansion behaviors ($keyword:$ / $keyword$ / $keyword: $) * handle win32 non-ascii config-file paths (#968, #1048, part of #872) Developer-visible changes: * most public header files now using doxygen markup * new (untested) internal difflib (#405) * neon debugging now tweakable via run-time config file * more progress on Subversion Book rewrite. * new ./configure --with-diffutils * begin work on client/server checksums (#649) * regression tests now depend on svnadmin dump/load * lose src_err field of svn_error_t * many fs function renames: begins fs database back-end abstraction. * new libsvn_repos prop-validating wrappers * lots of work on build-system dependency graph generation (for SWIG building) * swig binding work: - python svn calls can now run as independent threads - new java-binding build system - improved swig building features: --prefix, LDFLAGS behaviors * many, many bug fixes: wc->repos copies (#1029), #943 followup (#1023), copies of copies (#830), 'svn resolve' cleans up entries file (#1021), prop merging (#1012), segfault fixes (#1027, #1055), autoconf 2.5X (#886), O(1) copies (#717), new 'failed revert' signal (#714), detect missing schedule-add conflicts (#899, #863), begin dav namespace switchover (#840), status bugs, url auth inference (#1038), log bug (#1028), newline prompt (#1039), svnadmin errorchecking, url syntax errors (#1057, #1058), apr/utf8 work (start #872), and many more. Version 0.16 (released 4 Dec 2002, revision 3987) User-visible changes: * new 'svn cat' subcommand * new --revprop flag to access revision props, -r for versioned props (#943) * new "compression" runtime option in ~/.subversion/config * svnadmin/svnlook now use help system, and some subcommands deleted or moved. * tool changes: - new svnshell.py tool - new mirror_dir_through_svn.cgi script - new svn_load_dirs.pl features - updates to vc-svn.el * --message-encoding is now just --encoding, and affects svn: propvals too. * major rewrites of chapters 3, 4, 5 of the Subversion Book. Developer-visible changes: * new network layer, libsvn_ra_svn! still experimental. * all svn_error_t's now allocated in subpool of global pool. * reorganize svnlook/svnadmin subcommands & option-parsing (#540, #915, #910) * all log messages and svn: props now stored as UTF8/LF endings (#896) * huge cleanup/reorg of all svn_path_* routines * svn_client_status sends feedback, distinguishes unversioned vs. ignored * improvements to swig typemappings and build processes * fixes to pool cleanup handlers * begin abstraction of gen_make.py * entry-caching improvements * stop using global apr_xlate objects * win32-innosetup code added to packages/ * new work on ruby bindings and swig-java bindings * many, many bug fixes: various small coredumps, svn_error_t leaks, copy props correctly (#976), copy executable bits correctly (#982), test-system fix (#882), accidentally imported tmpfile (#964), ra_local checkout memleak (#985), accidental wc deletion (#988), better text vs. binary detection (#994), dav log-report error handling, bad 'svn switch' dav caching (#1000), don't call NULL callbacks (#1005), bogus switch feedback (#1007), eol-style file corruption (#920), getdate.y fix (#1009), ra_local error reporting (#900), start of work on issues #830 and #869. Version 0.15 (released 7 Nov 2002, revision 3687) User-visible changes: * New 'S' indicator in 'svn status' shows switched subdirs * New --dry-run option added for 'svn merge' (issue #953) * Fix 'svn update .' to handle svn:externals correctly * Memory usage of 'svn import' reduced (issue #860) * Allow 'svn revert' on missing directories scheduled for deletion * Assorted bug fixes in several exciting flavors * Documentation improvements Developer-visible changes: * #911 (apr and apr-util version at build time) * Fixed issues #851, #894, * Testing scripts accept --url=URL and BASE_URL=URL * Issue #881 (--enable-all-static) * Delta editors all converted to new-style, and editor composition is gone * Improve libsvn_wc wcprop handling (issue #806) * SWIG binding improvements * Various pool usage improvements Version 0.14.5 [Alpha Interim 5] (released 30 Oct 2002, revision 3578) User-visible changes: * allow --incremental option for 'svn log' xml output Developer-visible changes: * autoconf bugfix for berkeley-db detection * clean up property interface mess (part of #806) * dish.sh bugfix: build the new docbook docs correctly * python tests now log commands * gen-make.py now assumes 'build.conf' Version 0.14.4 [Alpha Interim 4] (released 29 Oct 2002, revision 3553) User-visible changes: * new working-copy entry-caching: speeds many ops up to 5x (#749) * new 'svnadmin recover', instead of db_recover * client can now view & change server-side revision props (e.g. log messages) * new --non-interactive switch for commandline client * new --incremental option to 'svn log' * new -r {date} syntax for specifying dated revs; works over network too. * automatically set svn:executable prop when adding or importing (#870) * initial $EDITOR text now ignores all log data below special token * consistify behavior of text & prop columns in 'svn status' output. * .svn/auth/* files now chmod 700, to stop scaring people. :-) * improved labels in 'svn diff' output (#936) * run-time adjustable neon timeout in newly renamed 'servers' config file * big improvements to cvs2svn script: bugfixes and basic branch/tag support * new python access-control hook script * no more implicit dot-target for 'svn propedit' or 'svn propset' (#924) * Win32 improvements: - use system-wide config-file/registry - run-time configurable diff/diff3 binary locations (#668) * remove obsolete --xml-file support * Handbook is now ported to Docbook, 2 new chapters. Developer-visible changes: * abstracted option/help-parsing code, now shared between svn and svnadmin * require apache 2.0.42 * use neon 0.23.5: fix XML entity derefs, SSL server certs, HP-UX build, etc. * support Berkeley DB 4.0 *or* 4.1 * many SWIG binding improvements: - better overall coverage of apr and libsvn_* library symbols - new 'make swig-py-ext' and 'make install-swig-py-ext' targets * finish conversion of all editor/drivers to "new" style (#737) * removed xml-delta editors and editor drivers and related tests * new predicate-logic system added to automated-test system ("skip" support) * more work on mailer.py * no more lost commit messages (#761) * eradication of misused stringbufs, obsolete code removal (#909) * mem-leak fixes in libsvn_fs (#860) * improved atomicity of working-file translations (#914) * improve ./configure --help output (#949) * MANY bugfixes, especially for entry-locks (#931, #932, #847, #938), merges (#880, ), auth storage (#934); also #921 (svnadmin segfault), #907 (xml quoting), #918 (post-commit processing), #935 (path canonicalization), #779 (diff errors) Version 0.14.3 [Alpha Interim 3] (released 20 Sept 2002, revision 3200) User-visible changes: * new ~/.subversion/config file * new $Id$ keyword * new client --no-auth-cache option * empty values in the Windows Registry are no longer ignored (issue #671) * report details of repository start-commit or pre-commit hook errors * fix locking behaviour when using current directory as a target * updated man page * new front-page logo. :-) Developer-visible changes: * continuing work on python SWIG bindings * continuing work on new access-baton system for libsvn_wc * upgrade to neon 0.23.4 to fix Windows build issues and seg faults * add XFAIL to the C testing framework * prevent setting of certain svn: props on incorrect file types * cleanup libsvn_subr's path library behavior * new 'fast-clean' vs. 'clean' Makefile targets * various bugfixes, tweaks, cleanups. Version 0.14.2 [Alpha Interim 2] (released 22 Aug 2002, revision 3033) User-visible changes: * fs schema change, see issue #842. **NOTE: repos dump/load cycle required!** * new 'svn ls -R' option * new status code `~', for type changes * add --username and --password options to 'svn ls' * new script tools/client-side/svn_all_diffs.pl * new script tools/examples/blame.py (draft) Developer-visible changes: * test suite now does XFAIL and XPASS * test suite over DAV now uses SVNParentPath, no longer depends on symlinks * DAV tests now work on Windows * upgrade to neon 0.22.0 * 'make install' notices the $(DESTDIR) parameter * new dav prop namespaces, but old still sent for compat; see issue #840 * error code space reorganized, see issue #702 * many cleanups to path handling * more use of access batons in libsvn_wc, see issue #749 * working props now stored with ".svn-work" extension, see issue #618 * the usual round of bug fixes, new regression tests, etc Version 0.14.1 [Alpha Interim 1] (released 9 August 2002, revision 2927) User-visible changes: * show copy-ancestry in 'svn log -v' * 'svn co' can take multiple URLs now * new 'svn ls' command * new 'svn st --no-ignore' option * new 'svn --version --quiet' option * more conservative 'svn help' usage error-message * more graceful degradation from charset conversion failure * standardize policy of -q switch behavior * less intimidating error output * new SVNParentPath directive for mod_dav_svn s * svnlook now correctly displays copied subtrees * Handbook: additions, tweaks, cleanups, and new French Translation :-) * svn_load_dirs.pl: auto propset on files matching specified regex, bug fixes Developer-visible changes: * integrated the delta-combiner! (issue #531) * integration of libsvn_wc-baton-locking branch (issue #749) * new "skip-deltas" added to delta-combiner * properly URI-encode/decode path components throughout our code * RA->do_diff() made independent from RA->do_switch(). * stricter setting/parsing of svn:mime-type property in client and server. * new 'install-static' make target * extend SWIG bindings to libsvn_wc and libsvn_client * BerkeleyDB usage tweaking: in preparation for auto-recovery features. * work on #850 (.dsp generator) * Better support for incremental dumps (see revision 2920) * started fs branch work on #842 (copyID inheritance), #830 (copies of copies), #790 (copy table uses txnID), #815 (custom sorting) * numerous bugfixes: #709 (better error handling), #813/814 (apr_filepath_merge), #685 (showing dir propdiffs), OS X dumper bugfix, #561 (property conflict detection), mod_dav_svn path bugs, svn_wc_status() bugs, path canonicalization bugs, #816 (svn log -r), #843 (URL keyword), #846 (kind-change replacement), #809 ($EDITOR dir), #855 (module updates not cooperating with new wc access batons), improvements to test suite sensitivity, Version 0.14.0 [Alpha] (released 23 July 2002, revision 2667) User-visible changes: * finally some documentation: The Subversion Handbook * i18n support for paths, prop names, and log messages; (not on Win32 yet) * support for URI-escaped paths * "-R" is now short for --recursive, and "-N" replaces "-n" * add the -R option to 'svn info' and 'svn resolve' * new syntax for 'svn switch' and 'svn co' * new 'svn-config' file installed * new commit-access-control.pl utility (feature #775) * new vc-svn.el, first pass at Emacs VC support for Subversion * lots of work on svn_load_dirs.pl (provides vendor-branch-like features) * new --message-encoding option for logfiles given by -F * support win32 drive-letters in file:/// urls * improved date output syntax: ISO-8601 prefix, then human-friendly suffix * the usual round of bug fixes Developer-visible changes: * UTF-8 changes - all libraries now assume UTF-8 input paths and log msgs - many apr calls are now abstracted into new svn_io_* wrappers * fs schema change - cache each revision's changed-paths in a new 'changes' table - another repository dump/load is required * a number of fs-dumper bugfixes and redesigns * test suite is now all python, so it can run on win32 * reduce huge memory consumption of mod_dav_svn during checkouts * memory optimizations for prop-reading and 'svn diff' * bugfixes for commit-email.pl and tweak-log.cgi * lots of branch work on the delta-combiner and on libsvn_wc rewrite * numerous bugfixes: 'svn merge .' bug (#748), bug #764, two new ghudson-dirversioning bugs, #756, #675, #783, #796, wc-root bugs, #799, #800, #797, directory-removal bugs (#611, #687) Version 0.13.2 [Pre-Alpha] (released 28 June 2002, revision 2376) User-visible changes: * fixed various buggy commandline outputs * allow global/local config-files on win32 * prevent overwrites with 'svn cp URL URL' * improvements to svn_load_dirs.pl * mod_dav_svn can generate xml output for directory GETs * new svnadmin(1) man page Developer-visible changes: * finished notification callback system, no more buggy output * fs-changes: - revisions table nothing but an index to txns table - branch work-in-progress: new 'changes' table to store changed paths * more work on svn_time_* funcs and formats (moving towards ISO8601) * property reversion bugs fixed, dumper bug fixed * add version number to svndiff database storage * new regression tests for 'svn merge' * fix 'svn diff -rX:Y' server bug * fix bugs in python test system * bring win32 build up-to-date, get most python tests working on win32 Version 0.13.1 [Pre-Alpha] (released 20 June 2002, revision 2291) User-visible changes: * "modules" are now implemented * new 'svn export' command * 'svn log' now traverses copy history and can print changed paths * 'svn merge' now (temporarily) only merges into '.' * 'svnadmin lscr' now traverses copy history * changes to the 'svn:executable' prop take effect immediately now * server is more tolerant of wc's with old-style version resource URLs * new Handbook started * commit-email.pl fixes/improvements -- now shows prop mods and copy history * bug fixes to cp, rm, merge, revert, admin dump and load, svnlook Developer-visible changes: * headers now install in subdir and libs are named libsvn_FOO-1.so * improvements to the Python test suite * delta combiner implemented (unused for now, though) * Python SWIG binding improvements: ability to write an editor in Python * new example: tools/examples/svnlook.py * start moving libsvn_client to new notification system (no composed editors!) * upgrade to neon 0.21.2, fixing deflated communication with apache * Moved Berkeley-specific code to libsvn_fs/bdb/, skels into libsvn_fs/util/ * changes to the RPM packaging Version 0.13.0 [Pre-Alpha] (released 10 June 2002, revision 2140) User-visible changes: * repositories have a new database schema; existing ones must be upgraded! - new svnadmin 'dump'/'load' commands to migrate repositories - read http://svn.apache.org/repos/asf/subversion/trunk/notes/repos_upgrade_HOWTO Developer-visible changes: * complete rewrite of filesystem schema! - skels are abstracted away, opening the door to SQL backends - node-ids now have copy IDs * huge progress on module system [only checkouts work at the moment] * massive conversion of stringbufs to char* in our public APIs * vsn-rsc-urls are now based on created-rev/path instead of fs_id_t's. * reinstate 'deleted' flag on entries, to ensure accurate update reports * dir_delta learns how to send copy history - svnlook no longer sends 10MB emails when we make a branch - dumpfiles get much smaller * memory consumption reduced via new apr-pool code that reuses/frees mem * client can now parse ISO-8601 timestamps (start of issue 614) * added script for stress-testing concurrent repository access * auto-locate apache's apr libraries at build-time * beginnings of ra_pipe library * progress on delta combiner code * many memleaks fixed, thanks to valgrind! * upgrade to newest neon, allow deflated communication with apache * many bugfixes to merge, switch, checkout, rm; tackling of issues 704, 705, 698, 711, 713, 721, 718 and many others Version 0.12.0 (released 3 May 2002, revision 1868) User-visible changes: * 'svn diff' can now compare two arbitrary URLs * 'svn diff' now displays property changes * 'svn rm' requires --force for unversioned and/or modified items * 'svn rm' immediately removes files & uncommitted dirs * 'svn mv' for WC->WC behaves like 'svn rm' with respect to the source * checkouts, updates, switches now print received revision on final line. * new 'svn info' command prints information about a versioned resource. * switch to 2-part conflict markers (diff3 -E) instead of 3-part (diff3 -A) * new bash programmable completion file * file's executable bit can be versioned (svn:executable prop) * commits and imports now support --nonrecursive option * new --xml option for 'svn log' * new 'svnadmin dump' command Developer-visible changes: * updates correctly deal with disjoint urls. * libsvn_wc now checksums text-bases, to detect working copy corruption * cached wcprops (vsn-rsc-urls) now auto-regenerate if invalid * python testsuite now runs on Win32. * new switch_tests.py added to testsuite * NEW internalized diff/diff3 library. Not yet integrated/tested. * dir_delta sends entry props; pipe-editor removed. * no more expat/ tree; use apr-util's expat instead. * fs deltificaton happens outside commit process, using fewer db locks * privatize svn_fs_id_t structure * start abstracting skels out of libsvn_fs * new docs: secure coding tips, quickref card * memory bugfixes for import/commit/mass removals * many bugfixes: issues 644, 646, 691, 693, 694, 543, 684 Version 0.11.1 (released 12 April 2002, revision 1692, branches/0.11.0) User-visible changes: * completion of 'svn merge' (issue 504) * added SVNReposName directive to mod_dav_svn * insist on a diff binary that supports "-u" * fix and unify pop-up $EDITOR behaviors (issues 638, 633, 615) Developer-visible changes: * finish rewrite of commit system to handle disjoint urls (issue 575) * finish proxy support via config files (esp. on win32) (issue 579) * fix svn_ra_dav__get_baseline_info and related bugs (issue 581) * reorganization of libsvn_wc header files & API * new getopt_tests.py to test commandline option processing * 'make check' now more portable -- tests invoked via python, not sh * miscellaneous bugfixes in imports, svndiff, db linkage. Version 0.11.0 (unreleased) Version 0.10.2 (released 25 Mar 2002, revision 1587) User-visible changes: * new ~/.subversion configuration directory * proxy support via ~/.subversion/proxies file Developer-visible changes: * rewrite of client-side commit process partially done * beginnings of 'svn merge' * mod_dav_svn now generates "streamy" report responses * stringbuf cleanups and bugfixes * interface to svn_wc_entry_t cleaned up * tweaks to build system and freebsd port * miscellaneous bugfixes in path escaping, pool usage, hp-ux compilation Version 0.10.1 (released 17 Mar 2002, revision 1537) User-visible changes: * New --targets command-line option for some commands. * conflicts now create conflict-markers in files, and 3 fulltext backups. * new 'svn resolve' command removes conflicted state (by removing backups) Developer-visible changes: * no more dependency on 'patch'; only on GNU diff3 and some version of 'diff' * complete rewrite of svn_wc_entry_t interface * begin abstracting svn_fs API by hiding implementation details * consolidate RA layer callbacks * start work on commit-driver rewrite * start work on ~/.subversion/ configuration directory, and proxy support * move a lot of svn_wc.h into private wc.h * bugfixes relating to commits, network prop xfers, 'svn log', 'svn co -q' * major deletion bug fixed (see email WARNING: http://subversion.tigris.org/servlets/ReadMsg?msgId=64442&listName=dev) Version 0.10.0 (released 08 Mar 2002, revision 1467) User-visible changes: * fewer out-of-memory errors: (see "memory consumption" below) * clearer user errors: - detailed marshalling of server errors to client - better errors from ra_dav - better commandline-client-specific error messages * 'svn log' now works on single paths correctly * show locked directories in 'svn status' * 'svnadmin lstxns' improvements, and new --long switch * commits show "Replacing" instead of "Deleting/Adding" (#571) * commits show progress on postfix txdeltas. * WARNING: existing repositories need to be upgraded; read tools/enable-dupkeys.sh. Developer-visible changes: * reduced memory consumption - new Editor interface that manages pools automatically - conversion of most existing editors to new system - have libsvn_fs write data to DB streamily - reduce DB logfile growth via 'duplicate keys' - stop using one pool for post-commit processing - stop using one pool for sending all textdeltas - many, many other pool-usage improvements in libsvn_wc, ra_dav, etc. * start of work on 'svn merge": issue 504, and diff3 integration * start of work on disjoint-url detection: issue 575 * start removing stringbuf path library funcs; use new const char * funcs * better python 2.X detection in test suite * svnlook uses single tempdir * build system evolution - upgrade to neon 0.19.[2-3] - lots of work on FreeBSD port * many small bugfixes: - propedit, file merges, revert, dir_delta, keywords - memory leaks in 'svn add', 'svn import/commit', and svnlook - date-parsing and readonly bugs Version 0.9 (released 15 Feb 2002, revision 1302) User-visible changes: * 'svn switch', for switching part of a working copy to a branch * 'svn status -v' now shows created-rev and last-author info * 'svn help ' now shows proper switches * if no log message passed to commit, $EDITOR pops up * greatly improved/re-organized README, INSTALL, and HACKING docs * big progress on cvs2svn repository converter * faster retrieval of old revisions: turn off fs directory deltification * fixed broken behaviors in 'svn diff' and 'svn log' Developer-visible changes: * new fs code for detecting differences and relatedness * new cancellation editor, for event-driven users of libsvn_client * make .svn/ area readonly * continued development of ruby, java, and python (swig) bindings * new config-file parser * code reorganization and cleanup - huge conversion of svn_stringbuf_t --> char * - standardized on commit_info return structure - no more 'path styles' in path library - rewrite bootstrapping code for python test framework - rewrite commandline app's help-system and alias-system - feedback table replaced with notfication callback - rewrite sorting of hashes - svnadmin internal rewrite - faster post-update processing - using SVN_ERR macros where they weren't - new svn_client_revision_t mechanism - txdelta windows are readonly now - pool debugging code moved to APR - various pool-usage fixes * build system evolution - apr-util now required - upgrade to neon 0.18.5 - much apr m4 macro churn - win32 updates, no longer needs precompiled neon - 'make check' when builddir != srcdir * fixes for many issues, including #624, 627, 580, 598, 591, 607. 609, 590, 565 [Versions 0.8 and older are only brief summaries] Version 0.8 (released 15 Jan 2002, revision 909) * newline conversion and keyword substitution (#524) * rewrite ra_local commit system to commit against HEAD (#463) * mod_dav_svn sends svndiffs now (#518) * code migration from libsvn_fs to libsvn_repos (#428) Version 0.7 (released 03 Dec 2001, revision 587) * 'svn cp/mv' completed: - can copy from wc/repos to wc/repos - This how we create branches/tags * 'svn mkdir' [WC_PATH|REPOS_URL] * 'svn delete' [REPOS_URL] Version 0.6 (released 12 Nov 2001, revision 444) * 'svn log' * 'svn cp/mv' from wc to wc Milestones M4/M5 (released 19 Oct 2001, revision 271) * network layer bugfixes * filesystem deltification Milestone M3 (released 30 Aug 2001, revision 1) * self-hosting begins, all history left behind in CVS repository. Milestone M2 (released 15 May 2001, from CVS, "milestone-2" tag) * filesystem library (libsvn_fs) * network layer (libsvn_ra_dav and mod_dav_svn) Milestone M1 (released 20 Oct 2000, from CVS, "milestone-1" tag) * working-copy library (libsvn_wc), using XML files Birth (05 June 2000) * CVS repository created. Index: vendor/subversion/dist/COMMITTERS =================================================================== --- vendor/subversion/dist/COMMITTERS (revision 339231) +++ vendor/subversion/dist/COMMITTERS (revision 339232) @@ -1,244 +1,244 @@ The following people have commit access to the Subversion sources. Note that this is not a full list of Subversion's authors, however -- for that, you'd need to look over the log messages to see all the patch contributors. If you have a question or comment, it's probably best to mail dev@subversion.apache.org, rather than mailing any of these people directly. Blanket commit access: jimb Jim Blandy sussman Ben Collins-Sussman kfogel Karl Fogel gstein Greg Stein brane Branko Čibej jorton Joe Orton ghudson Greg Hudson fitz Brian W. Fitzpatrick daniel Daniel Stenberg cmpilato C. Michael Pilato philip Philip Martin jerenkrantz Justin Erenkrantz rooneg Garrett Rooney blair Blair Zajac striker Sander Striker dlr Daniel Rall mbk Mark Benedetto King jaa Jani Averbach - julianfoad Julian Foad + julianfoad Julian Foad jszakmeister John Szakmeister ehu Erik Hülsmann breser Ben Reser maxb Max Bowsher dberlin Daniel Berlin danderson David Anderson djames David James pburba Paul Burba glasser David Glasser lgo Lieven Govaerts hwright Hyrum Wright vgeorgescu Vlad Georgescu kameshj Kamesh Jayachandran markphip Mark Phippard arfrever Arfrever Frehtes Taifersar Arahesis stsp Stefan Sperling kou Kouhei Sutou danielsh Daniel Shahaf peters Peter Samuelson rhuijben Bert Huijben stylesen Senthil Kumaran S steveking Stefan Küng neels Neels J. Hofmeyr jwhitlock Jeremy Whitlock sbutler Stephen Butler dannas Daniel Näslund stefan2 Stefan Fuhrmann jcorvel Johan Corveleyn trent Trent Nelson kotkov Evgeny Kotkov astieger Andreas Stieger jamessan James McCoy luke1410 Stefan Hett [[END ACTIVE FULL COMMITTERS. LEAVE THIS LINE HERE; SCRIPTS LOOK FOR IT.]] Full committers who have asked to be listed as dormant: bdenny Brian Estlin epg Eric Gillespie kraai Matt Kraai bcollins Ben Collins djh D.J. Heap dwhedon David Kimdon jpieper Josh Pieper kevin Kevin Pilch-Bisson lundblad Peter N. Lundblad malcolm Malcolm Rowe naked Nuutti Kotivuori ringstrom Tobias Ringström ivan Ivan Zhakov Partial committers who have asked to be listed as dormant: kon Kalle Olavi Niemitalo (psvn.el) rassilon Bill Tutt (Win32, COM, issue-1003-dev br.) pll Paul lussier (releases) rdonch Роман Донченко (Swig-Python b.) + karolszk Karol Szkudlarek (po: pl) Commit access for specific areas: Bindings: pmayweg Patrick Mayweg (JavaHL bindings) rey4 Russell Yanofsky (Swig bindings) clkao Chia-liang Kao (Swig-Perl b.) joeswatosh Joe Swatosh (Swig-Ruby b.) jrvernooij Jelmer Vernooij (Python bindings) sage Sage LaTorra (Ctypes-Python b.) vmpn Vladimir Berezniker (JavaHL bindings) rschupp Roderich Schupp (Swig bindings) stilor Alexey Neyman (Python bindings, svn-vendor.py) troycurtisjr Troy Curtis, Jr (Swig bindings) Packages: dws David Summers (RPMs) ebswift Troy Simpson (windows-innosetup) Miscellaneous: kbohling Kirby C. Bohling (tools/dev) [EMAIL IS BOUNCING] nsd Nick Duffek (doc) xsteve Stefan Reichör (psvn.el) josander Jostein Andersen (various) niemeyer Gustavo Niemeyer (svnperms.py) [EMAIL IS BOUNCING] zbrown Zack Brown (doc) [EMAIL IS BOUNCING] mprice Michael Price (releases) jrepenning Jack Repenning (tools/dev) jlonestar Martin Maurer (svnshow) [EMAIL IS BOUNCING] shlomif Shlomi Fish (svn-push) mthelen Michael W Thelen (doc) jeremybettis Jeremy Bettis (case-insensitive) martinto Martin Tomes (case-insensitive) danpat Daniel Patterson (svn-graph.pl) archiecobbs Archie Cobbs (svnmerge) [EMAIL IS BOUNCING] giovannibajo Giovanni Bajo (svnmerge) offby1 Eric Hanchrow (doc) nomis80 Simon Perreault (svn-clean) jlvarner Joshua Varner (doc) nori Kobayashi Noritada (Ruby tools, po: ja) [EMAIL IS BOUNCING] mf Martin Furter (svnmirror.sh svn-backup-dumps.py) adejong Arthur de Jong (svn2cl) wsanchez Wilfredo Sánchez (various contrib) mhagger Michael Haggerty (svntest) madanus Madan U S (svnmerge) [EMAIL IS BOUNCING] wein Mathias Weinert (mailer) bhuvan Bhuvaneswaran A (svn2feed.py, build/hudson) aogier Anthony Ogier (svn-merge-vendor.py) dkagedal David Kågedal (dsvn.el) mattiase Mattias Engdegård (dsvn.el) dustin Dustin J. Mitchell (svnmerge) rocketraman Raman Gupta (svnmerge) rhansen Richard Hansen (svnstsw) larrys Larry Shatzer, Jr. (svn-keyword-check.pl) nmiyo MIYOKAWA, Nobuyoshi (www: ja) rocksun Rock Sun (www: zh) kmradke Kevin Radke (add-needs-lock.py) esr Eric S. Raymond (svncutter) gmcdonald Gavin McDonald (build/hudson, tools/buildbot) artagnon Ramkumar Ramachandra (svnrdump, svntest) arwin Arwin Arni (svn-bisect) joes Joe Schaefer (svnpubsub) humbedooh Daniel Gruno (svnpubsub) prabhugs Prabhu Gnana Sundar (verify-keep-going) schabi Markus Schaber (testsuite) gbg Gabriela Gibson (gtest) lyalyakin Pavel Lyalyakin (site) Translation of message files: niqueco Nicolás Lichtmaier (po: es) luebbe Lübbe Onken (po: de) jensseidel Jens Seidel (po: de) oyvindmo Øyvind Møll (po: nb) sunny256 Øyvind A. Holm (po: nb) jzgoda Jaroslaw Zgoda (po: pl) - karolszk Karol Szkudlarek (po: pl) plasma Wei-Hon Chen (po: zh_TW) jihuang June-Yen Huang (po: zh_TW) [EMAIL IS BOUNCING] marcosc Marcos Chaves (po: pt_BR) pynoos Hojin Choi (po: ko) blueboh Jeong Seolin (po: ko) dongsheng Dongsheng Song (po: zh_CN) hynnet YingNing Huang (po: zh_CN) [EMAIL IS BOUNCING] lark Wang Jian (po: zh_CN) [EMAIL IS BOUNCING] giorgio_valoti Giorgio Valoti (po: it) nebiac Federico Nebiacolombo (po: it) fabien Fabien Coelho (po: fr) marcelg Marcel Gosselin (po: fr) mattiase Mattias Engdegård (po: sv) Experimental branches: ashod Ashod Nakashian (compressed- pristines br.) gthompson Glenn A. Thompson (pluggable-db br.) sigfred Sigfred Håversen (svnserve-ssl br.) [EMAIL IS BOUNCING] pmarek Ph. Marek (meta-data-v br.) jpeacock John Peacock (perl-bindings- improvements br.) nikclayton Nik Clayton (perl-bindings- improvements br.) cacknin Charles Acknin (svnpatch-diff br.) holden Holden Karau (scheme-bindings br.) moklo Morten Kloster (diff-improvements br.) vmpn Vladimir Berezniker (javahl-ra br.) Subprojects that are complete, abandoned or have moved elsewhere: xela Alexander Müller (Java JNI b.) yoshiki Yoshiki Hayashi (Non-SWIG Ruby b.) mmacek Marko Maček (cvs2svn branch) mass David Waite (certs branch) sergeyli Sergey A. Lipnevich (neon-0.24 port) ballbach Michael Ballbach (Old Mandrake RPM) morten Morten Ludvigsen (Swig-Java b.) jespersm Jesper Steen Møller (Swig-Java b.) knacke Kai Nacke (Swig-Java b.) fmatias Féliciano Matias (doc: fr) dimentiy Dmitriy O. Popkov (doc: ru) khmarbaise Karl Heinz Marbaise (doc: de) gerhardoettl Gerhard Oettl (doc: de) beerfrick Ariel Arjona (doc: es) gradha Grzegorz A. Hankiewicz (doc: es) ruben Rubén Gómez (doc: es) dbrouard Diego Brouard (doc: es) firemeteor Guo Rui (issue-2843-dev br.) ## Local Variables: ## coding:utf-8 ## End: ## vim:fileencoding=utf8 Index: vendor/subversion/dist/build.conf =================================================================== --- vendor/subversion/dist/build.conf (revision 339231) +++ vendor/subversion/dist/build.conf (revision 339232) @@ -1,1750 +1,1751 @@ # # build.conf -- configuration information for building Subversion # ###################################################################### # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. ###################################################################### # # This file is processed by gen-make.py, creating build-outputs.mk # # ---------------------------------------------------------------------------- # # PREDEFINED SECTION # # This [options] section is global in scope, providing information to the # process, rather than defining a build target, as all other sections do. # [options] includes = subversion/include/*.h include-wildcards = *.h *.i *.swg private-includes = subversion/include/private/*.h subversion/bindings/swig/include/*.swg subversion/libsvn_delta/compose_delta.c subversion/bindings/cxxhl/include/*.hpp subversion/bindings/cxxhl/include/svncxxhl/*.hpp subversion/bindings/cxxhl/src/*.hpp subversion/bindings/cxxhl/src/aprwrap/*.hpp subversion/bindings/cxxhl/src/private/*.hpp subversion/bindings/javahl/native/*.hpp subversion/bindings/javahl/native/jniwrapper/jni_*.hpp tools/dev/svnmover/linenoise/linenoise.h tools/dev/svnmover/linenoise/linenoise.c subversion/libsvn_subr/utf8proc/utf8proc_internal.h subversion/libsvn_subr/utf8proc/utf8proc.c subversion/libsvn_subr/utf8proc/utf8proc_data.c private-built-includes = subversion/svn_private_config.h subversion/libsvn_fs_fs/rep-cache-db.h subversion/libsvn_fs_x/rep-cache-db.h subversion/libsvn_wc/wc-metadata.h subversion/libsvn_wc/wc-queries.h subversion/libsvn_wc/wc-checks.h subversion/libsvn_subr/internal_statements.h subversion/tests/libsvn_wc/wc-test-queries.h subversion/bindings/swig/proxy/swig_python_external_runtime.swg subversion/bindings/swig/proxy/swig_perl_external_runtime.swg subversion/bindings/swig/proxy/swig_ruby_external_runtime.swg subversion/bindings/swig/proxy/rubyhead.swg subversion/bindings/javahl/include/org_apache_subversion_javahl_CommitItemStateFlags.h subversion/bindings/javahl/include/org_apache_subversion_javahl_NativeResources.h subversion/bindings/javahl/include/org_apache_subversion_javahl_Path.h subversion/bindings/javahl/include/org_apache_subversion_javahl_SVNRepos.h subversion/bindings/javahl/include/org_apache_subversion_javahl_SVNClient.h subversion/bindings/javahl/include/org_apache_subversion_javahl_types_NativeInputStream.h subversion/bindings/javahl/include/org_apache_subversion_javahl_types_NativeOutputStream.h subversion/bindings/javahl/include/org_apache_subversion_javahl_types_Version.h subversion/bindings/javahl/include/org_apache_subversion_javahl_types_VersionExtended.h subversion/bindings/javahl/include/org_apache_subversion_javahl_types_VersionExtended_LinkedLib.h subversion/bindings/javahl/include/org_apache_subversion_javahl_types_VersionExtended_LinkedLibIterator.h subversion/bindings/javahl/include/org_apache_subversion_javahl_types_VersionExtended_LoadedLib.h subversion/bindings/javahl/include/org_apache_subversion_javahl_types_VersionExtended_LoadedLibIterator.h subversion/bindings/javahl/include/org_apache_subversion_javahl_types_RuntimeVersion.h subversion/bindings/javahl/include/org_apache_subversion_javahl_types_Revision.h subversion/bindings/javahl/include/org_apache_subversion_javahl_types_RevisionRangeList.h subversion/bindings/javahl/include/org_apache_subversion_javahl_callback_UserPasswordCallback.h subversion/bindings/javahl/include/org_apache_subversion_javahl_remote_RemoteSession.h subversion/bindings/javahl/include/org_apache_subversion_javahl_remote_RemoteFactory.h subversion/bindings/javahl/include/org_apache_subversion_javahl_remote_CommitEditor.h subversion/bindings/javahl/include/org_apache_subversion_javahl_remote_StateReporter.h subversion/bindings/javahl/include/org_apache_subversion_javahl_util_ConfigImpl_Category.h subversion/bindings/javahl/include/org_apache_subversion_javahl_util_ConfigLib.h subversion/bindings/javahl/include/org_apache_subversion_javahl_util_DiffLib.h subversion/bindings/javahl/include/org_apache_subversion_javahl_util_PropLib.h subversion/bindings/javahl/include/org_apache_subversion_javahl_util_SubstLib.h subversion/bindings/javahl/include/org_apache_subversion_javahl_util_TunnelChannel.h subversion/bindings/javahl/include/org_apache_subversion_javahl_util_RequestChannel.h subversion/bindings/javahl/include/org_apache_subversion_javahl_util_ResponseChannel.h test-scripts = subversion/tests/cmdline/*_tests.py bdb-test-scripts = swig-python-opts = $(SWIG_FEATURES) -python $(SWIG_PY_FEATURES) -classic swig-perl-opts = $(SWIG_FEATURES) -perl $(SWIG_PL_FEATURES) -nopm -noproxy swig-ruby-opts = $(SWIG_FEATURES) -ruby $(SWIG_RB_FEATURES) swig-languages = python perl ruby swig-dirs = subversion/bindings/swig/python subversion/bindings/swig/perl subversion/bindings/swig/ruby subversion/bindings/swig/proxy swig-proxy-dir = subversion/bindings/swig/proxy swig-checkout-files = common.swg swigrun.swg runtime.swg ruby/rubydef.swg ruby/rubyhead.swg ruby/rubytracking.swg perl5/perlrun.swg python/pyrun.swg python/python.swg # ---------------------------------------------------------------------------- # # BUILD TARGETS # # Target parameters: # description - optional build target description # type - the target type, defines how to build it # when - the name of an autoconf-substed variable that muset be # defined to either "true" or "false", that determines # whether this target should be built and installed. # path - relative path to target sources # sources - explicit list of target sources # install - the installation group/type # manpages - the man pages associated with this target # libs - libraries that this target depends on # nonlibs - dependencies that are not linked into the target # lang - bindings for language $(lang) # msvc-libs - additional libraries to link with on Windows # msvc-export - additional list of files to expose in dsp/vc(x)proj # msvc-static - visual studio target produces only a static lib # msvc-force-static- visual studio always uses static libraries for svn libs # add-deps - expands to additional autoconf-defined dependencies # add-install-deps - like add-deps, but for the install step # external-lib - expands to additional autoconf-defined libs # external-project - visual studio project to depend on # # The subversion command-line client [svn] description = Subversion Client type = exe path = subversion/svn libs = libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_diff libsvn_subr apriconv apr manpages = subversion/svn/svn.1 install = bin msvc-libs = setargv.obj # The subversion repository administration tool [svnadmin] description = Subversion Repository Administrator type = exe path = subversion/svnadmin install = bin manpages = subversion/svnadmin/svnadmin.1 libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr apriconv apr msvc-libs = setargv.obj # The subversion repository dump filtering tool [svndumpfilter] description = Subversion Dumpfile Filter type = exe path = subversion/svndumpfilter install = bin manpages = subversion/svndumpfilter/svndumpfilter.1 libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr apriconv apr # The subversion repository inspection tool [svnlook] description = Subversion Repository Browser type = exe path = subversion/svnlook install = bin manpages = subversion/svnlook/svnlook.1 libs = libsvn_repos libsvn_fs libsvn_delta libsvn_diff libsvn_subr apriconv apr [svnserve] description = Subversion Server type = exe path = subversion/svnserve install = bin manpages = subversion/svnserve/svnserve.8 subversion/svnserve/svnserve.conf.5 libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr libsvn_ra_svn apriconv apr sasl msvc-libs = advapi32.lib ws2_32.lib [svnsync] description = Subversion repository replicator type = exe path = subversion/svnsync libs = libsvn_ra libsvn_delta libsvn_subr apr install = bin manpages = subversion/svnsync/svnsync.1 [svnversion] description = Subversion Revision Extractor type = exe path = subversion/svnversion libs = libsvn_wc libsvn_subr apriconv apr install = bin manpages = subversion/svnversion/svnversion.1 [svnrdump] description = Subversion remote repository dumper and loader type = exe path = subversion/svnrdump libs = libsvn_client libsvn_ra libsvn_repos libsvn_delta libsvn_subr aprutil apr install = bin manpages = subversion/svnrdump/svnrdump.1 [svnmucc] description = Subversion Multiple URL Command Client type = exe path = subversion/svnmucc libs = libsvn_client libsvn_ra libsvn_subr libsvn_delta apriconv apr install = bin manpages = subversion/svnmucc/svnmucc.1 # Support for GNOME Keyring [libsvn_auth_gnome_keyring] description = Subversion GNOME Keyring Library type = shared-only-lib install = gnome-keyring-lib path = subversion/libsvn_auth_gnome_keyring libs = libsvn_subr apr gnome-keyring # Support for KWallet [libsvn_auth_kwallet] description = Subversion KWallet Library type = shared-only-cxx-lib install = kwallet-lib path = subversion/libsvn_auth_kwallet libs = libsvn_subr apr kwallet link-cmd = $(LINK_CXX_LIB) # Library needed by all subversion clients [libsvn_client] description = Subversion Client Library type = lib path = subversion/libsvn_client libs = libsvn_wc libsvn_ra libsvn_delta libsvn_diff libsvn_subr apriconv apr install = lib msvc-export = svn_client.h private/svn_client_mtcc.h private/svn_client_private.h # Routines for binary diffing and tree-deltas [libsvn_delta] description = Subversion Delta Library type = lib install = fsmod-lib path = subversion/libsvn_delta libs = libsvn_subr aprutil apriconv apr zlib msvc-export = svn_delta.h private/svn_editor.h private/svn_delta_private.h private/svn_element.h private/svn_branch.h private/svn_branch_compat.h private/svn_branch_impl.h private/svn_branch_nested.h private/svn_branch_repos.h # Routines for diffing [libsvn_diff] description = Subversion Diff Library type = lib path = subversion/libsvn_diff libs = libsvn_subr apriconv apr zlib install = lib msvc-export = svn_diff.h private/svn_diff_private.h private/svn_diff_tree.h # The repository filesystem library [libsvn_fs] description = Subversion Repository Filesystem Library type = lib path = subversion/libsvn_fs install = ramod-lib libs = libsvn_fs_util libsvn_delta libsvn_subr fs-libs aprutil apr # conditionally add more dependencies add-deps = $(SVN_FS_LIB_DEPS) add-install-deps = $(SVN_FS_LIB_INSTALL_DEPS) msvc-export = svn_fs.h private/svn_fs_private.h [libsvn_fs_base] description = Subversion Filesystem Base Library type = fs-module path = subversion/libsvn_fs_base sources = *.c bdb/*.c util/*.c install = bdb-lib libs = libsvn_delta libsvn_subr aprutil apriconv apr bdb libsvn_fs_util msvc-export = ../libsvn_fs_base/fs_init.h msvc-delayload = yes [libsvn_fs_fs] description = Subversion FSFS Repository Filesystem Library type = fs-module path = subversion/libsvn_fs_fs install = fsmod-lib libs = libsvn_delta libsvn_subr aprutil apriconv apr libsvn_fs_util msvc-export = private/svn_fs_fs_private.h ../libsvn_fs_fs/fs_init.h msvc-delayload = yes [libsvn_fs_x] description = Subversion FSX Repository Filesystem Library type = fs-module path = subversion/libsvn_fs_x install = fsmod-lib libs = libsvn_delta libsvn_subr aprutil apriconv apr libsvn_fs_util msvc-export = ../libsvn_fs_x/fs_init.h msvc-delayload = yes # Low-level grab bag of utilities [libsvn_fs_util] description = Subversion Filesystem Utility Library type = lib install = fsmod-lib path = subversion/libsvn_fs_util libs = libsvn_subr aprutil apriconv apr msvc-libs = advapi32.lib shfolder.lib msvc-export = private/svn_fs_util.h # General API for accessing repositories [libsvn_ra] description = Subversion General Repository Access Library type = lib path = subversion/libsvn_ra libs = libsvn_delta libsvn_subr ra-libs apriconv apr # conditionally add more dependencies add-deps = $(SVN_RA_LIB_DEPS) add-install-deps = $(SVN_RA_LIB_INSTALL_DEPS) install = lib msvc-export = svn_ra.h private\svn_ra_private.h msvc-delayload = yes # Accessing repositories via DAV through serf [libsvn_ra_serf] description = Subversion HTTP/WebDAV Protocol Repository Access Library type = ra-module path = subversion/libsvn_ra_serf install = serf-lib libs = libsvn_delta libsvn_subr aprutil apriconv apr serf zlib msvc-static = yes # Accessing repositories via SVN [libsvn_ra_svn] description = Subversion SVN Protocol Repository Access Library type = ra-module path = subversion/libsvn_ra_svn install = ramod-lib libs = libsvn_delta libsvn_subr aprutil apriconv apr sasl msvc-static = yes # Accessing repositories via direct libsvn_fs [libsvn_ra_local] description = Subversion Local Repository Access Library type = ra-module path = subversion/libsvn_ra_local install = ramod-lib libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr apriconv apr msvc-static = yes # Routines built on top of libsvn_fs [libsvn_repos] description = Subversion Repository Library type = lib path = subversion/libsvn_repos install = ramod-lib libs = libsvn_fs libsvn_delta libsvn_subr apriconv apr msvc-export = svn_repos.h private/svn_repos_private.h ../libsvn_repos/authz.h # Low-level grab bag of utilities [libsvn_subr] description = Subversion General Utility Library type = lib install = fsmod-lib path = subversion/libsvn_subr sources = *.c lz4/*.c libs = aprutil apriconv apr xml zlib apr_memcache sqlite magic intl lz4 utf8proc msvc-libs = kernel32.lib advapi32.lib shfolder.lib ole32.lib crypt32.lib version.lib msvc-export = svn_auth.h svn_base64.h svn_cache_config.h svn_checksum.h svn_cmdline.h svn_compat.h svn_config.h svn_ctype.h svn_dirent_uri.h svn_dso.h svn_error.h svn_hash.h svn_io.h svn_iter.h svn_md5.h svn_mergeinfo.h svn_nls.h svn_opt.h svn_path.h svn_pools.h svn_props.h svn_quoprint.h svn_sorts.h svn_string.h svn_subst.h svn_time.h svn_types.h svn_user.h svn_utf.h svn_version.h svn_xml.h svn_x509.h private\svn_atomic.h private\svn_cache.h private\svn_cmdline_private.h private\svn_debug.h private\svn_error_private.h private\svn_fspath.h private\svn_log.h private\svn_mergeinfo_private.h private\svn_opt_private.h private\svn_skel.h private\svn_sqlite.h private\svn_utf_private.h private\svn_eol_private.h private\svn_token.h private\svn_adler32.h private\svn_temp_serializer.h private\svn_io_private.h private\svn_sorts_private.h private\svn_auth_private.h private\svn_string_private.h private\svn_magic.h private\svn_subr_private.h private\svn_mutex.h private\svn_packed_data.h private\svn_object_pool.h private\svn_cert.h private\svn_config_private.h # Working copy management lib [libsvn_wc] description = Subversion Working Copy Library type = lib path = subversion/libsvn_wc libs = libsvn_delta libsvn_diff libsvn_subr aprutil apriconv apr install = lib msvc-export = svn_wc.h private\svn_wc_private.h # Subversion plugin for Apache's mod_dav [mod_dav_svn] description = Subversion plug-in for the Apache DAV module when = INSTALL_APACHE_MODS type = apache-mod path = subversion/mod_dav_svn sources = *.c reports/*.c posts/*.c libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr libhttpd mod_dav nonlibs = apr aprutil install = apache-mod [mod_authz_svn] description = Subversion path-based authorization module for Apache when = INSTALL_APACHE_MODS type = apache-mod path = subversion/mod_authz_svn nonlibs = mod_dav_svn apr aprutil libs = libsvn_repos libsvn_subr libhttpd install = apache-mod [mod_dontdothat] description = Apache Httpd module to block certain kinds of Apache Subversion requests when = INSTALL_APACHE_MODS type = apache-mod path = tools/server-side/mod_dontdothat nonlibs = mod_dav_svn apr aprutil libs = libsvn_subr libhttpd install = tools # The Subversion FSFS repository manipulation tool [svnfsfs] description = Subversion FSFS Repository Manipulation Tool type = exe path = subversion/svnfsfs install = bin libs = libsvn_repos libsvn_fs libsvn_fs_fs libsvn_delta libsvn_subr apriconv apr # ---------------------------------------------------------------------------- # # CONSTRUCTED HEADERS # [rep_cache_fs_fs] description = Schema for the FSFS rep-sharing feature type = sql-header path = subversion/libsvn_fs_fs sources = rep-cache-db.sql [rep_cache_fs_x] description = Schema for the FSX rep-sharing feature type = sql-header path = subversion/libsvn_fs_x sources = rep-cache-db.sql [wc_queries] desription = Queries on the WC database type = sql-header path = subversion/libsvn_wc sources = wc-queries.sql [subr_sqlite] description = Internal statements for SQLite interface type = sql-header path = subversion/libsvn_subr sources = internal_statements.sql [wc_test_queries] description = Queries using working copy tests type = sql-header path = subversion/tests/libsvn_wc sources = wc-test-queries.sql # ---------------------------------------------------------------------------- # # TARGETS FOR I18N SUPPORT # [locale] type = i18n path = subversion/po install = locale external-project = svn_locale # ---------------------------------------------------------------------------- # # TARGETS FOR SWIG SUPPORT # [swig_core] type = swig path = subversion/bindings/swig sources = core.i libs = libsvn_swig_py libsvn_swig_perl libsvn_swig_ruby libsvn_diff libsvn_subr apr description = Subversion core library bindings [swig_client] type = swig path = subversion/bindings/swig sources = svn_client.i libs = libsvn_swig_py libsvn_swig_perl libsvn_swig_ruby libsvn_client libsvn_subr apr nonlibs = swig_core description = Subversion client library bindings [swig_delta] type = swig path = subversion/bindings/swig sources = svn_delta.i libs = libsvn_swig_py libsvn_swig_perl libsvn_swig_ruby libsvn_delta libsvn_subr apr nonlibs = swig_core description = Subversion delta library bindings [swig_diff] type = swig path = subversion/bindings/swig sources = svn_diff.i libs = libsvn_swig_py libsvn_swig_perl libsvn_swig_ruby libsvn_diff libsvn_subr apr nonlibs = swig_core description = Subversion diff library bindings [swig_fs] type = swig path = subversion/bindings/swig sources = svn_fs.i libs = libsvn_swig_py libsvn_swig_perl libsvn_swig_ruby libsvn_fs libsvn_subr apr nonlibs = swig_core description = Subversion FS library bindings [swig_ra] type = swig path = subversion/bindings/swig sources = svn_ra.i libs = libsvn_swig_py libsvn_swig_perl libsvn_swig_ruby libsvn_ra libsvn_subr apr nonlibs = swig_core description = Subversion RA library bindings [swig_repos] type = swig path = subversion/bindings/swig sources = svn_repos.i libs = libsvn_swig_py libsvn_swig_perl libsvn_swig_ruby libsvn_repos libsvn_subr apr nonlibs = swig_core description = Subversion repository library bindings [swig_wc] type = swig path = subversion/bindings/swig sources = svn_wc.i libs = libsvn_swig_py libsvn_swig_perl libsvn_swig_ruby libsvn_wc libsvn_subr apr nonlibs = swig_core description = Subversion WC library bindings # SWIG utility library for Python modules [libsvn_swig_py] type = swig_lib lang = python path = subversion/bindings/swig/python/libsvn_swig_py libs = libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_subr apriconv apr python swig link-cmd = $(LINK) install = swig-py-lib # need special build rule to include -DSWIGPYTHON compile-cmd = $(COMPILE_SWIG_PY) msvc-static = no msvc-export = ../bindings/swig/python/libsvn_swig_py/swigutil_py.h description = Subversion utility library for Python bindings # SWIG utility library for Perl modules [libsvn_swig_perl] type = swig_lib lang = perl path = subversion/bindings/swig/perl/libsvn_swig_perl libs = libsvn_delta libsvn_subr apriconv apr perl swig install = swig-pl-lib # need special build rule to include compile-cmd = $(COMPILE_SWIG_PL) msvc-static = no msvc-export = ../bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h # SWIG utility library for Ruby modules [libsvn_swig_ruby] type = swig_lib lang = ruby path = subversion/bindings/swig/ruby/libsvn_swig_ruby libs = libsvn_client libsvn_wc libsvn_delta libsvn_subr apriconv apr ruby swig link-cmd = $(LINK) $(SWIG_RB_LIBS) install = swig-rb-lib # need special build rule to include compile-cmd = $(COMPILE_SWIG_RB) msvc-static = no msvc-export = ../bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h # ---------------------------------------------------------------------------- # # JavaHL targets # [javahl-java] type = java path = subversion/bindings/javahl/src/org/apache/subversion/javahl subversion/bindings/javahl/src/org/apache/subversion/javahl/callback subversion/bindings/javahl/src/org/apache/subversion/javahl/remote subversion/bindings/javahl/src/org/apache/subversion/javahl/types subversion/bindings/javahl/src/org/apache/subversion/javahl/util src-root = subversion/bindings/javahl/src sources = *.java install = javahl-java link-cmd = $(COMPILE_JAVAHL_JAVAC) classes = subversion/bindings/javahl/classes package-roots = org [javahl-compat-java] type = java path = subversion/bindings/javahl/src/org/tigris/subversion/javahl sources = *.java install = javahl-java link-cmd = $(COMPILE_JAVAHL_COMPAT_JAVAC) classes = subversion/bindings/javahl/classes add-deps = $(javahl_java_DEPS) ### Replace JAR call in INSTALL_EXTRA_JAVAHL_JAVA macro Makefile.in. #jar = svn-javahl.jar package-roots = org [javahl-tests] type = java path = subversion/bindings/javahl/tests/org/apache/subversion/javahl sources = *.java install = javahl-java link-cmd = $(COMPILE_JAVAHL_JAVAC) classes = subversion/bindings/javahl/classes package-roots = org ### Java targets don't do up-to-date checks yet. #add-deps = javahl-java add-deps = $(javahl_java_DEPS) [javahl-compat-tests] type = java path = subversion/bindings/javahl/tests/org/tigris/subversion/javahl sources = *.java install = javahl-java link-cmd = $(COMPILE_JAVAHL_COMPAT_JAVAC) classes = subversion/bindings/javahl/classes package-roots = org ### Java targets don't do up-to-date checks yet. #add-deps = javahl-compat-java add-deps = $(javahl_compat_java_DEPS) [javahl-callback-javah] type = javah path = subversion/bindings/javahl/src/org/apache/subversion/javahl/callback classes = subversion/bindings/javahl/classes headers = subversion/bindings/javahl/include package = org.apache.subversion.javahl.callback sources = *.java add-deps = $(javahl_java_DEPS) install = javahl-javah link-cmd = $(COMPILE_JAVAHL_JAVAH) -force [javahl-remote-javah] type = javah path = subversion/bindings/javahl/src/org/apache/subversion/javahl/remote classes = subversion/bindings/javahl/classes headers = subversion/bindings/javahl/include package = org.apache.subversion.javahl.remote sources = *.java add-deps = $(javahl_java_DEPS) install = javahl-javah link-cmd = $(COMPILE_JAVAHL_JAVAH) -force [javahl-types-javah] type = javah path = subversion/bindings/javahl/src/org/apache/subversion/javahl/types classes = subversion/bindings/javahl/classes headers = subversion/bindings/javahl/include package = org.apache.subversion.javahl.types sources = *.java add-deps = $(javahl_java_DEPS) install = javahl-javah link-cmd = $(COMPILE_JAVAHL_JAVAH) -force [javahl-util-javah] type = javah path = subversion/bindings/javahl/src/org/apache/subversion/javahl/util classes = subversion/bindings/javahl/classes headers = subversion/bindings/javahl/include package = org.apache.subversion.javahl.util sources = *.java add-deps = $(javahl_java_DEPS) install = javahl-javah link-cmd = $(COMPILE_JAVAHL_JAVAH) -force [javahl-javah] type = javah path = subversion/bindings/javahl/src/org/apache/subversion/javahl classes = subversion/bindings/javahl/classes headers = subversion/bindings/javahl/include package = org.apache.subversion.javahl sources = *.java add-deps = $(javahl_java_DEPS) install = javahl-javah link-cmd = $(COMPILE_JAVAHL_JAVAH) -force [libsvnjavahl] description = Subversion Java HighLevel binding type = lib path = subversion/bindings/javahl/native libs = libsvn_repos libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_diff libsvn_subr libsvn_fs aprutil apriconv apr java-sdk sources = *.cpp jniwrapper/*.cpp add-deps = $(javahl_java_DEPS) $(javahl_callback_javah_DEPS) $(javahl_remote_javah_DEPS) $(javahl_types_javah_DEPS) $(javahl_util_javah_DEPS) $(javahl_javah_DEPS) install = javahl-lib # need special build rule to include -I$(JDK)/include/jni.h compile-cmd = $(COMPILE_JAVAHL_CXX) link-cmd = $(LINK_JAVAHL_CXX) # ---------------------------------------------------------------------------- # # C++HL targets # [libsvncxxhl] description = Subversion C++ HighLevel bindings type = lib path = subversion/bindings/cxxhl libs = libsvn_repos libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_diff libsvn_subr libsvn_fs aprutil apriconv apr sources = src/*.cpp src/aprwrap/*.cpp install = cxxhl-lib msvc-static = yes compile-cmd = $(COMPILE_CXXHL_CXX) link-cmd = $(LINK_CXX_LIB) [cxxhl-tests] description = Unit tests for Subversion C++ HighLevel bindings when = SVN_USE_GOOGLEMOCK type = exe path = subversion/bindings/cxxhl libs = libsvncxxhl libgooglemock libsvn_subr apr sources = tests/*.cpp install = cxxhl-tests compile-cmd = $(COMPILE_CXXHL_GOOGLEMOCK_CXX) link-cmd = $(LINK_CXX) # ---------------------------------------------------------------------------- # # Googlemock targets # [libgooglemock] description = Googlemock Library when = SVN_USE_GOOGLEMOCK type = lib path = googlemock sources = googletest/src/gtest-all.cc googlemock/src/gmock-all.cc install = cxxhl-tests msvc-static = yes compile-cmd = $(COMPILE_GOOGLEMOCK_CXX) link-cmd = $(LINK_CXX_LIB) # ---------------------------------------------------------------------------- # # TESTING TARGETS # # general library: our C testing framework [libsvn_test] type = lib path = subversion/tests install = test libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr aprutil apriconv apr msvc-static = yes undefined-lib-symbols = yes # ---------------------------------------------------------------------------- # Tests for libsvn_fs_base [fs-base-test] description = Tests for *public* fs API (svn_fs.h) type = exe path = subversion/tests/libsvn_fs_base sources = fs-base-test.c install = bdb-test libs = libsvn_test libsvn_fs libsvn_fs_base libsvn_delta libsvn_fs_util libsvn_subr apriconv apr msvc-force-static = yes [strings-reps-test] description = Test strings/reps in libsvn_fs_base type = exe path = subversion/tests/libsvn_fs_base sources = strings-reps-test.c install = bdb-test libs = libsvn_test libsvn_fs libsvn_fs_base libsvn_delta libsvn_subr apriconv apr msvc-force-static = yes [changes-test] description = Test changes in libsvn_fs_base type = exe path = subversion/tests/libsvn_fs_base sources = changes-test.c install = bdb-test libs = libsvn_test libsvn_fs libsvn_fs_base libsvn_delta libsvn_subr apriconv apr msvc-force-static = yes # ---------------------------------------------------------------------------- # Tests for libsvn_fs_fs [fs-fs-pack-test] description = Test fsfs packing in libsvn_fs_fs type = exe path = subversion/tests/libsvn_fs_fs sources = fs-fs-pack-test.c install = test libs = libsvn_test libsvn_fs libsvn_fs_fs libsvn_delta libsvn_subr apriconv apr msvc-force-static = yes [fs-fs-fuzzy-test] description = Use fuzzying to test FSFS corruption resilience type = exe path = subversion/tests/libsvn_fs_fs sources = fs-fs-fuzzy-test.c install = sub-test libs = libsvn_test libsvn_fs libsvn_fs_fs libsvn_delta libsvn_repos libsvn_subr apriconv apr msvc-force-static = yes [fs-fs-private-test] description = Test FSSF private API type = exe path = subversion/tests/libsvn_fs_fs sources = fs-fs-private-test.c install = test libs = libsvn_test libsvn_fs libsvn_fs_fs libsvn_delta libsvn_repos libsvn_subr apriconv apr msvc-force-static = yes # ---------------------------------------------------------------------------- # Tests for libsvn_fs_x [fs-x-pack-test] description = Test fsx packing in libsvn_fs_x type = exe path = subversion/tests/libsvn_fs_x sources = fs-x-pack-test.c install = test libs = libsvn_test libsvn_fs libsvn_fs_x libsvn_delta libsvn_subr apriconv apr msvc-force-static = yes [string-table-test] description = Test fsfs string tables type = exe path = subversion/tests/libsvn_fs_x sources = string-table-test.c install = test libs = libsvn_test libsvn_fs_x libsvn_subr apr msvc-force-static = yes # ---------------------------------------------------------------------------- # Tests for libsvn_fs [locks-test] description = Test locks in libsvn_fs type = exe path = subversion/tests/libsvn_fs sources = locks-test.c install = test libs = libsvn_test libsvn_fs libsvn_delta libsvn_subr apriconv apr msvc-force-static = yes [fs-test] description = Tests in libsvn_fs type = exe path = subversion/tests/libsvn_fs sources = fs-test.c install = test libs = libsvn_test libsvn_fs libsvn_delta libsvn_fs_util libsvn_subr aprutil apriconv apr [fs-sequential-test] description = Tests in libsvn_fs run sequentially type = exe path = subversion/tests/libsvn_fs sources = fs-sequential-test.c install = test libs = libsvn_test libsvn_fs libsvn_delta libsvn_fs_util libsvn_subr aprutil apriconv apr # ---------------------------------------------------------------------------- # Tests for libsvn_repos [authz-test] description = Test authz parsing in libsvn_repos type = exe path = subversion/tests/libsvn_repos sources = authz-test.c install = test libs = libsvn_test libsvn_repos libsvn_fs libsvn_delta libsvn_subr apriconv apr [repos-test] description = Test delta editor in libsvn_repos type = exe path = subversion/tests/libsvn_repos sources = repos-test.c dir-delta-editor.c install = test libs = libsvn_test libsvn_repos libsvn_fs libsvn_delta libsvn_subr apriconv apr [dump-load-test] description = Test dumping/loading repositories in libsvn_repos type = exe path = subversion/tests/libsvn_repos sources = dump-load-test.c install = test libs = libsvn_test libsvn_repos libsvn_fs libsvn_delta libsvn_subr apriconv apr # ---------------------------------------------------------------------------- # Tests for libsvn_subr [auth-test] description = Test platform-specific auth provider access type = exe path = subversion/tests/libsvn_subr sources = auth-test.c install = test libs = libsvn_test libsvn_subr apr [bit-array-test] description = Test packed bit arrays type = exe path = subversion/tests/libsvn_subr sources = bit-array-test.c install = test libs = libsvn_test libsvn_subr apr [cache-test] description = Test in-memory cache type = exe path = subversion/tests/libsvn_subr sources = cache-test.c install = test libs = libsvn_test libsvn_subr apr [checksum-test] description = Test checksum functions type = exe path = subversion/tests/libsvn_subr sources = checksum-test.c install = test libs = libsvn_test libsvn_subr apr zlib msvc-force-static = yes [compat-test] description = Test compatibility functions type = exe path = subversion/tests/libsvn_subr sources = compat-test.c install = test libs = libsvn_test libsvn_subr apr [config-test] description = Test svn_config utilities type = exe path = subversion/tests/libsvn_subr sources = config-test.c install = test libs = libsvn_test libsvn_subr apriconv apr [crypto-test] description = Test svn_crypto utilities type = exe path = subversion/tests/libsvn_subr sources = crypto-test.c install = test libs = libsvn_test libsvn_subr aprutil apr msvc-force-static = yes [dirent_uri-test] description = Test dirent_uri library type = exe path = subversion/tests/libsvn_subr sources = dirent_uri-test.c install = test libs = libsvn_test libsvn_subr apriconv apr [error-test] description = Test error library type = exe path = subversion/tests/libsvn_subr sources = error-test.c install = test libs = libsvn_test libsvn_subr apriconv apr [error-code-test] description = Test error library type = exe path = subversion/tests/libsvn_subr sources = error-code-test.c install = test libs = libsvn_test libsvn_subr apriconv apr [hashdump-test] description = Test hashfile format for props type = exe path = subversion/tests/libsvn_subr sources = hashdump-test.c install = test libs = libsvn_test libsvn_subr apriconv apr [io-test] description = Test I/O Operations type = exe path = subversion/tests/libsvn_subr sources = io-test.c install = test libs = libsvn_test libsvn_subr apriconv apr [opt-test] description = Test options library type = exe path = subversion/tests/libsvn_subr sources = opt-test.c install = test libs = libsvn_test libsvn_subr apr [mergeinfo-test] description = Test mergeinfo library type = exe path = subversion/tests/libsvn_subr sources = mergeinfo-test.c install = test libs = libsvn_test libsvn_subr apr [packed-data-test] description = Test path library type = exe path = subversion/tests/libsvn_subr sources = packed-data-test.c install = test libs = libsvn_test libsvn_subr apriconv apr [path-test] description = Test path library type = exe path = subversion/tests/libsvn_subr sources = path-test.c install = test libs = libsvn_test libsvn_subr apriconv apr [prefix-string-test] description = Test path library type = exe path = subversion/tests/libsvn_subr sources = prefix-string-test.c install = test libs = libsvn_test libsvn_subr apriconv apr [priority-queue-test] description = Test path library type = exe path = subversion/tests/libsvn_subr sources = priority-queue-test.c install = test libs = libsvn_test libsvn_subr apriconv apr [revision-test] description = Test revision library type = exe path = subversion/tests/libsvn_subr sources = revision-test.c install = test libs = libsvn_test libsvn_subr apr [root-pools-test] description = Test time functions type = exe path = subversion/tests/libsvn_subr sources = root-pools-test.c install = test libs = libsvn_test libsvn_subr apriconv apr [skel-test] description = Test skels in libsvn_subr type = exe path = subversion/tests/libsvn_subr sources = skel-test.c install = test libs = libsvn_test libsvn_subr apriconv apr [spillbuf-test] description = Test spillbuf in libsvn_subr type = exe path = subversion/tests/libsvn_subr sources = spillbuf-test.c install = test libs = libsvn_test libsvn_subr apriconv apr [stream-test] description = Test stream library type = exe path = subversion/tests/libsvn_subr sources = stream-test.c install = test libs = libsvn_test libsvn_subr apriconv apr [string-test] description = Test svn_stringbuf_t utilities type = exe path = subversion/tests/libsvn_subr sources = string-test.c install = test libs = libsvn_test libsvn_subr apriconv apr [sqlite-test] description = Test stream library type = exe path = subversion/tests/libsvn_subr sources = sqlite-test.c install = test libs = libsvn_test libsvn_subr apriconv apr [time-test] description = Test time functions type = exe path = subversion/tests/libsvn_subr sources = time-test.c install = test libs = libsvn_test libsvn_subr apriconv apr [utf-test] description = Test UTF-8 functions type = exe path = subversion/tests/libsvn_subr sources = utf-test.c install = test libs = libsvn_test libsvn_subr apriconv apr [subst_translate-test] description = Test the svn_subst_translate* functions type = exe path = subversion/tests/libsvn_subr sources = subst_translate-test.c install = test libs = libsvn_test libsvn_subr apriconv apr [translate-test] description = Test eol conversion and keyword substitution routines type = exe path = subversion/tests/libsvn_subr sources = translate-test.c install = test libs = libsvn_test libsvn_subr apriconv apr [x509-test] description = Test x509 parser type = exe path = subversion/tests/libsvn_subr sources = x509-test.c install = test libs = libsvn_test libsvn_subr apriconv apr [xml-test] description = Test XML parser in libsvn_subr type = exe path = subversion/tests/libsvn_subr sources = xml-test.c install = test libs = libsvn_test libsvn_subr apriconv apr [compress-test] description = Test compression functions type = exe path = subversion/tests/libsvn_subr sources = compress-test.c install = test libs = libsvn_test libsvn_subr apr # ---------------------------------------------------------------------------- # Tests for libsvn_delta [random-test] description = Use random data to test delta processing type = exe path = subversion/tests/libsvn_delta sources = random-test.c install = test libs = libsvn_test libsvn_delta libsvn_subr apriconv apr [window-test] description = Test delta window generation type = exe path = subversion/tests/libsvn_delta sources = window-test.c install = test libs = libsvn_test libsvn_delta libsvn_subr apriconv apr [svndiff-stream-test] description = Test svndiff streams type = exe path = subversion/tests/libsvn_delta sources = svndiff-stream-test.c install = test libs = libsvn_test libsvn_delta libsvn_subr apriconv apr # ---------------------------------------------------------------------------- # Tests for libsvn_client [client-test] description = Test low-level functionality in libsvn_client type = exe path = subversion/tests/libsvn_client sources = client-test.c install = test libs = libsvn_test libsvn_client libsvn_wc libsvn_repos libsvn_ra libsvn_fs libsvn_delta libsvn_subr apriconv apr msvc-force-static = yes [mtcc-test] description = Test Multi Command Context type = exe path = subversion/tests/libsvn_client sources = mtcc-test.c install = test libs = libsvn_test libsvn_client libsvn_wc libsvn_repos libsvn_ra libsvn_fs libsvn_delta libsvn_subr apriconv apr [conflicts-test] description = Test libsvn_client conflict resolver type = exe path = subversion/tests/libsvn_client sources = conflicts-test.c ../libsvn_wc/utils.c install = test libs = libsvn_test libsvn_client libsvn_wc libsvn_repos libsvn_ra libsvn_fs libsvn_delta libsvn_subr apriconv apr msvc-force-static = yes # ---------------------------------------------------------------------------- # Tests for libsvn_diff [diff-diff3-test] description = Test the diff/diff3 library type = exe path = subversion/tests/libsvn_diff sources = diff-diff3-test.c install = test libs = libsvn_test libsvn_diff libsvn_subr apriconv apr [parse-diff-test] description = Test unidiff parsing type = exe path = subversion/tests/libsvn_diff sources = parse-diff-test.c install = test libs = libsvn_test libsvn_diff libsvn_subr apriconv apr # ---------------------------------------------------------------------------- # Tests for libsvn_ra [ra-test] description = Test a few things in libsvn_ra type = exe path = subversion/tests/libsvn_ra sources = ra-test.c install = test libs = libsvn_test libsvn_ra libsvn_ra_svn libsvn_fs libsvn_delta libsvn_subr apriconv apr # ---------------------------------------------------------------------------- # Tests for libsvn_ra_local [ra-local-test] description = Test a few things in libsvn_ra_local type = exe path = subversion/tests/libsvn_ra_local sources = ra-local-test.c install = test libs = libsvn_test libsvn_ra_local libsvn_ra libsvn_fs libsvn_delta libsvn_subr apriconv apr # ---------------------------------------------------------------------------- # Tests for libsvn_wc [conflict-data-test] description = Test the storage of tree conflict data type = exe path = subversion/tests/libsvn_wc sources = conflict-data-test.c utils.c install = test libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr msvc-force-static = yes [db-test] description = Test the wc-ng database subsystem type = exe path = subversion/tests/libsvn_wc sources = db-test.c utils.c install = test libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr msvc-force-static = yes [pristine-store-test] description = Test the wc-ng pristine text storage subsystem type = exe path = subversion/tests/libsvn_wc sources = pristine-store-test.c utils.c install = test libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr msvc-force-static = yes [entries-compat-test] description = Test backwards compat for the entry interface type = exe path = subversion/tests/libsvn_wc sources = entries-compat.c utils.c install = test libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr msvc-force-static = yes [op-depth-test] description = Test layered tree changes type = exe path = subversion/tests/libsvn_wc sources = op-depth-test.c utils.c install = test libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr msvc-force-static = yes [wc-queries-test] description = Test Sqlite query evaluation type = exe path = subversion/tests/libsvn_wc sources = wc-queries-test.c ../../libsvn_subr/sqlite3wrapper.c install = test libs = libsvn_test libsvn_subr apriconv apr sqlite [wc-test] description = Test the main WC API functions type = exe path = subversion/tests/libsvn_wc sources = wc-test.c utils.c install = test libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr msvc-force-static = yes # ---------------------------------------------------------------------------- # These are not unit tests at all, they are small programs that exercise # parts of the libsvn_delta API from the command line. They are stuck here # because of some historical association with the test-suite, but should # really be put somewhere else. # test our textdelta encoding [svndiff-test] type = exe path = subversion/tests/libsvn_delta sources = svndiff-test.c install = test libs = libsvn_delta libsvn_subr apriconv apr testing = skip # compare two files, print txdelta windows [vdelta-test] type = exe path = subversion/tests/libsvn_delta sources = vdelta-test.c install = test libs = libsvn_delta libsvn_subr apriconv apr testing = skip [entries-dump] type = exe path = subversion/tests/cmdline sources = entries-dump.c install = test libs = libsvn_wc libsvn_subr apriconv apr msvc-force-static = yes testing = skip [atomic-ra-revprop-change] type = exe path = subversion/tests/cmdline sources = atomic-ra-revprop-change.c install = test libs = libsvn_ra libsvn_subr apriconv apr testing = skip [lock-helper] type = exe path = subversion/tests/cmdline sources = lock-helper.c install = test libs = libsvn_fs libsvn_subr apriconv apr testing = skip [wc-lock-tester] type = exe path = subversion/tests/libsvn_wc sources = wc-lock-tester.c install = test libs = libsvn_wc libsvn_subr apriconv apr msvc-force-static = yes testing = skip [wc-incomplete-tester] type = exe path = subversion/tests/libsvn_wc sources = wc-incomplete-tester.c install = test libs = libsvn_wc libsvn_subr apriconv apr msvc-force-static = yes testing = skip [svn-wc-db-tester] type = exe path = tools/dev/wc-ng sources = svn-wc-db-tester.c install = test libs = libsvn_wc libsvn_subr apr msvc-force-static = yes testing = skip # ---------------------------------------------------------------------------- # # EXTERNAL TARGETS (NO BUILD NEEDED) # [apr] type = lib external-lib = $(SVN_APR_LIBS) msvc-libs = ws2_32.lib rpcrt4.lib mswsock.lib pkg-config = apr-@SVN_APR_MAJOR_VERSION@ [aprutil] type = lib external-lib = $(SVN_APRUTIL_LIBS) pkg-config = apr-util-@SVN_APR_MAJOR_VERSION@ [apriconv] type = lib external-lib = $(SVN_APRUTIL_LIBS) [libhttpd] type = lib external-lib = $(SVN_HTTPD_LIBS) [mod_dav] type = lib external-lib = $(SVN_MOD_DAV_LIBS) [bdb] type = lib external-lib = $(SVN_DB_LIBS) [gnome-keyring] type = lib external-lib = $(SVN_GNOME_KEYRING_LIBS) -pkg-config = gnome-keyring-1 +pkg-config = @SVN_GNOME_KEYRING_PCLIBS@ +pkg-config-private = yes [kwallet] type = lib external-lib = $(SVN_KWALLET_LIBS) [magic] type = lib external-lib = $(SVN_MAGIC_LIBS) [sasl] type = lib external-lib = $(SVN_SASL_LIBS) [openssl] type = lib external-lib = $(SVN_OPENSSL_LIBS) $(SVN_LIBCRYPTO_LIBS) [intl] type = lib external-lib = $(SVN_INTL_LIBS) [zlib] type = lib external-lib = $(SVN_ZLIB_LIBS) msvc-static = yes [lz4] type = lib external-lib = $(SVN_LZ4_LIBS) [utf8proc] type = lib external-lib = $(SVN_UTF8PROC_LIBS) [apr_memcache] type = lib external-lib = $(SVN_APR_MEMCACHE_LIBS) [serf] type = lib external-lib = $(SVN_SERF_LIBS) libs = apr aprutil openssl zlib msvc-libs = secur32.lib pkg-config = serf-1 pkg-config-private = yes [sqlite] type = lib external-lib = $(SVN_SQLITE_LIBS) pkg-config = sqlite3 pkg-config-private = yes [xml] type = lib external-lib = $(SVN_XML_LIBS) [swig] type = lib external-lib = $(SVN_SWIG_LIBS) [perl] type = lib external-lib = $(SVN_PERL_LIBS) [python] type = lib external-lib = $(SVN_PYTHON_LIBS) [ruby] type = lib external-lib = $(SVN_RUBY_LIBS) [java-sdk] type = lib external-lib = $(SVN_JAVA_SDK_LIBS) [ra-libs] type = lib external-lib = $(SVN_RA_LIB_LINK) libs = libsvn_ra_serf libsvn_ra_local libsvn_ra_svn [fs-libs] type = lib external-lib = $(SVN_FS_LIB_LINK) libs = libsvn_fs_base libsvn_fs_fs libsvn_fs_x [__ALL__] type = project path = build/win32 libs = svn svnadmin svndumpfilter svnlook svnmucc svnserve svnrdump svnsync svnversion mod_authz_svn mod_dav_svn mod_dontdothat svnauthz svnauthz-validate svnraisetreeconflict svnfsfs svnbench svnmover [__ALL_TESTS__] type = project path = build/win32 libs = __ALL__ fs-test fs-base-test fs-fsfs-test fs-fs-pack-test fs-fs-fuzzy-test fs-fs-private-test fs-x-pack-test string-table-test fs-sequential-test skel-test strings-reps-test changes-test locks-test repos-test authz-test dump-load-test checksum-test compat-test config-test hashdump-test mergeinfo-test opt-test packed-data-test path-test prefix-string-test priority-queue-test root-pools-test stream-test string-test time-test utf-test bit-array-test error-test error-code-test cache-test spillbuf-test crypto-test revision-test subst_translate-test io-test translate-test random-test window-test diff-diff3-test ra-test ra-local-test sqlite-test svndiff-test vdelta-test entries-dump atomic-ra-revprop-change wc-lock-tester wc-incomplete-tester lock-helper client-test conflicts-test mtcc-test conflict-data-test db-test pristine-store-test entries-compat-test op-depth-test dirent_uri-test wc-queries-test wc-test auth-test parse-diff-test x509-test xml-test afl-x509 compress-test svndiff-stream-test [__MORE__] type = project path = build/win32 libs = __ALL_TESTS__ diff diff3 diff4 fsfs-access-map svn-populate-node-origins-index x509-parser svn-wc-db-tester svn-mergeinfo-normalizer svnconflict [__LIBS__] type = project path = build/win32 libs = fs-libs ra-libs libsvn_client libsvn_subr libsvn_wc aprutil apriconv apr [__CONFIG__] type = lib external-project = svn_config [__SWIG_PYTHON__] type = swig_project path = build/win32 libs = swig_client swig_delta swig_diff swig_fs swig_ra swig_repos swig_wc swig_core lang = python [__SWIG_PERL__] type = swig_project path = build/win32 libs = swig_client swig_delta swig_diff swig_fs swig_ra swig_repos swig_wc swig_core lang = perl [__SWIG_RUBY__] type = swig_project path = build/win32 libs = swig_client swig_delta swig_diff swig_fs swig_ra swig_repos swig_wc swig_core lang = ruby [__JAVAHL__] type = project path = build/win32 libs = javahl-java javahl-javah libsvnjavahl [__JAVAHL_TESTS__] type = project path = build/win32 libs = __JAVAHL__ javahl-tests javahl-compat-tests # ---------------------------------------------------------------------------- # Contrib and tools [fsfs-access-map] type = exe path = tools/dev sources = fsfs-access-map.c install = tools libs = libsvn_subr apr [diff] type = exe path = tools/diff sources = diff.c install = tools libs = libsvn_diff libsvn_subr apriconv apr [diff3] type = exe path = tools/diff sources = diff3.c install = tools libs = libsvn_diff libsvn_subr apriconv apr [diff4] type = exe path = tools/diff sources = diff4.c install = tools libs = libsvn_diff libsvn_subr apriconv apr [svnbench] description = Benchmarking and diagnostics tool for the network layer type = exe path = subversion/svnbench install = bin libs = libsvn_client libsvn_wc libsvn_ra libsvn_subr libsvn_delta apriconv apr [svnauthz] description = Authz config file tool type = exe path = tools/server-side sources = svnauthz.c install = tools libs = libsvn_repos libsvn_fs libsvn_subr apr # svnauthz-validate is the compat mode of the new svnauthz tool. It is # exactly the same code as svnauthz. This duplicated target is needed # in order to easily test both commands as part of the build since libtool # does not provide a way to set argv[0] different from the commands actual # name in the wrapper script. [svnauthz-validate] description = Authz config file validator type = exe path = tools/server-side sources = svnauthz.c install = tools libs = libsvn_repos libsvn_fs libsvn_subr apr [svn-populate-node-origins-index] description = Tool to populate the node origins index of a repository type = exe path = tools/server-side sources = svn-populate-node-origins-index.c install = tools libs = libsvn_repos libsvn_fs libsvn_subr apr [svnraisetreeconflict] description = Tool to Flag a Tree Conflict type = exe path = tools/dev/svnraisetreeconflict libs = libsvn_wc libsvn_subr apriconv apr install = tools [svn-mergeinfo-normalizer] type = exe path = tools/client-side/svn-mergeinfo-normalizer install = tools libs = libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_diff libsvn_subr apriconv apr [x509-parser] description = Tool to verify x509 certificates type = exe path = tools/dev sources = x509-parser.c install = tools libs = libsvn_subr apr [svnmover] description = Subversion Mover Command Client type = exe path = tools/dev/svnmover sources = *.c libs = libsvn_client libsvn_ra libsvn_subr libsvn_delta apriconv apr install = tools [svnconflict] type = exe path = tools/client-side/svnconflict install = tools libs = libsvn_client libsvn_wc libsvn_ra libsvn_subr apriconv apr [afl-x509] description = AFL fuzzer for x509 parser type = exe path = subversion/tests/afl sources = afl-x509.c install = test libs = libsvn_subr apr testing = skip Index: vendor/subversion/dist/configure =================================================================== --- vendor/subversion/dist/configure (revision 339231) +++ vendor/subversion/dist/configure (revision 339232) @@ -1,29340 +1,29350 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for subversion 1.10.0. +# Generated by GNU Autoconf 2.69 for subversion 1.10.2. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: http://subversion.apache.org/ about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='subversion' PACKAGE_TARNAME='subversion' -PACKAGE_VERSION='1.10.0' -PACKAGE_STRING='subversion 1.10.0' +PACKAGE_VERSION='1.10.2' +PACKAGE_STRING='subversion 1.10.2' PACKAGE_BUGREPORT='http://subversion.apache.org/' PACKAGE_URL='' ac_unique_file="subversion/include/svn_types.h" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='LTLIBOBJS SVN_CONFIG_SCRIPT_FILES INCLUDE_OUTPUTS JAVAHL_COMPAT_TESTS_TARGET JAVAHL_TESTS_TARGET JAVA_CLASSPATH LT_CXX_LIBADD FIX_JAVAHL_LIB JAVAHL_OBJDIR INSTALL_EXTRA_JAVAHL_LIB SVN_FS_LIB_LINK SVN_FS_LIB_INSTALL_DEPS SVN_FS_LIB_DEPS SVN_RA_LIB_LINK SVN_RA_LIB_INSTALL_DEPS SVN_RA_LIB_DEPS CTYPESGEN SWIG_PY_FEATURES SWIG_PL_FEATURES SWIG_RB_FEATURES SWIG_FEATURES SWIG_RB_TEST_VERBOSE SWIG_RB_SITE_ARCH_DIR SWIG_RB_SITE_LIB_DIR SWIG_RB_COMPILE SWIG_RB_INCLUDES SWIG_RB_LIBS SWIG_RB_LINK SWIG_PL_LINK SWIG_PL_INCLUDES SWIG_PY_LIBS SWIG_PY_LINK SWIG_PY_COMPILE SWIG_PY_INCLUDES SWIG RUBY_TEENY RUBY_MINOR RUBY_MAJOR RDOC RUBY PERL JNI_INCLUDES JAR JAVAH JAVADOC JAVAC_COMPAT_FLAGS JAVAC_FLAGS JAVAC JAVA JDK PYTHON MOD_ACTIVATION SVN_UTF8PROC_LIBS SVN_UTF8PROC_INCLUDES SVN_LZ4_LIBS SVN_LZ4_INCLUDES SVN_ZLIB_LIBS SVN_ZLIB_INCLUDES shared_only_LDFLAGS libsvn_wc_LDFLAGS libsvn_subr_LDFLAGS libsvn_repos_LDFLAGS libsvn_ra_svn_LDFLAGS libsvn_ra_serf_LDFLAGS libsvn_ra_local_LDFLAGS libsvn_ra_LDFLAGS libsvn_fs_util_LDFLAGS libsvn_fs_fs_LDFLAGS libsvn_fs_base_LDFLAGS libsvn_fs_LDFLAGS libsvn_diff_LDFLAGS libsvn_delta_LDFLAGS libsvn_client_LDFLAGS LIBOBJS BDB_TEST_PROGRAMS BDB_TEST_DEPS INSTALL_RULES INSTALL_STATIC_RULES BUILD_RULES SVN_KWALLET_LIBS SVN_KWALLET_INCLUDES KDE_CONFIG SVN_MAGIC_LIBS SVN_MAGIC_INCLUDES MSGFMTFLAGS NO_GETTEXT_CODESET GETTEXT_CODESET SVN_INTL_LIBS XGETTEXT MSGMERGE MSGFMT SVN_USE_GOOGLEMOCK GOOGLEMOCK_SRCDIR +SVN_GNOME_KEYRING_PCLIBS SVN_GNOME_KEYRING_LIBS SVN_GNOME_KEYRING_INCLUDES SVN_HAVE_GPG_AGENT SVN_SASL_LIBS SVN_SASL_INCLUDES SVN_DB_LIBS SVN_DB_INCLUDES SVN_XML_LIBS SVN_XML_INCLUDES DOXYGEN TRANG LT_NO_UNDEFINED TRANSFORM_LIBTOOL_SCRIPTS LT_LDFLAGS LT_CFLAGS SVN_LIBTOOL CXXCPP LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL AWK RANLIB STRIP ac_ct_AR AR DLLTOOL OBJDUMP NM ac_ct_DUMPBIN DUMPBIN LD FGREP LIBTOOL SVN_BINDIR SVN_SQLITE_LIBS SVN_SQLITE_INCLUDES HTTPD_VERSION INSTALL_APACHE_MODS APACHE_LIBEXECDIR APACHE_INCLUDES APACHE_LDFLAGS APXS HTTPD_WHITELIST SVN_APR_MEMCACHE_LIBS SVN_APR_MEMCACHE_INCLUDES SVN_SERF_LIBS SVN_SERF_INCLUDES PKG_CONFIG SVN_LT_SOVERSION SVN_APR_MAJOR_VERSION SVN_APRUTIL_LIBS SVN_APRUTIL_CONFIG SVN_APRUTIL_INCLUDES SVN_APR_SHLIB_PATH_VAR SVN_APR_LIBS SVN_APR_INCLUDES SVN_APR_CONFIG MKDIR INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM LN_S EGREP GREP target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build SED CPP CXXUSERFLAGS CXXMAINTAINERFLAGS CXXNOWARNFLAGS CXXMODEFLAGS ac_ct_CXX CXXFLAGS CXX CUSERFLAGS CMAINTAINERFLAGS CNOWARNFLAGS CMODEFLAGS OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC SWIG_LDFLAGS canonicalized_srcdir abs_builddir abs_srcdir target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking with_apr with_apr_util with_serf with_apr_memcache enable_apache_whitelist with_apxs with_apache_libexecdir enable_broken_httpd_auth with_sqlite enable_sqlite_compatibility_version enable_shared enable_static with_pic enable_fast_install with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock enable_experimental_libtool enable_all_static enable_local_library_preloading with_trang with_doxygen with_expat with_berkeley_db enable_bdb6 with_sasl enable_keychain with_gpg_agent with_old_gnome_keyring with_gnome_keyring enable_googlemock enable_ev2_impl enable_nls with_libmagic with_kwallet enable_plaintext_password_storage enable_debug enable_optimize enable_disallowing_of_undefined_references enable_maintainer_mode enable_full_version_match with_editor with_zlib with_lz4 with_utf8proc enable_mod_activation enable_gcov enable_gprof with_jdk with_jikes with_swig with_ruby_sitedir with_ruby_test_verbose with_ctypesgen enable_runtime_module_search enable_javahl with_junit ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CXX CXXFLAGS CCC CPP LT_SYS_LIBRARY_PATH CXXCPP SWIG_FEATURES SWIG_RB_FEATURES SWIG_PL_FEATURES SWIG_PY_FEATURES' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures subversion 1.10.0 to adapt to many kinds of systems. +\`configure' configures subversion 1.10.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/subversion] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of subversion 1.10.0:";; + short | recursive ) echo "Configuration of subversion 1.10.2:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-apache-whitelist=VER Whitelist a particular Apache version number, typically used to enable the use of a old version patched by a distribution. --enable-broken-httpd-auth Force build against httpd 2.4 with broken auth. (This is not recommended as Subversion will be vulnerable to CVE-2015-3184.) --enable-sqlite-compatibility-version=X.Y.Z Allow binary to run against SQLite as old as ARG --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-experimental-libtool Use APR's libtool --enable-static Build static libraries --enable-shared Build shared libraries --enable-all-static Build completely static (standalone) binaries. --enable-local-library-preloading Enable preloading of locally built libraries in locally built executables. This may be necessary for testing prior to installation on some platforms. It does not work on some platforms (Darwin, OpenBSD, ...). --enable-bdb6 Allow building against BDB 6+. See --with-berkeley-db for specifying the location of the Berkeley DB installation. Using BDB 6 will fail if this option is not used. --disable-keychain Disable use of Mac OS KeyChain for auth credentials --disable-googlemock Do not use the Googlemock testing framework --enable-ev2-impl Use Ev2 implementations, where available [EXPERIMENTAL] --disable-nls Disable gettext functionality --disable-plaintext-password-storage Disable on-disk caching of plaintext passwords and passphrases. (Leaving this functionality enabled will not force Subversion to store passwords in plaintext, but does permit users to explicitly allow that behavior via runtime configuration.) --enable-debug Turn on debugging --enable-optimize Turn on optimizations --enable-disallowing-of-undefined-references Use -Wl,--no-undefined flag during linking of some libraries to disallow undefined references --enable-maintainer-mode Turn on debugging and very strict compile-time warnings --disable-full-version-match Disable the full version match rules when checking Subversion library compatibility. --enable-mod-activation Enable mod_dav_svn in httpd.conf --enable-gcov Turn on gcov coverage testing (GCC only). --enable-gprof Produce gprof profiling data in 'gmon.out' (GCC only). --enable-runtime-module-search Turn on dynamic loading of RA/FS libraries including third-party FS libraries --enable-javahl Enable compilation of Java high-level bindings (requires C++) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-apr=PATH prefix for installed APR or the full path to apr-config --with-apr-util=PATH prefix for installed APU or the full path to apu-config --with-serf=PREFIX Serf HTTP client library (enabled by default if found) --with-apr_memcache=PREFIX Standalone apr_memcache client library --with-apxs[=FILE] Build shared Apache modules. FILE is the optional pathname to the Apache apxs tool; defaults to "apxs". --with-apache-libexecdir[=PATH] Install Apache modules to Apache's configured modules directory instead of LIBEXECDIR; if PATH is given, install to PATH. --with-sqlite=PREFIX Use installed SQLite library or amalgamation file. --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-aix-soname=aix|svr4|both shared library versioning (aka "SONAME") variant to provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-trang=PATH Specify the command to run the trang schema converter --with-doxygen=PATH Specify the command to run doxygen --with-expat=INCLUDES:LIB_SEARCH_DIRS:LIBS Specify location of Expat --with-berkeley-db[=HEADER:INCLUDES:LIB_SEARCH_DIRS:LIBS] The Subversion Berkeley DB based filesystem library requires Berkeley DB $db_version or $db_alt_version. If you specify `--without-berkeley-db', that library will not be built. If you omit the argument of this option completely, the configure script will use Berkeley DB used by APR-UTIL. --with-sasl=PATH Compile with libsasl2 in PATH --without-gpg-agent Disable support for GPG-Agent --with-old-gnome-keyring Enable old GNOME Keyring for auth credentials (prefer --with-gnome-keyring) --with-gnome-keyring Enable GNOME Keyring for auth credentials (enabled by default if found) --with-libmagic=PREFIX libmagic filetype detection library --with-kwallet[=PATH|INCDIR:LIBDIR] Enable use of KWallet (KDE 5 or 4) for auth credentials. PATH is the KDE install path, alternatively INCDIR:LIBDIR are the header and library install paths. --with-editor=PATH Specify a default editor for the subversion client. --with-zlib=PREFIX zlib compression library --with-lz4=PREFIX|internal look for lz4 in PREFIX or use the internal code --with-utf8proc=PREFIX|internal look for utf8proc in PREFIX or use the internal code --with-jdk=PATH Try to use 'PATH/include' to find the JNI headers. If PATH is not specified, look for a Java Development Kit at JAVA_HOME. --with-jikes=PATH Deprecated. Provided for backward compatibility. --with-swig=PATH Try to use 'PATH/bin/swig' to build the swig bindings. If PATH is not specified, look for a 'swig' binary in your PATH. --with-ruby-sitedir=SITEDIR install Ruby bindings in SITEDIR (default is same as ruby's one) --with-ruby-test-verbose=LEVEL how to use output level for Ruby bindings tests (default is normal) --with-ctypesgen=PATH Specify the path to ctypesgen. This can either be the full path to a ctypesgen installation, the full path to a ctypesgen source tree or the full path to ctypesgen.py. --with-junit=PATH Specify a path to the junit JAR file. Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags CPP C preprocessor LT_SYS_LIBRARY_PATH User-defined run-time library search path. CXXCPP C++ preprocessor SWIG_FEATURES SWIG feature flags common to all bindings SWIG_RB_FEATURES SWIG feature flags specific to Ruby bindings SWIG_PL_FEATURES SWIG feature flags specific to Perl bindings SWIG_PY_FEATURES SWIG feature flags specific to Python bindings Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -subversion configure 1.10.0 +subversion configure 1.10.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## -------------------------------------------- ## ## Report this to http://subversion.apache.org/ ## ## -------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by subversion $as_me 1.10.0, which was +It was created by subversion $as_me 1.10.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in build "$srcdir"/build; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in build \"$srcdir\"/build" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Subversion 1.10.0" >&5 -$as_echo "$as_me: Configuring Subversion 1.10.0" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Subversion 1.10.2" >&5 +$as_echo "$as_me: Configuring Subversion 1.10.2" >&6;} abs_srcdir="`cd $srcdir && pwd`" abs_builddir="`pwd`" if test "$abs_srcdir" = "$abs_builddir"; then canonicalized_srcdir="" else canonicalized_srcdir="$srcdir/" fi SWIG_LDFLAGS="$LDFLAGS" # Generate config.nice early (before the arguments are munged) { $as_echo "$as_me:${as_lineno-$LINENO}: creating config.nice" >&5 $as_echo "$as_me: creating config.nice" >&6;} # This little dance satisfies Cygwin, which cannot overwrite in-use files. if test -f "config.nice"; then mv "config.nice" "config.nice.old" fi cat >"config.nice" <&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CFLAGS_KEEP="$CFLAGS" CFLAGS="" if test "$GCC" = "yes"; then _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -std=c90" >&5 $as_echo_n "checking if $CC accepts -std=c90... " >&6; } CFLAGS="-std=c90 $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -std=c89" >&5 $as_echo_n "checking if $CC accepts -std=c89... " >&6; } CFLAGS="-std=c89 $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -ansi" >&5 $as_echo_n "checking if $CC accepts -ansi... " >&6; } CFLAGS="-ansi $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi CMODEFLAGS="$CFLAGS" CFLAGS="" if test "$GCC" = "yes"; then _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -w" >&5 $as_echo_n "checking if $CC accepts -w... " >&6; } CFLAGS="-w $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi CNOWARNFLAGS="$CFLAGS" CFLAGS="$CFLAGS_KEEP" if test "$GCC" = "yes"; then _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC accepts -Werror=unknown-warning-option... " >&6; } CFLAGS="-Werror=unknown-warning-option $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi # Look for a C++ compiler (before anything can set CXXFLAGS) CXXUSERFLAGS="$CXXFLAGS" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CXXFLAGS_KEEP="$CXXFLAGS" CXXFLAGS="" if test "$GXX" = "yes"; then _svn_xxflags__save="$CXXFLAGS" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -std=c++98" >&5 $as_echo_n "checking if $CXX accepts -std=c++98... " >&6; } CXXFLAGS="-std=c++98 $CXXFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(){} _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CXXFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi CXXMODEFLAGS="$CXXFLAGS" CXXFLAGS="" if test "$GXX" = "yes"; then _svn_xxflags__save="$CXXFLAGS" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -w" >&5 $as_echo_n "checking if $CXX accepts -w... " >&6; } CXXFLAGS="-w $CXXFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(){} _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CXXFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi CXXNOWARNFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS_KEEP" if test "$GXX" = "yes"; then _svn_xxflags__save="$CXXFLAGS" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CXX accepts -Werror=unknown-warning-option... " >&6; } CXXFLAGS="-Werror=unknown-warning-option $CXXFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(){} _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CXXFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi # Look for a C pre-processor ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Look for a good sed # AC_PROG_SED was introduced in Autoconf 2.59b { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed # Grab target_cpu, so we can use it in the Solaris pkginfo file # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- # Look for an extended grep { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # If $INSTALL is relative path to our fallback install-sh, then convert # to an absolute path, as in some cases (e.g. Solaris VPATH build), libtool # may try to use it from a changed working directory. if test "$INSTALL" = "build/install-sh -c"; then INSTALL="$abs_srcdir/$INSTALL" fi if test -z "$MKDIR"; then MKDIR="$INSTALL -d" fi # ==== Libraries, for which we may have source to build ====================== APR_VER_REGEXES="1\.[3-9]\. 2\." APR_WANTED_REGEXES="$APR_VER_REGEXES" { $as_echo "$as_me:${as_lineno-$LINENO}: Apache Portable Runtime (APR) library configuration" >&5 $as_echo "$as_me: Apache Portable Runtime (APR) library configuration" >&6;} apr_found="no" if test "$target_os" = "os2-emx"; then # Scripts don't pass test -x on OS/2 TEST_X="test -f" else TEST_X="test -x" fi acceptable_majors="2 1 0" apr_temp_acceptable_apr_config="" for apr_temp_major in $acceptable_majors do case $apr_temp_major in 0) apr_temp_acceptable_apr_config="$apr_temp_acceptable_apr_config apr-config" ;; *) apr_temp_acceptable_apr_config="$apr_temp_acceptable_apr_config apr-$apr_temp_major-config" ;; esac done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for APR" >&5 $as_echo_n "checking for APR... " >&6; } # Check whether --with-apr was given. if test "${with_apr+set}" = set; then : withval=$with_apr; if test "$withval" = "no" || test "$withval" = "yes"; then as_fn_error $? "--with-apr requires a directory or file to be provided" "$LINENO" 5 fi for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config do for lookdir in "$withval/bin" "$withval" do if $TEST_X "$lookdir/$apr_temp_apr_config_file"; then apr_config="$lookdir/$apr_temp_apr_config_file" apr_found="yes" break 2 fi done done if test "$apr_found" != "yes" && $TEST_X "$withval" && $withval --help > /dev/null 2>&1 ; then apr_config="$withval" apr_found="yes" fi if test "$apr_found" != "yes"; then as_fn_error $? "the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file." "$LINENO" 5 fi else if test -n "1" && test "1" = "1"; then for apr_temp_apr_config_file in $apr_temp_acceptable_apr_config do if $apr_temp_apr_config_file --help > /dev/null 2>&1 ; then apr_config="$apr_temp_apr_config_file" apr_found="yes" break else for lookdir in /usr /usr/local /usr/local/apr /opt/apr; do if $TEST_X "$lookdir/bin/$apr_temp_apr_config_file"; then apr_config="$lookdir/bin/$apr_temp_apr_config_file" apr_found="yes" break 2 fi done fi done fi if test "$apr_found" = "no" && test -d """"; then apr_temp_abs_srcdir="`cd \"""\" && pwd`" apr_found="reconfig" apr_bundled_major="`sed -n '/#define.*APR_MAJOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p' \"""/include/apr_version.h\"`" case $apr_bundled_major in "") as_fn_error $? "failed to find major version of bundled APR" "$LINENO" 5 ;; 0) apr_temp_apr_config_file="apr-config" ;; *) apr_temp_apr_config_file="apr-$apr_bundled_major-config" ;; esac if test -n """"; then apr_config="""/$apr_temp_apr_config_file" else apr_config="""/$apr_temp_apr_config_file" fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_found" >&5 $as_echo "$apr_found" >&6; } if test $apr_found = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: APR not found" >&5 $as_echo "$as_me: WARNING: APR not found" >&2;} echo "The Apache Portable Runtime (APR) library cannot be found." echo "Please install APR on this system and configure Subversion" echo "with the appropriate --with-apr option." echo "" echo "You probably need to do something similar with the Apache" echo "Portable Runtime Utility (APRUTIL) library and then configure" echo "Subversion with both the --with-apr and --with-apr-util options." echo "" as_fn_error $? "no suitable APR found" "$LINENO" 5 fi if test $apr_found = "reconfig"; then as_fn_error $? "Unexpected APR reconfig" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking APR version" >&5 $as_echo_n "checking APR version... " >&6; } apr_version="`$apr_config --version`" if test $? -ne 0; then as_fn_error $? "apr-config --version failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apr_version" >&5 $as_echo "$apr_version" >&6; } APR_WANTED_REGEX_MATCH=0 for apr_wanted_regex in $APR_WANTED_REGEXES; do if test `expr $apr_version : $apr_wanted_regex` -ne 0; then APR_WANTED_REGEX_MATCH=1 break fi done if test $APR_WANTED_REGEX_MATCH -eq 0; then echo "wanted regexes are $APR_WANTED_REGEXES" as_fn_error $? "invalid apr version found" "$LINENO" 5 fi CPPFLAGS="$CPPFLAGS `$apr_config --cppflags`" if test $? -ne 0; then as_fn_error $? "apr-config --cppflags failed" "$LINENO" 5 fi CFLAGS="$CFLAGS `$apr_config --cflags`" if test $? -ne 0; then as_fn_error $? "apr-config --cflags failed" "$LINENO" 5 fi apr_ldflags="`$apr_config --ldflags`" if test $? -ne 0; then as_fn_error $? "apr-config --ldflags failed" "$LINENO" 5 fi LDFLAGS="$LDFLAGS ` input_flags="$apr_ldflags" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi `" SVN_APR_INCLUDES="`$apr_config --includes`" if test $? -ne 0; then as_fn_error $? "apr-config --includes failed" "$LINENO" 5 fi if test "$enable_all_static" = "yes"; then SVN_APR_LIBS="`$apr_config --link-ld --libs`" if test $? -ne 0; then as_fn_error $? "apr-config --link-ld --libs failed" "$LINENO" 5 fi else SVN_APR_LIBS="`$apr_config --link-ld`" if test $? -ne 0; then as_fn_error $? "apr-config --link-ld failed" "$LINENO" 5 fi fi SVN_APR_LIBS="` input_flags="$SVN_APR_LIBS" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi `" SVN_APR_SHLIB_PATH_VAR="`$apr_config --shlib-path-var`" if test $? -ne 0; then as_fn_error $? "apr-config --shlib-path-var failed" "$LINENO" 5 fi SVN_APR_CONFIG="$apr_config" if test `expr $apr_version : 2` -ne 0; then svn_lib_ver=2 apu_config=$apr_config SVN_APRUTIL_CONFIG="$apu_config" SVN_APR_MAJOR_VERSION=2 else svn_lib_ver=0 APU_VER_REGEXES="1\.[3-9]\." APRUTIL_WANTED_REGEXES="$APU_VER_REGEXES" { $as_echo "$as_me:${as_lineno-$LINENO}: Apache Portable Runtime Utility (APRUTIL) library configuration" >&5 $as_echo "$as_me: Apache Portable Runtime Utility (APRUTIL) library configuration" >&6;} apu_found="no" if test "$target_os" = "os2-emx"; then # Scripts don't pass test -x on OS/2 TEST_X="test -f" else TEST_X="test -x" fi acceptable_majors="1 0" apu_temp_acceptable_apu_config="" for apu_temp_major in $acceptable_majors do case $apu_temp_major in 0) apu_temp_acceptable_apu_config="$apu_temp_acceptable_apu_config apu-config" ;; *) apu_temp_acceptable_apu_config="$apu_temp_acceptable_apu_config apu-$apu_temp_major-config" ;; esac done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for APR-util" >&5 $as_echo_n "checking for APR-util... " >&6; } # Check whether --with-apr-util was given. if test "${with_apr_util+set}" = set; then : withval=$with_apr_util; if test "$withval" = "no" || test "$withval" = "yes"; then as_fn_error $? "--with-apr-util requires a directory or file to be provided" "$LINENO" 5 fi for apu_temp_apu_config_file in $apu_temp_acceptable_apu_config do for lookdir in "$withval/bin" "$withval" do if $TEST_X "$lookdir/$apu_temp_apu_config_file"; then apu_config="$lookdir/$apu_temp_apu_config_file" apu_found="yes" break 2 fi done done if test "$apu_found" != "yes" && $TEST_X "$withval" && $withval --help > /dev/null 2>&1 ; then apu_config="$withval" apu_found="yes" fi if test "$apu_found" != "yes"; then as_fn_error $? "the --with-apr-util parameter is incorrect. It must specify an install prefix, a build directory, or an apu-config file." "$LINENO" 5 fi else if test -n "1" && test "1" = "1"; then for apu_temp_apu_config_file in $apu_temp_acceptable_apu_config do if $apu_temp_apu_config_file --help > /dev/null 2>&1 ; then apu_config="$apu_temp_apu_config_file" apu_found="yes" break else for lookdir in /usr /usr/local /usr/local/apr /opt/apr; do if $TEST_X "$lookdir/bin/$apu_temp_apu_config_file"; then apu_config="$lookdir/bin/$apu_temp_apu_config_file" apu_found="yes" break 2 fi done fi done fi if test "$apu_found" = "no" && test -d """"; then apu_temp_abs_srcdir="`cd \"""\" && pwd`" apu_found="reconfig" apu_bundled_major="`sed -n '/#define.*APU_MAJOR_VERSION/s/^[^0-9]*\([0-9]*\).*$/\1/p' \"""/include/apu_version.h\"`" case $apu_bundled_major in "") as_fn_error $? "failed to find major version of bundled APU" "$LINENO" 5 ;; 0) apu_temp_apu_config_file="apu-config" ;; *) apu_temp_apu_config_file="apu-$apu_bundled_major-config" ;; esac if test -n """"; then apu_config="""/$apu_temp_apu_config_file" else apu_config="""/$apu_temp_apu_config_file" fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_found" >&5 $as_echo "$apu_found" >&6; } if test $apu_found = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: APRUTIL not found" >&5 $as_echo "$as_me: WARNING: APRUTIL not found" >&2;} echo "The Apache Portable Runtime Utility (APRUTIL) library cannot be found." echo "Install APRUTIL on this system and configure Subversion with the" echo " appropriate --with-apr-util option." echo "" as_fn_error $? "no suitable APRUTIL found" "$LINENO" 5 fi if test $apu_found = "reconfig"; then as_fn_error $? "Unexpected APRUTIL reconfig" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking APRUTIL version" >&5 $as_echo_n "checking APRUTIL version... " >&6; } apu_version="`$apu_config --version`" if test $? -ne 0; then # This is a hack as suggested by Ben Collins-Sussman. It can be # removed after apache 2.0.44 has been released. (The apu-config # shipped in 2.0.43 contains a correct version number, but # stupidly doesn't understand the --version switch.) apu_version=`grep "APRUTIL_DOTTED_VERSION=" $(which $apu_config) | tr -d "APRUTIL_DOTTED_VERSION="| tr -d '"'` #AC_MSG_ERROR([ # apu-config --version failed. # Your apu-config doesn't support the --version switch, please upgrade # to APR-UTIL more recent than 2002-Nov-05.]) fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $apu_version" >&5 $as_echo "$apu_version" >&6; } APU_WANTED_REGEX_MATCH=0 for apu_wanted_regex in $APRUTIL_WANTED_REGEXES; do if test `expr $apu_version : $apu_wanted_regex` -ne 0; then APU_WANTED_REGEX_MATCH=1 break fi done if test $APU_WANTED_REGEX_MATCH -eq 0; then echo "wanted regexes are $APRUTIL_WANTED_REGEXES" as_fn_error $? "invalid APRUTIL version found" "$LINENO" 5 fi apu_ldflags="`$apu_config --ldflags`" if test $? -ne 0; then as_fn_error $? "apu-config --ldflags failed" "$LINENO" 5 fi LDFLAGS="$LDFLAGS ` input_flags="$apu_ldflags" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi `" SVN_APRUTIL_INCLUDES="`$apu_config --includes`" if test $? -ne 0; then as_fn_error $? "apu-config --includes failed" "$LINENO" 5 fi if test "$enable_all_static" = "yes"; then SVN_APRUTIL_LIBS="`$apu_config --link-ld --libs`" if test $? -ne 0; then as_fn_error $? "apu-config --link-ld --libs failed" "$LINENO" 5 fi else SVN_APRUTIL_LIBS="`$apu_config --link-ld`" if test $? -ne 0; then as_fn_error $? "apu-config --link-ld failed" "$LINENO" 5 fi fi SVN_APRUTIL_LIBS="` input_flags="$SVN_APRUTIL_LIBS" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi `" SVN_APRUTIL_CONFIG="$apu_config" SVN_HAVE_OLD_EXPAT="`$apu_config --old-expat`" if test "$SVN_HAVE_OLD_EXPAT" = "yes"; then $as_echo "#define SVN_HAVE_OLD_EXPAT 1" >>confdefs.h fi SVN_APR_MAJOR_VERSION=1 fi SVN_LT_SOVERSION="-version-info $svn_lib_ver" cat >>confdefs.h <<_ACEOF #define SVN_SOVERSION $svn_lib_ver _ACEOF # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done serf_found=no serf_required=no serf_skip=no serf_check_major="1" serf_check_minor="3" serf_check_patch="4" serf_check_version="1.3.4" # Check whether --with-serf was given. if test "${with_serf+set}" = set; then : withval=$with_serf; if test "$withval" = "yes" ; then serf_required=yes elif test "$withval" = "no" ; then serf_skip=yes else serf_required=yes serf_prefix="$withval" fi fi if test "$serf_skip" = "no" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: serf library configuration via pkg-config" >&5 $as_echo "$as_me: serf library configuration via pkg-config" >&6;} if test -n "$PKG_CONFIG"; then for serf_major in serf-2 serf-1; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $serf_major library" >&5 $as_echo_n "checking for $serf_major library... " >&6; } if test -n "$serf_prefix" ; then if test -e "$serf_prefix/$serf_major.pc" ; then serf_pc_arg="$serf_prefix/$serf_major.pc" elif test -e "$serf_prefix/lib/pkgconfig/$serf_major.pc" ; then serf_pc_arg="$serf_prefix/lib/pkgconfig/$serf_major.pc" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } continue fi else serf_pc_arg="$serf_major" fi if $PKG_CONFIG $serf_pc_arg --exists; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking serf library version" >&5 $as_echo_n "checking serf library version... " >&6; } SERF_VERSION=`$PKG_CONFIG $serf_pc_arg --modversion` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SERF_VERSION" >&5 $as_echo "$SERF_VERSION" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking serf version is suitable" >&5 $as_echo_n "checking serf version is suitable... " >&6; } if $PKG_CONFIG $serf_pc_arg --atleast-version=$serf_check_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } serf_found=yes SVN_SERF_INCLUDES=`$PKG_CONFIG $serf_pc_arg --cflags | $SED -e 's/ -D[^ ]*//g' -e 's/^-D[^ ]*//g'` SVN_SERF_LIBS=`$PKG_CONFIG $serf_pc_arg --libs-only-l` LDFLAGS="$LDFLAGS `$PKG_CONFIG $serf_pc_arg --libs | $SED -e 's/-l[^ ]*//g'`" break else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Serf version too old: need $serf_check_version" >&5 $as_echo "$as_me: WARNING: Serf version too old: need $serf_check_version" >&2;} fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi done fi if test -n "$serf_prefix" && test "$serf_found" = "no" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: serf library configuration via prefix" >&5 $as_echo "$as_me: serf library configuration via prefix" >&6;} serf_required=yes for serf_major in serf-2 serf-1; do if ! test -d $serf_prefix/include/$serf_major; then continue; fi save_cppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES $SVN_APRUTIL_INCLUDES -I$serf_prefix/include/$serf_major" for ac_header in serf.h do : ac_fn_c_check_header_mongrel "$LINENO" "serf.h" "ac_cv_header_serf_h" "$ac_includes_default" if test "x$ac_cv_header_serf_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SERF_H 1 _ACEOF save_ldflags="$LDFLAGS" LDFLAGS="$LDFLAGS ` input_flags="-L$serf_prefix/lib" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi `" as_ac_Lib=`$as_echo "ac_cv_lib_$serf_major''_serf_context_create" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for serf_context_create in -l$serf_major" >&5 $as_echo_n "checking for serf_context_create in -l$serf_major... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$serf_major $SVN_APRUTIL_LIBS $SVN_APR_LIBS -lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char serf_context_create (); int main () { return serf_context_create (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include "serf.h" int main () { #if ! SERF_VERSION_AT_LEAST($serf_check_major, $serf_check_minor, $serf_check_patch) #error Serf version too old: need $serf_check_version #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : serf_found=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Serf version too old: need $serf_check_version" >&5 $as_echo "$as_me: WARNING: Serf version too old: need $serf_check_version" >&2;} serf_found=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi LDFLAGS="$save_ldflags" fi done CPPFLAGS="$save_cppflags" test $serf_found = yes && break done if test $serf_found = "yes"; then SVN_SERF_INCLUDES="-I$serf_prefix/include/$serf_major" if test -e "$serf_prefix/lib/lib$serf_major.la"; then SVN_SERF_LIBS="$serf_prefix/lib/lib$serf_major.la" else SVN_SERF_LIBS="-l$serf_major" LDFLAGS="$LDFLAGS ` input_flags="-L$serf_prefix/lib" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi `" fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking was serf enabled" >&5 $as_echo_n "checking was serf enabled... " >&6; } if test "$serf_found" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "" echo "An appropriate version of serf could not be found, so libsvn_ra_serf" echo "will not be built. If you want to build libsvn_ra_serf, please" echo "install serf $serf_check_version or newer." echo "" if test "$serf_required" = "yes"; then as_fn_error $? "Serf was explicitly enabled but an appropriate version was not found." "$LINENO" 5 fi fi fi svn_lib_serf=$serf_found if test "$svn_lib_serf" = "yes"; then $as_echo "#define SVN_HAVE_SERF 1" >>confdefs.h fi apr_memcache_found=no # Check whether --with-apr_memcache was given. if test "${with_apr_memcache+set}" = set; then : withval=$with_apr_memcache; if test "$withval" = "yes" ; then as_fn_error $? "--with-apr_memcache requires an argument." "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: looking for separate apr_memcache package" >&5 $as_echo "$as_me: looking for separate apr_memcache package" >&6;} apr_memcache_prefix=$withval save_cppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES $SVN_APRUTIL_INCLUDES -I$apr_memcache_prefix/include/apr_memcache-0" ac_fn_c_check_header_mongrel "$LINENO" "apr_memcache.h" "ac_cv_header_apr_memcache_h" "$ac_includes_default" if test "x$ac_cv_header_apr_memcache_h" = xyes; then : save_ldflags="$LDFLAGS" LDFLAGS="$LDFLAGS -L$apr_memcache_prefix/lib" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for apr_memcache_create in -lapr_memcache" >&5 $as_echo_n "checking for apr_memcache_create in -lapr_memcache... " >&6; } if ${ac_cv_lib_apr_memcache_apr_memcache_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lapr_memcache $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char apr_memcache_create (); int main () { return apr_memcache_create (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_apr_memcache_apr_memcache_create=yes else ac_cv_lib_apr_memcache_apr_memcache_create=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_apr_memcache_apr_memcache_create" >&5 $as_echo "$ac_cv_lib_apr_memcache_apr_memcache_create" >&6; } if test "x$ac_cv_lib_apr_memcache_apr_memcache_create" = xyes; then : apr_memcache_found="standalone" fi LDFLAGS="$save_ldflags" fi CPPFLAGS="$save_cppflags" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: looking for apr_memcache as part of apr-util" >&5 $as_echo "$as_me: looking for apr_memcache as part of apr-util" >&6;} save_cppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES $SVN_APRUTIL_INCLUDES" ac_fn_c_check_header_mongrel "$LINENO" "apr_memcache.h" "ac_cv_header_apr_memcache_h" "$ac_includes_default" if test "x$ac_cv_header_apr_memcache_h" = xyes; then : save_ldflags="$LDFLAGS" LDFLAGS="$LDFLAGS $SVN_APRUTIL_LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for apr_memcache_create in -laprutil-1" >&5 $as_echo_n "checking for apr_memcache_create in -laprutil-1... " >&6; } if ${ac_cv_lib_aprutil_1_apr_memcache_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-laprutil-1 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char apr_memcache_create (); int main () { return apr_memcache_create (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_aprutil_1_apr_memcache_create=yes else ac_cv_lib_aprutil_1_apr_memcache_create=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_aprutil_1_apr_memcache_create" >&5 $as_echo "$ac_cv_lib_aprutil_1_apr_memcache_create" >&6; } if test "x$ac_cv_lib_aprutil_1_apr_memcache_create" = xyes; then : apr_memcache_found="aprutil" fi LDFLAGS="$save_ldflags" fi CPPFLAGS="$save_cppflags" fi if test $apr_memcache_found = "standalone"; then SVN_APR_MEMCACHE_INCLUDES="-I$apr_memcache_prefix/include/apr_memcache-0" SVN_APR_MEMCACHE_LIBS="$apr_memcache_prefix/lib/libapr_memcache.la" svn_lib_apr_memcache=yes elif test $apr_memcache_found = "aprutil"; then SVN_APR_MEMCACHE_INCLUDES="" SVN_APR_MEMCACHE_LIBS="" svn_lib_apr_memcache=yes elif test $apr_memcache_found = "reconfig"; then svn_lib_apr_memcache=yes else svn_lib_apr_memcache=no fi if test "$svn_lib_apr_memcache" = "yes"; then $as_echo "#define SVN_HAVE_MEMCACHE 1" >>confdefs.h fi # Check whether --enable-apache-whitelist was given. if test "${enable_apache_whitelist+set}" = set; then : enableval=$enable_apache_whitelist; apache_whitelist_ver=$enableval else apache_whitelist_ver=no fi HTTPD_WHITELIST="$apache_whitelist_ver" HTTPD_WANTED_MMN="20051115" HTTPD_WHITELIST_VER="$apache_whitelist_ver" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Apache module support via DSO through APXS" >&5 $as_echo_n "checking for Apache module support via DSO through APXS... " >&6; } # Check whether --with-apxs was given. if test "${with_apxs+set}" = set; then : withval=$with_apxs; if test "$withval" = "yes"; then APXS=apxs else APXS="$withval" fi APXS_EXPLICIT=1 fi if test -z "$APXS"; then for i in /usr/local/apache2/bin /usr/local/apache/bin /usr/bin /usr/sbin ; do if test -f "$i/apxs2"; then APXS="$i/apxs2" break fi if test -f "$i/apxs"; then APXS="$i/apxs" break fi done fi if test -n "$APXS" && test "$APXS" != "no"; then APXS_INCLUDE="`$APXS -q INCLUDEDIR`" if test -r $APXS_INCLUDE/mod_dav.h; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at $APXS" >&5 $as_echo "found at $APXS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking httpd version" >&5 $as_echo_n "checking httpd version... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "$APXS_INCLUDE/ap_mmn.h" #if AP_MODULE_MAGIC_AT_LEAST($HTTPD_WANTED_MMN,0) VERSION_OKAY #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "VERSION_OKAY" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: recent enough" >&5 $as_echo "recent enough" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: apache too old: mmn must be at least $HTTPD_WANTED_MMN" >&5 $as_echo "apache too old: mmn must be at least $HTTPD_WANTED_MMN" >&6; } if test "$APXS_EXPLICIT" != ""; then as_fn_error $? "Apache APXS build explicitly requested, but apache version is too old" "$LINENO" 5 fi APXS="" fi rm -f conftest* elif test "$APXS_EXPLICIT" != ""; then as_fn_error $? "no - APXS refers to an old version of Apache Unable to locate $APXS_INCLUDE/mod_dav.h" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - Unable to locate $APXS_INCLUDE/mod_dav.h" >&5 $as_echo "no - Unable to locate $APXS_INCLUDE/mod_dav.h" >&6; } APXS="" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # check for some busted versions of mod_dav # in particular 2.2.25, 2.4.5, and 2.4.6 had the following bugs which are # troublesome for Subversion: # PR 55304: https://issues.apache.org/bugzilla/show_bug.cgi?id=55304 # PR 55306: https://issues.apache.org/bugzilla/show_bug.cgi?id=55306 # PR 55397: https://issues.apache.org/bugzilla/show_bug.cgi?id=55397 if test -n "$APXS" && test "$APXS" != "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking mod_dav version" >&5 $as_echo_n "checking mod_dav version... " >&6; } HTTPD_MAJOR=`$SED -ne '/^#define AP_SERVER_MAJORVERSION_NUMBER/p' "$APXS_INCLUDE/ap_release.h" | $SED -e 's/^.*NUMBER *//'` HTTPD_MINOR=`$SED -ne '/^#define AP_SERVER_MINORVERSION_NUMBER/p' "$APXS_INCLUDE/ap_release.h" | $SED -e 's/^.*NUMBER *//'` HTTPD_PATCH=`$SED -ne '/^#define AP_SERVER_PATCHLEVEL_NUMBER/p' "$APXS_INCLUDE/ap_release.h" | $SED -e 's/^.*NUMBER *//'` HTTPD_VERSION="${HTTPD_MAJOR}.${HTTPD_MINOR}.${HTTPD_PATCH}" case "$HTTPD_VERSION" in $HTTPD_WHITELIST_VER) { $as_echo "$as_me:${as_lineno-$LINENO}: result: acceptable (whitelist)" >&5 $as_echo "acceptable (whitelist)" >&6; } ;; 2.2.25 | 2.4.[5-6]) { $as_echo "$as_me:${as_lineno-$LINENO}: result: broken" >&5 $as_echo "broken" >&6; } as_fn_error $? "Apache httpd version $HTTPD_VERSION includes a broken mod_dav; use a newer version of httpd" "$LINENO" 5 ;; 2.[0-9]*.[0-9]*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: acceptable" >&5 $as_echo "acceptable" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unrecognised" >&5 $as_echo "unrecognised" >&6; } as_fn_error $? "Apache httpd version $HTTPD_VERSION not recognised" "$LINENO" 5 ;; esac fi if test -n "$APXS" && test "$APXS" != "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Apache version is compatible with APR version" >&5 $as_echo_n "checking whether Apache version is compatible with APR version... " >&6; } apr_major_version="${apr_version%%.*}" case "$apr_major_version" in 0) apache_minor_version_wanted_regex="0" ;; 1) apache_minor_version_wanted_regex="[1-5]" ;; 2) apache_minor_version_wanted_regex="[3-5]" ;; *) as_fn_error $? "unknown APR version" "$LINENO" 5 ;; esac case $HTTPD_MINOR in $apache_minor_version_wanted_regex) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "Apache version $HTTPD_VERSION incompatible with APR version $apr_version" "$LINENO" 5 ;; esac fi # Check whether --with-apache-libexecdir was given. if test "${with_apache_libexecdir+set}" = set; then : withval=$with_apache_libexecdir; APACHE_LIBEXECDIR="$withval" else APACHE_LIBEXECDIR='no' fi INSTALL_APACHE_MODS=false if test -n "$APXS" && test "$APXS" != "no"; then APXS_CC="`$APXS -q CC`" APACHE_INCLUDES="$APACHE_INCLUDES -I$APXS_INCLUDE" if test "$APACHE_LIBEXECDIR" = 'no'; then APACHE_LIBEXECDIR="$libexecdir" elif test "$APACHE_LIBEXECDIR" = 'yes'; then APACHE_LIBEXECDIR="`$APXS -q libexecdir`" fi for ac_header in unistd.h do : ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UNISTD_H 1 _ACEOF for ac_func in getpid do : ac_fn_c_check_func "$LINENO" "getpid" "ac_cv_func_getpid" if test "x$ac_cv_func_getpid" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETPID 1 _ACEOF fi done fi done MMN_MAJOR=`$SED -ne '/^#define MODULE_MAGIC_NUMBER_MAJOR/p' "$APXS_INCLUDE/ap_mmn.h" | $SED -e 's/^.*MAJOR *//'` MMN_MINOR=`$SED -ne '/^#define MODULE_MAGIC_NUMBER_MINOR/p' "$APXS_INCLUDE/ap_mmn.h" | $SED -e 's/^.*MINOR *//' | $SED -e 's/ .*//'` if test "$MMN_MAJOR" = "20120211" && test "$MMN_MINOR" -lt "47" ; then # This is httpd 2.4 and it doesn't appear to have the required # API but the installation may have been patched. # Check whether --enable-broken-httpd-auth was given. if test "${enable_broken_httpd_auth+set}" = set; then : enableval=$enable_broken_httpd_auth; broken_httpd_auth=$enableval else broken_httpd_auth=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ap_some_authn_required" >&5 $as_echo_n "checking for ap_some_authn_required... " >&6; } old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $APACHE_INCLUDES $SVN_APR_INCLUDES" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "http_request.h" _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "int.*\sap_some_authn_required\s*\(" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } working_auth=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f conftest* CPPFLAGS="$old_CPPFLAGS" if test "$working_auth" = "yes" ; then $as_echo "#define SVN_USE_FORCE_AUTHN 1" >>confdefs.h elif test "$enable_broken_httpd_auth" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ==============================================" >&5 $as_echo "$as_me: WARNING: ==============================================" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Apache httpd $HTTPD_VERSION MMN $MMN_MAJOR.$MMN_MINOR" >&5 $as_echo "$as_me: WARNING: Apache httpd $HTTPD_VERSION MMN $MMN_MAJOR.$MMN_MINOR" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion will be vulnerable to CVE-2015-3184" >&5 $as_echo "$as_me: WARNING: Subversion will be vulnerable to CVE-2015-3184" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ==============================================" >&5 $as_echo "$as_me: WARNING: ==============================================" >&2;} $as_echo "#define SVN_ALLOW_BROKEN_HTTPD_AUTH 1" >>confdefs.h else as_fn_error $? "Apache httpd $HTTPD_VERSION MMN $MMN_MAJOR.$MMN_MINOR has broken auth (CVE-2015-3184)" "$LINENO" 5 fi fi BUILD_APACHE_RULE=apache-mod INSTALL_APACHE_RULE=install-mods-shared INSTALL_APACHE_MODS=true case $host in *-*-cygwin*) APACHE_LDFLAGS="-shrext .so" ;; esac elif test x"$APXS" != x"no"; then echo "==================================================================" echo "WARNING: skipping the build of mod_dav_svn" echo " try using --with-apxs" echo "==================================================================" fi # there aren't any flags that interest us ... #if test -n "$APXS" && test "$APXS" != "no"; then # CFLAGS="$CFLAGS `$APXS -q CFLAGS CFLAGS_SHLIB`" #fi if test -n "$APXS_CC" && test "$APXS_CC" != "$CC" ; then echo "==================================================================" echo "WARNING: You have chosen to compile Subversion with a different" echo " compiler than the one used to compile Apache." echo "" echo " Current compiler: $CC" echo " Apache's compiler: $APXS_CC" echo "" echo "This could cause some problems." echo "==================================================================" fi SQLITE_MINIMUM_VER="3.8.2" SQLITE_RECOMMENDED_VER="3.8.11.1" SQLITE_RECOMMENDED_VER_REL_YEAR="2015" SQLITE_URL="https://www.sqlite.org/$SQLITE_RECOMMENDED_VER_REL_YEAR/sqlite-amalgamation-$(printf %d%02d%02d%02d $(echo ${SQLITE_RECOMMENDED_VER} | sed -e 's/\./ /g')).zip" SQLITE_MINIMUM_VER="${SQLITE_MINIMUM_VER}" SQLITE_RECOMMENDED_VER="${SQLITE_RECOMMENDED_VER}" SQLITE_URL="${SQLITE_URL}" SQLITE_PKGNAME="sqlite3" version_string="$SQLITE_MINIMUM_VER" major=`expr $version_string : '\([0-9]*\)'` minor=`expr $version_string : '[0-9]*\.\([0-9]*\)'` micro=`expr $version_string : '[0-9]*\.[0-9]*\.\([0-9]*\)'` if test -z "$micro"; then micro=0 fi sqlite_min_ver_num=`expr $major \* 1000000 \ \+ $minor \* 1000 \ \+ $micro` { $as_echo "$as_me:${as_lineno-$LINENO}: checking sqlite library" >&5 $as_echo "$as_me: checking sqlite library" >&6;} # Check whether --with-sqlite was given. if test "${with_sqlite+set}" = set; then : withval=$with_sqlite; if test "$withval" = "yes" ; then as_fn_error $? "--with-sqlite requires an argument." "$LINENO" 5 else sqlite_dir="$withval" fi if test -d $sqlite_dir; then if test -z "$sqlite_dir"; then sqlite_dir="" sqlite_include="sqlite3.h" else sqlite_dir="$sqlite_dir" sqlite_include="$sqlite_dir/include/sqlite3.h" fi save_CPPFLAGS="$CPPFLAGS" save_LDFLAGS="$LDFLAGS" if test ! -z "$sqlite_dir"; then CPPFLAGS="$CPPFLAGS -I$sqlite_dir/include" LDFLAGS="$LDFLAGS -L$sqlite_dir/lib" fi ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default" if test "x$ac_cv_header_sqlite3_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking sqlite library version (via header)" >&5 $as_echo_n "checking sqlite library version (via header)... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "$sqlite_include" #if SQLITE_VERSION_NUMBER >= $sqlite_min_ver_num SQLITE_VERSION_OKAY #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "SQLITE_VERSION_OKAY" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: okay" >&5 $as_echo "okay" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_close in -lsqlite3" >&5 $as_echo_n "checking for sqlite3_close in -lsqlite3... " >&6; } if ${ac_cv_lib_sqlite3_sqlite3_close+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsqlite3 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sqlite3_close (); int main () { return sqlite3_close (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_sqlite3_sqlite3_close=yes else ac_cv_lib_sqlite3_sqlite3_close=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_close" >&5 $as_echo "$ac_cv_lib_sqlite3_sqlite3_close" >&6; } if test "x$ac_cv_lib_sqlite3_sqlite3_close" = xyes; then : svn_lib_sqlite="yes" if test -z "$sqlite_dir" -o ! -d "$sqlite_dir"; then SVN_SQLITE_LIBS="-lsqlite3" else SVN_SQLITE_INCLUDES="-I$sqlite_dir/include" SVN_SQLITE_LIBS="` input_flags="-L$sqlite_dir/lib -lsqlite3" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi `" fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported SQLite version" >&5 $as_echo "unsupported SQLite version" >&6; } fi rm -f conftest* fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" else sqlite_amalg="$sqlite_dir" { $as_echo "$as_me:${as_lineno-$LINENO}: checking sqlite amalgamation" >&5 $as_echo_n "checking sqlite amalgamation... " >&6; } if test ! -e $sqlite_amalg; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking sqlite amalgamation file version" >&5 $as_echo_n "checking sqlite amalgamation file version... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "$sqlite_amalg" #if SQLITE_VERSION_NUMBER >= $sqlite_min_ver_num SQLITE_VERSION_OKAY #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "SQLITE_VERSION_OKAY" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: amalgamation found and is okay" >&5 $as_echo "amalgamation found and is okay" >&6; } case $host_os in beos* | mingw* | pw32* | cegcc* | cygwin*) svn_sqlite_dso_ldflags= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" svn_sqlite_dso_ldflags="-ldl" else svn_sqlite_dso_ldflags= fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : svn_sqlite_dso_ldflags= else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : svn_sqlite_dso_ldflags="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : svn_sqlite_dso_ldflags= else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : svn_sqlite_dso_ldflags="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : svn_sqlite_dso_ldflags="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : svn_sqlite_dso_ldflags="-ldld" fi fi fi fi fi fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional libraries for sqlite" >&5 $as_echo_n "checking additional libraries for sqlite... " >&6; } if test -n "$svn_sqlite_dso_ldflags"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${svn_sqlite_dso_ldflags}" >&5 $as_echo "${svn_sqlite_dso_ldflags}" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi $as_echo "#define SVN_SQLITE_INLINE 1" >>confdefs.h SVN_SQLITE_INCLUDES="-I`dirname $sqlite_amalg`" if test -n "$svn_sqlite_dso_ldflags"; then SVN_SQLITE_LIBS="$svn_sqlite_dso_ldflags -lpthread" else SVN_SQLITE_LIBS="-lpthread" fi svn_lib_sqlite="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported amalgamation SQLite version" >&5 $as_echo "unsupported amalgamation SQLite version" >&6; } fi rm -f conftest* fi fi if test -z "$svn_lib_sqlite"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no suitable sqlite found in $sqlite_dir" >&5 $as_echo "$as_me: WARNING: no suitable sqlite found in $sqlite_dir" >&2;} echo "" echo "An appropriate version of sqlite could not be found. We recommmend" echo "${SQLITE_RECOMMENDED_VER}, but require at least ${SQLITE_MINIMUM_VER}." echo "Please either install a newer sqlite on this system" echo "" echo "or" echo "" echo "get the sqlite ${SQLITE_RECOMMENDED_VER} amalgamation from:" echo " ${SQLITE_URL}" echo "unpack the archive using unzip and rename the resulting" echo "directory to:" echo "$abs_srcdir/sqlite-amalgamation" if test x"$abs_srcdir" != x"$abs_builddir"; then echo "or to:" echo "$abs_builddir/sqlite-amalgamation" fi echo "" as_fn_error $? "Subversion requires SQLite" "$LINENO" 5 fi else sqlite_amalg="$abs_srcdir/sqlite-amalgamation/sqlite3.c" { $as_echo "$as_me:${as_lineno-$LINENO}: checking sqlite amalgamation" >&5 $as_echo_n "checking sqlite amalgamation... " >&6; } if test ! -e $sqlite_amalg; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking sqlite amalgamation file version" >&5 $as_echo_n "checking sqlite amalgamation file version... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "$sqlite_amalg" #if SQLITE_VERSION_NUMBER >= $sqlite_min_ver_num SQLITE_VERSION_OKAY #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "SQLITE_VERSION_OKAY" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: amalgamation found and is okay" >&5 $as_echo "amalgamation found and is okay" >&6; } case $host_os in beos* | mingw* | pw32* | cegcc* | cygwin*) svn_sqlite_dso_ldflags= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" svn_sqlite_dso_ldflags="-ldl" else svn_sqlite_dso_ldflags= fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : svn_sqlite_dso_ldflags= else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : svn_sqlite_dso_ldflags="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : svn_sqlite_dso_ldflags= else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : svn_sqlite_dso_ldflags="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : svn_sqlite_dso_ldflags="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : svn_sqlite_dso_ldflags="-ldld" fi fi fi fi fi fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional libraries for sqlite" >&5 $as_echo_n "checking additional libraries for sqlite... " >&6; } if test -n "$svn_sqlite_dso_ldflags"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${svn_sqlite_dso_ldflags}" >&5 $as_echo "${svn_sqlite_dso_ldflags}" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi $as_echo "#define SVN_SQLITE_INLINE 1" >>confdefs.h SVN_SQLITE_INCLUDES="-I`dirname $sqlite_amalg`" if test -n "$svn_sqlite_dso_ldflags"; then SVN_SQLITE_LIBS="$svn_sqlite_dso_ldflags -lpthread" else SVN_SQLITE_LIBS="-lpthread" fi svn_lib_sqlite="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported amalgamation SQLite version" >&5 $as_echo "unsupported amalgamation SQLite version" >&6; } fi rm -f conftest* fi if test -z "$svn_lib_sqlite"; then sqlite_amalg="$abs_builddir/sqlite-amalgamation/sqlite3.c" { $as_echo "$as_me:${as_lineno-$LINENO}: checking sqlite amalgamation" >&5 $as_echo_n "checking sqlite amalgamation... " >&6; } if test ! -e $sqlite_amalg; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking sqlite amalgamation file version" >&5 $as_echo_n "checking sqlite amalgamation file version... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "$sqlite_amalg" #if SQLITE_VERSION_NUMBER >= $sqlite_min_ver_num SQLITE_VERSION_OKAY #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "SQLITE_VERSION_OKAY" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: amalgamation found and is okay" >&5 $as_echo "amalgamation found and is okay" >&6; } case $host_os in beos* | mingw* | pw32* | cegcc* | cygwin*) svn_sqlite_dso_ldflags= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" svn_sqlite_dso_ldflags="-ldl" else svn_sqlite_dso_ldflags= fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : svn_sqlite_dso_ldflags= else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : svn_sqlite_dso_ldflags="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : svn_sqlite_dso_ldflags= else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : svn_sqlite_dso_ldflags="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : svn_sqlite_dso_ldflags="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : svn_sqlite_dso_ldflags="-ldld" fi fi fi fi fi fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional libraries for sqlite" >&5 $as_echo_n "checking additional libraries for sqlite... " >&6; } if test -n "$svn_sqlite_dso_ldflags"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${svn_sqlite_dso_ldflags}" >&5 $as_echo "${svn_sqlite_dso_ldflags}" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi $as_echo "#define SVN_SQLITE_INLINE 1" >>confdefs.h SVN_SQLITE_INCLUDES="-I`dirname $sqlite_amalg`" if test -n "$svn_sqlite_dso_ldflags"; then SVN_SQLITE_LIBS="$svn_sqlite_dso_ldflags -lpthread" else SVN_SQLITE_LIBS="-lpthread" fi svn_lib_sqlite="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported amalgamation SQLite version" >&5 $as_echo "unsupported amalgamation SQLite version" >&6; } fi rm -f conftest* fi fi if test -z "$svn_lib_sqlite"; then if test -z ""; then sqlite_dir="" sqlite_include="sqlite3.h" else sqlite_dir="" sqlite_include="/include/sqlite3.h" fi save_CPPFLAGS="$CPPFLAGS" save_LDFLAGS="$LDFLAGS" if test ! -z ""; then CPPFLAGS="$CPPFLAGS -I$sqlite_dir/include" LDFLAGS="$LDFLAGS -L$sqlite_dir/lib" fi ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default" if test "x$ac_cv_header_sqlite3_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking sqlite library version (via header)" >&5 $as_echo_n "checking sqlite library version (via header)... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "$sqlite_include" #if SQLITE_VERSION_NUMBER >= $sqlite_min_ver_num SQLITE_VERSION_OKAY #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "SQLITE_VERSION_OKAY" >/dev/null 2>&1; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: okay" >&5 $as_echo "okay" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_close in -lsqlite3" >&5 $as_echo_n "checking for sqlite3_close in -lsqlite3... " >&6; } if ${ac_cv_lib_sqlite3_sqlite3_close+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsqlite3 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sqlite3_close (); int main () { return sqlite3_close (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_sqlite3_sqlite3_close=yes else ac_cv_lib_sqlite3_sqlite3_close=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_close" >&5 $as_echo "$ac_cv_lib_sqlite3_sqlite3_close" >&6; } if test "x$ac_cv_lib_sqlite3_sqlite3_close" = xyes; then : svn_lib_sqlite="yes" if test -z "$sqlite_dir" -o ! -d "$sqlite_dir"; then SVN_SQLITE_LIBS="-lsqlite3" else SVN_SQLITE_INCLUDES="-I$sqlite_dir/include" SVN_SQLITE_LIBS="` input_flags="-L$sqlite_dir/lib -lsqlite3" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi `" fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported SQLite version" >&5 $as_echo "unsupported SQLite version" >&6; } fi rm -f conftest* fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" fi if test -z "$svn_lib_sqlite"; then if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking sqlite library version (via pkg-config)" >&5 $as_echo_n "checking sqlite library version (via pkg-config)... " >&6; } sqlite_version=`$PKG_CONFIG $SQLITE_PKGNAME --modversion --silence-errors` if test -n "$sqlite_version"; then version_string="$sqlite_version" major=`expr $version_string : '\([0-9]*\)'` minor=`expr $version_string : '[0-9]*\.\([0-9]*\)'` micro=`expr $version_string : '[0-9]*\.[0-9]*\.\([0-9]*\)'` if test -z "$micro"; then micro=0 fi sqlite_ver_num=`expr $major \* 1000000 \ \+ $minor \* 1000 \ \+ $micro` if test "$sqlite_ver_num" -ge "$sqlite_min_ver_num"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sqlite_version" >&5 $as_echo "$sqlite_version" >&6; } svn_lib_sqlite="yes" SVN_SQLITE_INCLUDES="`$PKG_CONFIG $SQLITE_PKGNAME --cflags`" SVN_SQLITE_LIBS="`$PKG_CONFIG $SQLITE_PKGNAME --libs`" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none or unsupported $sqlite_version" >&5 $as_echo "none or unsupported $sqlite_version" >&6; } fi fi fi if test -z "$svn_lib_sqlite"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$svn_lib_sqlite"; then echo "" echo "An appropriate version of sqlite could not be found. We recommmend" echo "${SQLITE_RECOMMENDED_VER}, but require at least ${SQLITE_MINIMUM_VER}." echo "Please either install a newer sqlite on this system" echo "" echo "or" echo "" echo "get the sqlite ${SQLITE_RECOMMENDED_VER} amalgamation from:" echo " ${SQLITE_URL}" echo "unpack the archive using unzip and rename the resulting" echo "directory to:" echo "$abs_srcdir/sqlite-amalgamation" if test x"$abs_srcdir" != x"$abs_builddir"; then echo "or to:" echo "$abs_builddir/sqlite-amalgamation" fi echo "" as_fn_error $? "Subversion requires SQLite" "$LINENO" 5 fi fi # Check whether --enable-sqlite-compatibility-version was given. if test "${enable_sqlite_compatibility_version+set}" = set; then : enableval=$enable_sqlite_compatibility_version; sqlite_compat_ver=$enableval else sqlite_compat_ver=no fi if test -n "$sqlite_compat_ver" && test "$sqlite_compat_ver" != no; then version_string="$sqlite_compat_ver" major=`expr $version_string : '\([0-9]*\)'` minor=`expr $version_string : '[0-9]*\.\([0-9]*\)'` micro=`expr $version_string : '[0-9]*\.[0-9]*\.\([0-9]*\)'` if test -z "$micro"; then micro=0 fi sqlite_compat_ver_num=`expr $major \* 1000000 \ \+ $minor \* 1000 \ \+ $micro` CFLAGS="-DSVN_SQLITE_MIN_VERSION='\"$sqlite_compat_ver\"' $CFLAGS" CFLAGS="-DSVN_SQLITE_MIN_VERSION_NUMBER=$sqlite_compat_ver_num $CFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler provides atomic builtins" >&5 $as_echo_n "checking whether the compiler provides atomic builtins... " >&6; } if ${svn_cv_atomic_builtins+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : svn_cv_atomic_builtins=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main() { unsigned long long val = 1010, tmp, *mem = &val; if (__sync_fetch_and_add(&val, 1010) != 1010 || val != 2020) return 1; tmp = val; if (__sync_fetch_and_sub(mem, 1010) != tmp || val != 1010) return 1; if (__sync_sub_and_fetch(&val, 1010) != 0 || val != 0) return 1; tmp = 3030; if (__sync_val_compare_and_swap(mem, 0, tmp) != 0 || val != tmp) return 1; if (__sync_lock_test_and_set(&val, 4040) != 3030) return 1; mem = &tmp; if (__sync_val_compare_and_swap(&mem, &tmp, &val) != &tmp) return 1; __sync_synchronize(); if (mem != &val) return 1; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : svn_cv_atomic_builtins=yes else svn_cv_atomic_builtins=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $svn_cv_atomic_builtins" >&5 $as_echo "$svn_cv_atomic_builtins" >&6; } if test "$svn_cv_atomic_builtins" = "yes"; then $as_echo "#define SVN_HAS_ATOMIC_BUILTINS 1" >>confdefs.h fi if test "${bindir}" = '${exec_prefix}/bin'; then if test "${exec_prefix}" = "NONE"; then if test "${prefix}" = "NONE"; then SVN_BINDIR="${ac_default_prefix}/bin" else SVN_BINDIR="${prefix}/bin" fi else SVN_BINDIR="${exec_prefix}/bin" fi else SVN_BINDIR="${bindir}" fi SVN_BINDIR="`eval echo ${SVN_BINDIR}`" cat >>confdefs.h <<_ACEOF #define SVN_BINDIR "${SVN_BINDIR}" _ACEOF localedir='${datadir}/locale' if test "${prefix}" = "NONE" \ && ( test "${datadir}" = '${prefix}/share' \ || ( test "${datadir}" = '${datarootdir}' \ && test "${datarootdir}" = '${prefix}/share' ) ); then exp_localedir='${ac_default_prefix}/share/locale' else exp_localedir=$localedir fi svn_last= svn_cur=""${exp_localedir}"" while test "x${svn_cur}" != "x${svn_last}"; do svn_last="${svn_cur}" svn_cur=`eval "echo ${svn_cur}"` done svn_localedir="${svn_cur}" cat >>confdefs.h <<_ACEOF #define SVN_LOCALE_DIR "${svn_localedir}" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: configuring libtool now" >&5 $as_echo "$as_me: configuring libtool now" >&6;} case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.6' macro_revision='2.4.6' ltmain=$ac_aux_dir/ltmain.sh # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case $ECHO in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n "$lt_cv_sys_max_cmd_len"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) if test yes = "$GCC"; then reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 $as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 $as_echo_n "checking for a working dd... " >&6; } if ${ac_cv_path_lt_DD+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then ac_path_lt_DD_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in dd; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi $ac_path_lt_DD_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_lt_DD"; then : fi else ac_cv_path_lt_DD=$lt_DD fi rm -f conftest.i conftest2.i conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 $as_echo "$ac_cv_path_lt_DD" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 $as_echo_n "checking how to truncate binary pipes... " >&6; } if ${lt_cv_truncate_bin+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 $as_echo "$lt_cv_truncate_bin" >&6; } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[012][,.]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done func_stripname_cnf () { case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;; esac } # func_stripname_cnf # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac else pic_mode=default fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac else enable_fast_install=yes fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. if test "${with_aix_soname+set}" = set; then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; *) as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 ;; esac lt_cv_with_aix_soname=$with_aix_soname else if ${lt_cv_with_aix_soname+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 $as_echo "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o func_cc_basename $compiler cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/${ac_tool_prefix}file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi lt_prog_compiler_pic='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test no = "$hard_links"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' export_dynamic_flag_spec='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 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' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) export_dynamic_flag_spec='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct=no hardcode_direct_absolute=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' $wl-bernotok' allow_undefined_flag=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test yes = "$GCC"; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' else archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; osf3*) if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test yes = "$GCC"; then wlarc='$wl' archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='$wl-z,text' allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen=shl_load else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen=dlopen else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi fi fi fi fi fi ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report what library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu else _lt_caught_CXX_error=yes fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds reload_flag_CXX=$reload_flag reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC func_cc_basename $compiler cc_basename=$func_cc_basename_result if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec_CXX='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. no_undefined_flag_CXX='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' $wl-bernotok' allow_undefined_flag_CXX=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi archive_cmds_need_lc_CXX=yes archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=yes file_list_spec_CXX='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' export_dynamic_flag_spec_CXX='$wl--export-all-symbols' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec_CXX='' fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" if test yes != "$lt_cv_apple_cc_single_mod"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi else ld_shlibs_CXX=no fi ;; os2*) hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_minus_L_CXX=yes allow_undefined_flag_CXX=unsupported shrext_cmds=.dll archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes_CXX=yes ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; haiku*) archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; hpux9*) hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='$wl-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' export_dynamic_flag_spec_CXX='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='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' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='$wl-E' whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes,no = "$GXX,$with_gnu_ld"; then allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then no_undefined_flag_CXX=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='$wl-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='$wl-z,text' allow_undefined_flag_CXX='$wl-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='$wl-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test no = "$ld_shlibs_CXX" && can_build_shared=no GCC_CXX=$GXX LD_CXX=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || test x-R = "$p"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX=$prev$p else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX=$prev$p else postdeps_CXX="${postdeps_CXX} $prev$p" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test no = "$pre_test_object_deps_done"; then if test -z "$predep_objects_CXX"; then predep_objects_CXX=$p else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX=$p else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi lt_prog_compiler_pic_CXX='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static_CXX='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test no = "$hard_links"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' ;; esac ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test no = "$ld_shlibs_CXX" && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no else lt_cv_archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec_CXX='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test yes = "$hardcode_automatic_CXX"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct_CXX" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" && test no != "$hardcode_minus_L_CXX"; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test relink = "$hardcode_action_CXX" || test yes = "$inherit_rpath_CXX"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test yes != "$_lt_caught_CXX_error" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_commands="$ac_config_commands libtool" # Only expand once: # Check whether --enable-experimental-libtool was given. if test "${enable_experimental_libtool+set}" = set; then : enableval=$enable_experimental_libtool; experimental_libtool=$enableval else experimental_libtool=no fi if test "$experimental_libtool" = "yes"; then echo "using APR's libtool" sh_libtool="`$apr_config --apr-libtool`" LIBTOOL="$sh_libtool" SVN_LIBTOOL="$sh_libtool" else sh_libtool="$abs_builddir/libtool" SVN_LIBTOOL="\$(SHELL) \"$sh_libtool\"" fi lt_pversion=`$LIBTOOL --version 2>/dev/null|$SED -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'` lt_version=`echo $lt_pversion|$SED -e 's/\([a-z]*\)$/.\1/'` lt_major_version=`echo $lt_version | cut -d'.' -f 1` svn_enable_static=yes svn_enable_shared=yes # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; svn_enable_static="$enableval" else svn_enable_static="yes" fi # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; svn_enable_shared="$enableval" else svn_enable_shared="yes" fi if test "$svn_enable_static" = "yes" && test "$svn_enable_shared" = "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: building both shared and static libraries" >&5 $as_echo "$as_me: building both shared and static libraries" >&6;} elif test "$svn_enable_static" = "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: building static libraries only" >&5 $as_echo "$as_me: building static libraries only" >&6;} LT_CFLAGS="-static $LT_CFLAGS" LT_LDFLAGS="-static $LT_LDFLAGS" elif test "$svn_enable_shared" = "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: building shared libraries only" >&5 $as_echo "$as_me: building shared libraries only" >&6;} if test "$lt_major_version" = "1" ; then LT_CFLAGS="-prefer-pic $LT_CFLAGS" elif test "$lt_major_version" = "2" ; then LT_CFLAGS="-shared $LT_CFLAGS" fi LT_LDFLAGS="-shared $LT_LDFLAGS" else as_fn_error $? "cannot disable both shared and static libraries" "$LINENO" 5 fi # Check whether --enable-all-static was given. if test "${enable_all_static+set}" = set; then : enableval=$enable_all_static; if test "$enableval" = "yes" ; then LT_LDFLAGS="-all-static $LT_LDFLAGS" elif test "$enableval" != "no" ; then as_fn_error $? "--enable-all-static doesn't accept argument" "$LINENO" 5 fi fi # Check whether --enable-local-library-preloading was given. if test "${enable_local_library_preloading+set}" = set; then : enableval=$enable_local_library_preloading; if test "$enableval" != "no"; then if test "$svn_enable_shared" = "yes"; then TRANSFORM_LIBTOOL_SCRIPTS="transform-libtool-scripts" else as_fn_error $? "--enable-local-library-preloading conflicts with --disable-shared" "$LINENO" 5 fi else TRANSFORM_LIBTOOL_SCRIPTS="" fi else TRANSFORM_LIBTOOL_SCRIPTS="" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libtool needs -no-undefined" >&5 $as_echo_n "checking whether libtool needs -no-undefined... " >&6; } case $host in *-*-cygwin*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } LT_NO_UNDEFINED="-no-undefined" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } LT_NO_UNDEFINED="" ;; esac trang=yes # Check whether --with-trang was given. if test "${with_trang+set}" = set; then : withval=$with_trang; trang="$withval" fi if test "$trang" = "yes"; then # Extract the first word of "trang", so it can be a program name with args. set dummy trang; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_TRANG+:} false; then : $as_echo_n "(cached) " >&6 else case $TRANG in [\\/]* | ?:[\\/]*) ac_cv_path_TRANG="$TRANG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_TRANG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_TRANG" && ac_cv_path_TRANG="none" ;; esac fi TRANG=$ac_cv_path_TRANG if test -n "$TRANG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRANG" >&5 $as_echo "$TRANG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else TRANG="$trang" fi doxygen=yes # Check whether --with-doxygen was given. if test "${with_doxygen+set}" = set; then : withval=$with_doxygen; doxygen="$withval" fi if test "$doxygen" = "yes"; then # Extract the first word of "doxygen", so it can be a program name with args. set dummy doxygen; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DOXYGEN+:} false; then : $as_echo_n "(cached) " >&6 else case $DOXYGEN in [\\/]* | ?:[\\/]*) ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_DOXYGEN" && ac_cv_path_DOXYGEN="none" ;; esac fi DOXYGEN=$ac_cv_path_DOXYGEN if test -n "$DOXYGEN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 $as_echo "$DOXYGEN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else DOXYGEN="$doxygen" fi # Check whether --with-expat was given. if test "${with_expat+set}" = set; then : withval=$with_expat; svn_lib_expat="$withval" else svn_lib_expat="::expat" fi # APR-util accepts "builtin" as an argument to this option so if the user # passed "builtin" pretend the user didn't specify the --with-expat option # at all. Expat will (hopefully) be found in apr-util. test "_$svn_lib_expat" = "_builtin" && svn_lib_expat="::expat" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Expat" >&5 $as_echo_n "checking for Expat... " >&6; } if test -n "`echo "$svn_lib_expat" | $EGREP ":.*:"`"; then SVN_XML_INCLUDES="" for i in `echo "$svn_lib_expat" | $SED -e "s/\([^:]*\):.*/\1/"`; do SVN_XML_INCLUDES="$SVN_XML_INCLUDES -I$i" done SVN_XML_INCLUDES="${SVN_XML_INCLUDES## }" for l in `echo "$svn_lib_expat" | $SED -e "s/.*:\([^:]*\):.*/\1/"`; do LDFLAGS="$LDFLAGS -L$l" done for l in `echo "$svn_lib_expat" | $SED -e "s/.*:\([^:]*\)/\1/"`; do SVN_XML_LIBS="$SVN_XML_LIBS -l$l" done SVN_XML_LIBS="${SVN_XML_LIBS## }" old_CPPFLAGS="$CPPFLAGS" old_LIBS="$LIBS" CPPFLAGS="$CPPFLAGS $SVN_XML_INCLUDES" LIBS="$LIBS $SVN_XML_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main() {XML_ParserCreate(NULL);} _ACEOF if ac_fn_c_try_link "$LINENO"; then : svn_lib_expat="yes" else svn_lib_expat="no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$old_LIBS" if test "$svn_lib_expat" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else SVN_XML_INCLUDES="" SVN_XML_LIBS="" CPPFLAGS="$CPPFLAGS $SVN_APRUTIL_INCLUDES" if test "$enable_all_static" != "yes"; then SVN_APRUTIL_LIBS="$SVN_APRUTIL_LIBS `$apu_config --libs`" fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main() {XML_ParserCreate(NULL);} _ACEOF if ac_fn_c_try_compile "$LINENO"; then : svn_lib_expat="yes" else svn_lib_expat="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$svn_lib_expat" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Expat found amongst libraries used by APR-Util, but Subversion libraries might be needlessly linked against additional unused libraries. It can be avoided by specifying exact location of Expat in argument of --with-expat option." >&5 $as_echo "$as_me: WARNING: Expat found amongst libraries used by APR-Util, but Subversion libraries might be needlessly linked against additional unused libraries. It can be avoided by specifying exact location of Expat in argument of --with-expat option." >&2;} else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "Expat not found" "$LINENO" 5 fi fi CPPFLAGS="$old_CPPFLAGS" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if test "$svn_lib_expat" = "yes"; then as_fn_error $? "--with-expat option requires argument" "$LINENO" 5 elif test "$svn_lib_expat" = "no"; then as_fn_error $? "Expat is required" "$LINENO" 5 else as_fn_error $? "Invalid syntax of argument of --with-expat option" "$LINENO" 5 fi fi # Berkeley DB on SCO OpenServer needs -lsocket { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 $as_echo_n "checking for socket in -lsocket... " >&6; } if ${ac_cv_lib_socket_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char socket (); int main () { return socket (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_socket=yes else ac_cv_lib_socket_socket=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 $as_echo "$ac_cv_lib_socket_socket" >&6; } if test "x$ac_cv_lib_socket_socket" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSOCKET 1 _ACEOF LIBS="-lsocket $LIBS" fi # Build the BDB filesystem library only if we have an appropriate # version of Berkeley DB. case "$host" in powerpc-apple-darwin*) # Berkeley DB 4.0 does not work on OS X. SVN_FS_WANT_DB_MAJOR=4 SVN_FS_WANT_DB_MINOR=1 SVN_FS_WANT_DB_PATCH=25 ;; *) SVN_FS_WANT_DB_MAJOR=4 SVN_FS_WANT_DB_MINOR=0 SVN_FS_WANT_DB_PATCH=14 ;; esac db_alt_version="5.x" # Look for libdb4.so first: db_version=$SVN_FS_WANT_DB_MAJOR.$SVN_FS_WANT_DB_MINOR.$SVN_FS_WANT_DB_PATCH # Check whether --with-berkeley-db was given. if test "${with_berkeley_db+set}" = set; then : withval=$with_berkeley_db; if test "$withval" = "no"; then bdb_status=skip elif test "$withval" = "yes"; then apu_db_version="`$apu_config --db-version`" if test $? -ne 0; then as_fn_error $? "Can't determine whether apr-util is linked against a proper version of Berkeley DB." "$LINENO" 5 fi if test "$withval" = "yes"; then if test "$apu_db_version" -lt "4"; then as_fn_error $? "APR-UTIL was linked against Berkeley DB version $apu_db_version, while version 4 or higher is required. Reinstall APR-UTIL with the appropriate options." "$LINENO" 5 fi bdb_status=required elif test "$apu_found" != "reconfig"; then if test "$apu_db_version" -lt 4; then as_fn_error $? "APR-UTIL was installed independently, it won't be possible to use the specified Berkeley DB: $withval" "$LINENO" 5 fi bdb_status=required fi else if echo "$withval" | $EGREP ":.*:.*:" > /dev/null; then svn_berkeley_db_header="`echo "$withval" | $SED -e "s/\([^:]*\):.*/\1/"`" SVN_DB_INCLUDES="" for i in `echo "$withval" | $SED -e "s/.*:\([^:]*\):[^:]*:.*/\1/"`; do SVN_DB_INCLUDES="$SVN_DB_INCLUDES -I$i" done SVN_DB_INCLUDES="${SVN_DB_INCLUDES## }" for l in `echo "$withval" | $SED -e "s/.*:[^:]*:\([^:]*\):.*/\1/"`; do LDFLAGS="$LDFLAGS ` input_flags="-L$l" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi `" done SVN_DB_LIBS="" for l in `echo "$withval" | $SED -e "s/.*:\([^:]*\)/\1/"`; do SVN_DB_LIBS="$SVN_DB_LIBS -l$l" done SVN_DB_LIBS="${SVN_DB_LIBS## }" bdb_status=required else as_fn_error $? "Invalid syntax of argument of --with-berkeley-db option" "$LINENO" 5 fi fi else # No --with-berkeley-db option: # # Check if APR-UTIL is providing the correct Berkeley DB version # for us. # apu_db_version="`$apu_config --db-version`" if test $? -ne 0; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Detected older version of APR-UTIL, trying to determine whether apr-util is linked against Berkeley DB $db_version" >&5 $as_echo "$as_me: WARNING: Detected older version of APR-UTIL, trying to determine whether apr-util is linked against Berkeley DB $db_version" >&2;} bdb_status=try-link elif test "$apu_db_version" -lt "4"; then bdb_status=skip else bdb_status=try-link fi fi if test "$bdb_status" = "skip"; then svn_lib_berkeley_db=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for availability of Berkeley DB" >&5 $as_echo_n "checking for availability of Berkeley DB... " >&6; } # Check whether --enable-bdb6 was given. if test "${enable_bdb6+set}" = set; then : enableval=$enable_bdb6; enable_bdb6=$enableval else enable_bdb6=unspecified fi svn_lib_berkeley_db_try_save_cppflags="$CPPFLAGS" svn_lib_berkeley_db_try_save_libs="$LIBS" svn_check_berkeley_db_major=$SVN_FS_WANT_DB_MAJOR svn_check_berkeley_db_minor=$SVN_FS_WANT_DB_MINOR svn_check_berkeley_db_patch=$SVN_FS_WANT_DB_PATCH enable_bdb6=$enable_bdb6 if test -z "$SVN_DB_LIBS"; then # We pass --dbm-libs here since Debian has modified apu-config not # to return -ldb unless --dbm-libs is passed. This may also produce # extra output beyond -ldb but since we're only filtering for -ldb # it won't matter to us. However, --dbm-libs was added to apu-config # in 1.3.8 so it's possible the version we have doesn't support it # so fallback without it if we get an error. svn_db_libs_prefiltered="`$apu_config --libs --dbm-libs`" if test $? -ne 0; then svn_db_libs_prefiltered="`$apu_config --libs`" fi # Extract only the -ldb.* flag from the libs supplied by apu-config # Otherwise we get bit by the fact that expat might not be built yet # Or that it resides in a non-standard location which we would have # to compensate with using something like -R`$apu_config --prefix`/lib. # SVN_DB_LIBS="`echo \"$svn_db_libs_prefiltered\" | $SED -e 's/.*\(-ldb[^[:space:]]*\).*/\1/' | $EGREP -- '-ldb[^[:space:]]*'`" fi CPPFLAGS="$SVN_DB_INCLUDES $SVN_APRUTIL_INCLUDES $CPPFLAGS" LIBS="`$apu_config --ldflags` $SVN_DB_LIBS $LIBS" if test -n "$svn_berkeley_db_header"; then SVN_DB_HEADER="#include <$svn_berkeley_db_header>" svn_db_header="#include <$svn_berkeley_db_header>" else SVN_DB_HEADER="#include " svn_db_header="#define APU_WANT_DB #include " fi if test "$cross_compiling" = yes; then : svn_have_berkeley_db=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include $svn_db_header int main () { int major, minor, patch; db_version (&major, &minor, &patch); /* Sanity check: ensure that db.h constants actually match the db library */ if (major != DB_VERSION_MAJOR || minor != DB_VERSION_MINOR || patch != DB_VERSION_PATCH) exit (1); /* Block Berkeley DB 6, because (a) we haven't tested with it, (b) 6.0.20 and newer are under the AGPL, and we want use of AGPL dependencies to be opt-in. */ if (major >= 6 && strcmp("$enable_bdb6", "yes")) exit(2); /* Run-time check: ensure the library claims to be the correct version. */ if (major < $svn_check_berkeley_db_major) exit (1); if (major > $svn_check_berkeley_db_major) exit (0); if (minor < $svn_check_berkeley_db_minor) exit (1); if (minor > $svn_check_berkeley_db_minor) exit (0); if (patch >= $svn_check_berkeley_db_patch) exit (0); else exit (1); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : svn_have_berkeley_db=yes else rc=$? svn_have_berkeley_db=no if test $rc = 2; then svn_have_berkeley_db=no6 fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi CPPFLAGS="$svn_lib_berkeley_db_try_save_cppflags" LIBS="$svn_lib_berkeley_db_try_save_libs" if test "$svn_have_berkeley_db" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } svn_lib_berkeley_db=yes else if test "$svn_have_berkeley_db" = "no6"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (found version 6, but --enable-bdb6 not specified)" >&5 $as_echo "no (found version 6, but --enable-bdb6 not specified)" >&6; } # A warning will be printed at the end of configure.ac. else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi svn_lib_berkeley_db=no if test "$bdb_status" = "required"; then as_fn_error $? "Berkeley DB $db_version or $db_alt_version wasn't found." "$LINENO" 5 fi fi fi cat >>confdefs.h <<_ACEOF #define SVN_FS_WANT_DB_MAJOR $SVN_FS_WANT_DB_MAJOR _ACEOF cat >>confdefs.h <<_ACEOF #define SVN_FS_WANT_DB_MINOR $SVN_FS_WANT_DB_MINOR _ACEOF cat >>confdefs.h <<_ACEOF #define SVN_FS_WANT_DB_PATCH $SVN_FS_WANT_DB_PATCH _ACEOF # Check whether --with-sasl was given. if test "${with_sasl+set}" = set; then : withval=$with_sasl; with_sasl="$withval" required="yes" else with_sasl="yes" required="no" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to look for SASL" >&5 $as_echo_n "checking whether to look for SASL... " >&6; } if test "${with_sasl}" = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } svn_lib_sasl=no else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } saved_LDFLAGS="$LDFLAGS" saved_CPPFLAGS="$CPPFLAGS" if test "$with_sasl" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: Looking in default locations" >&5 $as_echo "$as_me: Looking in default locations" >&6;} ac_fn_c_check_header_mongrel "$LINENO" "sasl/sasl.h" "ac_cv_header_sasl_sasl_h" "$ac_includes_default" if test "x$ac_cv_header_sasl_sasl_h" = xyes; then : ac_fn_c_check_header_mongrel "$LINENO" "sasl/saslutil.h" "ac_cv_header_sasl_saslutil_h" "$ac_includes_default" if test "x$ac_cv_header_sasl_saslutil_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prop_get in -lsasl2" >&5 $as_echo_n "checking for prop_get in -lsasl2... " >&6; } if ${ac_cv_lib_sasl2_prop_get+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsasl2 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char prop_get (); int main () { return prop_get (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_sasl2_prop_get=yes else ac_cv_lib_sasl2_prop_get=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl2_prop_get" >&5 $as_echo "$ac_cv_lib_sasl2_prop_get" >&6; } if test "x$ac_cv_lib_sasl2_prop_get" = xyes; then : svn_lib_sasl=yes else svn_lib_sasl=no fi else svn_lib_sasl=no fi else svn_lib_sasl=no fi if test "$svn_lib_sasl" = "no"; then with_sasl="/usr/local" fi else svn_lib_sasl=no fi if test "$svn_lib_sasl" = "no"; then SVN_SASL_INCLUDES="-I${with_sasl}/include" CPPFLAGS="$CPPFLAGS $SVN_SASL_INCLUDES" LDFLAGS="$LDFLAGS ` input_flags="-L${with_sasl}/lib" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi `" ac_fn_c_check_header_mongrel "$LINENO" "sasl/sasl.h" "ac_cv_header_sasl_sasl_h" "$ac_includes_default" if test "x$ac_cv_header_sasl_sasl_h" = xyes; then : ac_fn_c_check_header_mongrel "$LINENO" "sasl/saslutil.h" "ac_cv_header_sasl_saslutil_h" "$ac_includes_default" if test "x$ac_cv_header_sasl_saslutil_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prop_get in -lsasl2" >&5 $as_echo_n "checking for prop_get in -lsasl2... " >&6; } if ${ac_cv_lib_sasl2_prop_get+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsasl2 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char prop_get (); int main () { return prop_get (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_sasl2_prop_get=yes else ac_cv_lib_sasl2_prop_get=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl2_prop_get" >&5 $as_echo "$ac_cv_lib_sasl2_prop_get" >&6; } if test "x$ac_cv_lib_sasl2_prop_get" = xyes; then : svn_lib_sasl=yes else svn_lib_sasl=no fi else svn_lib_sasl=no fi else svn_lib_sasl=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for availability of Cyrus SASL v2" >&5 $as_echo_n "checking for availability of Cyrus SASL v2... " >&6; } if test "$svn_lib_sasl" = "yes"; then SVN_SASL_LIBS="-lsasl2" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if test "$required" = "yes"; then as_fn_error $? "Could not find Cyrus SASL v2" "$LINENO" 5 fi SVN_SASL_INCLUDES="" LDFLAGS="$saved_LDFLAGS" fi CPPFLAGS="$saved_CPPFLAGS" fi if test "$svn_lib_sasl" = "yes"; then $as_echo "#define SVN_HAVE_SASL 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O dynamic module iteration functions" >&5 $as_echo_n "checking for Mach-O dynamic module iteration functions... " >&6; } if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { const struct mach_header *header = _dyld_get_image_header(0); const char *name = _dyld_get_image_name(0); if (name && header) return 0; return 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : $as_echo "#define SVN_HAVE_MACHO_ITERATE 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS property list utilities" >&5 $as_echo_n "checking for Mac OS property list utilities... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) \ || !defined(MAC_OS_X_VERSION_10_0) \ || (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_0) #error ProperyList API unavailable. #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : LIBS="$LIBS -framework CoreFoundation" $as_echo "#define SVN_HAVE_MACOS_PLIST 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Check whether --enable-keychain was given. if test "${enable_keychain+set}" = set; then : enableval=$enable_keychain; enable_keychain=$enableval else enable_keychain=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS KeyChain Services" >&5 $as_echo_n "checking for Mac OS KeyChain Services... " >&6; } if test "$enable_keychain" = "yes"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if !defined(MAC_OS_X_VERSION_MAX_ALLOWED) \ || !defined(MAC_OS_X_VERSION_10_2) \ || (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_2) #error KeyChain API unavailable. #endif int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : LIBS="$LIBS -framework Security" LIBS="$LIBS -framework CoreServices" $as_echo "#define SVN_HAVE_KEYCHAIN_SERVICES 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else enable_keychain=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether APR has support for DSOs" >&5 $as_echo_n "checking whether APR has support for DSOs... " >&6; } old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if !APR_HAS_DSO #error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : APR_HAS_DSO="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else APR_HAS_DSO="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f conftest.err conftest.i conftest.$ac_ext CPPFLAGS="$old_CPPFLAGS" if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for D-Bus .pc file" >&5 $as_echo_n "checking for D-Bus .pc file... " >&6; } if $PKG_CONFIG --exists dbus-1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } old_CPPFLAGS="$CPPFLAGS" old_LIBS="$LIBS" DBUS_CPPFLAGS="`$PKG_CONFIG --cflags dbus-1`" { $as_echo "$as_me:${as_lineno-$LINENO}: checking D-Bus version" >&5 $as_echo_n "checking D-Bus version... " >&6; } DBUS_VERSION="`$PKG_CONFIG --modversion dbus-1`" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBUS_VERSION" >&5 $as_echo "$DBUS_VERSION" >&6; } # D-Bus 0.* requires DBUS_API_SUBJECT_TO_CHANGE if test -n "`echo "$DBUS_VERSION" | $EGREP '^0\.[[:digit:]]+'`"; then DBUS_CPPFLAGS="$DBUS_CPPFLAGS -DDBUS_API_SUBJECT_TO_CHANGE" fi DBUS_LIBS="`$PKG_CONFIG --libs dbus-1`" CPPFLAGS="$CPPFLAGS $DBUS_CPPFLAGS" LIBS="$LIBS $DBUS_LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for D-Bus" >&5 $as_echo_n "checking for D-Bus... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main() {dbus_bus_get(DBUS_BUS_SESSION, NULL);} _ACEOF if ac_fn_c_try_link "$LINENO"; then : HAVE_DBUS="yes" else HAVE_DBUS="no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$HAVE_DBUS" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi CPPFLAGS="$old_CPPFLAGS" LIBS="$old_LIBS" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi # Check whether --with-gpg_agent was given. if test "${with_gpg_agent+set}" = set; then : withval=$with_gpg_agent; else with_gpg_agent=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to support GPG-Agent" >&5 $as_echo_n "checking whether to support GPG-Agent... " >&6; } if test "$with_gpg_agent" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define SVN_HAVE_GPG_AGENT 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Check whether --with-old_gnome_keyring was given. if test "${with_old_gnome_keyring+set}" = set; then : withval=$with_old_gnome_keyring; with_old_gnome_keyring="$withval" else with_old_gnome_keyring=no fi found_old_gnome_keyring=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to look for old GNOME Keyring" >&5 $as_echo_n "checking whether to look for old GNOME Keyring... " >&6; } if test "$with_old_gnome_keyring" != "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } case "$host" in *-*-darwin*) if test "$with_old_gnome_keyring" = "yes"; then as_fn_error $? "--with-old-gnome-keyring is not supported on Mac OS X." "$LINENO" 5 else with_old_gnome_keyring=no fi ;; *) if test "$svn_enable_shared" = "yes"; then if test "$APR_HAS_DSO" = "yes"; then if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLib and GNOME Keyring .pc files" >&5 $as_echo_n "checking for GLib and GNOME Keyring .pc files... " >&6; } if $PKG_CONFIG --exists glib-2.0 gnome-keyring-1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } old_CPPFLAGS="$CPPFLAGS" SVN_GNOME_KEYRING_INCLUDES="`$PKG_CONFIG --cflags glib-2.0 gnome-keyring-1`" CPPFLAGS="$CPPFLAGS $SVN_GNOME_KEYRING_INCLUDES" ac_fn_c_check_header_mongrel "$LINENO" "gnome-keyring.h" "ac_cv_header_gnome_keyring_h" "$ac_includes_default" if test "x$ac_cv_header_gnome_keyring_h" = xyes; then : found_old_gnome_keyring=yes else found_old_gnome_keyring=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNOME Keyring" >&5 $as_echo_n "checking for GNOME Keyring... " >&6; } if test "$found_old_gnome_keyring" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define SVN_HAVE_GNOME_KEYRING 1" >>confdefs.h CPPFLAGS="$old_CPPFLAGS" SVN_GNOME_KEYRING_LIBS="`$PKG_CONFIG --libs glib-2.0 gnome-keyring-1`" + SVN_GNOME_KEYRING_PCLIBS="glib-2.0 gnome-keyring-1" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if test "$with_old_gnome_keyring" = "yes"; then as_fn_error $? "cannot find GNOME Keyring" "$LINENO" 5 fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if test "$with_old_gnome_keyring" = "yes"; then as_fn_error $? "cannot find GLib and GNOME Keyring .pc files." "$LINENO" 5 else with_old_gnome_keyring=no fi fi else if test "$with_old_gnome_keyring" = "yes"; then as_fn_error $? "cannot find pkg-config. GNOME Keyring requires this." "$LINENO" 5 else with_old_gnome_keyring=no fi fi else if test "$with_old_gnome_keyring" = "yes"; then as_fn_error $? "APR does not have support for DSOs. GNOME Keyring requires this." "$LINENO" 5 else with_old_gnome_keyring=no fi fi else if test "$with_old_gnome_keyring" = "yes"; then as_fn_error $? "--with-old-gnome-keyring conflicts with --disable-shared" "$LINENO" 5 else with_old_gnome_keyring=no fi fi ;; esac else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Check whether --with-gnome_keyring was given. if test "${with_gnome_keyring+set}" = set; then : withval=$with_gnome_keyring; with_gnome_keyring="$withval" else with_gnome_keyring=auto fi found_gnome_keyring="no" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to look for GNOME Keyring" >&5 $as_echo_n "checking whether to look for GNOME Keyring... " >&6; } if test "$found_old_gnome_keyring" = "yes" && test "$with_gnome_keyring" = "auto"; then with_gnome_keyring="no" fi if test "$with_gnome_keyring" != "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } case "$host" in *-*-darwin*) if test "$with_gnome_keyring" = "yes"; then as_fn_error $? "--with-gnome-keyring is not supported on Mac OS X." "$LINENO" 5 fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNOME Keyring" >&5 $as_echo_n "checking for GNOME Keyring... " >&6; } if test "$found_old_gnome_keyring" = "no"; then if test "$svn_enable_shared" = "yes"; then if test "$APR_HAS_DSO" = "yes"; then if test -n "$PKG_CONFIG"; then if $PKG_CONFIG --exists libsecret-1; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define SVN_HAVE_LIBSECRET 1" >>confdefs.h SVN_GNOME_KEYRING_INCLUDES="`$PKG_CONFIG --cflags libsecret-1`" SVN_GNOME_KEYRING_LIBS="`$PKG_CONFIG --libs libsecret-1`" + SVN_GNOME_KEYRING_PCLIBS="libsecret-1" found_gnome_keyring="yes" else if test "$with_gnome_keyring" = "yes"; then as_fn_error $? "cannot find libsecret" "$LINENO" 5 fi fi else if test "$with_gnome_keyring" = "yes"; then as_fn_error $? "cannot find pkg-config" "$LINENO" 5 fi fi else if test "$with_gnome_keyring" = "yes"; then as_fn_error $? "APR does not support DSOs" "$LINENO" 5 fi fi else if test "$with_gnome_keyring" = "yes"; then as_fn_error $? "--with-gnome-keyring conflicts with --disable-shared" "$LINENO" 5 fi fi else if test "$with_gnome_keyring" = "yes"; then as_fn_error $? "--with-gnome-keyring conflicts with --with-old-gnome-keyring" "$LINENO" 5 fi fi if test "$found_gnome_keyring" = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; esac else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi + # Check whether --enable-googlemock was given. if test "${enable_googlemock+set}" = set; then : enableval=$enable_googlemock; else enable_googlemock=yes fi GOOGLEMOCK_SRCDIR=$abs_srcdir/googlemock { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether use Googlemock" >&5 $as_echo_n "checking whether use Googlemock... " >&6; } if test "$enable_googlemock" != "no"; then if test -d "$GOOGLEMOCK_SRCDIR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SVN_USE_GOOGLEMOCK=true else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SVN_USE_GOOGLEMOCK=false fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SVN_USE_GOOGLEMOCK=false fi # Check whether --enable-ev2-impl was given. if test "${enable_ev2_impl+set}" = set; then : enableval=$enable_ev2_impl; enable_ev2_impl=$enableval else enable_ev2_impl=no fi if test "$enable_ev2_impl" = "yes"; then $as_echo "#define ENABLE_EV2_IMPL 1" >>confdefs.h fi # Check whether --enable-nls was given. if test "${enable_nls+set}" = set; then : enableval=$enable_nls; enable_nls=$enableval else enable_nls=yes fi USE_NLS="no" SVN_INTL_LIBS="" if test "$enable_nls" = "yes"; then # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MSGFMT+:} false; then : $as_echo_n "(cached) " >&6 else case $MSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="none" ;; esac fi MSGFMT=$ac_cv_path_MSGFMT if test -n "$MSGFMT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MSGMERGE+:} false; then : $as_echo_n "(cached) " >&6 else case $MSGMERGE in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE="none" ;; esac fi MSGMERGE=$ac_cv_path_MSGMERGE if test -n "$MSGMERGE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 $as_echo "$MSGMERGE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_XGETTEXT+:} false; then : $as_echo_n "(cached) " >&6 else case $XGETTEXT in [\\/]* | ?:[\\/]*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT="none" ;; esac fi XGETTEXT=$ac_cv_path_XGETTEXT if test -n "$XGETTEXT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$MSGFMT" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bindtextdomain" >&5 $as_echo_n "checking for library containing bindtextdomain... " >&6; } if ${ac_cv_search_bindtextdomain+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bindtextdomain (); int main () { return bindtextdomain (); ; return 0; } _ACEOF for ac_lib in '' intl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_bindtextdomain=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_bindtextdomain+:} false; then : break fi done if ${ac_cv_search_bindtextdomain+:} false; then : else ac_cv_search_bindtextdomain=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bindtextdomain" >&5 $as_echo "$ac_cv_search_bindtextdomain" >&6; } ac_res=$ac_cv_search_bindtextdomain if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" # in case libintl needs to be linked explicitly, # $ac_cv_search_bindtextdomain contains -l linker flags if echo "$ac_cv_search_bindtextdomain" | grep '^-l' >/dev/null then SVN_INTL_LIBS="$ac_cv_search_bindtextdomain" fi else enable_nls="no" fi if test "$enable_nls" = "no"; then # Destroy the cached result so we can test again unset ac_cv_search_bindtextdomain # On some systems, libintl needs libiconv to link properly, # so try again with -liconv. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bindtextdomain" >&5 $as_echo_n "checking for library containing bindtextdomain... " >&6; } if ${ac_cv_search_bindtextdomain+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bindtextdomain (); int main () { return bindtextdomain (); ; return 0; } _ACEOF for ac_lib in '' intl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib -liconv $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_bindtextdomain=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_bindtextdomain+:} false; then : break fi done if ${ac_cv_search_bindtextdomain+:} false; then : else ac_cv_search_bindtextdomain=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bindtextdomain" >&5 $as_echo "$ac_cv_search_bindtextdomain" >&6; } ac_res=$ac_cv_search_bindtextdomain if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" enable_nls="yes" if echo "$ac_cv_search_bindtextdomain" | grep '^-l' >/dev/null then SVN_INTL_LIBS="$ac_cv_search_bindtextdomain" fi # This is here so that -liconv ends up in LIBS # if it worked with -liconv. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libiconv_open in -liconv" >&5 $as_echo_n "checking for libiconv_open in -liconv... " >&6; } if ${ac_cv_lib_iconv_libiconv_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-liconv $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char libiconv_open (); int main () { return libiconv_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_iconv_libiconv_open=yes else ac_cv_lib_iconv_libiconv_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_libiconv_open" >&5 $as_echo "$ac_cv_lib_iconv_libiconv_open" >&6; } if test "x$ac_cv_lib_iconv_libiconv_open" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBICONV 1 _ACEOF LIBS="-liconv $LIBS" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: bindtextdomain() not found. Disabling NLS." >&5 $as_echo "$as_me: WARNING: bindtextdomain() not found. Disabling NLS." >&2;} enable_nls="no" fi fi if test "$enable_nls" = "yes"; then $as_echo "#define ENABLE_NLS 1" >>confdefs.h USE_NLS="yes" fi fi fi GETTEXT_CODESET=\# NO_GETTEXT_CODESET=\# if test $USE_NLS = "yes"; then for ac_func in bind_textdomain_codeset do : ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BIND_TEXTDOMAIN_CODESET 1 _ACEOF GETTEXT_CODESET="" else NO_GETTEXT_CODESET="" fi done fi # Check if we are using GNU gettext. GNU_GETTEXT=no MSGFMTFLAGS='' if test $USE_NLS = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we are using GNU gettext" >&5 $as_echo_n "checking if we are using GNU gettext... " >&6; } if $MSGFMT --version 2>&1 | $EGREP GNU > /dev/null; then GNU_GETTEXT=yes MSGFMTFLAGS='-c' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNU_GETTEXT" >&5 $as_echo "$GNU_GETTEXT" >&6; } fi libmagic_found=no # Check whether --with-libmagic was given. if test "${with_libmagic+set}" = set; then : withval=$with_libmagic; if test "$withval" = "yes" ; then ac_fn_c_check_header_mongrel "$LINENO" "magic.h" "ac_cv_header_magic_h" "$ac_includes_default" if test "x$ac_cv_header_magic_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for magic_open in -lmagic" >&5 $as_echo_n "checking for magic_open in -lmagic... " >&6; } if ${ac_cv_lib_magic_magic_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmagic $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char magic_open (); int main () { return magic_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_magic_magic_open=yes else ac_cv_lib_magic_magic_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_magic_magic_open" >&5 $as_echo "$ac_cv_lib_magic_magic_open" >&6; } if test "x$ac_cv_lib_magic_magic_open" = xyes; then : libmagic_found="builtin" fi fi libmagic_prefix="the default locations" elif test "$withval" != "no"; then libmagic_prefix=$withval save_cppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$libmagic_prefix/include" for ac_header in magic.h do : ac_fn_c_check_header_mongrel "$LINENO" "magic.h" "ac_cv_header_magic_h" "$ac_includes_default" if test "x$ac_cv_header_magic_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MAGIC_H 1 _ACEOF save_ldflags="$LDFLAGS" LDFLAGS="-L$libmagic_prefix/lib $LDFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for magic_open in -lmagic" >&5 $as_echo_n "checking for magic_open in -lmagic... " >&6; } if ${ac_cv_lib_magic_magic_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmagic $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char magic_open (); int main () { return magic_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_magic_magic_open=yes else ac_cv_lib_magic_magic_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_magic_magic_open" >&5 $as_echo "$ac_cv_lib_magic_magic_open" >&6; } if test "x$ac_cv_lib_magic_magic_open" = xyes; then : libmagic_found="yes" fi LDFLAGS="$save_ldflags" fi done CPPFLAGS="$save_cppflags" fi if test "$withval" != "no" && test "$libmagic_found" = "no"; then as_fn_error $? "--with-libmagic requested, but libmagic not found at $libmagic_prefix" "$LINENO" 5 fi else ac_fn_c_check_header_mongrel "$LINENO" "magic.h" "ac_cv_header_magic_h" "$ac_includes_default" if test "x$ac_cv_header_magic_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for magic_open in -lmagic" >&5 $as_echo_n "checking for magic_open in -lmagic... " >&6; } if ${ac_cv_lib_magic_magic_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmagic $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char magic_open (); int main () { return magic_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_magic_magic_open=yes else ac_cv_lib_magic_magic_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_magic_magic_open" >&5 $as_echo "$ac_cv_lib_magic_magic_open" >&6; } if test "x$ac_cv_lib_magic_magic_open" = xyes; then : libmagic_found="builtin" fi fi fi if test "$libmagic_found" != "no"; then $as_echo "#define SVN_HAVE_LIBMAGIC 1" >>confdefs.h SVN_MAGIC_LIBS="-lmagic" fi if test "$libmagic_found" = "yes"; then SVN_MAGIC_INCLUDES="-I$libmagic_prefix/include" LDFLAGS="$LDFLAGS ` input_flags="-L$libmagic_prefix/lib" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi `" fi # Check whether --with-kwallet was given. if test "${with_kwallet+set}" = set; then : withval=$with_kwallet; svn_lib_kwallet="$withval" else svn_lib_kwallet=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to look for KWallet" >&5 $as_echo_n "checking whether to look for KWallet... " >&6; } if test "$svn_lib_kwallet" != "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } case "$host" in *-*-darwin*) as_fn_error $? "--with-kwallet is not supported on Mac OS X." "$LINENO" 5 ;; *) if test "$svn_enable_shared" = "yes"; then if test "$APR_HAS_DSO" = "yes"; then if test -n "$PKG_CONFIG"; then if test "$HAVE_DBUS" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt" >&5 $as_echo_n "checking for Qt... " >&6; } if $PKG_CONFIG --exists Qt5Core Qt5DBus Qt5Gui; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, Qt5" >&5 $as_echo "yes, Qt5" >&6; } qt_pkg_config_names="Qt5Core Qt5DBus Qt5Gui" kde_config_name="kf5-config" kde_inc_names="KF5/KWallet KF5/KCoreAddons KF5/KI18n" kde_lib_names="-lKF5Wallet -lKF5I18n -lKF5CoreAddons -lQt5Gui -lQt5DBus -lQt5Core" elif $PKG_CONFIG --exists QtCore QtDBus QtGui; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, Qt4" >&5 $as_echo "yes, Qt4" >&6; } qt_pkg_config_names="QtCore QtDBus QtGui" kde_config_name="kde4-config" kde_inc_names="/" kde_lib_names="-lkdeui -lkdecore -lQtGui -lQtDBus -lQtCore" fi if test -n "$qt_pkg_config_names"; then if test "$svn_lib_kwallet" != "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $kde_config_name" >&5 $as_echo_n "checking for $kde_config_name... " >&6; } KDE_CONFIG="$svn_lib_kwallet/bin/$kde_config_name" if test -f "$KDE_CONFIG" && test -x "$KDE_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else if echo "$svn_lib_kwallet" | $EGREP ":" > /dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: unneeded" >&5 $as_echo "unneeded" >&6; } KDE_CONFIG="unneeded" kde_incdir="`echo "$svn_lib_kwallet" | $SED -e "s/:.*//"`" kde_libdir="`echo "$svn_lib_kwallet" | $SED -e "s/.*://"`" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } KDE_CONFIG="" fi fi else # Extract the first word of "$kde_config_name", so it can be a program name with args. set dummy $kde_config_name; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_KDE_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $KDE_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_KDE_CONFIG="$KDE_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_KDE_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi KDE_CONFIG=$ac_cv_path_KDE_CONFIG if test -n "$KDE_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KDE_CONFIG" >&5 $as_echo "$KDE_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -n "$KDE_CONFIG"; then kde_incdir="`$KDE_CONFIG --install include`" kde_libdir="`$KDE_CONFIG --install lib`" fi fi if test -n "$KDE_CONFIG"; then if test $kde_config_name = "kf5-config"; then CXXFLAGS_KEEP="$CXXFLAGS" CXXFLAGS="" if test "$GXX" = "yes"; then _svn_xxflags__save="$CXXFLAGS" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -std=c++11" >&5 $as_echo_n "checking if $CXX accepts -std=c++11... " >&6; } CXXFLAGS="-std=c++11 $CXXFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(){} _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CXXFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi CXXMODEFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS_KEEP" fi old_CXXFLAGS="$CXXFLAGS" old_LDFLAGS="$LDFLAGS" old_LIBS="$LIBS" CXXFLAGS="$CXXFLAGS $CXXMODEFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for KWallet" >&5 $as_echo_n "checking for KWallet... " >&6; } for d in `$PKG_CONFIG --cflags $qt_pkg_config_names`; do if test -n "`echo "$d" | $EGREP -- '^-D[^[:space:]]*'`"; then CPPFLAGS="$CPPFLAGS $d" fi done qt_include_dirs="`$PKG_CONFIG --cflags-only-I $qt_pkg_config_names`" for kde_inc_name in $kde_inc_names; do kde_kwallet_includes="$kde_kwallet_includes -I$kde_incdir/$kde_inc_name" done SVN_KWALLET_INCLUDES="$DBUS_CPPFLAGS $qt_include_dirs $kde_kwallet_includes" qt_libs_other_options="`$PKG_CONFIG --libs-only-other $qt_pkg_config_names`" SVN_KWALLET_LIBS="$DBUS_LIBS $kde_lib_names $qt_libs_other_options" CXXFLAGS="$CXXFLAGS $SVN_KWALLET_INCLUDES -fPIC" LIBS="$LIBS $SVN_KWALLET_LIBS" qt_lib_dirs="`$PKG_CONFIG --libs-only-L $qt_pkg_config_names`" LDFLAGS="$old_LDFLAGS ` input_flags="$qt_lib_dirs -L$kde_libdir" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi `" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main() {KWallet::Wallet::walletList();} _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : svn_lib_kwallet="yes" else svn_lib_kwallet="no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "$svn_lib_kwallet" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } CXXFLAGS="$old_CXXFLAGS" LIBS="$old_LIBS" if test "$kde_config_name" = "kf5-config"; then $as_echo "#define SVN_HAVE_KF5 1" >>confdefs.h fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "cannot find KWallet" "$LINENO" 5 fi else as_fn_error $? "cannot find $kde_config_name" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "cannot find Qt" "$LINENO" 5 fi else as_fn_error $? "cannot find D-Bus" "$LINENO" 5 fi else as_fn_error $? "cannot find pkg-config" "$LINENO" 5 fi else as_fn_error $? "APR does not have support for DSOs" "$LINENO" 5 fi else as_fn_error $? "--with-kwallet conflicts with --disable-shared" "$LINENO" 5 fi ;; esac else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$svn_lib_kwallet" = "yes"; then $as_echo "#define SVN_HAVE_KWALLET 1" >>confdefs.h fi # Check whether --enable-plaintext-password-storage was given. if test "${enable_plaintext_password_storage+set}" = set; then : enableval=$enable_plaintext_password_storage; if test "$enableval" = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: Disabling plaintext password/passphrase storage" >&5 $as_echo "$as_me: Disabling plaintext password/passphrase storage" >&6;} $as_echo "#define SVN_DISABLE_PLAINTEXT_PASSWORD_STORAGE 1" >>confdefs.h fi fi INSTALL_STATIC_RULES="install-bin install-docs" INSTALL_RULES="install-fsmod-lib install-ramod-lib install-lib install-include install-static" INSTALL_RULES="$INSTALL_RULES $INSTALL_APACHE_RULE" BUILD_RULES="fsmod-lib ramod-lib lib bin test sub-test $BUILD_APACHE_RULE tools" if test "$svn_lib_berkeley_db" = "yes"; then BUILD_RULES="$BUILD_RULES bdb-lib bdb-test" INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-fsmod-lib/install-fsmod-lib install-bdb-lib/'`" INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-bdb-lib" BDB_TEST_DEPS="\$(BDB_TEST_DEPS)" BDB_TEST_PROGRAMS="\$(BDB_TEST_PROGRAMS)" fi if test "$svn_lib_serf" = "yes"; then BUILD_RULES="$BUILD_RULES serf-lib" INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-ramod-lib/install-ramod-lib install-serf-lib/'`" INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-serf-lib" fi if test "$svn_lib_kwallet" = "yes"; then BUILD_RULES="$BUILD_RULES kwallet-lib" INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-lib/install-lib install-kwallet-lib/'`" INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-kwallet-lib" fi if test "$found_old_gnome_keyring" = "yes" || test "$found_gnome_keyring" = "yes"; then BUILD_RULES="$BUILD_RULES gnome-keyring-lib" INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-lib/install-lib install-gnome-keyring-lib/'`" INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-gnome-keyring-lib" fi if test "$USE_NLS" = "yes"; then BUILD_RULES="$BUILD_RULES locale" INSTALL_RULES="$INSTALL_RULES install-locale" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5 $as_echo_n "checking for working memcmp... " >&6; } if ${ac_cv_func_memcmp_working+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_memcmp_working=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Some versions of memcmp are not 8-bit clean. */ char c0 = '\100', c1 = '\200', c2 = '\201'; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) return 1; /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. William Lewis provided this test program. */ { char foo[21]; char bar[21]; int i; for (i = 0; i < 4; i++) { char *a = foo + i; char *b = bar + i; strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) return 1; } return 0; } ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_memcmp_working=yes else ac_cv_func_memcmp_working=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5 $as_echo "$ac_cv_func_memcmp_working" >&6; } test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in *" memcmp.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; esac for ac_func in vprintf do : ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" if test "x$ac_cv_func_vprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VPRINTF 1 _ACEOF ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" if test "x$ac_cv_func__doprnt" = xyes; then : $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h fi fi done for ac_func in symlink readlink do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in sys/utsname.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default" if test "x$ac_cv_header_sys_utsname_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_UTSNAME_H 1 _ACEOF for ac_func in uname do : ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname" if test "x$ac_cv_func_uname" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UNAME 1 _ACEOF fi done fi done ac_fn_c_check_header_mongrel "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default" if test "x$ac_cv_header_termios_h" = xyes; then : for ac_func in tcgetattr tcsetattr do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF $as_echo "#define HAVE_TERMIOS_H 1" >>confdefs.h fi done fi # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; if test "$enableval" = "yes" ; then enable_debugging="yes" else enable_debugging="no" fi else # Neither --enable-debug nor --disable-debug was passed. enable_debugging="maybe" fi # Check whether --enable-optimize was given. if test "${enable_optimize+set}" = set; then : enableval=$enable_optimize; if test "$enableval" = "yes" ; then enable_optimization="yes" else enable_optimization="no" fi else # Neither --enable-optimize nor --disable-optimize was passed. enable_optimization="maybe" fi # Check whether --enable-disallowing-of-undefined-references was given. if test "${enable_disallowing_of_undefined_references+set}" = set; then : enableval=$enable_disallowing_of_undefined_references; fi if test "$enable_disallowing_of_undefined_references" != "yes" && test "`uname`" != "Linux"; then enable_disallowing_of_undefined_references="no" fi if test "$enable_disallowing_of_undefined_references" != "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-undefined" >&5 $as_echo_n "checking for -Wl,--no-undefined... " >&6; } old_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -Wl,--no-undefined" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(){;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : svn_wl_no_undefined="yes" else svn_wl_no_undefined="no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$old_LDFLAGS" if test "$svn_wl_no_undefined" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } for library_dir in "$abs_srcdir/subversion/libsvn_"*; do eval "`basename $library_dir`_LDFLAGS=-Wl,--no-undefined" done shared_only_LDFLAGS="-Wl,--no-undefined" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if test "$enable_disallowing_of_undefined_references" = "yes"; then as_fn_error $? "--enable-disallowing-of-undefined-references explicitly requested, but -Wl,--no-undefined not supported" "$LINENO" 5 fi fi fi # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; if test "$enableval" = "yes" ; then if test "$enable_debugging" = "no" ; then as_fn_error $? "Can't have --disable-debug and --enable-maintainer-mode" "$LINENO" 5 fi enable_debugging=yes if test "$GCC" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: maintainer-mode: adding GCC warning flags" >&5 $as_echo "$as_me: maintainer-mode: adding GCC warning flags" >&6;} CFLAGS_KEEP="$CFLAGS" CFLAGS="" _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -Werror=implicit-function-declaration" >&5 $as_echo_n "checking if $CC accepts -Werror=implicit-function-declaration... " >&6; } CFLAGS="-Werror=implicit-function-declaration $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -Werror=declaration-after-statement" >&5 $as_echo_n "checking if $CC accepts -Werror=declaration-after-statement... " >&6; } CFLAGS="-Werror=declaration-after-statement $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -Wextra-tokens" >&5 $as_echo_n "checking if $CC accepts -Wextra-tokens... " >&6; } CFLAGS="-Wextra-tokens $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -Wnewline-eof" >&5 $as_echo_n "checking if $CC accepts -Wnewline-eof... " >&6; } CFLAGS="-Wnewline-eof $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -Wshorten-64-to-32" >&5 $as_echo_n "checking if $CC accepts -Wshorten-64-to-32... " >&6; } CFLAGS="-Wshorten-64-to-32 $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -Wold-style-definition" >&5 $as_echo_n "checking if $CC accepts -Wold-style-definition... " >&6; } CFLAGS="-Wold-style-definition $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -Wno-system-headers" >&5 $as_echo_n "checking if $CC accepts -Wno-system-headers... " >&6; } CFLAGS="-Wno-system-headers $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -Wno-format-nonliteral" >&5 $as_echo_n "checking if $CC accepts -Wno-format-nonliteral... " >&6; } CFLAGS="-Wno-format-nonliteral $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -Wmissing-variable-declarations" >&5 $as_echo_n "checking if $CC accepts -Wmissing-variable-declarations... " >&6; } CFLAGS="-Wmissing-variable-declarations $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -Wno-unused-const-variable" >&5 $as_echo_n "checking if $CC accepts -Wno-unused-const-variable... " >&6; } CFLAGS="-Wno-unused-const-variable $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CMAINTAINERFLAGS="$CFLAGS" CFLAGS="$CFLAGS_KEEP" CMAINTAINERFLAGS="-Wall -Wpointer-arith -Wwrite-strings -Wshadow -Wformat=2 -Wunused -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wno-multichar -Wredundant-decls -Wnested-externs -Winline -Wno-long-long -Wbad-function-cast $CMAINTAINERFLAGS" fi if test "$GXX" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: maintainer-mode: adding G++ warning flags" >&5 $as_echo "$as_me: maintainer-mode: adding G++ warning flags" >&6;} CXXFLAGS_KEEP="$CXXFLAGS" CXXFLAGS="" _svn_xxflags__save="$CXXFLAGS" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -Wextra-tokens" >&5 $as_echo_n "checking if $CXX accepts -Wextra-tokens... " >&6; } CXXFLAGS="-Wextra-tokens $CXXFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(){} _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CXXFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu _svn_xxflags__save="$CXXFLAGS" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -Wnewline-eof" >&5 $as_echo_n "checking if $CXX accepts -Wnewline-eof... " >&6; } CXXFLAGS="-Wnewline-eof $CXXFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(){} _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CXXFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu _svn_xxflags__save="$CXXFLAGS" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -Wshorten-64-to-32" >&5 $as_echo_n "checking if $CXX accepts -Wshorten-64-to-32... " >&6; } CXXFLAGS="-Wshorten-64-to-32 $CXXFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(){} _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CXXFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu _svn_xxflags__save="$CXXFLAGS" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -Wno-system-headers" >&5 $as_echo_n "checking if $CXX accepts -Wno-system-headers... " >&6; } CXXFLAGS="-Wno-system-headers $CXXFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(){} _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CXXFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CXXMAINTAINERFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS_KEEP" CXXMAINTAINERFLAGS="-Wall -Wpointer-arith -Wwrite-strings -Wshadow -Wunused -Wunreachable-code $CXXMAINTAINERFLAGS" fi fi fi if test "$enable_debugging" = "yes" ; then if test "$enable_optimization" != "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: Disabling optimizations for debugging" >&5 $as_echo "$as_me: Disabling optimizations for debugging" >&6;} CFLAGS="`echo $CFLAGS' ' | $SED -e 's/-O[^ ]* //g'`" CXXFLAGS="`echo $CXXFLAGS' ' | $SED -e 's/-O[^ ]* //g'`" fi if test -z "`echo $CUSERFLAGS' ' | $EGREP -- '-g[0-9]? '`"; then { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling debugging for C" >&5 $as_echo "$as_me: Enabling debugging for C" >&6;} CFLAGS="`echo $CFLAGS' ' | $SED -e 's/-g[0-9] //g' -e 's/-g //g'`" _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-inline" >&5 $as_echo_n "checking if $CC accepts -fno-inline... " >&6; } CFLAGS="-fno-inline $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-omit-frame-pointer" >&5 $as_echo_n "checking if $CC accepts -fno-omit-frame-pointer... " >&6; } CFLAGS="-fno-omit-frame-pointer $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -g3" >&5 $as_echo_n "checking if $CC accepts -g3... " >&6; } CFLAGS="-g3 $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -g2" >&5 $as_echo_n "checking if $CC accepts -g2... " >&6; } CFLAGS="-g2 $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -g" >&5 $as_echo_n "checking if $CC accepts -g... " >&6; } CFLAGS="-g $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi if test -z "`echo $CXXUSERFLAGS' ' | $EGREP -- '-g[0-9]? '`"; then { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling debugging for C++" >&5 $as_echo "$as_me: Enabling debugging for C++" >&6;} CXXFLAGS="`echo $CXXFLAGS' ' | $SED -e 's/-g[0-9] //g' -e 's/-g //g'`" _svn_xxflags__save="$CXXFLAGS" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -fno-inline" >&5 $as_echo_n "checking if $CXX accepts -fno-inline... " >&6; } CXXFLAGS="-fno-inline $CXXFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(){} _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CXXFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu _svn_xxflags__save="$CXXFLAGS" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -fno-omit-frame-pointer" >&5 $as_echo_n "checking if $CXX accepts -fno-omit-frame-pointer... " >&6; } CXXFLAGS="-fno-omit-frame-pointer $CXXFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(){} _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CXXFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu _svn_xxflags__save="$CXXFLAGS" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -g3" >&5 $as_echo_n "checking if $CXX accepts -g3... " >&6; } CXXFLAGS="-g3 $CXXFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(){} _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CXXFLAGS="$_svn_xxflags__save" _svn_xxflags__save="$CXXFLAGS" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -g2" >&5 $as_echo_n "checking if $CXX accepts -g2... " >&6; } CXXFLAGS="-g2 $CXXFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(){} _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CXXFLAGS="$_svn_xxflags__save" _svn_xxflags__save="$CXXFLAGS" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -g" >&5 $as_echo_n "checking if $CXX accepts -g... " >&6; } CXXFLAGS="-g $CXXFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(){} _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CXXFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi CFLAGS="$CFLAGS -DSVN_DEBUG -DAP_DEBUG" CXXFLAGS="$CXXFLAGS -DSVN_DEBUG -DAP_DEBUG" elif test "$enable_debugging" = "no" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: Disabling debugging" >&5 $as_echo "$as_me: Disabling debugging" >&6;} CFLAGS="`echo $CFLAGS' ' | $SED -e 's/-g[0-9] //g' -e 's/-g //g'`" CXXFLAGS="`echo $CXXFLAGS' ' | $SED -e 's/-g[0-9] //g' -e 's/-g //g'`" CFLAGS="$CFLAGS -DNDEBUG" CXXFLAGS="$CXXFLAGS -DNDEBUG" # elif test "$enable_debugging" = "maybe" ; then # # do nothing fi if test "$enable_optimization" = "yes"; then if test -z "`echo $CUSERFLAGS' ' | $EGREP -- '-O[^ ]* '`"; then CFLAGS="`echo $CFLAGS' ' | $SED -e 's/-O[^ ]* //g'`" if test "$enable_debugging" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling optimizations for C (with debugging enabled)" >&5 $as_echo "$as_me: Enabling optimizations for C (with debugging enabled)" >&6;} _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -O1" >&5 $as_echo_n "checking if $CC accepts -O1... " >&6; } CFLAGS="-O1 $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -O" >&5 $as_echo_n "checking if $CC accepts -O... " >&6; } CFLAGS="-O $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu else { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling optimizations for C" >&5 $as_echo "$as_me: Enabling optimizations for C" >&6;} _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -O3" >&5 $as_echo_n "checking if $CC accepts -O3... " >&6; } CFLAGS="-O3 $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -O2" >&5 $as_echo_n "checking if $CC accepts -O2... " >&6; } CFLAGS="-O2 $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -O1" >&5 $as_echo_n "checking if $CC accepts -O1... " >&6; } CFLAGS="-O1 $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -O" >&5 $as_echo_n "checking if $CC accepts -O... " >&6; } CFLAGS="-O $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -Wno-clobbered" >&5 $as_echo_n "checking if $CC accepts -Wno-clobbered... " >&6; } CFLAGS="-Wno-clobbered $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu _svn_xxflags__save="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -flto" >&5 $as_echo_n "checking if $CC accepts -flto... " >&6; } CFLAGS="-flto $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void){return 0;} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi fi if test -z "`echo $CXXUSERFLAGS' ' | $EGREP -- '-O[^ ]* '`"; then CXXFLAGS="`echo $CXXFLAGS' ' | $SED -e 's/-O[^ ]* //g'`" if test "$enable_debugging" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling optimizations for C++ (with debugging enabled)" >&5 $as_echo "$as_me: Enabling optimizations for C++ (with debugging enabled)" >&6;} _svn_xxflags__save="$CXXFLAGS" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -O1" >&5 $as_echo_n "checking if $CXX accepts -O1... " >&6; } CXXFLAGS="-O1 $CXXFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(){} _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CXXFLAGS="$_svn_xxflags__save" _svn_xxflags__save="$CXXFLAGS" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -O" >&5 $as_echo_n "checking if $CXX accepts -O... " >&6; } CXXFLAGS="-O $CXXFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(){} _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CXXFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu else { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling optimizations for C++" >&5 $as_echo "$as_me: Enabling optimizations for C++" >&6;} _svn_xxflags__save="$CXXFLAGS" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -O3" >&5 $as_echo_n "checking if $CXX accepts -O3... " >&6; } CXXFLAGS="-O3 $CXXFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(){} _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CXXFLAGS="$_svn_xxflags__save" _svn_xxflags__save="$CXXFLAGS" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -O2" >&5 $as_echo_n "checking if $CXX accepts -O2... " >&6; } CXXFLAGS="-O2 $CXXFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(){} _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CXXFLAGS="$_svn_xxflags__save" _svn_xxflags__save="$CXXFLAGS" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -O1" >&5 $as_echo_n "checking if $CXX accepts -O1... " >&6; } CXXFLAGS="-O1 $CXXFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(){} _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CXXFLAGS="$_svn_xxflags__save" _svn_xxflags__save="$CXXFLAGS" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -O" >&5 $as_echo_n "checking if $CXX accepts -O... " >&6; } CXXFLAGS="-O $CXXFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(){} _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CXXFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu _svn_xxflags__save="$CXXFLAGS" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -Wno-clobbered" >&5 $as_echo_n "checking if $CXX accepts -Wno-clobbered... " >&6; } CXXFLAGS="-Wno-clobbered $CXXFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(){} _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CXXFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu _svn_xxflags__save="$CXXFLAGS" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -flto" >&5 $as_echo_n "checking if $CXX accepts -flto... " >&6; } CXXFLAGS="-flto $CXXFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(){} _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CXXFLAGS="$_svn_xxflags__save" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi fi elif test "$enable_optimization" = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: Disabling optimizations" >&5 $as_echo "$as_me: Disabling optimizations" >&6;} CFLAGS="`echo $CFLAGS' ' | $SED -e 's/-O[^ ]* //g'`" CXXFLAGS="`echo $CXXFLAGS' ' | $SED -e 's/-O[^ ]* //g'`" # elif test "$enable_optimization" = "maybe" ; then # # do nothing fi { $as_echo "$as_me:${as_lineno-$LINENO}: C compiler flags: $CFLAGS" >&5 $as_echo "$as_me: C compiler flags: $CFLAGS" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: user-defined: $CUSERFLAGS" >&5 $as_echo "$as_me: user-defined: $CUSERFLAGS" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: maintainer-mode: $CMAINTAINERFLAGS" >&5 $as_echo "$as_me: maintainer-mode: $CMAINTAINERFLAGS" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: C++ compiler flags: $CXXFLAGS" >&5 $as_echo "$as_me: C++ compiler flags: $CXXFLAGS" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: user-defined: $CXXUSERFLAGS" >&5 $as_echo "$as_me: user-defined: $CXXUSERFLAGS" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: maintainer-mode: $CXXMAINTAINERFLAGS" >&5 $as_echo "$as_me: maintainer-mode: $CXXMAINTAINERFLAGS" >&6;} # Check whether --enable-full-version-match was given. if test "${enable_full_version_match+set}" = set; then : enableval=$enable_full_version_match; if test "$enableval" = "no" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: Disabling svn full version matching" >&5 $as_echo "$as_me: Disabling svn full version matching" >&6;} $as_echo "#define SVN_DISABLE_FULL_VERSION_MATCH 1" >>confdefs.h fi fi # Check whether --with-editor was given. if test "${with_editor+set}" = set; then : withval=$with_editor; if test "$withval" = "yes" ; then as_fn_error $? "--with-editor requires an argument." "$LINENO" 5 else SVN_CLIENT_EDITOR=$withval cat >>confdefs.h <<_ACEOF #define SVN_CLIENT_EDITOR "$SVN_CLIENT_EDITOR" _ACEOF fi fi zlib_found=no zlib_skip=no # Check whether --with-zlib was given. if test "${with_zlib+set}" = set; then : withval=$with_zlib; if test "$withval" = "yes"; then zlib_skip=no elif test "$withval" = "no"; then zlib_skip=yes else zlib_skip=no zlib_prefix="$withval" fi fi if test "$zlib_skip" = "yes"; then as_fn_error $? "subversion requires zlib" "$LINENO" 5 fi if test -n "$zlib_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: zlib library configuration via prefix" >&5 $as_echo "$as_me: zlib library configuration via prefix" >&6;} save_cppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$zlib_prefix/include" for ac_header in zlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" if test "x$ac_cv_header_zlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_ZLIB_H 1 _ACEOF save_ldflags="$LDFLAGS" LDFLAGS="$LDFLAGS -L$zlib_prefix/lib" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5 $as_echo_n "checking for inflate in -lz... " >&6; } if ${ac_cv_lib_z_inflate+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char inflate (); int main () { return inflate (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_z_inflate=yes else ac_cv_lib_z_inflate=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5 $as_echo "$ac_cv_lib_z_inflate" >&6; } if test "x$ac_cv_lib_z_inflate" = xyes; then : zlib_found="yes" SVN_ZLIB_INCLUDES="-I$zlib_prefix/include" SVN_ZLIB_LIBS="` input_flags="-L$zlib_prefix/lib" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi ` -lz" fi LDFLAGS="$save_ldflags" fi done CPPFLAGS="$save_cppflags" else { $as_echo "$as_me:${as_lineno-$LINENO}: zlib library configuration via pkg-config" >&5 $as_echo "$as_me: zlib library configuration via pkg-config" >&6;} if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib library" >&5 $as_echo_n "checking for zlib library... " >&6; } if $PKG_CONFIG zlib --exists; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } zlib_found=yes SVN_ZLIB_INCLUDES=`$PKG_CONFIG zlib --cflags` SVN_ZLIB_LIBS=`$PKG_CONFIG zlib --libs` SVN_ZLIB_LIBS="` input_flags="$SVN_ZLIB_LIBS" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi `" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test "$zlib_found" = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: zlib library configuration" >&5 $as_echo "$as_me: zlib library configuration" >&6;} ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" if test "x$ac_cv_header_zlib_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5 $as_echo_n "checking for inflate in -lz... " >&6; } if ${ac_cv_lib_z_inflate+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char inflate (); int main () { return inflate (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_z_inflate=yes else ac_cv_lib_z_inflate=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5 $as_echo "$ac_cv_lib_z_inflate" >&6; } if test "x$ac_cv_lib_z_inflate" = xyes; then : zlib_found="builtin" SVN_ZLIB_LIBS="-lz" fi fi fi fi if test "$zlib_found" = "no"; then as_fn_error $? "subversion requires zlib" "$LINENO" 5 fi # Check whether --with-lz4 was given. if test "${with_lz4+set}" = set; then : withval=$with_lz4; if test "$withval" = internal; then lz4_prefix=internal elif test "$withval" = yes; then lz4_prefix=std else lz4_prefix="$withval" fi else lz4_prefix=std fi + if test "$lz4_prefix" = "no"; then + as_fn_error $? "Subversion requires LZ4" "$LINENO" 5 + fi if test "$lz4_prefix" = "internal"; then { $as_echo "$as_me:${as_lineno-$LINENO}: using internal lz4" >&5 $as_echo "$as_me: using internal lz4" >&6;} $as_echo "#define SVN_INTERNAL_LZ4 1" >>confdefs.h else if test "$lz4_prefix" = "std"; then if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lz4 library via pkg-config" >&5 $as_echo_n "checking for lz4 library via pkg-config... " >&6; } if $PKG_CONFIG liblz4 --atleast-version=129 || $PKG_CONFIG liblz4 --max-version=3; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } lz4_found=yes SVN_LZ4_INCLUDES=`$PKG_CONFIG liblz4 --cflags` SVN_LZ4_LIBS=`$PKG_CONFIG liblz4 --libs` SVN_LZ4_LIBS="` input_flags="$SVN_LZ4_LIBS" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi `" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test "$lz4_found" != "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: lz4 configuration without pkg-config" >&5 $as_echo "$as_me: lz4 configuration without pkg-config" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4_compress_default in -llz4" >&5 $as_echo_n "checking for LZ4_compress_default in -llz4... " >&6; } if ${ac_cv_lib_lz4_LZ4_compress_default+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llz4 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char LZ4_compress_default (); int main () { return LZ4_compress_default (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_lz4_LZ4_compress_default=yes else ac_cv_lib_lz4_LZ4_compress_default=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lz4_LZ4_compress_default" >&5 $as_echo "$ac_cv_lib_lz4_LZ4_compress_default" >&6; } if test "x$ac_cv_lib_lz4_LZ4_compress_default" = xyes; then : lz4_found=yes SVN_LZ4_LIBS="-llz4" fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: lz4 configuration via prefix" >&5 $as_echo "$as_me: lz4 configuration via prefix" >&6;} save_cppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$lz4_prefix/include" save_ldflags="$LDFLAGS" LDFLAGS="$LDFLAGS -L$lz4_prefix/lib" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4_compress_default in -llz4" >&5 $as_echo_n "checking for LZ4_compress_default in -llz4... " >&6; } if ${ac_cv_lib_lz4_LZ4_compress_default+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-llz4 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char LZ4_compress_default (); int main () { return LZ4_compress_default (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_lz4_LZ4_compress_default=yes else ac_cv_lib_lz4_LZ4_compress_default=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lz4_LZ4_compress_default" >&5 $as_echo "$ac_cv_lib_lz4_LZ4_compress_default" >&6; } if test "x$ac_cv_lib_lz4_LZ4_compress_default" = xyes; then : lz4_found=yes SVN_LZ4_INCLUDES="-I$lz4_prefix/include" SVN_LZ4_LIBS="` input_flags="-L$lz4_prefix/lib" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi ` -llz4" fi LDFLAGS="$save_ldflags" CPPFLAGS="$save_cppflags" fi if test "$lz4_found" != "yes"; then as_fn_error $? "Subversion requires LZ4 >= r129, or use --with-lz4=internal" "$LINENO" 5 fi fi # Check whether --with-utf8proc was given. if test "${with_utf8proc+set}" = set; then : withval=$with_utf8proc; if test "$withval" = internal; then utf8proc_prefix=internal elif test "$withval" = yes; then utf8proc_prefix=std else utf8proc_prefix="$withval" fi else utf8proc_prefix=std fi + if test "$utf8proc_prefix" = "no"; then + as_fn_error $? "Subversion requires UTF8PROC" "$LINENO" 5 + fi if test "$utf8proc_prefix" = "internal"; then { $as_echo "$as_me:${as_lineno-$LINENO}: using internal utf8proc" >&5 $as_echo "$as_me: using internal utf8proc" >&6;} $as_echo "#define SVN_INTERNAL_UTF8PROC 1" >>confdefs.h else if test "$utf8proc_prefix" = "std"; then { $as_echo "$as_me:${as_lineno-$LINENO}: utf8proc configuration without pkg-config" >&5 $as_echo "$as_me: utf8proc configuration without pkg-config" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for utf8proc_version in -lutf8proc" >&5 $as_echo_n "checking for utf8proc_version in -lutf8proc... " >&6; } if ${ac_cv_lib_utf8proc_utf8proc_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lutf8proc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char utf8proc_version (); int main () { return utf8proc_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_utf8proc_utf8proc_version=yes else ac_cv_lib_utf8proc_utf8proc_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_utf8proc_utf8proc_version" >&5 $as_echo "$ac_cv_lib_utf8proc_utf8proc_version" >&6; } if test "x$ac_cv_lib_utf8proc_utf8proc_version" = xyes; then : utf8proc_found=yes SVN_UTF8PROC_LIBS="-lutf8proc" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: utf8proc configuration via prefix" >&5 $as_echo "$as_me: utf8proc configuration via prefix" >&6;} save_cppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$utf8proc_prefix/include" save_ldflags="$LDFLAGS" LDFLAGS="$LDFLAGS -L$utf8proc_prefix/lib" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for utf8proc_version in -lutf8proc" >&5 $as_echo_n "checking for utf8proc_version in -lutf8proc... " >&6; } if ${ac_cv_lib_utf8proc_utf8proc_version+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lutf8proc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char utf8proc_version (); int main () { return utf8proc_version (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_utf8proc_utf8proc_version=yes else ac_cv_lib_utf8proc_utf8proc_version=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_utf8proc_utf8proc_version" >&5 $as_echo "$ac_cv_lib_utf8proc_utf8proc_version" >&6; } if test "x$ac_cv_lib_utf8proc_utf8proc_version" = xyes; then : utf8proc_found=yes SVN_UTF8PROC_INCLUDES="-I$utf8proc_prefix/include" SVN_UTF8PROC_LIBS="` input_flags="-L$utf8proc_prefix/lib" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi ` -lutf8proc" fi LDFLAGS="$save_ldflags" CPPFLAGS="$save_cppflags" fi if test "$utf8proc_found" != "yes"; then as_fn_error $? "Subversion requires UTF8PROC" "$LINENO" 5 fi fi MOD_ACTIVATION="" # Check whether --enable-mod-activation was given. if test "${enable_mod_activation+set}" = set; then : enableval=$enable_mod_activation; if test "$enableval" = "yes" ; then MOD_ACTIVATION="-a" { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling apache module activation" >&5 $as_echo "$as_me: Enabling apache module activation" >&6;} else { $as_echo "$as_me:${as_lineno-$LINENO}: Disabling apache module activation" >&5 $as_echo "$as_me: Disabling apache module activation" >&6;} fi fi # Check whether --enable-gcov was given. if test "${enable_gcov+set}" = set; then : enableval=$enable_gcov; if test "$enableval" = "yes" ; then if test "$GCC" = "yes"; then if test "$svn_enable_shared" = "yes" ; then as_fn_error $? "Can't have --enable-gcov without --disable-shared (we recommend also using --enable-all-static)." "$LINENO" 5 fi if test ! "$enable_all_static" = "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: We recommend --enable-all-static with --enable-gcov." >&5 $as_echo "$as_me: WARNING: We recommend --enable-all-static with --enable-gcov." >&2;} fi { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling gcov coverage testing." >&5 $as_echo "$as_me: Enabling gcov coverage testing." >&6;} CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage" CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage" else as_fn_error $? "We only support --enable-gcov with GCC right now." "$LINENO" 5 fi fi fi # Check whether --enable-gprof was given. if test "${enable_gprof+set}" = set; then : enableval=$enable_gprof; if test "$enableval" = "yes" ; then if test "$GCC" = "yes"; then if test "$svn_enable_shared" = "yes" ; then as_fn_error $? "Can't have --enable-gprof without --disable-shared (we recommend also using --enable-all-static)." "$LINENO" 5 fi if test ! "$enable_all_static" = "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: We recommend --enable-all-static with --enable-gprof." >&5 $as_echo "$as_me: WARNING: We recommend --enable-all-static with --enable-gprof." >&2;} fi { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling gprof profiling data (to gmon.out)." >&5 $as_echo "$as_me: Enabling gprof profiling data (to gmon.out)." >&6;} CFLAGS="$CFLAGS -pg" CXXFLAGS="$CXXFLAGS -pg" LT_LDFLAGS="$LT_LDFLAGS -pg" else as_fn_error $? "We only support --enable-gprof with GCC right now." "$LINENO" 5 fi fi fi # Scripting and Bindings languages # Python: Used for testsuite, and bindings PYTHON="`$abs_srcdir/build/find_python.sh`" if test -z "$PYTHON"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Python 2.7 or later is required to run the testsuite" >&5 $as_echo "$as_me: WARNING: Python 2.7 or later is required to run the testsuite" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: or to use the Subversion Python bindings" >&5 $as_echo "$as_me: WARNING: or to use the Subversion Python bindings" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: " >&5 $as_echo "$as_me: WARNING: " >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: If you have a suitable Python installed, but not on the" >&5 $as_echo "$as_me: WARNING: If you have a suitable Python installed, but not on the" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: PATH, set the environment variable PYTHON to the full path" >&5 $as_echo "$as_me: WARNING: PATH, set the environment variable PYTHON to the full path" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: to the Python executable, and re-run configure" >&5 $as_echo "$as_me: WARNING: to the Python executable, and re-run configure" >&2;} fi for ac_prog in "$PYTHON" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 $as_echo "$PYTHON" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PYTHON" && break done test -n "$PYTHON" || PYTHON="none" # The minimum version for the JVM runtime for our Java bytecode. JAVA_OLDEST_WORKING_VER='1.6' # SVN_CHECK_JDK sets $JAVA_CLASSPATH JAVA_OLDEST_WORKING_VER="$JAVA_OLDEST_WORKING_VER" # Check whether --with-jdk was given. if test "${with_jdk+set}" = set; then : withval=$with_jdk; case "$withval" in "no") JDK_SUITABLE=no ;; "yes") where=check JAVA_OLDEST_WORKING_VER="$JAVA_OLDEST_WORKING_VER" JDK=none JAVA_BIN=none JAVADOC=none JAVAC=none JAVAH=none JAR=none JNI_INCLUDES=none JDK_SUITABLE=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JDK" >&5 $as_echo_n "checking for JDK... " >&6; } if test $where = check; then if test -x "$JAVA_HOME/bin/java"; then JDK="$JAVA_HOME" elif test -x "/usr/libexec/java_home"; then JDK=`/usr/libexec/java_home` elif test -x "/Library/Java/Home/bin/java"; then JDK="/Library/Java/Home" elif test -x "/usr/bin/java"; then JDK="/usr" elif test -x "/usr/local/bin/java"; then JDK="/usr/local" fi else JDK=$where fi os_arch="`uname`" if test "$os_arch" = "Darwin"; then OSX_VER=`/usr/bin/sw_vers | grep ProductVersion | cut -f2 | cut -d"." -f1,2` if test "$OSX_VER" = "10.4"; then OSX_VER="10.4u" fi OSX_SYS_JAVA_FRAMEWORK="/System/Library/Frameworks/JavaVM.framework" OSX_SDK_JAVA_FRAMEWORK="/Developer/SDKs/MacOSX$OSX_VER.sdk/System/Library" OSX_SDK_JAVA_FRAMEWORK="$OSX_SDK_JAVA_FRAMEWORK/Frameworks/JavaVM.framework" fi if test "$os_arch" = "Darwin" && test "$JDK" = "/usr" && test -d "/Library/Java/Home"; then JDK="/Library/Java/Home" fi if test "$os_arch" = "Darwin" && test "$JDK" = "/Library/Java/Home"; then JRE_LIB_DIR="$OSX_SYS_JAVA_FRAMEWORK/Classes" else JRE_LIB_DIR="$JDK/jre/lib" fi if test -f "$JDK/include/jni.h"; then JNI_INCLUDEDIR="$JDK/include" JDK_SUITABLE=yes elif test "$os_arch" = "Darwin" && test -e "$JDK/Headers/jni.h"; then JNI_INCLUDEDIR="$JDK/Headers" JDK_SUITABLE=yes elif test "$os_arch" = "Darwin" && test -e "$OSX_SYS_JAVA_FRAMEWORK/Headers/jni.h"; then JNI_INCLUDEDIR="$OSX_SYS_JAVA_FRAMEWORK/Headers" JDK_SUITABLE=yes elif test "$os_arch" = "Darwin" && test -e "$OSX_SDK_JAVA_FRAMEWORK/Headers/jni.h"; then JNI_INCLUDEDIR="$OSX_SDK_JAVA_FRAMEWORK/Headers" JDK_SUITABLE=yes else JDK_SUITABLE=no fi if test "$JDK_SUITABLE" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JNI_INCLUDEDIR/jni.h" >&5 $as_echo "$JNI_INCLUDEDIR/jni.h" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if test "$where" != "check"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no JNI header files found." >&5 $as_echo "$as_me: WARNING: no JNI header files found." >&2;} if test "$os_arch" = "Darwin"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You may need to install the latest Java Development package from http://connect.apple.com/. Apple no longer includes the JNI header files by default on Java updates." >&5 $as_echo "$as_me: WARNING: You may need to install the latest Java Development package from http://connect.apple.com/. Apple no longer includes the JNI header files by default on Java updates." >&2;} fi fi fi if test "$JDK_SUITABLE" = "yes"; then JAVA_BIN='$(JDK)/bin' JAVA="$JAVA_BIN/java" JAVAC="$JAVA_BIN/javac" JAVAH="$JAVA_BIN/javah" JAVADOC="$JAVA_BIN/javadoc" JAR="$JAVA_BIN/jar" # Check whether --with-jikes was given. if test "${with_jikes+set}" = set; then : withval=$with_jikes; if test "$withval" != "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The --with-jikes option was ignored" >&5 $as_echo "$as_me: WARNING: The --with-jikes option was ignored" >&2;} fi fi # The release for "-source" could actually be greater than that # of "-target", if we want to cross-compile for lesser JVMs. if test -z "$JAVAC_FLAGS"; then JAVAC_FLAGS="-target $JAVA_OLDEST_WORKING_VER -source 1.6" if test "$enable_debugging" = "yes"; then JAVAC_FLAGS="-g -Xlint -Xlint:unchecked -Xlint:serial -Xlint:path $JAVAC_FLAGS" if test -z "$JAVAC_COMPAT_FLAGS"; then JAVAC_COMPAT_FLAGS="$JAVAC_FLAGS -Xlint:-unchecked -Xlint:-deprecation -Xlint:-dep-ann -Xlint:-rawtypes" fi fi fi JNI_INCLUDES="-I$JNI_INCLUDEDIR" list="`find "$JNI_INCLUDEDIR" -type d -print`" for dir in $list; do JNI_INCLUDES="$JNI_INCLUDES -I$dir" done fi ;; *) where=$withval JAVA_OLDEST_WORKING_VER="$JAVA_OLDEST_WORKING_VER" JDK=none JAVA_BIN=none JAVADOC=none JAVAC=none JAVAH=none JAR=none JNI_INCLUDES=none JDK_SUITABLE=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JDK" >&5 $as_echo_n "checking for JDK... " >&6; } if test $where = check; then if test -x "$JAVA_HOME/bin/java"; then JDK="$JAVA_HOME" elif test -x "/usr/libexec/java_home"; then JDK=`/usr/libexec/java_home` elif test -x "/Library/Java/Home/bin/java"; then JDK="/Library/Java/Home" elif test -x "/usr/bin/java"; then JDK="/usr" elif test -x "/usr/local/bin/java"; then JDK="/usr/local" fi else JDK=$where fi os_arch="`uname`" if test "$os_arch" = "Darwin"; then OSX_VER=`/usr/bin/sw_vers | grep ProductVersion | cut -f2 | cut -d"." -f1,2` if test "$OSX_VER" = "10.4"; then OSX_VER="10.4u" fi OSX_SYS_JAVA_FRAMEWORK="/System/Library/Frameworks/JavaVM.framework" OSX_SDK_JAVA_FRAMEWORK="/Developer/SDKs/MacOSX$OSX_VER.sdk/System/Library" OSX_SDK_JAVA_FRAMEWORK="$OSX_SDK_JAVA_FRAMEWORK/Frameworks/JavaVM.framework" fi if test "$os_arch" = "Darwin" && test "$JDK" = "/usr" && test -d "/Library/Java/Home"; then JDK="/Library/Java/Home" fi if test "$os_arch" = "Darwin" && test "$JDK" = "/Library/Java/Home"; then JRE_LIB_DIR="$OSX_SYS_JAVA_FRAMEWORK/Classes" else JRE_LIB_DIR="$JDK/jre/lib" fi if test -f "$JDK/include/jni.h"; then JNI_INCLUDEDIR="$JDK/include" JDK_SUITABLE=yes elif test "$os_arch" = "Darwin" && test -e "$JDK/Headers/jni.h"; then JNI_INCLUDEDIR="$JDK/Headers" JDK_SUITABLE=yes elif test "$os_arch" = "Darwin" && test -e "$OSX_SYS_JAVA_FRAMEWORK/Headers/jni.h"; then JNI_INCLUDEDIR="$OSX_SYS_JAVA_FRAMEWORK/Headers" JDK_SUITABLE=yes elif test "$os_arch" = "Darwin" && test -e "$OSX_SDK_JAVA_FRAMEWORK/Headers/jni.h"; then JNI_INCLUDEDIR="$OSX_SDK_JAVA_FRAMEWORK/Headers" JDK_SUITABLE=yes else JDK_SUITABLE=no fi if test "$JDK_SUITABLE" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JNI_INCLUDEDIR/jni.h" >&5 $as_echo "$JNI_INCLUDEDIR/jni.h" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if test "$where" != "check"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no JNI header files found." >&5 $as_echo "$as_me: WARNING: no JNI header files found." >&2;} if test "$os_arch" = "Darwin"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You may need to install the latest Java Development package from http://connect.apple.com/. Apple no longer includes the JNI header files by default on Java updates." >&5 $as_echo "$as_me: WARNING: You may need to install the latest Java Development package from http://connect.apple.com/. Apple no longer includes the JNI header files by default on Java updates." >&2;} fi fi fi if test "$JDK_SUITABLE" = "yes"; then JAVA_BIN='$(JDK)/bin' JAVA="$JAVA_BIN/java" JAVAC="$JAVA_BIN/javac" JAVAH="$JAVA_BIN/javah" JAVADOC="$JAVA_BIN/javadoc" JAR="$JAVA_BIN/jar" # Check whether --with-jikes was given. if test "${with_jikes+set}" = set; then : withval=$with_jikes; if test "$withval" != "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The --with-jikes option was ignored" >&5 $as_echo "$as_me: WARNING: The --with-jikes option was ignored" >&2;} fi fi # The release for "-source" could actually be greater than that # of "-target", if we want to cross-compile for lesser JVMs. if test -z "$JAVAC_FLAGS"; then JAVAC_FLAGS="-target $JAVA_OLDEST_WORKING_VER -source 1.6" if test "$enable_debugging" = "yes"; then JAVAC_FLAGS="-g -Xlint -Xlint:unchecked -Xlint:serial -Xlint:path $JAVAC_FLAGS" if test -z "$JAVAC_COMPAT_FLAGS"; then JAVAC_COMPAT_FLAGS="$JAVAC_FLAGS -Xlint:-unchecked -Xlint:-deprecation -Xlint:-dep-ann -Xlint:-rawtypes" fi fi fi JNI_INCLUDES="-I$JNI_INCLUDEDIR" list="`find "$JNI_INCLUDEDIR" -type d -print`" for dir in $list; do JNI_INCLUDES="$JNI_INCLUDES -I$dir" done fi ;; esac else where=check JAVA_OLDEST_WORKING_VER="$JAVA_OLDEST_WORKING_VER" JDK=none JAVA_BIN=none JAVADOC=none JAVAC=none JAVAH=none JAR=none JNI_INCLUDES=none JDK_SUITABLE=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JDK" >&5 $as_echo_n "checking for JDK... " >&6; } if test $where = check; then if test -x "$JAVA_HOME/bin/java"; then JDK="$JAVA_HOME" elif test -x "/usr/libexec/java_home"; then JDK=`/usr/libexec/java_home` elif test -x "/Library/Java/Home/bin/java"; then JDK="/Library/Java/Home" elif test -x "/usr/bin/java"; then JDK="/usr" elif test -x "/usr/local/bin/java"; then JDK="/usr/local" fi else JDK=$where fi os_arch="`uname`" if test "$os_arch" = "Darwin"; then OSX_VER=`/usr/bin/sw_vers | grep ProductVersion | cut -f2 | cut -d"." -f1,2` if test "$OSX_VER" = "10.4"; then OSX_VER="10.4u" fi OSX_SYS_JAVA_FRAMEWORK="/System/Library/Frameworks/JavaVM.framework" OSX_SDK_JAVA_FRAMEWORK="/Developer/SDKs/MacOSX$OSX_VER.sdk/System/Library" OSX_SDK_JAVA_FRAMEWORK="$OSX_SDK_JAVA_FRAMEWORK/Frameworks/JavaVM.framework" fi if test "$os_arch" = "Darwin" && test "$JDK" = "/usr" && test -d "/Library/Java/Home"; then JDK="/Library/Java/Home" fi if test "$os_arch" = "Darwin" && test "$JDK" = "/Library/Java/Home"; then JRE_LIB_DIR="$OSX_SYS_JAVA_FRAMEWORK/Classes" else JRE_LIB_DIR="$JDK/jre/lib" fi if test -f "$JDK/include/jni.h"; then JNI_INCLUDEDIR="$JDK/include" JDK_SUITABLE=yes elif test "$os_arch" = "Darwin" && test -e "$JDK/Headers/jni.h"; then JNI_INCLUDEDIR="$JDK/Headers" JDK_SUITABLE=yes elif test "$os_arch" = "Darwin" && test -e "$OSX_SYS_JAVA_FRAMEWORK/Headers/jni.h"; then JNI_INCLUDEDIR="$OSX_SYS_JAVA_FRAMEWORK/Headers" JDK_SUITABLE=yes elif test "$os_arch" = "Darwin" && test -e "$OSX_SDK_JAVA_FRAMEWORK/Headers/jni.h"; then JNI_INCLUDEDIR="$OSX_SDK_JAVA_FRAMEWORK/Headers" JDK_SUITABLE=yes else JDK_SUITABLE=no fi if test "$JDK_SUITABLE" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JNI_INCLUDEDIR/jni.h" >&5 $as_echo "$JNI_INCLUDEDIR/jni.h" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if test "$where" != "check"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no JNI header files found." >&5 $as_echo "$as_me: WARNING: no JNI header files found." >&2;} if test "$os_arch" = "Darwin"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You may need to install the latest Java Development package from http://connect.apple.com/. Apple no longer includes the JNI header files by default on Java updates." >&5 $as_echo "$as_me: WARNING: You may need to install the latest Java Development package from http://connect.apple.com/. Apple no longer includes the JNI header files by default on Java updates." >&2;} fi fi fi if test "$JDK_SUITABLE" = "yes"; then JAVA_BIN='$(JDK)/bin' JAVA="$JAVA_BIN/java" JAVAC="$JAVA_BIN/javac" JAVAH="$JAVA_BIN/javah" JAVADOC="$JAVA_BIN/javadoc" JAR="$JAVA_BIN/jar" # Check whether --with-jikes was given. if test "${with_jikes+set}" = set; then : withval=$with_jikes; if test "$withval" != "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The --with-jikes option was ignored" >&5 $as_echo "$as_me: WARNING: The --with-jikes option was ignored" >&2;} fi fi # The release for "-source" could actually be greater than that # of "-target", if we want to cross-compile for lesser JVMs. if test -z "$JAVAC_FLAGS"; then JAVAC_FLAGS="-target $JAVA_OLDEST_WORKING_VER -source 1.6" if test "$enable_debugging" = "yes"; then JAVAC_FLAGS="-g -Xlint -Xlint:unchecked -Xlint:serial -Xlint:path $JAVAC_FLAGS" if test -z "$JAVAC_COMPAT_FLAGS"; then JAVAC_COMPAT_FLAGS="$JAVAC_FLAGS -Xlint:-unchecked -Xlint:-deprecation -Xlint:-dep-ann -Xlint:-rawtypes" fi fi fi JNI_INCLUDES="-I$JNI_INCLUDEDIR" list="`find "$JNI_INCLUDEDIR" -type d -print`" for dir in $list; do JNI_INCLUDES="$JNI_INCLUDES -I$dir" done fi fi # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PERL+:} false; then : $as_echo_n "(cached) " >&6 else case $PERL in [\\/]* | ?:[\\/]*) ac_cv_path_PERL="$PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="none" ;; esac fi PERL=$ac_cv_path_PERL if test -n "$PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 $as_echo "$PERL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -n "$RUBY"; then # Extract the first word of ""$RUBY"", so it can be a program name with args. set dummy "$RUBY"; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_RUBY+:} false; then : $as_echo_n "(cached) " >&6 else case $RUBY in [\\/]* | ?:[\\/]*) ac_cv_path_RUBY="$RUBY" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_RUBY="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_RUBY" && ac_cv_path_RUBY="none" ;; esac fi RUBY=$ac_cv_path_RUBY if test -n "$RUBY"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUBY" >&5 $as_echo "$RUBY" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else for ac_prog in ruby ruby1 ruby1.8 ruby18 ruby1.9 ruby19 ruby1.9.3 ruby193 ruby2 ruby2.0 ruby20 ruby2.1 ruby21 ruby2.2 ruby22 ruby2.3 ruby23 ruby2.4 ruby24 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_RUBY+:} false; then : $as_echo_n "(cached) " >&6 else case $RUBY in [\\/]* | ?:[\\/]*) ac_cv_path_RUBY="$RUBY" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_RUBY="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi RUBY=$ac_cv_path_RUBY if test -n "$RUBY"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUBY" >&5 $as_echo "$RUBY" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$RUBY" && break done test -n "$RUBY" || RUBY="none" fi if test "$RUBY" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking rb_hash_foreach" >&5 $as_echo_n "checking rb_hash_foreach... " >&6; } if "$RUBY" -r mkmf -e 'exit(have_func("rb_hash_foreach") ? 0 : 1)' >/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } if test -n "$RDOC"; then # Extract the first word of ""$RDOC"", so it can be a program name with args. set dummy "$RDOC"; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_RDOC+:} false; then : $as_echo_n "(cached) " >&6 else case $RDOC in [\\/]* | ?:[\\/]*) ac_cv_path_RDOC="$RDOC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_RDOC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_RDOC" && ac_cv_path_RDOC="none" ;; esac fi RDOC=$ac_cv_path_RDOC if test -n "$RDOC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RDOC" >&5 $as_echo "$RDOC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else for ac_prog in rdoc rdoc1 rdoc1.8 rdoc18 rdoc1.9 rdoc19 rdoc1.9.3 rdoc193 rdoc2 rdoc2.0 rdoc20 rdoc2.1 rdoc21 rdoc2.2 rdoc22 rdoc2.3 rdoc23 rdoc2.4 rdoc24 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_RUBY+:} false; then : +if ${ac_cv_path_RDOC+:} false; then : $as_echo_n "(cached) " >&6 else - case $RUBY in + case $RDOC in [\\/]* | ?:[\\/]*) - ac_cv_path_RUBY="$RUBY" # Let the user override the test with a path. + ac_cv_path_RDOC="$RDOC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_RUBY="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_RDOC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi -RUBY=$ac_cv_path_RUBY -if test -n "$RUBY"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUBY" >&5 -$as_echo "$RUBY" >&6; } +RDOC=$ac_cv_path_RDOC +if test -n "$RDOC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RDOC" >&5 +$as_echo "$RDOC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - test -n "$RUBY" && break + test -n "$RDOC" && break done -test -n "$RUBY" || RUBY="none" +test -n "$RDOC" || RDOC="none" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Ruby major version" >&5 $as_echo_n "checking for Ruby major version... " >&6; } if ${svn_cv_ruby_major+:} false; then : $as_echo_n "(cached) " >&6 else svn_cv_ruby_major="`$RUBY -rrbconfig -e 'print RbConfig::CONFIG.fetch(%q(MAJOR))'`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $svn_cv_ruby_major" >&5 $as_echo "$svn_cv_ruby_major" >&6; } RUBY_MAJOR="$svn_cv_ruby_major" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Ruby minor version" >&5 $as_echo_n "checking for Ruby minor version... " >&6; } if ${svn_cv_ruby_minor+:} false; then : $as_echo_n "(cached) " >&6 else svn_cv_ruby_minor="`$RUBY -rrbconfig -e 'print RbConfig::CONFIG.fetch(%q(MINOR))'`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $svn_cv_ruby_minor" >&5 $as_echo "$svn_cv_ruby_minor" >&6; } RUBY_MINOR="$svn_cv_ruby_minor" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Ruby teeny version" >&5 $as_echo_n "checking for Ruby teeny version... " >&6; } if ${svn_cv_ruby_teeny+:} false; then : $as_echo_n "(cached) " >&6 else svn_cv_ruby_teeny="`$RUBY -rrbconfig -e 'major, minor, teeny = RUBY_VERSION.split("."); print teeny;'`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $svn_cv_ruby_teeny" >&5 $as_echo "$svn_cv_ruby_teeny" >&6; } RUBY_TEENY="$svn_cv_ruby_teeny" if test \( "$RUBY_MAJOR" -eq "1" -a "$RUBY_MINOR" -gt "8" -a "$RUBY_TEENY" -lt "3" \); then # Disallow Ruby between 1.8.7 and 1.9.3 RUBY="none" { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The detected Ruby is between 1.9 and 1.9.3" >&5 $as_echo "$as_me: WARNING: The detected Ruby is between 1.9 and 1.9.3" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Only 1.8.x and 1.9.3 or later are supported at this time" >&5 $as_echo "$as_me: WARNING: Only 1.8.x and 1.9.3 or later are supported at this time" >&2;} fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } RUBY="none" { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The detected Ruby is too old for Subversion to use" >&5 $as_echo "$as_me: WARNING: The detected Ruby is too old for Subversion to use" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: A Ruby which has rb_hash_foreach is required to use the" >&5 $as_echo "$as_me: WARNING: A Ruby which has rb_hash_foreach is required to use the" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Ruby bindings" >&5 $as_echo "$as_me: WARNING: Subversion Ruby bindings" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Upgrade to the official 1.8.2 release, or later" >&5 $as_echo "$as_me: WARNING: Upgrade to the official 1.8.2 release, or later" >&2;} fi fi # Check whether --with-swig was given. if test "${with_swig+set}" = set; then : withval=$with_swig; case "$withval" in "no") SWIG_SUITABLE=no where=no if test $where = no; then SWIG=none elif test $where = required || test $where = check; then # Extract the first word of "swig", so it can be a program name with args. set dummy swig; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_SWIG+:} false; then : $as_echo_n "(cached) " >&6 else case $SWIG in [\\/]* | ?:[\\/]*) ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_SWIG" && ac_cv_path_SWIG="none" ;; esac fi SWIG=$ac_cv_path_SWIG if test -n "$SWIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5 $as_echo "$SWIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$SWIG" = "none" && test $where = required; then as_fn_error $? "SWIG required, but not found" "$LINENO" 5 fi else if test -f "$where"; then SWIG="$where" else SWIG="$where/bin/swig" fi if test ! -f "$SWIG" || test ! -x "$SWIG"; then as_fn_error $? "Could not find swig binary at $SWIG" "$LINENO" 5 fi fi if test "$SWIG" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking swig version" >&5 $as_echo_n "checking swig version... " >&6; } SWIG_VERSION_RAW="`$SWIG -version 2>&1 | \ $SED -ne 's/^.*Version \(.*\)$/\1/p'`" # We want the version as an integer so we can test against # which version we're using. SWIG doesn't provide this # to us so we have to come up with it on our own. # The major is passed straight through, # the minor is zero padded to two places, # and the patch level is zero padded to three places. # e.g. 1.3.24 becomes 103024 SWIG_VERSION="`echo \"$SWIG_VERSION_RAW\" | \ $SED -e 's/[^0-9\.].*$//' \ -e 's/\.\([0-9]\)$/.0\1/' \ -e 's/\.\([0-9][0-9]\)$/.0\1/' \ -e 's/\.\([0-9]\)\./0\1/; s/\.//g;'`" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_VERSION_RAW" >&5 $as_echo "$SWIG_VERSION_RAW" >&6; } # If you change the required swig version number, don't forget to update: # subversion/bindings/swig/INSTALL if test -n "$SWIG_VERSION" && test "$SWIG_VERSION" -ge "103024"; then SWIG_SUITABLE=yes else SWIG_SUITABLE=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Detected SWIG version $SWIG_VERSION_RAW" >&5 $as_echo "$as_me: WARNING: Detected SWIG version $SWIG_VERSION_RAW" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion requires SWIG >= 1.3.24" >&5 $as_echo "$as_me: WARNING: Subversion requires SWIG >= 1.3.24" >&2;} fi + fi - SWIG_PY_COMPILE="none" - SWIG_PY_LINK="none" - if test "$PYTHON" != "none"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Configuring python swig binding" >&5 + SWIG_PY_COMPILE="none" + SWIG_PY_LINK="none" + if test "$PYTHON" != "none"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Configuring python swig binding" >&5 $as_echo "$as_me: Configuring python swig binding" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python includes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python includes" >&5 $as_echo_n "checking for Python includes... " >&6; } if ${ac_cv_python_includes+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_includes="`$PYTHON ${abs_srcdir}/build/get-py-info.py --includes`" + ac_cv_python_includes="`$PYTHON ${abs_srcdir}/build/get-py-info.py --includes`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_includes" >&5 $as_echo "$ac_cv_python_includes" >&6; } - SWIG_PY_INCLUDES="\$(SWIG_INCLUDES) $ac_cv_python_includes" + SWIG_PY_INCLUDES="\$(SWIG_INCLUDES) $ac_cv_python_includes" - if test "$ac_cv_python_includes" = "none"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python bindings cannot be built without distutils module" >&5 + if test "$ac_cv_python_includes" = "none"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python bindings cannot be built without distutils module" >&5 $as_echo "$as_me: WARNING: python bindings cannot be built without distutils module" >&2;} - fi + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiling Python extensions" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiling Python extensions" >&5 $as_echo_n "checking for compiling Python extensions... " >&6; } if ${ac_cv_python_compile+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_compile="`$PYTHON ${abs_srcdir}/build/get-py-info.py --compile`" + ac_cv_python_compile="`$PYTHON ${abs_srcdir}/build/get-py-info.py --compile`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_compile" >&5 $as_echo "$ac_cv_python_compile" >&6; } - SWIG_PY_COMPILE="$ac_cv_python_compile $CFLAGS" + SWIG_PY_COMPILE="$ac_cv_python_compile $CFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking Python extensions" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking Python extensions" >&5 $as_echo_n "checking for linking Python extensions... " >&6; } if ${ac_cv_python_link+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_link="`$PYTHON ${abs_srcdir}/build/get-py-info.py --link`" + ac_cv_python_link="`$PYTHON ${abs_srcdir}/build/get-py-info.py --link`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_link" >&5 $as_echo "$ac_cv_python_link" >&6; } - SWIG_PY_LINK="$ac_cv_python_link" + SWIG_PY_LINK="$ac_cv_python_link" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking Python libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking Python libraries" >&5 $as_echo_n "checking for linking Python libraries... " >&6; } if ${ac_cv_python_libs+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_libs="`$PYTHON ${abs_srcdir}/build/get-py-info.py --libs`" + ac_cv_python_libs="`$PYTHON ${abs_srcdir}/build/get-py-info.py --libs`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_libs" >&5 $as_echo "$ac_cv_python_libs" >&6; } - SWIG_PY_LIBS="` + SWIG_PY_LIBS="` input_flags="$ac_cv_python_libs" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi `" - SVN_PYCFMT_SAVE_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for apr_int64_t Python/C API format string" >&5 + SVN_PYCFMT_SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for apr_int64_t Python/C API format string" >&5 $as_echo_n "checking for apr_int64_t Python/C API format string... " >&6; } if ${svn_cv_pycfmt_apr_int64_t+:} false; then : $as_echo_n "(cached) " >&6 else - if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - MaTcHtHiS APR_INT64_T_FMT EnDeNd + MaTcHtHiS APR_INT64_T_FMT EnDeNd _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "MaTcHtHiS +\"lld\" +EnDeNd" >/dev/null 2>&1; then : svn_cv_pycfmt_apr_int64_t="L" fi rm -f conftest* - fi - if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + fi + if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ r - #include - MaTcHtHiS APR_INT64_T_FMT EnDeNd + #include + MaTcHtHiS APR_INT64_T_FMT EnDeNd _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "MaTcHtHiS +\"ld\" +EnDeNd" >/dev/null 2>&1; then : svn_cv_pycfmt_apr_int64_t="l" fi rm -f conftest* - fi - if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + fi + if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - MaTcHtHiS APR_INT64_T_FMT EnDeNd + MaTcHtHiS APR_INT64_T_FMT EnDeNd _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "MaTcHtHiS +\"d\" +EnDeNd" >/dev/null 2>&1; then : svn_cv_pycfmt_apr_int64_t="i" fi rm -f conftest* - fi + fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $svn_cv_pycfmt_apr_int64_t" >&5 $as_echo "$svn_cv_pycfmt_apr_int64_t" >&6; } - CPPFLAGS="$SVN_PYCFMT_SAVE_CPPFLAGS" - if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then - as_fn_error $? "failed to recognize APR_INT64_T_FMT on this platform" "$LINENO" 5 - fi + CPPFLAGS="$SVN_PYCFMT_SAVE_CPPFLAGS" + if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then + as_fn_error $? "failed to recognize APR_INT64_T_FMT on this platform" "$LINENO" 5 + fi cat >>confdefs.h <<_ACEOF #define SVN_APR_INT64_T_PYCFMT "$svn_cv_pycfmt_apr_int64_t" _ACEOF - fi + fi - if test "$PERL" != "none"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking perl version" >&5 + if test "$PERL" != "none"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking perl version" >&5 $as_echo_n "checking perl version... " >&6; } - PERL_VERSION="`$PERL -e 'q([); print $] * 1000000,$/;'`" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL_VERSION" >&5 + PERL_VERSION="`$PERL -e 'q([); print $] * 1000000,$/;'`" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL_VERSION" >&5 $as_echo "$PERL_VERSION" >&6; } - if test "$PERL_VERSION" -ge "5008000"; then - SWIG_PL_INCLUDES="\$(SWIG_INCLUDES) `$PERL -MExtUtils::Embed -e ccopts`" - SWIG_PL_LINK="`$PERL -MExtUtils::Embed -e ldopts`" - SWIG_PL_LINK="` + if test "$PERL_VERSION" -ge "5008000"; then + SWIG_PL_INCLUDES="\$(SWIG_INCLUDES) `$PERL -MExtUtils::Embed -e ccopts`" + SWIG_PL_LINK="`$PERL -MExtUtils::Embed -e ldopts`" + SWIG_PL_LINK="` input_flags="$SWIG_PL_LINK" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi `" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: perl bindings require perl 5.8.0 or newer." >&5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: perl bindings require perl 5.8.0 or newer." >&5 $as_echo "$as_me: WARNING: perl bindings require perl 5.8.0 or newer." >&2;} - fi fi + fi - SWIG_RB_COMPILE="none" - SWIG_RB_LINK="none" - if test "$RUBY" != "none"; then - rbconfig="$RUBY -rrbconfig -e " + SWIG_RB_COMPILE="none" + SWIG_RB_LINK="none" + if test "$RUBY" != "none"; then + rbconfig="$RUBY -rrbconfig -e " - for var_name in arch archdir CC LDSHARED DLEXT LIBS LIBRUBYARG \ - rubyhdrdir rubyarchhdrdir sitedir sitelibdir sitearchdir libdir - do - rbconfig_tmp=`$rbconfig "print RbConfig::CONFIG['$var_name']"` - eval "rbconfig_$var_name=\"$rbconfig_tmp\"" - done + for var_name in arch archdir CC LDSHARED DLEXT LIBS LIBRUBYARG \ + rubyhdrdir rubyarchhdrdir sitedir sitelibdir sitearchdir libdir + do + rbconfig_tmp=`$rbconfig "print RbConfig::CONFIG['$var_name']"` + eval "rbconfig_$var_name=\"$rbconfig_tmp\"" + done - { $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Ruby SWIG binding" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Ruby SWIG binding" >&5 $as_echo "$as_me: Configuring Ruby SWIG binding" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Ruby include path" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Ruby include path" >&5 $as_echo_n "checking for Ruby include path... " >&6; } if ${svn_cv_ruby_includes+:} false; then : $as_echo_n "(cached) " >&6 else - if test -d "$rbconfig_rubyhdrdir"; then - svn_cv_ruby_includes="-I. -I$rbconfig_rubyhdrdir -I$rbconfig_rubyhdrdir/ruby -I$rbconfig_rubyhdrdir/ruby/backward" - if test -d "$rbconfig_rubyarchhdrdir"; then - svn_cv_ruby_includes="$svn_cv_ruby_includes -I$rbconfig_rubyarchhdrdir" - else - svn_cv_ruby_includes="$svn_cv_ruby_includes -I$rbconfig_rubyhdrdir/$rbconfig_arch" - fi + if test -d "$rbconfig_rubyhdrdir"; then + svn_cv_ruby_includes="-I. -I$rbconfig_rubyhdrdir -I$rbconfig_rubyhdrdir/ruby -I$rbconfig_rubyhdrdir/ruby/backward" + if test -d "$rbconfig_rubyarchhdrdir"; then + svn_cv_ruby_includes="$svn_cv_ruby_includes -I$rbconfig_rubyarchhdrdir" else - svn_cv_ruby_includes="-I. -I$rbconfig_archdir" + svn_cv_ruby_includes="$svn_cv_ruby_includes -I$rbconfig_rubyhdrdir/$rbconfig_arch" fi + else + svn_cv_ruby_includes="-I. -I$rbconfig_archdir" + fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $svn_cv_ruby_includes" >&5 $as_echo "$svn_cv_ruby_includes" >&6; } - SWIG_RB_INCLUDES="\$(SWIG_INCLUDES) $svn_cv_ruby_includes" + SWIG_RB_INCLUDES="\$(SWIG_INCLUDES) $svn_cv_ruby_includes" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to compile Ruby extensions" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to compile Ruby extensions" >&5 $as_echo_n "checking how to compile Ruby extensions... " >&6; } if ${svn_cv_ruby_compile+:} false; then : $as_echo_n "(cached) " >&6 else - svn_cv_ruby_compile="$rbconfig_CC $CFLAGS" + svn_cv_ruby_compile="$rbconfig_CC $CFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $svn_cv_ruby_compile" >&5 $as_echo "$svn_cv_ruby_compile" >&6; } - SWIG_RB_COMPILE="$svn_cv_ruby_compile" + SWIG_RB_COMPILE="$svn_cv_ruby_compile" SWIG_RB_COMPILE=`echo "$SWIG_RB_COMPILE" | $SED -e 's/-ansi//'` SWIG_RB_COMPILE=`echo "$SWIG_RB_COMPILE" | $SED -e 's/-std=c89//'` SWIG_RB_COMPILE=`echo "$SWIG_RB_COMPILE" | $SED -e 's/-std=c90//'` - SWIG_RB_COMPILE="$SWIG_RB_COMPILE -Wno-int-to-pointer-cast" + SWIG_RB_COMPILE="$SWIG_RB_COMPILE -Wno-int-to-pointer-cast" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link Ruby extensions" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link Ruby extensions" >&5 $as_echo_n "checking how to link Ruby extensions... " >&6; } if ${svn_cv_ruby_link+:} false; then : $as_echo_n "(cached) " >&6 else - svn_cv_ruby_link="`$RUBY -e 'ARGV.shift; print ARGV.join(%q( ))' \ - $rbconfig_LDSHARED`" - svn_cv_ruby_link="$rbconfig_CC $svn_cv_ruby_link" - svn_cv_ruby_link="$svn_cv_ruby_link -shrext .$rbconfig_DLEXT" + svn_cv_ruby_link="`$RUBY -e 'ARGV.shift; print ARGV.join(%q( ))' \ + $rbconfig_LDSHARED`" + svn_cv_ruby_link="$rbconfig_CC $svn_cv_ruby_link" + svn_cv_ruby_link="$svn_cv_ruby_link -shrext .$rbconfig_DLEXT" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $svn_cv_ruby_link" >&5 $as_echo "$svn_cv_ruby_link" >&6; } - SWIG_RB_LINK="$svn_cv_ruby_link" + SWIG_RB_LINK="$svn_cv_ruby_link" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link Ruby libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link Ruby libraries" >&5 $as_echo_n "checking how to link Ruby libraries... " >&6; } if ${ac_cv_ruby_libs+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_ruby_libs="$rbconfig_LIBRUBYARG $rbconfig_LIBS" + ac_cv_ruby_libs="$rbconfig_LIBRUBYARG $rbconfig_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ruby_libs" >&5 $as_echo "$ac_cv_ruby_libs" >&6; } - SWIG_RB_LIBS="` + SWIG_RB_LIBS="` input_flags="$ac_cv_ruby_libs" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi `" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rb_errinfo" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rb_errinfo" >&5 $as_echo_n "checking for rb_errinfo... " >&6; } - old_CFLAGS="$CFLAGS" - old_LIBS="$LIBS" - CFLAGS="$CFLAGS $svn_cv_ruby_includes" + old_CFLAGS="$CFLAGS" + old_LIBS="$LIBS" + CFLAGS="$CFLAGS $svn_cv_ruby_includes" CFLAGS=`echo "$CFLAGS" | $SED -e 's/-ansi//'` CFLAGS=`echo "$CFLAGS" | $SED -e 's/-std=c89//'` CFLAGS=`echo "$CFLAGS" | $SED -e 's/-std=c90//'` - LIBS="$SWIG_RB_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + LIBS="$SWIG_RB_LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main() {rb_errinfo();} _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_rb_errinfo="yes" else have_rb_errinfo="no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test "$have_rb_errinfo" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + if test "$have_rb_errinfo" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_RB_ERRINFO 1" >>confdefs.h - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - fi - CFLAGS="$old_CFLAGS" - LIBS="$old_LIBS" + fi + CFLAGS="$old_CFLAGS" + LIBS="$old_LIBS" - if ${svn_cv_ruby_sitedir+:} false; then : + if ${svn_cv_ruby_sitedir+:} false; then : $as_echo_n "(cached) " >&6 else - svn_cv_ruby_sitedir="$rbconfig_sitedir" + svn_cv_ruby_sitedir="$rbconfig_sitedir" fi # Check whether --with-ruby-sitedir was given. if test "${with_ruby_sitedir+set}" = set; then : withval=$with_ruby_sitedir; svn_ruby_installdir="$withval" else svn_ruby_installdir="$svn_cv_ruby_sitedir" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to install Ruby scripts" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to install Ruby scripts" >&5 $as_echo_n "checking where to install Ruby scripts... " >&6; } - if ${svn_cv_ruby_sitedir_libsuffix+:} false; then : + if ${svn_cv_ruby_sitedir_libsuffix+:} false; then : $as_echo_n "(cached) " >&6 else - svn_cv_ruby_sitedir_libsuffix="`echo "$rbconfig_sitelibdir" | \ - $SED -e "s,^$rbconfig_sitedir,,"`" + svn_cv_ruby_sitedir_libsuffix="`echo "$rbconfig_sitelibdir" | \ + $SED -e "s,^$rbconfig_sitedir,,"`" fi - SWIG_RB_SITE_LIB_DIR="${svn_ruby_installdir}${svn_cv_ruby_sitedir_libsuffix}" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_RB_SITE_LIB_DIR" >&5 + SWIG_RB_SITE_LIB_DIR="${svn_ruby_installdir}${svn_cv_ruby_sitedir_libsuffix}" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_RB_SITE_LIB_DIR" >&5 $as_echo "$SWIG_RB_SITE_LIB_DIR" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to install Ruby extensions" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to install Ruby extensions" >&5 $as_echo_n "checking where to install Ruby extensions... " >&6; } - if ${svn_cv_ruby_sitedir_archsuffix+:} false; then : + if ${svn_cv_ruby_sitedir_archsuffix+:} false; then : $as_echo_n "(cached) " >&6 else - svn_cv_ruby_sitedir_archsuffix="`echo "$rbconfig_sitearchdir" | \ - $SED -e "s,^$rbconfig_sitedir,,"`" + svn_cv_ruby_sitedir_archsuffix="`echo "$rbconfig_sitearchdir" | \ + $SED -e "s,^$rbconfig_sitedir,,"`" fi - SWIG_RB_SITE_ARCH_DIR="${svn_ruby_installdir}${svn_cv_ruby_sitedir_archsuffix}" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_RB_SITE_ARCH_DIR" >&5 + SWIG_RB_SITE_ARCH_DIR="${svn_ruby_installdir}${svn_cv_ruby_sitedir_archsuffix}" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_RB_SITE_ARCH_DIR" >&5 $as_echo "$SWIG_RB_SITE_ARCH_DIR" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to use output level for Ruby bindings tests" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to use output level for Ruby bindings tests" >&5 $as_echo_n "checking how to use output level for Ruby bindings tests... " >&6; } - if ${svn_cv_ruby_test_verbose+:} false; then : + if ${svn_cv_ruby_test_verbose+:} false; then : $as_echo_n "(cached) " >&6 else - svn_cv_ruby_test_verbose="normal" + svn_cv_ruby_test_verbose="normal" fi # Check whether --with-ruby-test-verbose was given. if test "${with_ruby_test_verbose+set}" = set; then : withval=$with_ruby_test_verbose; svn_ruby_test_verbose="$withval" else svn_ruby_test_verbose="$svn_cv_ruby_test_verbose" fi - SWIG_RB_TEST_VERBOSE="$svn_ruby_test_verbose" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_RB_TEST_VERBOSE" >&5 + SWIG_RB_TEST_VERBOSE="$svn_ruby_test_verbose" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_RB_TEST_VERBOSE" >&5 $as_echo "$SWIG_RB_TEST_VERBOSE" >&6; } - fi fi ;; "yes") where=required if test $where = no; then SWIG=none elif test $where = required || test $where = check; then # Extract the first word of "swig", so it can be a program name with args. set dummy swig; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_SWIG+:} false; then : $as_echo_n "(cached) " >&6 else case $SWIG in [\\/]* | ?:[\\/]*) ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_SWIG" && ac_cv_path_SWIG="none" ;; esac fi SWIG=$ac_cv_path_SWIG if test -n "$SWIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5 $as_echo "$SWIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$SWIG" = "none" && test $where = required; then as_fn_error $? "SWIG required, but not found" "$LINENO" 5 fi else if test -f "$where"; then SWIG="$where" else SWIG="$where/bin/swig" fi if test ! -f "$SWIG" || test ! -x "$SWIG"; then as_fn_error $? "Could not find swig binary at $SWIG" "$LINENO" 5 fi fi if test "$SWIG" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking swig version" >&5 $as_echo_n "checking swig version... " >&6; } SWIG_VERSION_RAW="`$SWIG -version 2>&1 | \ $SED -ne 's/^.*Version \(.*\)$/\1/p'`" # We want the version as an integer so we can test against # which version we're using. SWIG doesn't provide this # to us so we have to come up with it on our own. # The major is passed straight through, # the minor is zero padded to two places, # and the patch level is zero padded to three places. # e.g. 1.3.24 becomes 103024 SWIG_VERSION="`echo \"$SWIG_VERSION_RAW\" | \ $SED -e 's/[^0-9\.].*$//' \ -e 's/\.\([0-9]\)$/.0\1/' \ -e 's/\.\([0-9][0-9]\)$/.0\1/' \ -e 's/\.\([0-9]\)\./0\1/; s/\.//g;'`" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_VERSION_RAW" >&5 $as_echo "$SWIG_VERSION_RAW" >&6; } # If you change the required swig version number, don't forget to update: # subversion/bindings/swig/INSTALL if test -n "$SWIG_VERSION" && test "$SWIG_VERSION" -ge "103024"; then SWIG_SUITABLE=yes else SWIG_SUITABLE=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Detected SWIG version $SWIG_VERSION_RAW" >&5 $as_echo "$as_me: WARNING: Detected SWIG version $SWIG_VERSION_RAW" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion requires SWIG >= 1.3.24" >&5 $as_echo "$as_me: WARNING: Subversion requires SWIG >= 1.3.24" >&2;} fi + fi - SWIG_PY_COMPILE="none" - SWIG_PY_LINK="none" - if test "$PYTHON" != "none"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Configuring python swig binding" >&5 + SWIG_PY_COMPILE="none" + SWIG_PY_LINK="none" + if test "$PYTHON" != "none"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Configuring python swig binding" >&5 $as_echo "$as_me: Configuring python swig binding" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python includes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python includes" >&5 $as_echo_n "checking for Python includes... " >&6; } if ${ac_cv_python_includes+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_includes="`$PYTHON ${abs_srcdir}/build/get-py-info.py --includes`" + ac_cv_python_includes="`$PYTHON ${abs_srcdir}/build/get-py-info.py --includes`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_includes" >&5 $as_echo "$ac_cv_python_includes" >&6; } - SWIG_PY_INCLUDES="\$(SWIG_INCLUDES) $ac_cv_python_includes" + SWIG_PY_INCLUDES="\$(SWIG_INCLUDES) $ac_cv_python_includes" - if test "$ac_cv_python_includes" = "none"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python bindings cannot be built without distutils module" >&5 + if test "$ac_cv_python_includes" = "none"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python bindings cannot be built without distutils module" >&5 $as_echo "$as_me: WARNING: python bindings cannot be built without distutils module" >&2;} - fi + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiling Python extensions" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiling Python extensions" >&5 $as_echo_n "checking for compiling Python extensions... " >&6; } if ${ac_cv_python_compile+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_compile="`$PYTHON ${abs_srcdir}/build/get-py-info.py --compile`" + ac_cv_python_compile="`$PYTHON ${abs_srcdir}/build/get-py-info.py --compile`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_compile" >&5 $as_echo "$ac_cv_python_compile" >&6; } - SWIG_PY_COMPILE="$ac_cv_python_compile $CFLAGS" + SWIG_PY_COMPILE="$ac_cv_python_compile $CFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking Python extensions" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking Python extensions" >&5 $as_echo_n "checking for linking Python extensions... " >&6; } if ${ac_cv_python_link+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_link="`$PYTHON ${abs_srcdir}/build/get-py-info.py --link`" + ac_cv_python_link="`$PYTHON ${abs_srcdir}/build/get-py-info.py --link`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_link" >&5 $as_echo "$ac_cv_python_link" >&6; } - SWIG_PY_LINK="$ac_cv_python_link" + SWIG_PY_LINK="$ac_cv_python_link" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking Python libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking Python libraries" >&5 $as_echo_n "checking for linking Python libraries... " >&6; } if ${ac_cv_python_libs+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_libs="`$PYTHON ${abs_srcdir}/build/get-py-info.py --libs`" + ac_cv_python_libs="`$PYTHON ${abs_srcdir}/build/get-py-info.py --libs`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_libs" >&5 $as_echo "$ac_cv_python_libs" >&6; } - SWIG_PY_LIBS="` + SWIG_PY_LIBS="` input_flags="$ac_cv_python_libs" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi `" - SVN_PYCFMT_SAVE_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for apr_int64_t Python/C API format string" >&5 + SVN_PYCFMT_SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for apr_int64_t Python/C API format string" >&5 $as_echo_n "checking for apr_int64_t Python/C API format string... " >&6; } if ${svn_cv_pycfmt_apr_int64_t+:} false; then : $as_echo_n "(cached) " >&6 else - if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - MaTcHtHiS APR_INT64_T_FMT EnDeNd + MaTcHtHiS APR_INT64_T_FMT EnDeNd _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "MaTcHtHiS +\"lld\" +EnDeNd" >/dev/null 2>&1; then : svn_cv_pycfmt_apr_int64_t="L" fi rm -f conftest* - fi - if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + fi + if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ r - #include - MaTcHtHiS APR_INT64_T_FMT EnDeNd + #include + MaTcHtHiS APR_INT64_T_FMT EnDeNd _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "MaTcHtHiS +\"ld\" +EnDeNd" >/dev/null 2>&1; then : svn_cv_pycfmt_apr_int64_t="l" fi rm -f conftest* - fi - if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + fi + if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - MaTcHtHiS APR_INT64_T_FMT EnDeNd + MaTcHtHiS APR_INT64_T_FMT EnDeNd _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "MaTcHtHiS +\"d\" +EnDeNd" >/dev/null 2>&1; then : svn_cv_pycfmt_apr_int64_t="i" fi rm -f conftest* - fi + fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $svn_cv_pycfmt_apr_int64_t" >&5 $as_echo "$svn_cv_pycfmt_apr_int64_t" >&6; } - CPPFLAGS="$SVN_PYCFMT_SAVE_CPPFLAGS" - if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then - as_fn_error $? "failed to recognize APR_INT64_T_FMT on this platform" "$LINENO" 5 - fi + CPPFLAGS="$SVN_PYCFMT_SAVE_CPPFLAGS" + if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then + as_fn_error $? "failed to recognize APR_INT64_T_FMT on this platform" "$LINENO" 5 + fi cat >>confdefs.h <<_ACEOF #define SVN_APR_INT64_T_PYCFMT "$svn_cv_pycfmt_apr_int64_t" _ACEOF - fi + fi - if test "$PERL" != "none"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking perl version" >&5 + if test "$PERL" != "none"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking perl version" >&5 $as_echo_n "checking perl version... " >&6; } - PERL_VERSION="`$PERL -e 'q([); print $] * 1000000,$/;'`" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL_VERSION" >&5 + PERL_VERSION="`$PERL -e 'q([); print $] * 1000000,$/;'`" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL_VERSION" >&5 $as_echo "$PERL_VERSION" >&6; } - if test "$PERL_VERSION" -ge "5008000"; then - SWIG_PL_INCLUDES="\$(SWIG_INCLUDES) `$PERL -MExtUtils::Embed -e ccopts`" - SWIG_PL_LINK="`$PERL -MExtUtils::Embed -e ldopts`" - SWIG_PL_LINK="` + if test "$PERL_VERSION" -ge "5008000"; then + SWIG_PL_INCLUDES="\$(SWIG_INCLUDES) `$PERL -MExtUtils::Embed -e ccopts`" + SWIG_PL_LINK="`$PERL -MExtUtils::Embed -e ldopts`" + SWIG_PL_LINK="` input_flags="$SWIG_PL_LINK" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi `" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: perl bindings require perl 5.8.0 or newer." >&5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: perl bindings require perl 5.8.0 or newer." >&5 $as_echo "$as_me: WARNING: perl bindings require perl 5.8.0 or newer." >&2;} - fi fi + fi - SWIG_RB_COMPILE="none" - SWIG_RB_LINK="none" - if test "$RUBY" != "none"; then - rbconfig="$RUBY -rrbconfig -e " + SWIG_RB_COMPILE="none" + SWIG_RB_LINK="none" + if test "$RUBY" != "none"; then + rbconfig="$RUBY -rrbconfig -e " - for var_name in arch archdir CC LDSHARED DLEXT LIBS LIBRUBYARG \ - rubyhdrdir rubyarchhdrdir sitedir sitelibdir sitearchdir libdir - do - rbconfig_tmp=`$rbconfig "print RbConfig::CONFIG['$var_name']"` - eval "rbconfig_$var_name=\"$rbconfig_tmp\"" - done + for var_name in arch archdir CC LDSHARED DLEXT LIBS LIBRUBYARG \ + rubyhdrdir rubyarchhdrdir sitedir sitelibdir sitearchdir libdir + do + rbconfig_tmp=`$rbconfig "print RbConfig::CONFIG['$var_name']"` + eval "rbconfig_$var_name=\"$rbconfig_tmp\"" + done - { $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Ruby SWIG binding" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Ruby SWIG binding" >&5 $as_echo "$as_me: Configuring Ruby SWIG binding" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Ruby include path" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Ruby include path" >&5 $as_echo_n "checking for Ruby include path... " >&6; } if ${svn_cv_ruby_includes+:} false; then : $as_echo_n "(cached) " >&6 else - if test -d "$rbconfig_rubyhdrdir"; then - svn_cv_ruby_includes="-I. -I$rbconfig_rubyhdrdir -I$rbconfig_rubyhdrdir/ruby -I$rbconfig_rubyhdrdir/ruby/backward" - if test -d "$rbconfig_rubyarchhdrdir"; then - svn_cv_ruby_includes="$svn_cv_ruby_includes -I$rbconfig_rubyarchhdrdir" - else - svn_cv_ruby_includes="$svn_cv_ruby_includes -I$rbconfig_rubyhdrdir/$rbconfig_arch" - fi + if test -d "$rbconfig_rubyhdrdir"; then + svn_cv_ruby_includes="-I. -I$rbconfig_rubyhdrdir -I$rbconfig_rubyhdrdir/ruby -I$rbconfig_rubyhdrdir/ruby/backward" + if test -d "$rbconfig_rubyarchhdrdir"; then + svn_cv_ruby_includes="$svn_cv_ruby_includes -I$rbconfig_rubyarchhdrdir" else - svn_cv_ruby_includes="-I. -I$rbconfig_archdir" + svn_cv_ruby_includes="$svn_cv_ruby_includes -I$rbconfig_rubyhdrdir/$rbconfig_arch" fi + else + svn_cv_ruby_includes="-I. -I$rbconfig_archdir" + fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $svn_cv_ruby_includes" >&5 $as_echo "$svn_cv_ruby_includes" >&6; } - SWIG_RB_INCLUDES="\$(SWIG_INCLUDES) $svn_cv_ruby_includes" + SWIG_RB_INCLUDES="\$(SWIG_INCLUDES) $svn_cv_ruby_includes" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to compile Ruby extensions" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to compile Ruby extensions" >&5 $as_echo_n "checking how to compile Ruby extensions... " >&6; } if ${svn_cv_ruby_compile+:} false; then : $as_echo_n "(cached) " >&6 else - svn_cv_ruby_compile="$rbconfig_CC $CFLAGS" + svn_cv_ruby_compile="$rbconfig_CC $CFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $svn_cv_ruby_compile" >&5 $as_echo "$svn_cv_ruby_compile" >&6; } - SWIG_RB_COMPILE="$svn_cv_ruby_compile" + SWIG_RB_COMPILE="$svn_cv_ruby_compile" SWIG_RB_COMPILE=`echo "$SWIG_RB_COMPILE" | $SED -e 's/-ansi//'` SWIG_RB_COMPILE=`echo "$SWIG_RB_COMPILE" | $SED -e 's/-std=c89//'` SWIG_RB_COMPILE=`echo "$SWIG_RB_COMPILE" | $SED -e 's/-std=c90//'` - SWIG_RB_COMPILE="$SWIG_RB_COMPILE -Wno-int-to-pointer-cast" + SWIG_RB_COMPILE="$SWIG_RB_COMPILE -Wno-int-to-pointer-cast" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link Ruby extensions" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link Ruby extensions" >&5 $as_echo_n "checking how to link Ruby extensions... " >&6; } if ${svn_cv_ruby_link+:} false; then : $as_echo_n "(cached) " >&6 else - svn_cv_ruby_link="`$RUBY -e 'ARGV.shift; print ARGV.join(%q( ))' \ - $rbconfig_LDSHARED`" - svn_cv_ruby_link="$rbconfig_CC $svn_cv_ruby_link" - svn_cv_ruby_link="$svn_cv_ruby_link -shrext .$rbconfig_DLEXT" + svn_cv_ruby_link="`$RUBY -e 'ARGV.shift; print ARGV.join(%q( ))' \ + $rbconfig_LDSHARED`" + svn_cv_ruby_link="$rbconfig_CC $svn_cv_ruby_link" + svn_cv_ruby_link="$svn_cv_ruby_link -shrext .$rbconfig_DLEXT" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $svn_cv_ruby_link" >&5 $as_echo "$svn_cv_ruby_link" >&6; } - SWIG_RB_LINK="$svn_cv_ruby_link" + SWIG_RB_LINK="$svn_cv_ruby_link" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link Ruby libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link Ruby libraries" >&5 $as_echo_n "checking how to link Ruby libraries... " >&6; } if ${ac_cv_ruby_libs+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_ruby_libs="$rbconfig_LIBRUBYARG $rbconfig_LIBS" + ac_cv_ruby_libs="$rbconfig_LIBRUBYARG $rbconfig_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ruby_libs" >&5 $as_echo "$ac_cv_ruby_libs" >&6; } - SWIG_RB_LIBS="` + SWIG_RB_LIBS="` input_flags="$ac_cv_ruby_libs" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi `" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rb_errinfo" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rb_errinfo" >&5 $as_echo_n "checking for rb_errinfo... " >&6; } - old_CFLAGS="$CFLAGS" - old_LIBS="$LIBS" - CFLAGS="$CFLAGS $svn_cv_ruby_includes" + old_CFLAGS="$CFLAGS" + old_LIBS="$LIBS" + CFLAGS="$CFLAGS $svn_cv_ruby_includes" CFLAGS=`echo "$CFLAGS" | $SED -e 's/-ansi//'` CFLAGS=`echo "$CFLAGS" | $SED -e 's/-std=c89//'` CFLAGS=`echo "$CFLAGS" | $SED -e 's/-std=c90//'` - LIBS="$SWIG_RB_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + LIBS="$SWIG_RB_LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main() {rb_errinfo();} _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_rb_errinfo="yes" else have_rb_errinfo="no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test "$have_rb_errinfo" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + if test "$have_rb_errinfo" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_RB_ERRINFO 1" >>confdefs.h - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - fi - CFLAGS="$old_CFLAGS" - LIBS="$old_LIBS" + fi + CFLAGS="$old_CFLAGS" + LIBS="$old_LIBS" - if ${svn_cv_ruby_sitedir+:} false; then : + if ${svn_cv_ruby_sitedir+:} false; then : $as_echo_n "(cached) " >&6 else - svn_cv_ruby_sitedir="$rbconfig_sitedir" + svn_cv_ruby_sitedir="$rbconfig_sitedir" fi # Check whether --with-ruby-sitedir was given. if test "${with_ruby_sitedir+set}" = set; then : withval=$with_ruby_sitedir; svn_ruby_installdir="$withval" else svn_ruby_installdir="$svn_cv_ruby_sitedir" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to install Ruby scripts" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to install Ruby scripts" >&5 $as_echo_n "checking where to install Ruby scripts... " >&6; } - if ${svn_cv_ruby_sitedir_libsuffix+:} false; then : + if ${svn_cv_ruby_sitedir_libsuffix+:} false; then : $as_echo_n "(cached) " >&6 else - svn_cv_ruby_sitedir_libsuffix="`echo "$rbconfig_sitelibdir" | \ - $SED -e "s,^$rbconfig_sitedir,,"`" + svn_cv_ruby_sitedir_libsuffix="`echo "$rbconfig_sitelibdir" | \ + $SED -e "s,^$rbconfig_sitedir,,"`" fi - SWIG_RB_SITE_LIB_DIR="${svn_ruby_installdir}${svn_cv_ruby_sitedir_libsuffix}" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_RB_SITE_LIB_DIR" >&5 + SWIG_RB_SITE_LIB_DIR="${svn_ruby_installdir}${svn_cv_ruby_sitedir_libsuffix}" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_RB_SITE_LIB_DIR" >&5 $as_echo "$SWIG_RB_SITE_LIB_DIR" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to install Ruby extensions" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to install Ruby extensions" >&5 $as_echo_n "checking where to install Ruby extensions... " >&6; } - if ${svn_cv_ruby_sitedir_archsuffix+:} false; then : + if ${svn_cv_ruby_sitedir_archsuffix+:} false; then : $as_echo_n "(cached) " >&6 else - svn_cv_ruby_sitedir_archsuffix="`echo "$rbconfig_sitearchdir" | \ - $SED -e "s,^$rbconfig_sitedir,,"`" + svn_cv_ruby_sitedir_archsuffix="`echo "$rbconfig_sitearchdir" | \ + $SED -e "s,^$rbconfig_sitedir,,"`" fi - SWIG_RB_SITE_ARCH_DIR="${svn_ruby_installdir}${svn_cv_ruby_sitedir_archsuffix}" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_RB_SITE_ARCH_DIR" >&5 + SWIG_RB_SITE_ARCH_DIR="${svn_ruby_installdir}${svn_cv_ruby_sitedir_archsuffix}" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_RB_SITE_ARCH_DIR" >&5 $as_echo "$SWIG_RB_SITE_ARCH_DIR" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to use output level for Ruby bindings tests" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to use output level for Ruby bindings tests" >&5 $as_echo_n "checking how to use output level for Ruby bindings tests... " >&6; } - if ${svn_cv_ruby_test_verbose+:} false; then : + if ${svn_cv_ruby_test_verbose+:} false; then : $as_echo_n "(cached) " >&6 else - svn_cv_ruby_test_verbose="normal" + svn_cv_ruby_test_verbose="normal" fi # Check whether --with-ruby-test-verbose was given. if test "${with_ruby_test_verbose+set}" = set; then : withval=$with_ruby_test_verbose; svn_ruby_test_verbose="$withval" else svn_ruby_test_verbose="$svn_cv_ruby_test_verbose" fi - SWIG_RB_TEST_VERBOSE="$svn_ruby_test_verbose" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_RB_TEST_VERBOSE" >&5 + SWIG_RB_TEST_VERBOSE="$svn_ruby_test_verbose" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_RB_TEST_VERBOSE" >&5 $as_echo "$SWIG_RB_TEST_VERBOSE" >&6; } - fi fi ;; *) where=$withval if test $where = no; then SWIG=none elif test $where = required || test $where = check; then # Extract the first word of "swig", so it can be a program name with args. set dummy swig; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_SWIG+:} false; then : $as_echo_n "(cached) " >&6 else case $SWIG in [\\/]* | ?:[\\/]*) ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_SWIG" && ac_cv_path_SWIG="none" ;; esac fi SWIG=$ac_cv_path_SWIG if test -n "$SWIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5 $as_echo "$SWIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$SWIG" = "none" && test $where = required; then as_fn_error $? "SWIG required, but not found" "$LINENO" 5 fi else if test -f "$where"; then SWIG="$where" else SWIG="$where/bin/swig" fi if test ! -f "$SWIG" || test ! -x "$SWIG"; then as_fn_error $? "Could not find swig binary at $SWIG" "$LINENO" 5 fi fi if test "$SWIG" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking swig version" >&5 $as_echo_n "checking swig version... " >&6; } SWIG_VERSION_RAW="`$SWIG -version 2>&1 | \ $SED -ne 's/^.*Version \(.*\)$/\1/p'`" # We want the version as an integer so we can test against # which version we're using. SWIG doesn't provide this # to us so we have to come up with it on our own. # The major is passed straight through, # the minor is zero padded to two places, # and the patch level is zero padded to three places. # e.g. 1.3.24 becomes 103024 SWIG_VERSION="`echo \"$SWIG_VERSION_RAW\" | \ $SED -e 's/[^0-9\.].*$//' \ -e 's/\.\([0-9]\)$/.0\1/' \ -e 's/\.\([0-9][0-9]\)$/.0\1/' \ -e 's/\.\([0-9]\)\./0\1/; s/\.//g;'`" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_VERSION_RAW" >&5 $as_echo "$SWIG_VERSION_RAW" >&6; } # If you change the required swig version number, don't forget to update: # subversion/bindings/swig/INSTALL if test -n "$SWIG_VERSION" && test "$SWIG_VERSION" -ge "103024"; then SWIG_SUITABLE=yes else SWIG_SUITABLE=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Detected SWIG version $SWIG_VERSION_RAW" >&5 $as_echo "$as_me: WARNING: Detected SWIG version $SWIG_VERSION_RAW" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion requires SWIG >= 1.3.24" >&5 $as_echo "$as_me: WARNING: Subversion requires SWIG >= 1.3.24" >&2;} fi + fi - SWIG_PY_COMPILE="none" - SWIG_PY_LINK="none" - if test "$PYTHON" != "none"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Configuring python swig binding" >&5 + SWIG_PY_COMPILE="none" + SWIG_PY_LINK="none" + if test "$PYTHON" != "none"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Configuring python swig binding" >&5 $as_echo "$as_me: Configuring python swig binding" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python includes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python includes" >&5 $as_echo_n "checking for Python includes... " >&6; } if ${ac_cv_python_includes+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_includes="`$PYTHON ${abs_srcdir}/build/get-py-info.py --includes`" + ac_cv_python_includes="`$PYTHON ${abs_srcdir}/build/get-py-info.py --includes`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_includes" >&5 $as_echo "$ac_cv_python_includes" >&6; } - SWIG_PY_INCLUDES="\$(SWIG_INCLUDES) $ac_cv_python_includes" + SWIG_PY_INCLUDES="\$(SWIG_INCLUDES) $ac_cv_python_includes" - if test "$ac_cv_python_includes" = "none"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python bindings cannot be built without distutils module" >&5 + if test "$ac_cv_python_includes" = "none"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python bindings cannot be built without distutils module" >&5 $as_echo "$as_me: WARNING: python bindings cannot be built without distutils module" >&2;} - fi + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiling Python extensions" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiling Python extensions" >&5 $as_echo_n "checking for compiling Python extensions... " >&6; } if ${ac_cv_python_compile+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_compile="`$PYTHON ${abs_srcdir}/build/get-py-info.py --compile`" + ac_cv_python_compile="`$PYTHON ${abs_srcdir}/build/get-py-info.py --compile`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_compile" >&5 $as_echo "$ac_cv_python_compile" >&6; } - SWIG_PY_COMPILE="$ac_cv_python_compile $CFLAGS" + SWIG_PY_COMPILE="$ac_cv_python_compile $CFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking Python extensions" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking Python extensions" >&5 $as_echo_n "checking for linking Python extensions... " >&6; } if ${ac_cv_python_link+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_link="`$PYTHON ${abs_srcdir}/build/get-py-info.py --link`" + ac_cv_python_link="`$PYTHON ${abs_srcdir}/build/get-py-info.py --link`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_link" >&5 $as_echo "$ac_cv_python_link" >&6; } - SWIG_PY_LINK="$ac_cv_python_link" + SWIG_PY_LINK="$ac_cv_python_link" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking Python libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking Python libraries" >&5 $as_echo_n "checking for linking Python libraries... " >&6; } if ${ac_cv_python_libs+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_libs="`$PYTHON ${abs_srcdir}/build/get-py-info.py --libs`" + ac_cv_python_libs="`$PYTHON ${abs_srcdir}/build/get-py-info.py --libs`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_libs" >&5 $as_echo "$ac_cv_python_libs" >&6; } - SWIG_PY_LIBS="` + SWIG_PY_LIBS="` input_flags="$ac_cv_python_libs" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi `" - SVN_PYCFMT_SAVE_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for apr_int64_t Python/C API format string" >&5 + SVN_PYCFMT_SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for apr_int64_t Python/C API format string" >&5 $as_echo_n "checking for apr_int64_t Python/C API format string... " >&6; } if ${svn_cv_pycfmt_apr_int64_t+:} false; then : $as_echo_n "(cached) " >&6 else - if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - MaTcHtHiS APR_INT64_T_FMT EnDeNd + MaTcHtHiS APR_INT64_T_FMT EnDeNd _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "MaTcHtHiS +\"lld\" +EnDeNd" >/dev/null 2>&1; then : svn_cv_pycfmt_apr_int64_t="L" fi rm -f conftest* - fi - if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + fi + if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ r - #include - MaTcHtHiS APR_INT64_T_FMT EnDeNd + #include + MaTcHtHiS APR_INT64_T_FMT EnDeNd _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "MaTcHtHiS +\"ld\" +EnDeNd" >/dev/null 2>&1; then : svn_cv_pycfmt_apr_int64_t="l" fi rm -f conftest* - fi - if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + fi + if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - MaTcHtHiS APR_INT64_T_FMT EnDeNd + MaTcHtHiS APR_INT64_T_FMT EnDeNd _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "MaTcHtHiS +\"d\" +EnDeNd" >/dev/null 2>&1; then : svn_cv_pycfmt_apr_int64_t="i" fi rm -f conftest* - fi + fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $svn_cv_pycfmt_apr_int64_t" >&5 $as_echo "$svn_cv_pycfmt_apr_int64_t" >&6; } - CPPFLAGS="$SVN_PYCFMT_SAVE_CPPFLAGS" - if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then - as_fn_error $? "failed to recognize APR_INT64_T_FMT on this platform" "$LINENO" 5 - fi + CPPFLAGS="$SVN_PYCFMT_SAVE_CPPFLAGS" + if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then + as_fn_error $? "failed to recognize APR_INT64_T_FMT on this platform" "$LINENO" 5 + fi cat >>confdefs.h <<_ACEOF #define SVN_APR_INT64_T_PYCFMT "$svn_cv_pycfmt_apr_int64_t" _ACEOF - fi + fi - if test "$PERL" != "none"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking perl version" >&5 + if test "$PERL" != "none"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking perl version" >&5 $as_echo_n "checking perl version... " >&6; } - PERL_VERSION="`$PERL -e 'q([); print $] * 1000000,$/;'`" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL_VERSION" >&5 + PERL_VERSION="`$PERL -e 'q([); print $] * 1000000,$/;'`" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL_VERSION" >&5 $as_echo "$PERL_VERSION" >&6; } - if test "$PERL_VERSION" -ge "5008000"; then - SWIG_PL_INCLUDES="\$(SWIG_INCLUDES) `$PERL -MExtUtils::Embed -e ccopts`" - SWIG_PL_LINK="`$PERL -MExtUtils::Embed -e ldopts`" - SWIG_PL_LINK="` + if test "$PERL_VERSION" -ge "5008000"; then + SWIG_PL_INCLUDES="\$(SWIG_INCLUDES) `$PERL -MExtUtils::Embed -e ccopts`" + SWIG_PL_LINK="`$PERL -MExtUtils::Embed -e ldopts`" + SWIG_PL_LINK="` input_flags="$SWIG_PL_LINK" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi `" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: perl bindings require perl 5.8.0 or newer." >&5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: perl bindings require perl 5.8.0 or newer." >&5 $as_echo "$as_me: WARNING: perl bindings require perl 5.8.0 or newer." >&2;} - fi fi + fi - SWIG_RB_COMPILE="none" - SWIG_RB_LINK="none" - if test "$RUBY" != "none"; then - rbconfig="$RUBY -rrbconfig -e " + SWIG_RB_COMPILE="none" + SWIG_RB_LINK="none" + if test "$RUBY" != "none"; then + rbconfig="$RUBY -rrbconfig -e " - for var_name in arch archdir CC LDSHARED DLEXT LIBS LIBRUBYARG \ - rubyhdrdir rubyarchhdrdir sitedir sitelibdir sitearchdir libdir - do - rbconfig_tmp=`$rbconfig "print RbConfig::CONFIG['$var_name']"` - eval "rbconfig_$var_name=\"$rbconfig_tmp\"" - done + for var_name in arch archdir CC LDSHARED DLEXT LIBS LIBRUBYARG \ + rubyhdrdir rubyarchhdrdir sitedir sitelibdir sitearchdir libdir + do + rbconfig_tmp=`$rbconfig "print RbConfig::CONFIG['$var_name']"` + eval "rbconfig_$var_name=\"$rbconfig_tmp\"" + done - { $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Ruby SWIG binding" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Ruby SWIG binding" >&5 $as_echo "$as_me: Configuring Ruby SWIG binding" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Ruby include path" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Ruby include path" >&5 $as_echo_n "checking for Ruby include path... " >&6; } if ${svn_cv_ruby_includes+:} false; then : $as_echo_n "(cached) " >&6 else - if test -d "$rbconfig_rubyhdrdir"; then - svn_cv_ruby_includes="-I. -I$rbconfig_rubyhdrdir -I$rbconfig_rubyhdrdir/ruby -I$rbconfig_rubyhdrdir/ruby/backward" - if test -d "$rbconfig_rubyarchhdrdir"; then - svn_cv_ruby_includes="$svn_cv_ruby_includes -I$rbconfig_rubyarchhdrdir" - else - svn_cv_ruby_includes="$svn_cv_ruby_includes -I$rbconfig_rubyhdrdir/$rbconfig_arch" - fi + if test -d "$rbconfig_rubyhdrdir"; then + svn_cv_ruby_includes="-I. -I$rbconfig_rubyhdrdir -I$rbconfig_rubyhdrdir/ruby -I$rbconfig_rubyhdrdir/ruby/backward" + if test -d "$rbconfig_rubyarchhdrdir"; then + svn_cv_ruby_includes="$svn_cv_ruby_includes -I$rbconfig_rubyarchhdrdir" else - svn_cv_ruby_includes="-I. -I$rbconfig_archdir" + svn_cv_ruby_includes="$svn_cv_ruby_includes -I$rbconfig_rubyhdrdir/$rbconfig_arch" fi + else + svn_cv_ruby_includes="-I. -I$rbconfig_archdir" + fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $svn_cv_ruby_includes" >&5 $as_echo "$svn_cv_ruby_includes" >&6; } - SWIG_RB_INCLUDES="\$(SWIG_INCLUDES) $svn_cv_ruby_includes" + SWIG_RB_INCLUDES="\$(SWIG_INCLUDES) $svn_cv_ruby_includes" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to compile Ruby extensions" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to compile Ruby extensions" >&5 $as_echo_n "checking how to compile Ruby extensions... " >&6; } if ${svn_cv_ruby_compile+:} false; then : $as_echo_n "(cached) " >&6 else - svn_cv_ruby_compile="$rbconfig_CC $CFLAGS" + svn_cv_ruby_compile="$rbconfig_CC $CFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $svn_cv_ruby_compile" >&5 $as_echo "$svn_cv_ruby_compile" >&6; } - SWIG_RB_COMPILE="$svn_cv_ruby_compile" + SWIG_RB_COMPILE="$svn_cv_ruby_compile" SWIG_RB_COMPILE=`echo "$SWIG_RB_COMPILE" | $SED -e 's/-ansi//'` SWIG_RB_COMPILE=`echo "$SWIG_RB_COMPILE" | $SED -e 's/-std=c89//'` SWIG_RB_COMPILE=`echo "$SWIG_RB_COMPILE" | $SED -e 's/-std=c90//'` - SWIG_RB_COMPILE="$SWIG_RB_COMPILE -Wno-int-to-pointer-cast" + SWIG_RB_COMPILE="$SWIG_RB_COMPILE -Wno-int-to-pointer-cast" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link Ruby extensions" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link Ruby extensions" >&5 $as_echo_n "checking how to link Ruby extensions... " >&6; } if ${svn_cv_ruby_link+:} false; then : $as_echo_n "(cached) " >&6 else - svn_cv_ruby_link="`$RUBY -e 'ARGV.shift; print ARGV.join(%q( ))' \ - $rbconfig_LDSHARED`" - svn_cv_ruby_link="$rbconfig_CC $svn_cv_ruby_link" - svn_cv_ruby_link="$svn_cv_ruby_link -shrext .$rbconfig_DLEXT" + svn_cv_ruby_link="`$RUBY -e 'ARGV.shift; print ARGV.join(%q( ))' \ + $rbconfig_LDSHARED`" + svn_cv_ruby_link="$rbconfig_CC $svn_cv_ruby_link" + svn_cv_ruby_link="$svn_cv_ruby_link -shrext .$rbconfig_DLEXT" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $svn_cv_ruby_link" >&5 $as_echo "$svn_cv_ruby_link" >&6; } - SWIG_RB_LINK="$svn_cv_ruby_link" + SWIG_RB_LINK="$svn_cv_ruby_link" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link Ruby libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link Ruby libraries" >&5 $as_echo_n "checking how to link Ruby libraries... " >&6; } if ${ac_cv_ruby_libs+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_ruby_libs="$rbconfig_LIBRUBYARG $rbconfig_LIBS" + ac_cv_ruby_libs="$rbconfig_LIBRUBYARG $rbconfig_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ruby_libs" >&5 $as_echo "$ac_cv_ruby_libs" >&6; } - SWIG_RB_LIBS="` + SWIG_RB_LIBS="` input_flags="$ac_cv_ruby_libs" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi `" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rb_errinfo" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rb_errinfo" >&5 $as_echo_n "checking for rb_errinfo... " >&6; } - old_CFLAGS="$CFLAGS" - old_LIBS="$LIBS" - CFLAGS="$CFLAGS $svn_cv_ruby_includes" + old_CFLAGS="$CFLAGS" + old_LIBS="$LIBS" + CFLAGS="$CFLAGS $svn_cv_ruby_includes" CFLAGS=`echo "$CFLAGS" | $SED -e 's/-ansi//'` CFLAGS=`echo "$CFLAGS" | $SED -e 's/-std=c89//'` CFLAGS=`echo "$CFLAGS" | $SED -e 's/-std=c90//'` - LIBS="$SWIG_RB_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + LIBS="$SWIG_RB_LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main() {rb_errinfo();} _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_rb_errinfo="yes" else have_rb_errinfo="no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test "$have_rb_errinfo" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + if test "$have_rb_errinfo" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_RB_ERRINFO 1" >>confdefs.h - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - fi - CFLAGS="$old_CFLAGS" - LIBS="$old_LIBS" + fi + CFLAGS="$old_CFLAGS" + LIBS="$old_LIBS" - if ${svn_cv_ruby_sitedir+:} false; then : + if ${svn_cv_ruby_sitedir+:} false; then : $as_echo_n "(cached) " >&6 else - svn_cv_ruby_sitedir="$rbconfig_sitedir" + svn_cv_ruby_sitedir="$rbconfig_sitedir" fi # Check whether --with-ruby-sitedir was given. if test "${with_ruby_sitedir+set}" = set; then : withval=$with_ruby_sitedir; svn_ruby_installdir="$withval" else svn_ruby_installdir="$svn_cv_ruby_sitedir" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to install Ruby scripts" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to install Ruby scripts" >&5 $as_echo_n "checking where to install Ruby scripts... " >&6; } - if ${svn_cv_ruby_sitedir_libsuffix+:} false; then : + if ${svn_cv_ruby_sitedir_libsuffix+:} false; then : $as_echo_n "(cached) " >&6 else - svn_cv_ruby_sitedir_libsuffix="`echo "$rbconfig_sitelibdir" | \ - $SED -e "s,^$rbconfig_sitedir,,"`" + svn_cv_ruby_sitedir_libsuffix="`echo "$rbconfig_sitelibdir" | \ + $SED -e "s,^$rbconfig_sitedir,,"`" fi - SWIG_RB_SITE_LIB_DIR="${svn_ruby_installdir}${svn_cv_ruby_sitedir_libsuffix}" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_RB_SITE_LIB_DIR" >&5 + SWIG_RB_SITE_LIB_DIR="${svn_ruby_installdir}${svn_cv_ruby_sitedir_libsuffix}" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_RB_SITE_LIB_DIR" >&5 $as_echo "$SWIG_RB_SITE_LIB_DIR" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to install Ruby extensions" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to install Ruby extensions" >&5 $as_echo_n "checking where to install Ruby extensions... " >&6; } - if ${svn_cv_ruby_sitedir_archsuffix+:} false; then : + if ${svn_cv_ruby_sitedir_archsuffix+:} false; then : $as_echo_n "(cached) " >&6 else - svn_cv_ruby_sitedir_archsuffix="`echo "$rbconfig_sitearchdir" | \ - $SED -e "s,^$rbconfig_sitedir,,"`" + svn_cv_ruby_sitedir_archsuffix="`echo "$rbconfig_sitearchdir" | \ + $SED -e "s,^$rbconfig_sitedir,,"`" fi - SWIG_RB_SITE_ARCH_DIR="${svn_ruby_installdir}${svn_cv_ruby_sitedir_archsuffix}" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_RB_SITE_ARCH_DIR" >&5 + SWIG_RB_SITE_ARCH_DIR="${svn_ruby_installdir}${svn_cv_ruby_sitedir_archsuffix}" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_RB_SITE_ARCH_DIR" >&5 $as_echo "$SWIG_RB_SITE_ARCH_DIR" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to use output level for Ruby bindings tests" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to use output level for Ruby bindings tests" >&5 $as_echo_n "checking how to use output level for Ruby bindings tests... " >&6; } - if ${svn_cv_ruby_test_verbose+:} false; then : + if ${svn_cv_ruby_test_verbose+:} false; then : $as_echo_n "(cached) " >&6 else - svn_cv_ruby_test_verbose="normal" + svn_cv_ruby_test_verbose="normal" fi # Check whether --with-ruby-test-verbose was given. if test "${with_ruby_test_verbose+set}" = set; then : withval=$with_ruby_test_verbose; svn_ruby_test_verbose="$withval" else svn_ruby_test_verbose="$svn_cv_ruby_test_verbose" fi - SWIG_RB_TEST_VERBOSE="$svn_ruby_test_verbose" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_RB_TEST_VERBOSE" >&5 + SWIG_RB_TEST_VERBOSE="$svn_ruby_test_verbose" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_RB_TEST_VERBOSE" >&5 $as_echo "$SWIG_RB_TEST_VERBOSE" >&6; } - fi fi ;; esac else where=check if test $where = no; then SWIG=none elif test $where = required || test $where = check; then # Extract the first word of "swig", so it can be a program name with args. set dummy swig; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_SWIG+:} false; then : $as_echo_n "(cached) " >&6 else case $SWIG in [\\/]* | ?:[\\/]*) ac_cv_path_SWIG="$SWIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_SWIG" && ac_cv_path_SWIG="none" ;; esac fi SWIG=$ac_cv_path_SWIG if test -n "$SWIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5 $as_echo "$SWIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$SWIG" = "none" && test $where = required; then as_fn_error $? "SWIG required, but not found" "$LINENO" 5 fi else if test -f "$where"; then SWIG="$where" else SWIG="$where/bin/swig" fi if test ! -f "$SWIG" || test ! -x "$SWIG"; then as_fn_error $? "Could not find swig binary at $SWIG" "$LINENO" 5 fi fi if test "$SWIG" != "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking swig version" >&5 $as_echo_n "checking swig version... " >&6; } SWIG_VERSION_RAW="`$SWIG -version 2>&1 | \ $SED -ne 's/^.*Version \(.*\)$/\1/p'`" # We want the version as an integer so we can test against # which version we're using. SWIG doesn't provide this # to us so we have to come up with it on our own. # The major is passed straight through, # the minor is zero padded to two places, # and the patch level is zero padded to three places. # e.g. 1.3.24 becomes 103024 SWIG_VERSION="`echo \"$SWIG_VERSION_RAW\" | \ $SED -e 's/[^0-9\.].*$//' \ -e 's/\.\([0-9]\)$/.0\1/' \ -e 's/\.\([0-9][0-9]\)$/.0\1/' \ -e 's/\.\([0-9]\)\./0\1/; s/\.//g;'`" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_VERSION_RAW" >&5 $as_echo "$SWIG_VERSION_RAW" >&6; } # If you change the required swig version number, don't forget to update: # subversion/bindings/swig/INSTALL if test -n "$SWIG_VERSION" && test "$SWIG_VERSION" -ge "103024"; then SWIG_SUITABLE=yes else SWIG_SUITABLE=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Detected SWIG version $SWIG_VERSION_RAW" >&5 $as_echo "$as_me: WARNING: Detected SWIG version $SWIG_VERSION_RAW" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion requires SWIG >= 1.3.24" >&5 $as_echo "$as_me: WARNING: Subversion requires SWIG >= 1.3.24" >&2;} fi + fi - SWIG_PY_COMPILE="none" - SWIG_PY_LINK="none" - if test "$PYTHON" != "none"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Configuring python swig binding" >&5 + SWIG_PY_COMPILE="none" + SWIG_PY_LINK="none" + if test "$PYTHON" != "none"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Configuring python swig binding" >&5 $as_echo "$as_me: Configuring python swig binding" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python includes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python includes" >&5 $as_echo_n "checking for Python includes... " >&6; } if ${ac_cv_python_includes+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_includes="`$PYTHON ${abs_srcdir}/build/get-py-info.py --includes`" + ac_cv_python_includes="`$PYTHON ${abs_srcdir}/build/get-py-info.py --includes`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_includes" >&5 $as_echo "$ac_cv_python_includes" >&6; } - SWIG_PY_INCLUDES="\$(SWIG_INCLUDES) $ac_cv_python_includes" + SWIG_PY_INCLUDES="\$(SWIG_INCLUDES) $ac_cv_python_includes" - if test "$ac_cv_python_includes" = "none"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python bindings cannot be built without distutils module" >&5 + if test "$ac_cv_python_includes" = "none"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python bindings cannot be built without distutils module" >&5 $as_echo "$as_me: WARNING: python bindings cannot be built without distutils module" >&2;} - fi + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiling Python extensions" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiling Python extensions" >&5 $as_echo_n "checking for compiling Python extensions... " >&6; } if ${ac_cv_python_compile+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_compile="`$PYTHON ${abs_srcdir}/build/get-py-info.py --compile`" + ac_cv_python_compile="`$PYTHON ${abs_srcdir}/build/get-py-info.py --compile`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_compile" >&5 $as_echo "$ac_cv_python_compile" >&6; } - SWIG_PY_COMPILE="$ac_cv_python_compile $CFLAGS" + SWIG_PY_COMPILE="$ac_cv_python_compile $CFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking Python extensions" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking Python extensions" >&5 $as_echo_n "checking for linking Python extensions... " >&6; } if ${ac_cv_python_link+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_link="`$PYTHON ${abs_srcdir}/build/get-py-info.py --link`" + ac_cv_python_link="`$PYTHON ${abs_srcdir}/build/get-py-info.py --link`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_link" >&5 $as_echo "$ac_cv_python_link" >&6; } - SWIG_PY_LINK="$ac_cv_python_link" + SWIG_PY_LINK="$ac_cv_python_link" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking Python libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for linking Python libraries" >&5 $as_echo_n "checking for linking Python libraries... " >&6; } if ${ac_cv_python_libs+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_libs="`$PYTHON ${abs_srcdir}/build/get-py-info.py --libs`" + ac_cv_python_libs="`$PYTHON ${abs_srcdir}/build/get-py-info.py --libs`" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_libs" >&5 $as_echo "$ac_cv_python_libs" >&6; } - SWIG_PY_LIBS="` + SWIG_PY_LIBS="` input_flags="$ac_cv_python_libs" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi `" - SVN_PYCFMT_SAVE_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for apr_int64_t Python/C API format string" >&5 + SVN_PYCFMT_SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for apr_int64_t Python/C API format string" >&5 $as_echo_n "checking for apr_int64_t Python/C API format string... " >&6; } if ${svn_cv_pycfmt_apr_int64_t+:} false; then : $as_echo_n "(cached) " >&6 else - if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - MaTcHtHiS APR_INT64_T_FMT EnDeNd + MaTcHtHiS APR_INT64_T_FMT EnDeNd _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "MaTcHtHiS +\"lld\" +EnDeNd" >/dev/null 2>&1; then : svn_cv_pycfmt_apr_int64_t="L" fi rm -f conftest* - fi - if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + fi + if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ r - #include - MaTcHtHiS APR_INT64_T_FMT EnDeNd + #include + MaTcHtHiS APR_INT64_T_FMT EnDeNd _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "MaTcHtHiS +\"ld\" +EnDeNd" >/dev/null 2>&1; then : svn_cv_pycfmt_apr_int64_t="l" fi rm -f conftest* - fi - if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + fi + if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - MaTcHtHiS APR_INT64_T_FMT EnDeNd + MaTcHtHiS APR_INT64_T_FMT EnDeNd _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "MaTcHtHiS +\"d\" +EnDeNd" >/dev/null 2>&1; then : svn_cv_pycfmt_apr_int64_t="i" fi rm -f conftest* - fi + fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $svn_cv_pycfmt_apr_int64_t" >&5 $as_echo "$svn_cv_pycfmt_apr_int64_t" >&6; } - CPPFLAGS="$SVN_PYCFMT_SAVE_CPPFLAGS" - if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then - as_fn_error $? "failed to recognize APR_INT64_T_FMT on this platform" "$LINENO" 5 - fi + CPPFLAGS="$SVN_PYCFMT_SAVE_CPPFLAGS" + if test "x$svn_cv_pycfmt_apr_int64_t" = "x"; then + as_fn_error $? "failed to recognize APR_INT64_T_FMT on this platform" "$LINENO" 5 + fi cat >>confdefs.h <<_ACEOF #define SVN_APR_INT64_T_PYCFMT "$svn_cv_pycfmt_apr_int64_t" _ACEOF - fi + fi - if test "$PERL" != "none"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking perl version" >&5 + if test "$PERL" != "none"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking perl version" >&5 $as_echo_n "checking perl version... " >&6; } - PERL_VERSION="`$PERL -e 'q([); print $] * 1000000,$/;'`" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL_VERSION" >&5 + PERL_VERSION="`$PERL -e 'q([); print $] * 1000000,$/;'`" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL_VERSION" >&5 $as_echo "$PERL_VERSION" >&6; } - if test "$PERL_VERSION" -ge "5008000"; then - SWIG_PL_INCLUDES="\$(SWIG_INCLUDES) `$PERL -MExtUtils::Embed -e ccopts`" - SWIG_PL_LINK="`$PERL -MExtUtils::Embed -e ldopts`" - SWIG_PL_LINK="` + if test "$PERL_VERSION" -ge "5008000"; then + SWIG_PL_INCLUDES="\$(SWIG_INCLUDES) `$PERL -MExtUtils::Embed -e ccopts`" + SWIG_PL_LINK="`$PERL -MExtUtils::Embed -e ldopts`" + SWIG_PL_LINK="` input_flags="$SWIG_PL_LINK" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi `" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: perl bindings require perl 5.8.0 or newer." >&5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: perl bindings require perl 5.8.0 or newer." >&5 $as_echo "$as_me: WARNING: perl bindings require perl 5.8.0 or newer." >&2;} - fi fi + fi - SWIG_RB_COMPILE="none" - SWIG_RB_LINK="none" - if test "$RUBY" != "none"; then - rbconfig="$RUBY -rrbconfig -e " + SWIG_RB_COMPILE="none" + SWIG_RB_LINK="none" + if test "$RUBY" != "none"; then + rbconfig="$RUBY -rrbconfig -e " - for var_name in arch archdir CC LDSHARED DLEXT LIBS LIBRUBYARG \ - rubyhdrdir rubyarchhdrdir sitedir sitelibdir sitearchdir libdir - do - rbconfig_tmp=`$rbconfig "print RbConfig::CONFIG['$var_name']"` - eval "rbconfig_$var_name=\"$rbconfig_tmp\"" - done + for var_name in arch archdir CC LDSHARED DLEXT LIBS LIBRUBYARG \ + rubyhdrdir rubyarchhdrdir sitedir sitelibdir sitearchdir libdir + do + rbconfig_tmp=`$rbconfig "print RbConfig::CONFIG['$var_name']"` + eval "rbconfig_$var_name=\"$rbconfig_tmp\"" + done - { $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Ruby SWIG binding" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Ruby SWIG binding" >&5 $as_echo "$as_me: Configuring Ruby SWIG binding" >&6;} - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Ruby include path" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Ruby include path" >&5 $as_echo_n "checking for Ruby include path... " >&6; } if ${svn_cv_ruby_includes+:} false; then : $as_echo_n "(cached) " >&6 else - if test -d "$rbconfig_rubyhdrdir"; then - svn_cv_ruby_includes="-I. -I$rbconfig_rubyhdrdir -I$rbconfig_rubyhdrdir/ruby -I$rbconfig_rubyhdrdir/ruby/backward" - if test -d "$rbconfig_rubyarchhdrdir"; then - svn_cv_ruby_includes="$svn_cv_ruby_includes -I$rbconfig_rubyarchhdrdir" - else - svn_cv_ruby_includes="$svn_cv_ruby_includes -I$rbconfig_rubyhdrdir/$rbconfig_arch" - fi + if test -d "$rbconfig_rubyhdrdir"; then + svn_cv_ruby_includes="-I. -I$rbconfig_rubyhdrdir -I$rbconfig_rubyhdrdir/ruby -I$rbconfig_rubyhdrdir/ruby/backward" + if test -d "$rbconfig_rubyarchhdrdir"; then + svn_cv_ruby_includes="$svn_cv_ruby_includes -I$rbconfig_rubyarchhdrdir" else - svn_cv_ruby_includes="-I. -I$rbconfig_archdir" + svn_cv_ruby_includes="$svn_cv_ruby_includes -I$rbconfig_rubyhdrdir/$rbconfig_arch" fi + else + svn_cv_ruby_includes="-I. -I$rbconfig_archdir" + fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $svn_cv_ruby_includes" >&5 $as_echo "$svn_cv_ruby_includes" >&6; } - SWIG_RB_INCLUDES="\$(SWIG_INCLUDES) $svn_cv_ruby_includes" + SWIG_RB_INCLUDES="\$(SWIG_INCLUDES) $svn_cv_ruby_includes" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to compile Ruby extensions" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to compile Ruby extensions" >&5 $as_echo_n "checking how to compile Ruby extensions... " >&6; } if ${svn_cv_ruby_compile+:} false; then : $as_echo_n "(cached) " >&6 else - svn_cv_ruby_compile="$rbconfig_CC $CFLAGS" + svn_cv_ruby_compile="$rbconfig_CC $CFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $svn_cv_ruby_compile" >&5 $as_echo "$svn_cv_ruby_compile" >&6; } - SWIG_RB_COMPILE="$svn_cv_ruby_compile" + SWIG_RB_COMPILE="$svn_cv_ruby_compile" SWIG_RB_COMPILE=`echo "$SWIG_RB_COMPILE" | $SED -e 's/-ansi//'` SWIG_RB_COMPILE=`echo "$SWIG_RB_COMPILE" | $SED -e 's/-std=c89//'` SWIG_RB_COMPILE=`echo "$SWIG_RB_COMPILE" | $SED -e 's/-std=c90//'` - SWIG_RB_COMPILE="$SWIG_RB_COMPILE -Wno-int-to-pointer-cast" + SWIG_RB_COMPILE="$SWIG_RB_COMPILE -Wno-int-to-pointer-cast" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link Ruby extensions" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link Ruby extensions" >&5 $as_echo_n "checking how to link Ruby extensions... " >&6; } if ${svn_cv_ruby_link+:} false; then : $as_echo_n "(cached) " >&6 else - svn_cv_ruby_link="`$RUBY -e 'ARGV.shift; print ARGV.join(%q( ))' \ - $rbconfig_LDSHARED`" - svn_cv_ruby_link="$rbconfig_CC $svn_cv_ruby_link" - svn_cv_ruby_link="$svn_cv_ruby_link -shrext .$rbconfig_DLEXT" + svn_cv_ruby_link="`$RUBY -e 'ARGV.shift; print ARGV.join(%q( ))' \ + $rbconfig_LDSHARED`" + svn_cv_ruby_link="$rbconfig_CC $svn_cv_ruby_link" + svn_cv_ruby_link="$svn_cv_ruby_link -shrext .$rbconfig_DLEXT" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $svn_cv_ruby_link" >&5 $as_echo "$svn_cv_ruby_link" >&6; } - SWIG_RB_LINK="$svn_cv_ruby_link" + SWIG_RB_LINK="$svn_cv_ruby_link" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link Ruby libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link Ruby libraries" >&5 $as_echo_n "checking how to link Ruby libraries... " >&6; } if ${ac_cv_ruby_libs+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_ruby_libs="$rbconfig_LIBRUBYARG $rbconfig_LIBS" + ac_cv_ruby_libs="$rbconfig_LIBRUBYARG $rbconfig_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ruby_libs" >&5 $as_echo "$ac_cv_ruby_libs" >&6; } - SWIG_RB_LIBS="` + SWIG_RB_LIBS="` input_flags="$ac_cv_ruby_libs" output_flags="" filtered_dirs="/lib /lib64 /usr/lib /usr/lib64" for flag in $input_flags; do filter="no" for dir in $filtered_dirs; do if test "$flag" = "-L$dir" || test "$flag" = "-L$dir/"; then filter="yes" break fi done if test "$filter" = "no"; then output_flags="$output_flags $flag" fi done if test -n "$output_flags"; then printf "%s" "${output_flags# }" fi `" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rb_errinfo" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rb_errinfo" >&5 $as_echo_n "checking for rb_errinfo... " >&6; } - old_CFLAGS="$CFLAGS" - old_LIBS="$LIBS" - CFLAGS="$CFLAGS $svn_cv_ruby_includes" + old_CFLAGS="$CFLAGS" + old_LIBS="$LIBS" + CFLAGS="$CFLAGS $svn_cv_ruby_includes" CFLAGS=`echo "$CFLAGS" | $SED -e 's/-ansi//'` CFLAGS=`echo "$CFLAGS" | $SED -e 's/-std=c89//'` CFLAGS=`echo "$CFLAGS" | $SED -e 's/-std=c90//'` - LIBS="$SWIG_RB_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + LIBS="$SWIG_RB_LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main() {rb_errinfo();} _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_rb_errinfo="yes" else have_rb_errinfo="no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - if test "$have_rb_errinfo" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + if test "$have_rb_errinfo" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_RB_ERRINFO 1" >>confdefs.h - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } - fi - CFLAGS="$old_CFLAGS" - LIBS="$old_LIBS" + fi + CFLAGS="$old_CFLAGS" + LIBS="$old_LIBS" - if ${svn_cv_ruby_sitedir+:} false; then : + if ${svn_cv_ruby_sitedir+:} false; then : $as_echo_n "(cached) " >&6 else - svn_cv_ruby_sitedir="$rbconfig_sitedir" + svn_cv_ruby_sitedir="$rbconfig_sitedir" fi # Check whether --with-ruby-sitedir was given. if test "${with_ruby_sitedir+set}" = set; then : withval=$with_ruby_sitedir; svn_ruby_installdir="$withval" else svn_ruby_installdir="$svn_cv_ruby_sitedir" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to install Ruby scripts" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to install Ruby scripts" >&5 $as_echo_n "checking where to install Ruby scripts... " >&6; } - if ${svn_cv_ruby_sitedir_libsuffix+:} false; then : + if ${svn_cv_ruby_sitedir_libsuffix+:} false; then : $as_echo_n "(cached) " >&6 else - svn_cv_ruby_sitedir_libsuffix="`echo "$rbconfig_sitelibdir" | \ - $SED -e "s,^$rbconfig_sitedir,,"`" + svn_cv_ruby_sitedir_libsuffix="`echo "$rbconfig_sitelibdir" | \ + $SED -e "s,^$rbconfig_sitedir,,"`" fi - SWIG_RB_SITE_LIB_DIR="${svn_ruby_installdir}${svn_cv_ruby_sitedir_libsuffix}" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_RB_SITE_LIB_DIR" >&5 + SWIG_RB_SITE_LIB_DIR="${svn_ruby_installdir}${svn_cv_ruby_sitedir_libsuffix}" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_RB_SITE_LIB_DIR" >&5 $as_echo "$SWIG_RB_SITE_LIB_DIR" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to install Ruby extensions" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to install Ruby extensions" >&5 $as_echo_n "checking where to install Ruby extensions... " >&6; } - if ${svn_cv_ruby_sitedir_archsuffix+:} false; then : + if ${svn_cv_ruby_sitedir_archsuffix+:} false; then : $as_echo_n "(cached) " >&6 else - svn_cv_ruby_sitedir_archsuffix="`echo "$rbconfig_sitearchdir" | \ - $SED -e "s,^$rbconfig_sitedir,,"`" + svn_cv_ruby_sitedir_archsuffix="`echo "$rbconfig_sitearchdir" | \ + $SED -e "s,^$rbconfig_sitedir,,"`" fi - SWIG_RB_SITE_ARCH_DIR="${svn_ruby_installdir}${svn_cv_ruby_sitedir_archsuffix}" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_RB_SITE_ARCH_DIR" >&5 + SWIG_RB_SITE_ARCH_DIR="${svn_ruby_installdir}${svn_cv_ruby_sitedir_archsuffix}" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_RB_SITE_ARCH_DIR" >&5 $as_echo "$SWIG_RB_SITE_ARCH_DIR" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to use output level for Ruby bindings tests" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to use output level for Ruby bindings tests" >&5 $as_echo_n "checking how to use output level for Ruby bindings tests... " >&6; } - if ${svn_cv_ruby_test_verbose+:} false; then : + if ${svn_cv_ruby_test_verbose+:} false; then : $as_echo_n "(cached) " >&6 else - svn_cv_ruby_test_verbose="normal" + svn_cv_ruby_test_verbose="normal" fi # Check whether --with-ruby-test-verbose was given. if test "${with_ruby_test_verbose+set}" = set; then : withval=$with_ruby_test_verbose; svn_ruby_test_verbose="$withval" else svn_ruby_test_verbose="$svn_cv_ruby_test_verbose" fi - SWIG_RB_TEST_VERBOSE="$svn_ruby_test_verbose" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_RB_TEST_VERBOSE" >&5 + SWIG_RB_TEST_VERBOSE="$svn_ruby_test_verbose" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG_RB_TEST_VERBOSE" >&5 $as_echo "$SWIG_RB_TEST_VERBOSE" >&6; } - fi fi fi # Check whether --with-ctypesgen was given. if test "${with_ctypesgen+set}" = set; then : withval=$with_ctypesgen; case "$withval" in "no") where=no CTYPESGEN=none if test $where = check; then # Extract the first word of ""ctypesgen.py"", so it can be a program name with args. set dummy "ctypesgen.py"; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_CTYPESGEN+:} false; then : $as_echo_n "(cached) " >&6 else case $CTYPESGEN in [\\/]* | ?:[\\/]*) ac_cv_path_CTYPESGEN="$CTYPESGEN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CTYPESGEN="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_CTYPESGEN" && ac_cv_path_CTYPESGEN="none" ;; esac fi CTYPESGEN=$ac_cv_path_CTYPESGEN if test -n "$CTYPESGEN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CTYPESGEN" >&5 $as_echo "$CTYPESGEN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi elif test $where != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctypesgen.py" >&5 $as_echo_n "checking for ctypesgen.py... " >&6; } if test -f "$where"; then CTYPESGEN="$where" elif test -f "$where/bin/ctypesgen.py"; then CTYPESGEN="$where/bin/ctypesgen.py" else CTYPESGEN="$where/ctypesgen.py" fi if test ! -f "$CTYPESGEN" || test ! -x "$CTYPESGEN"; then as_fn_error $? "Could not find ctypesgen at $where/ctypesgen.py or at $where/bin/ctypesgen.py" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CTYPESGEN" >&5 $as_echo "$CTYPESGEN" >&6; } fi fi ;; "yes") where=check CTYPESGEN=none if test $where = check; then # Extract the first word of ""ctypesgen.py"", so it can be a program name with args. set dummy "ctypesgen.py"; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_CTYPESGEN+:} false; then : $as_echo_n "(cached) " >&6 else case $CTYPESGEN in [\\/]* | ?:[\\/]*) ac_cv_path_CTYPESGEN="$CTYPESGEN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CTYPESGEN="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_CTYPESGEN" && ac_cv_path_CTYPESGEN="none" ;; esac fi CTYPESGEN=$ac_cv_path_CTYPESGEN if test -n "$CTYPESGEN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CTYPESGEN" >&5 $as_echo "$CTYPESGEN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi elif test $where != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctypesgen.py" >&5 $as_echo_n "checking for ctypesgen.py... " >&6; } if test -f "$where"; then CTYPESGEN="$where" elif test -f "$where/bin/ctypesgen.py"; then CTYPESGEN="$where/bin/ctypesgen.py" else CTYPESGEN="$where/ctypesgen.py" fi if test ! -f "$CTYPESGEN" || test ! -x "$CTYPESGEN"; then as_fn_error $? "Could not find ctypesgen at $where/ctypesgen.py or at $where/bin/ctypesgen.py" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CTYPESGEN" >&5 $as_echo "$CTYPESGEN" >&6; } fi fi ;; *) where=$withval CTYPESGEN=none if test $where = check; then # Extract the first word of ""ctypesgen.py"", so it can be a program name with args. set dummy "ctypesgen.py"; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_CTYPESGEN+:} false; then : $as_echo_n "(cached) " >&6 else case $CTYPESGEN in [\\/]* | ?:[\\/]*) ac_cv_path_CTYPESGEN="$CTYPESGEN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CTYPESGEN="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_CTYPESGEN" && ac_cv_path_CTYPESGEN="none" ;; esac fi CTYPESGEN=$ac_cv_path_CTYPESGEN if test -n "$CTYPESGEN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CTYPESGEN" >&5 $as_echo "$CTYPESGEN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi elif test $where != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctypesgen.py" >&5 $as_echo_n "checking for ctypesgen.py... " >&6; } if test -f "$where"; then CTYPESGEN="$where" elif test -f "$where/bin/ctypesgen.py"; then CTYPESGEN="$where/bin/ctypesgen.py" else CTYPESGEN="$where/ctypesgen.py" fi if test ! -f "$CTYPESGEN" || test ! -x "$CTYPESGEN"; then as_fn_error $? "Could not find ctypesgen at $where/ctypesgen.py or at $where/bin/ctypesgen.py" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CTYPESGEN" >&5 $as_echo "$CTYPESGEN" >&6; } fi fi ;; esac else where=check CTYPESGEN=none if test $where = check; then # Extract the first word of ""ctypesgen.py"", so it can be a program name with args. set dummy "ctypesgen.py"; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_CTYPESGEN+:} false; then : $as_echo_n "(cached) " >&6 else case $CTYPESGEN in [\\/]* | ?:[\\/]*) ac_cv_path_CTYPESGEN="$CTYPESGEN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CTYPESGEN="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_CTYPESGEN" && ac_cv_path_CTYPESGEN="none" ;; esac fi CTYPESGEN=$ac_cv_path_CTYPESGEN if test -n "$CTYPESGEN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CTYPESGEN" >&5 $as_echo "$CTYPESGEN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi elif test $where != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctypesgen.py" >&5 $as_echo_n "checking for ctypesgen.py... " >&6; } if test -f "$where"; then CTYPESGEN="$where" elif test -f "$where/bin/ctypesgen.py"; then CTYPESGEN="$where/bin/ctypesgen.py" else CTYPESGEN="$where/ctypesgen.py" fi if test ! -f "$CTYPESGEN" || test ! -x "$CTYPESGEN"; then as_fn_error $? "Could not find ctypesgen at $where/ctypesgen.py or at $where/bin/ctypesgen.py" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CTYPESGEN" >&5 $as_echo "$CTYPESGEN" >&6; } fi fi fi # Check whether --enable-runtime-module-search was given. if test "${enable_runtime_module_search+set}" = set; then : enableval=$enable_runtime_module_search; if test "$enableval" = "yes"; then use_dso=yes if test "$svn_enable_shared" = "no"; then as_fn_error $? "--enable-runtime-module-search conflicts with --disable-shared" "$LINENO" 5 fi $as_echo "#define SVN_USE_DSO 1" >>confdefs.h case "$host" in *-*-darwin*) $as_echo "#define SVN_DSO_SUFFIX_FMT \"%d.%d.dylib\"" >>confdefs.h ;; *) $as_echo "#define SVN_DSO_SUFFIX_FMT \"%d.so.%d\"" >>confdefs.h ;; esac fi fi if test "$svn_enable_shared" = "no" || test "$use_dso" != "yes"; then $as_echo "#define SVN_LIBSVN_RA_LINKS_RA_LOCAL 1" >>confdefs.h svn_ra_lib_deps="\$(RA_LOCAL_DEPS)" svn_ra_lib_install_deps="install-ramod-lib" svn_ra_lib_link="\$(RA_LOCAL_LINK)" $as_echo "#define SVN_LIBSVN_RA_LINKS_RA_SVN 1" >>confdefs.h svn_ra_lib_deps="$svn_ra_lib_deps \$(RA_SVN_DEPS)" svn_ra_lib_link="$svn_ra_lib_link \$(RA_SVN_LINK)" if test "$svn_lib_serf" = "yes"; then $as_echo "#define SVN_LIBSVN_RA_LINKS_RA_SERF 1" >>confdefs.h svn_ra_lib_deps="$svn_ra_lib_deps \$(RA_SERF_DEPS)" svn_ra_lib_install_deps="$svn_ra_lib_install_deps install-serf-lib" svn_ra_lib_link="$svn_ra_lib_link \$(RA_SERF_LINK)" fi SVN_RA_LIB_DEPS=$svn_ra_lib_deps SVN_RA_LIB_INSTALL_DEPS=$svn_ra_lib_install_deps SVN_RA_LIB_LINK=$svn_ra_lib_link $as_echo "#define SVN_LIBSVN_FS_LINKS_FS_FS 1" >>confdefs.h svn_fs_lib_deps="\$(FS_FS_DEPS)" svn_fs_lib_install_deps="install-fsmod-lib" svn_fs_lib_link="\$(FS_FS_LINK)" $as_echo "#define SVN_LIBSVN_FS_LINKS_FS_X 1" >>confdefs.h svn_fs_lib_deps="$svn_fs_lib_deps \$(FS_X_DEPS)" svn_fs_lib_link="$svn_fs_lib_link \$(FS_X_LINK)" if test "$svn_lib_berkeley_db" = "yes"; then $as_echo "#define SVN_LIBSVN_FS_LINKS_FS_BASE 1" >>confdefs.h svn_fs_lib_deps="$svn_fs_lib_deps \$(FS_BASE_DEPS)" svn_fs_lib_install_deps="$svn_fs_lib_install_deps install-bdb-lib" svn_fs_lib_link="$svn_fs_lib_link \$(FS_BASE_LINK)" fi SVN_FS_LIB_DEPS=$svn_fs_lib_deps SVN_FS_LIB_INSTALL_DEPS=$svn_fs_lib_install_deps SVN_FS_LIB_LINK=$svn_fs_lib_link fi # ==== JavaHL ================================================================ do_javahl_build=no # Check whether --enable-javahl was given. if test "${enable_javahl+set}" = set; then : enableval=$enable_javahl; if test "$enableval" = "yes" ; then do_javahl_build="yes" fi fi JAVAHL_OBJDIR="" INSTALL_EXTRA_JAVAHL_LIB="" FIX_JAVAHL_LIB="" JAVAHL_TESTS_TARGET="" JAVAHL_COMPAT_TESTS_TARGET="" LT_CXX_LIBADD="" if test "$do_javahl_build" = "yes"; then if test "$JDK_SUITABLE" = "no"; then as_fn_error $? "Cannot compile JavaHL without a suitable JDK. Please specify a suitable JDK using the --with-jdk option." "$LINENO" 5 fi JAVAHL_OBJDIR='$(libsvnjavahl_PATH)/.libs' os_arch=`uname` if test "$os_arch" = "Darwin"; then INSTALL_EXTRA_JAVAHL_LIB='ln -sf $(libdir)/libsvnjavahl-1.dylib $(libdir)/libsvnjavahl-1.jnilib' FIX_JAVAHL_LIB="ln -sf libsvnjavahl-1.dylib $JAVAHL_OBJDIR/libsvnjavahl-1.jnilib" fi # This segment (and the rest of r10800) is very likely unnecessary # with libtool 1.5, which automatically adds libstdc++ as a # dependency to the C++ libraries it builds. So at some future time # when autogen.sh requires libtool 1.5 or higher, we can get rid of # it. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for additional flags to link C++ libraries" >&5 $as_echo_n "checking for additional flags to link C++ libraries... " >&6; } if test "x$ac_compiler_gnu" = "xyes"; then case "$host" in *freebsd10*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; *) LT_CXX_LIBADD="-lstdc++" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LT_CXX_LIBADD" >&5 $as_echo "$LT_CXX_LIBADD" >&6; } ;; esac else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } fi fi # Check whether --with-junit was given. if test "${with_junit+set}" = set; then : withval=$with_junit; if test "$withval" != "no"; then if test -n "$JAVA_CLASSPATH"; then JAVA_CLASSPATH="$withval:$JAVA_CLASSPATH" else JAVA_CLASSPATH="$withval" fi JAVAHL_TESTS_TARGET="javahl-tests" JAVAHL_COMPAT_TESTS_TARGET="javahl-compat-tests" fi fi # ==== Miscellaneous bits ==================================================== for ac_header in stdbool.h stdint.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Strip '-no-cpp-precomp' from CPPFLAGS for the clang compiler ### I think we get this flag from APR, so the fix probably belongs there if test "$CC" = "clang"; then CPPFLAGS=`echo "$CPPFLAGS" | $SED -e 's/-no-cpp-precomp //'` fi cat >>confdefs.h <<_ACEOF #define SVN_PATH_LOCAL_SEPARATOR '/' _ACEOF cat >>confdefs.h <<_ACEOF #define SVN_NULL_DEVICE_NAME "/dev/null" _ACEOF DEFAULT_FS_TYPE="fsfs" cat >>confdefs.h <<_ACEOF #define DEFAULT_FS_TYPE "$DEFAULT_FS_TYPE" _ACEOF DEFAULT_HTTP_LIBRARY="serf" cat >>confdefs.h <<_ACEOF #define DEFAULT_HTTP_LIBRARY "$DEFAULT_HTTP_LIBRARY" _ACEOF # BSD/OS (BSDi) needs to use a different include syntax in Makefile INCLUDE_OUTPUTS="include \$(top_srcdir)/build-outputs.mk" case "$host" in *bsdi*) # Check whether they've installed GNU make if ! make --version > /dev/null 2>&1; then # BSDi make INCLUDE_OUTPUTS=".include \"\$(top_srcdir)/build-outputs.mk\"" fi ;; esac # ==== Detection complete - output and run config.status ===================== ac_config_headers="$ac_config_headers subversion/svn_private_config.h.tmp:subversion/svn_private_config.h.in" ac_config_commands="$ac_config_commands svn_private_config.h.tmp" ac_config_files="$ac_config_files Makefile" # Create pkg-config .pc files from .pc.in files for pc_in_file in "${abs_srcdir}"/subversion/libsvn_*/*.pc.in; do pc_file=${pc_in_file#${abs_srcdir}/} pc_file=${pc_file%.in} ac_config_files="$ac_config_files ${pc_file}" done SVN_CONFIG_SCRIPT_FILES="$SVN_CONFIG_SCRIPT_FILES tools/backup/hot-backup.py" ac_config_files="$ac_config_files tools/backup/hot-backup.py" SVN_CONFIG_SCRIPT_FILES="$SVN_CONFIG_SCRIPT_FILES tools/hook-scripts/commit-access-control.pl" ac_config_files="$ac_config_files tools/hook-scripts/commit-access-control.pl" SVN_CONFIG_SCRIPT_FILES="$SVN_CONFIG_SCRIPT_FILES subversion/bindings/swig/perl/native/Makefile.PL" ac_config_files="$ac_config_files subversion/bindings/swig/perl/native/Makefile.PL" if test -e packages/solaris/pkginfo.in; then SVN_CONFIG_SCRIPT_FILES="$SVN_CONFIG_SCRIPT_FILES packages/solaris/pkginfo" ac_config_files="$ac_config_files packages/solaris/pkginfo" fi # Ensure that SWIG is checked after reconfiguration. rm -f .swig_checked cat >>confdefs.h <<_ACEOF #define SVN_BUILD_HOST "${host}" _ACEOF cat >>confdefs.h <<_ACEOF #define SVN_BUILD_TARGET "${target}" _ACEOF cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by subversion $as_me 1.10.0, which was +This file was extended by subversion $as_me 1.10.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -subversion config.status 1.10.0 +subversion config.status 1.10.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_cv_nm_interface \ nm_file_list_spec \ lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ reload_flag_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_separator_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ configure_time_dlsearch_path \ configure_time_lt_sys_library_path \ reload_cmds_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX \ postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile' SED="$SED" SVN_DB_HEADER="$SVN_DB_HEADER" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "subversion/svn_private_config.h.tmp") CONFIG_HEADERS="$CONFIG_HEADERS subversion/svn_private_config.h.tmp:subversion/svn_private_config.h.in" ;; "svn_private_config.h.tmp") CONFIG_COMMANDS="$CONFIG_COMMANDS svn_private_config.h.tmp" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "${pc_file}") CONFIG_FILES="$CONFIG_FILES ${pc_file}" ;; "tools/backup/hot-backup.py") CONFIG_FILES="$CONFIG_FILES tools/backup/hot-backup.py" ;; "tools/hook-scripts/commit-access-control.pl") CONFIG_FILES="$CONFIG_FILES tools/hook-scripts/commit-access-control.pl" ;; "subversion/bindings/swig/perl/native/Makefile.PL") CONFIG_FILES="$CONFIG_FILES subversion/bindings/swig/perl/native/Makefile.PL" ;; "packages/solaris/pkginfo") CONFIG_FILES="$CONFIG_FILES packages/solaris/pkginfo" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "libtool":C) # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 # Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # The names of the tagged configurations supported by this script. available_tags='CXX ' # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shared archive member basename,for filename based shared library versioning on AIX. shared_archive_member_spec=$shared_archive_member_spec # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm into a list of symbols to manually relocate. global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name lister interface. nm_interface=$lt_lt_cv_nm_interface # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot # Command to truncate a binary pipe. lt_truncate_bin=$lt_lt_cv_truncate_bin # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Detected run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # How to create reloadable object files. reload_flag=$lt_reload_flag_CXX reload_cmds=$lt_reload_cmds_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; "svn_private_config.h.tmp":C) svn_cf=subversion/svn_private_config.h; $SED -e "s/@SVN_DB_HEADER@/$SVN_DB_HEADER/" $svn_cf.tmp > $svn_cf.tmp.new cmp -s $svn_cf.tmp.new $svn_cf || mv -f $svn_cf.tmp.new $svn_cf rm -f $svn_cf.tmp.new $svn_cf.tmp ;; "tools/backup/hot-backup.py":F) chmod +x tools/backup/hot-backup.py ;; "tools/hook-scripts/commit-access-control.pl":F) chmod +x tools/hook-scripts/commit-access-control.pl ;; "subversion/bindings/swig/perl/native/Makefile.PL":F) chmod +x subversion/bindings/swig/perl/native/Makefile.PL ;; "packages/solaris/pkginfo":F) chmod +x packages/solaris/pkginfo ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi # ==== Print final messages to user ========================================== if test "$svn_have_berkeley_db" = "no6" && test "$enable_bdb6" != "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: We have configured without BDB filesystem support Berkeley DB 6 was found, but not used. Please re-run configure (see ./config.nice) with the '--enable-bdb6' flag to use it, or explicitly specify '--disable-bdb6' or '--without-berkeley-db' to silence this warning. Please note that some versions of Berkeley DB 6+ are under the GNU Affero General Public License, version 3: https://oss.oracle.com/pipermail/bdb/2013-June/000056.html The AGPL-3.0 licence may impose special requirements for making available source code of server-side software. The text of the licence is: https://www.gnu.org/licenses/agpl-3.0.html http://opensource.org/licenses/AGPL-3.0 The Berkeley DB backend to Subversion is deprecated; see http://subversion.apache.org/docs/release-notes/1.8#bdb-deprecated The Subversion developers have not tested Subversion with Berkeley DB 6 for technical problems or bugs. " >&5 $as_echo "$as_me: WARNING: We have configured without BDB filesystem support Berkeley DB 6 was found, but not used. Please re-run configure (see ./config.nice) with the '--enable-bdb6' flag to use it, or explicitly specify '--disable-bdb6' or '--without-berkeley-db' to silence this warning. Please note that some versions of Berkeley DB 6+ are under the GNU Affero General Public License, version 3: https://oss.oracle.com/pipermail/bdb/2013-June/000056.html The AGPL-3.0 licence may impose special requirements for making available source code of server-side software. The text of the licence is: https://www.gnu.org/licenses/agpl-3.0.html http://opensource.org/licenses/AGPL-3.0 The Berkeley DB backend to Subversion is deprecated; see http://subversion.apache.org/docs/release-notes/1.8#bdb-deprecated The Subversion developers have not tested Subversion with Berkeley DB 6 for technical problems or bugs. " >&2;} fi Index: vendor/subversion/dist/configure.ac =================================================================== --- vendor/subversion/dist/configure.ac (revision 339231) +++ vendor/subversion/dist/configure.ac (revision 339232) @@ -1,1641 +1,1642 @@ dnl Licensed to the Apache Software Foundation (ASF) under one dnl or more contributor license agreements. See the NOTICE file dnl distributed with this work for additional information dnl regarding copyright ownership. The ASF licenses this file dnl to you under the Apache License, Version 2.0 (the dnl "License"); you may not use this file except in compliance dnl with the License. You may obtain a copy of the License at dnl dnl http://www.apache.org/licenses/LICENSE-2.0 dnl dnl Unless required by applicable law or agreed to in writing, dnl software distributed under the License is distributed on an dnl "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY dnl KIND, either express or implied. See the License for the dnl specific language governing permissions and limitations dnl under the License. dnl configure.ac: Autoconfiscation for Subversion dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) dnl Get the version of Subversion, using m4's esyscmd() command to do this dnl at m4-time, since AC_INIT() requires it then. AC_INIT([subversion], [esyscmd(python build/getversion.py SVN subversion/include/svn_version.h)], [http://subversion.apache.org/]) AC_CONFIG_SRCDIR(subversion/include/svn_types.h) AC_CONFIG_AUX_DIR([build]) AC_MSG_NOTICE([Configuring Subversion ]AC_PACKAGE_VERSION) AC_SUBST([abs_srcdir], ["`cd $srcdir && pwd`"]) AC_SUBST([abs_builddir], ["`pwd`"]) if test "$abs_srcdir" = "$abs_builddir"; then canonicalized_srcdir="" else canonicalized_srcdir="$srcdir/" fi AC_SUBST([canonicalized_srcdir]) SWIG_LDFLAGS="$LDFLAGS" AC_SUBST([SWIG_LDFLAGS]) # Generate config.nice early (before the arguments are munged) SVN_CONFIG_NICE(config.nice) # ==== Check for programs ==================================================== # Look for a C compiler (before anything can set CFLAGS) CUSERFLAGS="$CFLAGS" AC_PROG_CC SVN_CC_MODE_SETUP # Look for a C++ compiler (before anything can set CXXFLAGS) CXXUSERFLAGS="$CXXFLAGS" AC_PROG_CXX SVN_CXX_MODE_SETUP # Look for a C pre-processor AC_PROG_CPP # Look for a good sed # AC_PROG_SED was introduced in Autoconf 2.59b m4_ifdef([AC_PROG_SED], [AC_PROG_SED], [SED="${SED:-sed}"]) # Grab target_cpu, so we can use it in the Solaris pkginfo file AC_CANONICAL_TARGET # Look for an extended grep AC_PROG_EGREP AC_PROG_LN_S AC_PROG_INSTALL # If $INSTALL is relative path to our fallback install-sh, then convert # to an absolute path, as in some cases (e.g. Solaris VPATH build), libtool # may try to use it from a changed working directory. if test "$INSTALL" = "build/install-sh -c"; then INSTALL="$abs_srcdir/$INSTALL" fi if test -z "$MKDIR"; then MKDIR="$INSTALL -d" fi AC_SUBST([MKDIR]) # ==== Libraries, for which we may have source to build ====================== dnl verify apr version and set apr flags dnl These regular expressions should not contain "\(" and "\)". APR_VER_REGEXES=["1\.[3-9]\. 2\."] SVN_LIB_APR($APR_VER_REGEXES) if test `expr $apr_version : 2` -ne 0; then dnl Bump the library so-version to 2 if using APR-2 dnl (Debian uses so-version 1 for APR-1-with-largefile) svn_lib_ver=2 dnl APR-2 provides APRUTIL apu_config=$apr_config AC_SUBST(SVN_APRUTIL_INCLUDES) AC_SUBST(SVN_APRUTIL_CONFIG, ["$apu_config"]) AC_SUBST(SVN_APRUTIL_LIBS) SVN_APR_MAJOR_VERSION=2 else svn_lib_ver=0 APU_VER_REGEXES=["1\.[3-9]\."] SVN_LIB_APRUTIL($APU_VER_REGEXES) SVN_APR_MAJOR_VERSION=1 fi AC_SUBST(SVN_APR_MAJOR_VERSION) SVN_LT_SOVERSION="-version-info $svn_lib_ver" AC_SUBST(SVN_LT_SOVERSION) AC_DEFINE_UNQUOTED(SVN_SOVERSION, $svn_lib_ver, [Subversion library major verson]) dnl Search for pkg-config AC_PATH_PROG(PKG_CONFIG, pkg-config) dnl Search for serf SVN_LIB_SERF(1,3,4) if test "$svn_lib_serf" = "yes"; then AC_DEFINE([SVN_HAVE_SERF], 1, [Defined if support for Serf is enabled]) fi dnl Search for apr_memcache (only affects fs_fs) SVN_LIB_APR_MEMCACHE if test "$svn_lib_apr_memcache" = "yes"; then AC_DEFINE(SVN_HAVE_MEMCACHE, 1, [Defined if apr_memcache (standalone or in apr-util) is present]) fi AC_ARG_ENABLE(apache-whitelist, AS_HELP_STRING([--enable-apache-whitelist=VER], [Whitelist a particular Apache version number, typically used to enable the use of a old version patched by a distribution.]), [apache_whitelist_ver=$enableval], [apache_whitelist_ver=no]) HTTPD_WHITELIST="$apache_whitelist_ver" AC_SUBST(HTTPD_WHITELIST) dnl Find Apache with a recent-enough magic module number SVN_FIND_APACHE(20051115, $apache_whitelist_ver) dnl Search for SQLite. If you change SQLITE_URL from a .zip to dnl something else also update build/ac-macros/sqlite.m4 to reflect dnl the correct command to unpack the downloaded file. SQLITE_MINIMUM_VER="3.8.2" SQLITE_RECOMMENDED_VER="3.8.11.1" dnl Used to construct the SQLite download URL. SQLITE_RECOMMENDED_VER_REL_YEAR="2015" SQLITE_URL="https://www.sqlite.org/$SQLITE_RECOMMENDED_VER_REL_YEAR/sqlite-amalgamation-$(printf %d%02d%02d%02d $(echo ${SQLITE_RECOMMENDED_VER} | sed -e 's/\./ /g')).zip" SVN_LIB_SQLITE(${SQLITE_MINIMUM_VER}, ${SQLITE_RECOMMENDED_VER}, ${SQLITE_URL}) AC_ARG_ENABLE(sqlite-compatibility-version, AS_HELP_STRING([--enable-sqlite-compatibility-version=X.Y.Z], [Allow binary to run against SQLite as old as ARG]), [sqlite_compat_ver=$enableval],[sqlite_compat_ver=no]) if test -n "$sqlite_compat_ver" && test "$sqlite_compat_ver" != no; then SVN_SQLITE_VERNUM_PARSE([$sqlite_compat_ver], [sqlite_compat_ver_num]) CFLAGS="-DSVN_SQLITE_MIN_VERSION='\"$sqlite_compat_ver\"' $CFLAGS" CFLAGS="-DSVN_SQLITE_MIN_VERSION_NUMBER=$sqlite_compat_ver_num $CFLAGS" fi SVN_CHECK_FOR_ATOMIC_BUILTINS if test "$svn_cv_atomic_builtins" = "yes"; then AC_DEFINE(SVN_HAS_ATOMIC_BUILTINS, 1, [Define if compiler provides atomic builtins]) fi dnl Set up a number of directories --------------------- dnl Create SVN_BINDIR for proper substitution if test "${bindir}" = '${exec_prefix}/bin'; then if test "${exec_prefix}" = "NONE"; then if test "${prefix}" = "NONE"; then SVN_BINDIR="${ac_default_prefix}/bin" else SVN_BINDIR="${prefix}/bin" fi else SVN_BINDIR="${exec_prefix}/bin" fi else SVN_BINDIR="${bindir}" fi dnl fully evaluate this value. when we substitute it into our tool scripts, dnl they will not have things such as ${bindir} available SVN_BINDIR="`eval echo ${SVN_BINDIR}`" AC_SUBST(SVN_BINDIR) dnl provide ${bindir} in svn_private_config.h for use in compiled code AC_DEFINE_UNQUOTED(SVN_BINDIR, "${SVN_BINDIR}", [Defined to be the path to the installed binaries]) dnl This purposely does *not* allow for multiple parallel installs. dnl However, it is compatible with most gettext usages. localedir='${datadir}/locale' AC_SUBST(localedir) dnl For SVN_LOCALE_DIR, we have to expand it to something. See SVN_BINDIR. if test "${prefix}" = "NONE" \ && ( test "${datadir}" = '${prefix}/share' \ || ( test "${datadir}" = '${datarootdir}' \ && test "${datarootdir}" = '${prefix}/share' ) ); then exp_localedir='${ac_default_prefix}/share/locale' else exp_localedir=$localedir fi SVN_EXPAND_VAR(svn_localedir, "${exp_localedir}") AC_DEFINE_UNQUOTED(SVN_LOCALE_DIR, "${svn_localedir}", [Defined to be the path to the installed locale dirs]) dnl Check for libtool -- we'll definitely need it for all our shared libs! AC_MSG_NOTICE([configuring libtool now]) ifdef([LT_INIT], [LT_INIT], [AC_PROG_LIBTOOL]) AC_ARG_ENABLE(experimental-libtool, AS_HELP_STRING([--enable-experimental-libtool],[Use APR's libtool]), [experimental_libtool=$enableval],[experimental_libtool=no]) if test "$experimental_libtool" = "yes"; then echo "using APR's libtool" sh_libtool="`$apr_config --apr-libtool`" LIBTOOL="$sh_libtool" SVN_LIBTOOL="$sh_libtool" else sh_libtool="$abs_builddir/libtool" SVN_LIBTOOL="\$(SHELL) \"$sh_libtool\"" fi AC_SUBST(SVN_LIBTOOL) dnl Determine the libtool version changequote(, )dnl lt_pversion=`$LIBTOOL --version 2>/dev/null|$SED -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'` lt_version=`echo $lt_pversion|$SED -e 's/\([a-z]*\)$/.\1/'` lt_major_version=`echo $lt_version | cut -d'.' -f 1` changequote([, ])dnl dnl set the default parameters svn_enable_static=yes svn_enable_shared=yes dnl check for --enable-static option AC_ARG_ENABLE(static, AS_HELP_STRING([--enable-static], [Build static libraries]), [svn_enable_static="$enableval"], [svn_enable_static="yes"]) dnl check for --enable-shared option AC_ARG_ENABLE(shared, AS_HELP_STRING([--enable-shared], [Build shared libraries]), [svn_enable_shared="$enableval"], [svn_enable_shared="yes"]) if test "$svn_enable_static" = "yes" && test "$svn_enable_shared" = "yes" ; then AC_MSG_NOTICE([building both shared and static libraries]) elif test "$svn_enable_static" = "yes" ; then AC_MSG_NOTICE([building static libraries only]) LT_CFLAGS="-static $LT_CFLAGS" LT_LDFLAGS="-static $LT_LDFLAGS" elif test "$svn_enable_shared" = "yes" ; then AC_MSG_NOTICE([building shared libraries only]) if test "$lt_major_version" = "1" ; then LT_CFLAGS="-prefer-pic $LT_CFLAGS" elif test "$lt_major_version" = "2" ; then LT_CFLAGS="-shared $LT_CFLAGS" fi LT_LDFLAGS="-shared $LT_LDFLAGS" else AC_MSG_ERROR([cannot disable both shared and static libraries]) fi dnl Check for --enable-all-static option AC_ARG_ENABLE(all-static, AS_HELP_STRING([--enable-all-static], [Build completely static (standalone) binaries.]), [ if test "$enableval" = "yes" ; then LT_LDFLAGS="-all-static $LT_LDFLAGS" elif test "$enableval" != "no" ; then AC_MSG_ERROR([--enable-all-static doesn't accept argument]) fi ]) AC_SUBST(LT_CFLAGS) AC_SUBST(LT_LDFLAGS) AC_ARG_ENABLE(local-library-preloading, AS_HELP_STRING([--enable-local-library-preloading], [Enable preloading of locally built libraries in locally built executables. This may be necessary for testing prior to installation on some platforms. It does not work on some platforms (Darwin, OpenBSD, ...).]), [ if test "$enableval" != "no"; then if test "$svn_enable_shared" = "yes"; then TRANSFORM_LIBTOOL_SCRIPTS="transform-libtool-scripts" else AC_MSG_ERROR([--enable-local-library-preloading conflicts with --disable-shared]) fi else TRANSFORM_LIBTOOL_SCRIPTS="" fi ], [ TRANSFORM_LIBTOOL_SCRIPTS="" ]) AC_SUBST(TRANSFORM_LIBTOOL_SCRIPTS) dnl Check if -no-undefined is needed for the platform. dnl It should always work but with libtool 1.4.3 on OS X it breaks the build. dnl So we only turn it on for platforms where we know we really need it. AC_MSG_CHECKING([whether libtool needs -no-undefined]) case $host in *-*-cygwin*) AC_MSG_RESULT([yes]) LT_NO_UNDEFINED="-no-undefined" ;; *) AC_MSG_RESULT([no]) LT_NO_UNDEFINED="" ;; esac AC_SUBST(LT_NO_UNDEFINED) dnl Check for trang. trang=yes AC_ARG_WITH(trang, AS_HELP_STRING([--with-trang=PATH], [Specify the command to run the trang schema converter]), [ trang="$withval" ]) if test "$trang" = "yes"; then AC_PATH_PROG(TRANG, trang, none) else TRANG="$trang" AC_SUBST(TRANG) fi dnl Check for doxygen doxygen=yes AC_ARG_WITH(doxygen, AC_HELP_STRING([--with-doxygen=PATH], [Specify the command to run doxygen]), [ doxygen="$withval" ]) if test "$doxygen" = "yes"; then AC_PATH_PROG(DOXYGEN, doxygen, none) else DOXYGEN="$doxygen" AC_SUBST(DOXYGEN) fi dnl Check for libraries -------------------- dnl Expat ------------------- AC_ARG_WITH(expat, AS_HELP_STRING([--with-expat=INCLUDES:LIB_SEARCH_DIRS:LIBS], [Specify location of Expat]), [svn_lib_expat="$withval"], [svn_lib_expat="::expat"]) # APR-util accepts "builtin" as an argument to this option so if the user # passed "builtin" pretend the user didn't specify the --with-expat option # at all. Expat will (hopefully) be found in apr-util. test "_$svn_lib_expat" = "_builtin" && svn_lib_expat="::expat" AC_MSG_CHECKING([for Expat]) if test -n "`echo "$svn_lib_expat" | $EGREP ":.*:"`"; then SVN_XML_INCLUDES="" for i in [`echo "$svn_lib_expat" | $SED -e "s/\([^:]*\):.*/\1/"`]; do SVN_XML_INCLUDES="$SVN_XML_INCLUDES -I$i" done SVN_XML_INCLUDES="${SVN_XML_INCLUDES## }" for l in [`echo "$svn_lib_expat" | $SED -e "s/.*:\([^:]*\):.*/\1/"`]; do LDFLAGS="$LDFLAGS -L$l" done for l in [`echo "$svn_lib_expat" | $SED -e "s/.*:\([^:]*\)/\1/"`]; do SVN_XML_LIBS="$SVN_XML_LIBS -l$l" done SVN_XML_LIBS="${SVN_XML_LIBS## }" old_CPPFLAGS="$CPPFLAGS" old_LIBS="$LIBS" CPPFLAGS="$CPPFLAGS $SVN_XML_INCLUDES" LIBS="$LIBS $SVN_XML_LIBS" AC_LINK_IFELSE([AC_LANG_SOURCE([[ #include int main() {XML_ParserCreate(NULL);}]])], svn_lib_expat="yes", svn_lib_expat="no") LIBS="$old_LIBS" if test "$svn_lib_expat" = "yes"; then AC_MSG_RESULT([yes]) else SVN_XML_INCLUDES="" SVN_XML_LIBS="" CPPFLAGS="$CPPFLAGS $SVN_APRUTIL_INCLUDES" if test "$enable_all_static" != "yes"; then SVN_APRUTIL_LIBS="$SVN_APRUTIL_LIBS `$apu_config --libs`" fi AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ #include int main() {XML_ParserCreate(NULL);}]])], svn_lib_expat="yes", svn_lib_expat="no") if test "$svn_lib_expat" = "yes"; then AC_MSG_RESULT([yes]) AC_MSG_WARN([Expat found amongst libraries used by APR-Util, but Subversion libraries might be needlessly linked against additional unused libraries. It can be avoided by specifying exact location of Expat in argument of --with-expat option.]) else AC_MSG_RESULT([no]) AC_MSG_ERROR([Expat not found]) fi fi CPPFLAGS="$old_CPPFLAGS" else AC_MSG_RESULT([no]) if test "$svn_lib_expat" = "yes"; then AC_MSG_ERROR([--with-expat option requires argument]) elif test "$svn_lib_expat" = "no"; then AC_MSG_ERROR([Expat is required]) else AC_MSG_ERROR([Invalid syntax of argument of --with-expat option]) fi fi AC_SUBST(SVN_XML_INCLUDES) AC_SUBST(SVN_XML_LIBS) dnl Berkeley DB ------------------- # Berkeley DB on SCO OpenServer needs -lsocket AC_CHECK_LIB(socket, socket) # Build the BDB filesystem library only if we have an appropriate # version of Berkeley DB. case "$host" in powerpc-apple-darwin*) # Berkeley DB 4.0 does not work on OS X. SVN_FS_WANT_DB_MAJOR=4 SVN_FS_WANT_DB_MINOR=1 SVN_FS_WANT_DB_PATCH=25 ;; *) SVN_FS_WANT_DB_MAJOR=4 SVN_FS_WANT_DB_MINOR=0 SVN_FS_WANT_DB_PATCH=14 ;; esac db_alt_version="5.x" # Look for libdb4.so first: SVN_LIB_BERKELEY_DB($SVN_FS_WANT_DB_MAJOR, $SVN_FS_WANT_DB_MINOR, $SVN_FS_WANT_DB_PATCH, [db4 db]) AC_DEFINE_UNQUOTED(SVN_FS_WANT_DB_MAJOR, $SVN_FS_WANT_DB_MAJOR, [The desired major version for the Berkeley DB]) AC_DEFINE_UNQUOTED(SVN_FS_WANT_DB_MINOR, $SVN_FS_WANT_DB_MINOR, [The desired minor version for the Berkeley DB]) AC_DEFINE_UNQUOTED(SVN_FS_WANT_DB_PATCH, $SVN_FS_WANT_DB_PATCH, [The desired patch version for the Berkeley DB]) AC_SUBST(SVN_DB_INCLUDES) AC_SUBST(SVN_DB_LIBS) SVN_LIB_SASL if test "$svn_lib_sasl" = "yes"; then AC_DEFINE(SVN_HAVE_SASL, 1, [Defined if Cyrus SASL v2 is present on the system]) fi dnl Mac OS specific features ------------------- SVN_LIB_MACHO_ITERATE SVN_LIB_MACOS_PLIST SVN_LIB_MACOS_KEYCHAIN dnl APR_HAS_DSO ------------------- AC_MSG_CHECKING([whether APR has support for DSOs]) old_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $SVN_APR_INCLUDES" AC_PREPROC_IFELSE([AC_LANG_SOURCE([[ #include #if !APR_HAS_DSO #error #endif]])], APR_HAS_DSO="yes" AC_MSG_RESULT([yes]), APR_HAS_DSO="no" AC_MSG_RESULT([no])) CPPFLAGS="$old_CPPFLAGS" dnl D-Bus (required for support for KWallet) ------------------- if test -n "$PKG_CONFIG"; then AC_MSG_CHECKING([for D-Bus .pc file]) if $PKG_CONFIG --exists dbus-1; then AC_MSG_RESULT([yes]) old_CPPFLAGS="$CPPFLAGS" old_LIBS="$LIBS" DBUS_CPPFLAGS="`$PKG_CONFIG --cflags dbus-1`" AC_MSG_CHECKING([D-Bus version]) DBUS_VERSION="`$PKG_CONFIG --modversion dbus-1`" AC_MSG_RESULT([$DBUS_VERSION]) # D-Bus 0.* requires DBUS_API_SUBJECT_TO_CHANGE if test -n ["`echo "$DBUS_VERSION" | $EGREP '^0\.[[:digit:]]+'`"]; then DBUS_CPPFLAGS="$DBUS_CPPFLAGS -DDBUS_API_SUBJECT_TO_CHANGE" fi DBUS_LIBS="`$PKG_CONFIG --libs dbus-1`" CPPFLAGS="$CPPFLAGS $DBUS_CPPFLAGS" LIBS="$LIBS $DBUS_LIBS" AC_MSG_CHECKING([for D-Bus]) AC_LINK_IFELSE([AC_LANG_SOURCE([[ #include int main() {dbus_bus_get(DBUS_BUS_SESSION, NULL);}]])], HAVE_DBUS="yes", HAVE_DBUS="no") if test "$HAVE_DBUS" = "yes"; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi CPPFLAGS="$old_CPPFLAGS" LIBS="$old_LIBS" else AC_MSG_RESULT([no]) fi fi dnl GPG Agent ------------------- AC_ARG_WITH(gpg_agent, AS_HELP_STRING([--without-gpg-agent], [Disable support for GPG-Agent]), [], [with_gpg_agent=yes]) AC_MSG_CHECKING([whether to support GPG-Agent]) if test "$with_gpg_agent" = "yes"; then AC_MSG_RESULT([yes]) AC_DEFINE([SVN_HAVE_GPG_AGENT], [1], [Is GPG Agent support enabled?]) else AC_MSG_RESULT([no]) fi AC_SUBST(SVN_HAVE_GPG_AGENT) dnl GNOME Keyring ------------------- AC_ARG_WITH(old_gnome_keyring, AS_HELP_STRING([--with-old-gnome-keyring], [Enable old GNOME Keyring for auth credentials (prefer --with-gnome-keyring)]), [with_old_gnome_keyring="$withval"], [with_old_gnome_keyring=no]) found_old_gnome_keyring=no AC_MSG_CHECKING([whether to look for old GNOME Keyring]) if test "$with_old_gnome_keyring" != "no"; then AC_MSG_RESULT([yes]) case "$host" in *-*-darwin*) if test "$with_old_gnome_keyring" = "yes"; then AC_MSG_ERROR([--with-old-gnome-keyring is not supported on Mac OS X.]) else with_old_gnome_keyring=no fi ;; *) if test "$svn_enable_shared" = "yes"; then if test "$APR_HAS_DSO" = "yes"; then if test -n "$PKG_CONFIG"; then AC_MSG_CHECKING([for GLib and GNOME Keyring .pc files]) if $PKG_CONFIG --exists glib-2.0 gnome-keyring-1; then AC_MSG_RESULT([yes]) old_CPPFLAGS="$CPPFLAGS" SVN_GNOME_KEYRING_INCLUDES="`$PKG_CONFIG --cflags glib-2.0 gnome-keyring-1`" CPPFLAGS="$CPPFLAGS $SVN_GNOME_KEYRING_INCLUDES" AC_CHECK_HEADER(gnome-keyring.h, found_old_gnome_keyring=yes, found_old_gnome_keyring=no) AC_MSG_CHECKING([for GNOME Keyring]) if test "$found_old_gnome_keyring" = "yes"; then AC_MSG_RESULT([yes]) AC_DEFINE([SVN_HAVE_GNOME_KEYRING], [1], [Is GNOME Keyring support enabled?]) CPPFLAGS="$old_CPPFLAGS" SVN_GNOME_KEYRING_LIBS="`$PKG_CONFIG --libs glib-2.0 gnome-keyring-1`" + SVN_GNOME_KEYRING_PCLIBS="glib-2.0 gnome-keyring-1" else AC_MSG_RESULT([no]) if test "$with_old_gnome_keyring" = "yes"; then AC_MSG_ERROR([cannot find GNOME Keyring]) fi fi else AC_MSG_RESULT([no]) if test "$with_old_gnome_keyring" = "yes"; then AC_MSG_ERROR([cannot find GLib and GNOME Keyring .pc files.]) else with_old_gnome_keyring=no fi fi else if test "$with_old_gnome_keyring" = "yes"; then AC_MSG_ERROR([cannot find pkg-config. GNOME Keyring requires this.]) else with_old_gnome_keyring=no fi fi else if test "$with_old_gnome_keyring" = "yes"; then AC_MSG_ERROR([APR does not have support for DSOs. GNOME Keyring requires this.]) else with_old_gnome_keyring=no fi fi else if test "$with_old_gnome_keyring" = "yes"; then AC_MSG_ERROR([--with-old-gnome-keyring conflicts with --disable-shared]) else with_old_gnome_keyring=no fi fi ;; esac else AC_MSG_RESULT([no]) fi AC_SUBST(SVN_GNOME_KEYRING_INCLUDES) AC_SUBST(SVN_GNOME_KEYRING_LIBS) dnl LibSecret ------------------- SVN_LIB_SECRET dnl Googlemock ----------------- AC_ARG_ENABLE([googlemock], AS_HELP_STRING([--disable-googlemock], [Do not use the Googlemock testing framework]), [], [enable_googlemock=yes]) AC_SUBST([GOOGLEMOCK_SRCDIR], [$abs_srcdir/googlemock]) AC_MSG_CHECKING([whether use Googlemock]) if test "$enable_googlemock" != "no"; then if test -d "$GOOGLEMOCK_SRCDIR"; then AC_MSG_RESULT([yes]) SVN_USE_GOOGLEMOCK=true else AC_MSG_RESULT([no]) SVN_USE_GOOGLEMOCK=false fi else AC_MSG_RESULT([no]) SVN_USE_GOOGLEMOCK=false fi AC_SUBST([SVN_USE_GOOGLEMOCK]) dnl Ev2 experimental features ---------------------- dnl Note: The Ev2 implementations will be built unconditionally, but by dnl providing this flag, users can choose to use the currently-shimmed Ev2 dnl editor implementations for various operations. This will probably dnl negatively impact performance, but is useful for testing. AC_ARG_ENABLE(ev2-impl, AS_HELP_STRING([--enable-ev2-impl], [Use Ev2 implementations, where available [EXPERIMENTAL]]), [enable_ev2_impl=$enableval],[enable_ev2_impl=no]) if test "$enable_ev2_impl" = "yes"; then AC_DEFINE(ENABLE_EV2_IMPL, 1, [Define to 1 if Ev2 implementations should be used.]) fi dnl I18n ------------------- AC_ARG_ENABLE(nls, AS_HELP_STRING([--disable-nls],[Disable gettext functionality]), [enable_nls=$enableval],[enable_nls=yes]) USE_NLS="no" SVN_INTL_LIBS="" if test "$enable_nls" = "yes"; then dnl First, check to see if there is a working msgfmt. AC_PATH_PROG(MSGFMT, msgfmt, none) AC_PATH_PROG(MSGMERGE, msgmerge, none) AC_PATH_PROG(XGETTEXT, xgettext, none) if test "$MSGFMT" != "none"; then AC_SEARCH_LIBS(bindtextdomain, [intl], [ # in case libintl needs to be linked explicitly, # $ac_cv_search_bindtextdomain contains -l linker flags if echo "$ac_cv_search_bindtextdomain" | grep '^-l' >/dev/null then SVN_INTL_LIBS="$ac_cv_search_bindtextdomain" fi ], [ enable_nls="no" ]) if test "$enable_nls" = "no"; then # Destroy the cached result so we can test again unset ac_cv_search_bindtextdomain # On some systems, libintl needs libiconv to link properly, # so try again with -liconv. AC_SEARCH_LIBS(bindtextdomain, [intl], [ enable_nls="yes" if echo "$ac_cv_search_bindtextdomain" | grep '^-l' >/dev/null then SVN_INTL_LIBS="$ac_cv_search_bindtextdomain" fi # This is here so that -liconv ends up in LIBS # if it worked with -liconv. AC_CHECK_LIB(iconv, libiconv_open) ], [ AC_MSG_WARN([bindtextdomain() not found. Disabling NLS.]) enable_nls="no" ], -liconv) fi if test "$enable_nls" = "yes"; then AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if translation of program messages to the user's native language is requested.]) USE_NLS="yes" fi fi fi AC_SUBST(SVN_INTL_LIBS) AH_BOTTOM([ /* Indicate to translators that string X should be translated. Do not look up the translation at run time; just expand to X. This macro is suitable for use where a constant string is required at compile time. */ #define N_(x) x /* Indicate to translators that we have decided the string X should not be translated. Expand to X. */ #define U_(x) x #ifdef ENABLE_NLS #include #include /* Indicate to translators that string X should be translated. At run time, look up and return the translation of X. */ #define _(x) dgettext(PACKAGE_NAME, x) /* Indicate to translators that strings X1 and X2 are singular and plural forms of the same message, and should be translated. At run time, return an appropriate translation depending on the number N. */ #define Q_(x1, x2, n) dngettext(PACKAGE_NAME, x1, x2, n) #else #define _(x) (x) #define Q_(x1, x2, n) (((n) == 1) ? x1 : x2) #define gettext(x) (x) #define dgettext(domain, x) (x) #endif /* compiler hints */ #if defined(__GNUC__) && (__GNUC__ >= 3) # define SVN__PREDICT_FALSE(x) (__builtin_expect(x, 0)) # define SVN__PREDICT_TRUE(x) (__builtin_expect(!!(x), 1)) #else # define SVN__PREDICT_FALSE(x) (x) # define SVN__PREDICT_TRUE(x) (x) #endif #if defined(SVN_DEBUG) # define SVN__FORCE_INLINE # define SVN__PREVENT_INLINE #elif defined(__GNUC__) # define SVN__FORCE_INLINE APR_INLINE __attribute__ ((always_inline)) # define SVN__PREVENT_INLINE __attribute__ ((noinline)) #else # define SVN__FORCE_INLINE APR_INLINE # define SVN__PREVENT_INLINE #endif /* Macro used to specify that a variable is intentionally left unused. Supresses compiler warnings about the variable being unused. */ #define SVN_UNUSED(v) ( (void)(v) ) ]) dnl Used to simulate makefile conditionals. GETTEXT_CODESET=\# NO_GETTEXT_CODESET=\# if test $USE_NLS = "yes"; then AC_CHECK_FUNCS(bind_textdomain_codeset, [ GETTEXT_CODESET="" ], [ NO_GETTEXT_CODESET="" ]) fi AC_SUBST(GETTEXT_CODESET) AC_SUBST(NO_GETTEXT_CODESET) # Check if we are using GNU gettext. GNU_GETTEXT=no MSGFMTFLAGS='' if test $USE_NLS = "yes"; then AC_MSG_CHECKING(if we are using GNU gettext) if $MSGFMT --version 2>&1 | $EGREP GNU > /dev/null; then GNU_GETTEXT=yes MSGFMTFLAGS='-c' fi AC_MSG_RESULT($GNU_GETTEXT) fi AC_SUBST(MSGFMTFLAGS) dnl libmagic ------------------- libmagic_found=no AC_ARG_WITH(libmagic,AS_HELP_STRING([--with-libmagic=PREFIX], [libmagic filetype detection library]), [ if test "$withval" = "yes" ; then AC_CHECK_HEADER(magic.h, [ AC_CHECK_LIB(magic, magic_open, [libmagic_found="builtin"]) ]) libmagic_prefix="the default locations" elif test "$withval" != "no"; then libmagic_prefix=$withval save_cppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$libmagic_prefix/include" AC_CHECK_HEADERS(magic.h,[ save_ldflags="$LDFLAGS" LDFLAGS="-L$libmagic_prefix/lib $LDFLAGS" AC_CHECK_LIB(magic, magic_open, [libmagic_found="yes"]) LDFLAGS="$save_ldflags" ]) CPPFLAGS="$save_cppflags" fi if test "$withval" != "no" && test "$libmagic_found" = "no"; then AC_MSG_ERROR([[--with-libmagic requested, but libmagic not found at $libmagic_prefix]]) fi ], [ AC_CHECK_HEADER(magic.h, [ AC_CHECK_LIB(magic, magic_open, [libmagic_found="builtin"]) ]) ]) if test "$libmagic_found" != "no"; then AC_DEFINE([SVN_HAVE_LIBMAGIC], [1], [Defined if libmagic support is enabled]) SVN_MAGIC_LIBS="-lmagic" fi if test "$libmagic_found" = "yes"; then SVN_MAGIC_INCLUDES="-I$libmagic_prefix/include" LDFLAGS="$LDFLAGS `SVN_REMOVE_STANDARD_LIB_DIRS(-L$libmagic_prefix/lib)`" fi AC_SUBST(SVN_MAGIC_INCLUDES) AC_SUBST(SVN_MAGIC_LIBS) dnl KWallet ------------------- SVN_LIB_KWALLET if test "$svn_lib_kwallet" = "yes"; then AC_DEFINE([SVN_HAVE_KWALLET], 1, [Defined if KWallet support is enabled]) fi dnl plaintext passwords ------------------- AC_ARG_ENABLE(plaintext-password-storage, AS_HELP_STRING([--disable-plaintext-password-storage], [Disable on-disk caching of plaintext passwords and passphrases. (Leaving this functionality enabled will not force Subversion to store passwords in plaintext, but does permit users to explicitly allow that behavior via runtime configuration.)]), [ if test "$enableval" = "no"; then AC_MSG_NOTICE([Disabling plaintext password/passphrase storage]) AC_DEFINE(SVN_DISABLE_PLAINTEXT_PASSWORD_STORAGE, 1, [Defined if plaintext password/passphrase storage is disabled]) fi ]) dnl Build and install rules ------------------- INSTALL_STATIC_RULES="install-bin install-docs" INSTALL_RULES="install-fsmod-lib install-ramod-lib install-lib install-include install-static" INSTALL_RULES="$INSTALL_RULES $INSTALL_APACHE_RULE" BUILD_RULES="fsmod-lib ramod-lib lib bin test sub-test $BUILD_APACHE_RULE tools" if test "$svn_lib_berkeley_db" = "yes"; then BUILD_RULES="$BUILD_RULES bdb-lib bdb-test" INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-fsmod-lib/install-fsmod-lib install-bdb-lib/'`" INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-bdb-lib" BDB_TEST_DEPS="\$(BDB_TEST_DEPS)" BDB_TEST_PROGRAMS="\$(BDB_TEST_PROGRAMS)" fi if test "$svn_lib_serf" = "yes"; then BUILD_RULES="$BUILD_RULES serf-lib" INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-ramod-lib/install-ramod-lib install-serf-lib/'`" INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-serf-lib" fi if test "$svn_lib_kwallet" = "yes"; then BUILD_RULES="$BUILD_RULES kwallet-lib" INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-lib/install-lib install-kwallet-lib/'`" INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-kwallet-lib" fi if test "$found_old_gnome_keyring" = "yes" || test "$found_gnome_keyring" = "yes"; then BUILD_RULES="$BUILD_RULES gnome-keyring-lib" INSTALL_RULES="`echo $INSTALL_RULES | $SED 's/install-lib/install-lib install-gnome-keyring-lib/'`" INSTALL_STATIC_RULES="$INSTALL_STATIC_RULES install-gnome-keyring-lib" fi if test "$USE_NLS" = "yes"; then BUILD_RULES="$BUILD_RULES locale" INSTALL_RULES="$INSTALL_RULES install-locale" fi AC_SUBST(BUILD_RULES) AC_SUBST(INSTALL_STATIC_RULES) AC_SUBST(INSTALL_RULES) AC_SUBST(BDB_TEST_DEPS) AC_SUBST(BDB_TEST_PROGRAMS) dnl Check for header files ---------------- dnl Standard C headers AC_HEADER_STDC dnl Check for typedefs, structures, and compiler characteristics ---------- dnl if compiler doesn't understand `const', then define it empty AC_C_CONST dnl if non-existent, define size_t to be `unsigned' AC_TYPE_SIZE_T dnl Check for library functions ---------- AC_FUNC_MEMCMP dnl svn_error's default warning handler uses vfprintf() AC_FUNC_VPRINTF dnl check for functions needed in special file handling AC_CHECK_FUNCS(symlink readlink) dnl check for uname AC_CHECK_HEADERS(sys/utsname.h, [AC_CHECK_FUNCS(uname)], []) dnl check for termios AC_CHECK_HEADER(termios.h,[ AC_CHECK_FUNCS(tcgetattr tcsetattr,[ AC_DEFINE(HAVE_TERMIOS_H,1,[Defined if we have a usable termios library.]) ]) ]) dnl Process some configuration options ---------- AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [Turn on debugging]), [ if test "$enableval" = "yes" ; then enable_debugging="yes" else enable_debugging="no" fi ], [ # Neither --enable-debug nor --disable-debug was passed. enable_debugging="maybe" ]) AC_ARG_ENABLE(optimize, AS_HELP_STRING([--enable-optimize], [Turn on optimizations]), [ if test "$enableval" = "yes" ; then enable_optimization="yes" else enable_optimization="no" fi ], [ # Neither --enable-optimize nor --disable-optimize was passed. enable_optimization="maybe" ]) dnl Use -Wl,--no-undefined during linking of some libraries AC_ARG_ENABLE(disallowing-of-undefined-references, [AS_HELP_STRING([--enable-disallowing-of-undefined-references], [Use -Wl,--no-undefined flag during linking of some libraries to disallow undefined references])]) if test "$enable_disallowing_of_undefined_references" != "yes" && test "`uname`" != "Linux"; then enable_disallowing_of_undefined_references="no" fi if test "$enable_disallowing_of_undefined_references" != "no"; then AC_MSG_CHECKING([for -Wl,--no-undefined]) old_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -Wl,--no-undefined" AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(){;}]])], [svn_wl_no_undefined="yes"], [svn_wl_no_undefined="no"]) LDFLAGS="$old_LDFLAGS" if test "$svn_wl_no_undefined" = "yes"; then AC_MSG_RESULT([yes]) for library_dir in "$abs_srcdir/subversion/libsvn_"*; do eval "`basename $library_dir`_LDFLAGS=-Wl,--no-undefined" done shared_only_LDFLAGS="-Wl,--no-undefined" else AC_MSG_RESULT([no]) if test "$enable_disallowing_of_undefined_references" = "yes"; then AC_MSG_ERROR([--enable-disallowing-of-undefined-references explicitly requested, but -Wl,--no-undefined not supported]) fi fi fi AC_SUBST([libsvn_client_LDFLAGS]) AC_SUBST([libsvn_delta_LDFLAGS]) AC_SUBST([libsvn_diff_LDFLAGS]) AC_SUBST([libsvn_fs_LDFLAGS]) AC_SUBST([libsvn_fs_base_LDFLAGS]) AC_SUBST([libsvn_fs_fs_LDFLAGS]) AC_SUBST([libsvn_fs_util_LDFLAGS]) AC_SUBST([libsvn_ra_LDFLAGS]) AC_SUBST([libsvn_ra_local_LDFLAGS]) AC_SUBST([libsvn_ra_serf_LDFLAGS]) AC_SUBST([libsvn_ra_svn_LDFLAGS]) AC_SUBST([libsvn_repos_LDFLAGS]) AC_SUBST([libsvn_subr_LDFLAGS]) AC_SUBST([libsvn_wc_LDFLAGS]) AC_SUBST([shared_only_LDFLAGS]) AC_ARG_ENABLE(maintainer-mode, AS_HELP_STRING([--enable-maintainer-mode], [Turn on debugging and very strict compile-time warnings]), [ if test "$enableval" = "yes" ; then if test "$enable_debugging" = "no" ; then AC_MSG_ERROR([Can't have --disable-debug and --enable-maintainer-mode]) fi enable_debugging=yes dnl Enable some extra warnings. Put these before the user's flags dnl so the user can specify flags that override these. if test "$GCC" = "yes"; then AC_MSG_NOTICE([maintainer-mode: adding GCC warning flags]) dnl some additional flags that can be handy for an occasional review, dnl but throw too many warnings in svn code, of too little importance, dnl to keep these enabled. Remove the "dnl" to do a run with these dnl switches enabled. dnl ./configure CFLAGS="-Wswitch-enum -Wswitch-default" dnl Add each of the following flags only if the C compiler accepts it. CFLAGS_KEEP="$CFLAGS" CFLAGS="" SVN_CFLAGS_ADD_IFELSE([-Werror=implicit-function-declaration]) SVN_CFLAGS_ADD_IFELSE([-Werror=declaration-after-statement]) SVN_CFLAGS_ADD_IFELSE([-Wextra-tokens]) SVN_CFLAGS_ADD_IFELSE([-Wnewline-eof]) SVN_CFLAGS_ADD_IFELSE([-Wshorten-64-to-32]) SVN_CFLAGS_ADD_IFELSE([-Wold-style-definition]) SVN_CFLAGS_ADD_IFELSE([-Wno-system-headers]) SVN_CFLAGS_ADD_IFELSE([-Wno-format-nonliteral]) SVN_CFLAGS_ADD_IFELSE([-Wmissing-variable-declarations]) SVN_CFLAGS_ADD_IFELSE([-Wno-unused-const-variable]) CMAINTAINERFLAGS="$CFLAGS" CFLAGS="$CFLAGS_KEEP" dnl Add flags that all versions of GCC (should) support CMAINTAINERFLAGS="-Wall -Wpointer-arith -Wwrite-strings -Wshadow -Wformat=2 -Wunused -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wno-multichar -Wredundant-decls -Wnested-externs -Winline -Wno-long-long -Wbad-function-cast $CMAINTAINERFLAGS" fi if test "$GXX" = "yes"; then AC_MSG_NOTICE([maintainer-mode: adding G++ warning flags]) dnl Add each of the following flags only if the C++ compiler accepts it. CXXFLAGS_KEEP="$CXXFLAGS" CXXFLAGS="" SVN_CXXFLAGS_ADD_IFELSE([-Wextra-tokens]) SVN_CXXFLAGS_ADD_IFELSE([-Wnewline-eof]) SVN_CXXFLAGS_ADD_IFELSE([-Wshorten-64-to-32]) SVN_CXXFLAGS_ADD_IFELSE([-Wno-system-headers]) CXXMAINTAINERFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS_KEEP" dnl Add flags that all versions of G++ (should) support CXXMAINTAINERFLAGS="-Wall -Wpointer-arith -Wwrite-strings -Wshadow -Wunused -Wunreachable-code $CXXMAINTAINERFLAGS" fi fi ]) if test "$enable_debugging" = "yes" ; then dnl At the moment, we don't want optimization, because we're dnl debugging. Unless optiization was explicitly enabled. if test "$enable_optimization" != "yes"; then AC_MSG_NOTICE([Disabling optimizations for debugging]) CFLAGS=["`echo $CFLAGS' ' | $SED -e 's/-O[^ ]* //g'`"] CXXFLAGS=["`echo $CXXFLAGS' ' | $SED -e 's/-O[^ ]* //g'`"] fi dnl Add debugging flags, unless they were set by the user if test -z ["`echo $CUSERFLAGS' ' | $EGREP -- '-g[0-9]? '`"]; then AC_MSG_NOTICE([Enabling debugging for C]) CFLAGS=["`echo $CFLAGS' ' | $SED -e 's/-g[0-9] //g' -e 's/-g //g'`"] SVN_CFLAGS_ADD_IFELSE([-fno-inline]) SVN_CFLAGS_ADD_IFELSE([-fno-omit-frame-pointer]) SVN_CFLAGS_ADD_IFELSE([-g3],[],[ SVN_CFLAGS_ADD_IFELSE([-g2],[],[ SVN_CFLAGS_ADD_IFELSE([-g])])]) fi if test -z ["`echo $CXXUSERFLAGS' ' | $EGREP -- '-g[0-9]? '`"]; then AC_MSG_NOTICE([Enabling debugging for C++]) CXXFLAGS=["`echo $CXXFLAGS' ' | $SED -e 's/-g[0-9] //g' -e 's/-g //g'`"] SVN_CXXFLAGS_ADD_IFELSE([-fno-inline]) SVN_CXXFLAGS_ADD_IFELSE([-fno-omit-frame-pointer]) SVN_CXXFLAGS_ADD_IFELSE([-g3],[],[ SVN_CXXFLAGS_ADD_IFELSE([-g2],[],[ SVN_CXXFLAGS_ADD_IFELSE([-g])])]) fi dnl SVN_DEBUG enables specific features for developer builds dnl AP_DEBUG enables specific (Apache) features for developer builds CFLAGS="$CFLAGS -DSVN_DEBUG -DAP_DEBUG" CXXFLAGS="$CXXFLAGS -DSVN_DEBUG -DAP_DEBUG" elif test "$enable_debugging" = "no" ; then AC_MSG_NOTICE([Disabling debugging]) CFLAGS=["`echo $CFLAGS' ' | $SED -e 's/-g[0-9] //g' -e 's/-g //g'`"] CXXFLAGS=["`echo $CXXFLAGS' ' | $SED -e 's/-g[0-9] //g' -e 's/-g //g'`"] dnl Compile with NDEBUG to get rid of assertions CFLAGS="$CFLAGS -DNDEBUG" CXXFLAGS="$CXXFLAGS -DNDEBUG" # elif test "$enable_debugging" = "maybe" ; then # # do nothing fi if test "$enable_optimization" = "yes"; then dnl Add optimization flags, unless they were set by the user if test -z ["`echo $CUSERFLAGS' ' | $EGREP -- '-O[^ ]* '`"]; then CFLAGS=["`echo $CFLAGS' ' | $SED -e 's/-O[^ ]* //g'`"] if test "$enable_debugging" = "yes"; then AC_MSG_NOTICE([Enabling optimizations for C (with debugging enabled)]) SVN_CFLAGS_ADD_IFELSE([-O1],[],[ SVN_CFLAGS_ADD_IFELSE([-O])]) else AC_MSG_NOTICE([Enabling optimizations for C]) SVN_CFLAGS_ADD_IFELSE([-O3],[],[ SVN_CFLAGS_ADD_IFELSE([-O2],[],[ SVN_CFLAGS_ADD_IFELSE([-O1],[],[ SVN_CFLAGS_ADD_IFELSE([-O])])])]) SVN_CFLAGS_ADD_IFELSE([-Wno-clobbered]) SVN_CFLAGS_ADD_IFELSE([-flto]) fi fi if test -z ["`echo $CXXUSERFLAGS' ' | $EGREP -- '-O[^ ]* '`"]; then CXXFLAGS=["`echo $CXXFLAGS' ' | $SED -e 's/-O[^ ]* //g'`"] if test "$enable_debugging" = "yes"; then AC_MSG_NOTICE([Enabling optimizations for C++ (with debugging enabled)]) SVN_CXXFLAGS_ADD_IFELSE([-O1],[],[ SVN_CXXFLAGS_ADD_IFELSE([-O])]) else AC_MSG_NOTICE([Enabling optimizations for C++]) SVN_CXXFLAGS_ADD_IFELSE([-O3],[],[ SVN_CXXFLAGS_ADD_IFELSE([-O2],[],[ SVN_CXXFLAGS_ADD_IFELSE([-O1],[],[ SVN_CXXFLAGS_ADD_IFELSE([-O])])])]) SVN_CXXFLAGS_ADD_IFELSE([-Wno-clobbered]) SVN_CXXFLAGS_ADD_IFELSE([-flto]) fi fi elif test "$enable_optimization" = "no"; then dnl Remove all optimization flags AC_MSG_NOTICE([Disabling optimizations]) CFLAGS=["`echo $CFLAGS' ' | $SED -e 's/-O[^ ]* //g'`"] CXXFLAGS=["`echo $CXXFLAGS' ' | $SED -e 's/-O[^ ]* //g'`"] # elif test "$enable_optimization" = "maybe" ; then # # do nothing fi dnl Dump the current compiler options AC_MSG_NOTICE([C compiler flags: $CFLAGS]) AC_MSG_NOTICE([ user-defined: $CUSERFLAGS]) AC_MSG_NOTICE([ maintainer-mode: $CMAINTAINERFLAGS]) AC_MSG_NOTICE([C++ compiler flags: $CXXFLAGS]) AC_MSG_NOTICE([ user-defined: $CXXUSERFLAGS]) AC_MSG_NOTICE([ maintainer-mode: $CXXMAINTAINERFLAGS]) AC_ARG_ENABLE(full-version-match, AS_HELP_STRING([--disable-full-version-match], [Disable the full version match rules when checking Subversion library compatibility.]), [ if test "$enableval" = "no" ; then AC_MSG_NOTICE([Disabling svn full version matching]) AC_DEFINE(SVN_DISABLE_FULL_VERSION_MATCH, 1, [Defined if the full version matching rules are disabled]) fi ]) AC_ARG_WITH(editor, AS_HELP_STRING([--with-editor=PATH], [Specify a default editor for the subversion client.]), [ if test "$withval" = "yes" ; then AC_MSG_ERROR([--with-editor requires an argument.]) else SVN_CLIENT_EDITOR=$withval AC_DEFINE_UNQUOTED(SVN_CLIENT_EDITOR, "$SVN_CLIENT_EDITOR", [The path of a default editor for the client.]) fi ]) SVN_LIB_Z SVN_LZ4 SVN_UTF8PROC MOD_ACTIVATION="" AC_ARG_ENABLE(mod-activation, AS_HELP_STRING([--enable-mod-activation], [Enable mod_dav_svn in httpd.conf]), [ if test "$enableval" = "yes" ; then MOD_ACTIVATION="-a" AC_MSG_NOTICE([Enabling apache module activation]) else AC_MSG_NOTICE([Disabling apache module activation]) fi ]) AC_SUBST(MOD_ACTIVATION) AC_ARG_ENABLE(gcov, AC_HELP_STRING([--enable-gcov], [Turn on gcov coverage testing (GCC only).]), [ if test "$enableval" = "yes" ; then dnl Probably other compilers support something similar; dnl feel free to extend this to include them. if test "$GCC" = "yes"; then if test "$svn_enable_shared" = "yes" ; then AC_MSG_ERROR([Can't have --enable-gcov without --disable-shared (we recommend also using --enable-all-static).]) fi if test ! "$enable_all_static" = "yes" ; then AC_MSG_WARN(We recommend --enable-all-static with --enable-gcov.) fi AC_MSG_NOTICE([Enabling gcov coverage testing.]) CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage" CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage" else AC_MSG_ERROR([We only support --enable-gcov with GCC right now.]) fi fi ]) AC_ARG_ENABLE(gprof, AS_HELP_STRING([--enable-gprof], [Produce gprof profiling data in 'gmon.out' (GCC only).]), [ if test "$enableval" = "yes" ; then dnl Probably other compilers support -pg or something similar; dnl feel free to extend this to include them. if test "$GCC" = "yes"; then if test "$svn_enable_shared" = "yes" ; then AC_MSG_ERROR([Can't have --enable-gprof without --disable-shared (we recommend also using --enable-all-static).]) fi if test ! "$enable_all_static" = "yes" ; then AC_MSG_WARN(We recommend --enable-all-static with --enable-gprof.) fi AC_MSG_NOTICE([Enabling gprof profiling data (to gmon.out).]) CFLAGS="$CFLAGS -pg" CXXFLAGS="$CXXFLAGS -pg" LT_LDFLAGS="$LT_LDFLAGS -pg" else AC_MSG_ERROR([We only support --enable-gprof with GCC right now.]) fi fi ]) # Scripting and Bindings languages # Python: Used for testsuite, and bindings PYTHON="`$abs_srcdir/build/find_python.sh`" if test -z "$PYTHON"; then AC_MSG_WARN([Python 2.7 or later is required to run the testsuite]) AC_MSG_WARN([or to use the Subversion Python bindings]) AC_MSG_WARN([]) AC_MSG_WARN([If you have a suitable Python installed, but not on the]) AC_MSG_WARN([PATH, set the environment variable PYTHON to the full path]) AC_MSG_WARN([to the Python executable, and re-run configure]) fi AC_PATH_PROGS(PYTHON, "$PYTHON", none) # The minimum version for the JVM runtime for our Java bytecode. JAVA_OLDEST_WORKING_VER='1.6' # SVN_CHECK_JDK sets $JAVA_CLASSPATH SVN_CHECK_JDK($JAVA_OLDEST_WORKING_VER) AC_PATH_PROG(PERL, perl, none) if test -n "$RUBY"; then AC_PATH_PROG(RUBY, "$RUBY", none) else AC_PATH_PROGS(RUBY, ruby ruby1 ruby1.8 ruby18 ruby1.9 ruby19 ruby1.9.3 ruby193 ruby2 ruby2.0 ruby20 ruby2.1 ruby21 ruby2.2 ruby22 ruby2.3 ruby23 ruby2.4 ruby24, none) fi if test "$RUBY" != "none"; then AC_MSG_CHECKING([rb_hash_foreach]) if "$RUBY" -r mkmf -e 'exit(have_func("rb_hash_foreach") ? 0 : 1)' >/dev/null; then AC_MSG_RESULT([yes]) if test -n "$RDOC"; then AC_PATH_PROG(RDOC, "$RDOC", none) else - AC_PATH_PROGS(RUBY, rdoc rdoc1 rdoc1.8 rdoc18 rdoc1.9 rdoc19 rdoc1.9.3 rdoc193 rdoc2 rdoc2.0 rdoc20 rdoc2.1 rdoc21 rdoc2.2 rdoc22 rdoc2.3 rdoc23 rdoc2.4 rdoc24, none) + AC_PATH_PROGS(RDOC, rdoc rdoc1 rdoc1.8 rdoc18 rdoc1.9 rdoc19 rdoc1.9.3 rdoc193 rdoc2 rdoc2.0 rdoc20 rdoc2.1 rdoc21 rdoc2.2 rdoc22 rdoc2.3 rdoc23 rdoc2.4 rdoc24, none) fi AC_CACHE_CHECK([for Ruby major version], [svn_cv_ruby_major],[ svn_cv_ruby_major="`$RUBY -rrbconfig -e 'print RbConfig::CONFIG.fetch(%q(MAJOR))'`" ]) RUBY_MAJOR="$svn_cv_ruby_major" AC_CACHE_CHECK([for Ruby minor version], [svn_cv_ruby_minor],[ svn_cv_ruby_minor="`$RUBY -rrbconfig -e 'print RbConfig::CONFIG.fetch(%q(MINOR))'`" ]) RUBY_MINOR="$svn_cv_ruby_minor" AC_CACHE_CHECK([for Ruby teeny version], [svn_cv_ruby_teeny],[ svn_cv_ruby_teeny="`$RUBY -rrbconfig -e 'major, minor, teeny = RUBY_VERSION.split("."); print teeny;'`" ]) RUBY_TEENY="$svn_cv_ruby_teeny" AC_SUBST(RUBY_MAJOR) AC_SUBST(RUBY_MINOR) AC_SUBST(RUBY_TEENY) if test \( "$RUBY_MAJOR" -eq "1" -a "$RUBY_MINOR" -gt "8" -a "$RUBY_TEENY" -lt "3" \); then # Disallow Ruby between 1.8.7 and 1.9.3 RUBY="none" AC_MSG_WARN([The detected Ruby is between 1.9 and 1.9.3]) AC_MSG_WARN([Only 1.8.x and 1.9.3 or later are supported at this time]) fi else AC_MSG_RESULT([no]) RUBY="none" AC_MSG_WARN([The detected Ruby is too old for Subversion to use]) AC_MSG_WARN([A Ruby which has rb_hash_foreach is required to use the]) AC_MSG_WARN([Subversion Ruby bindings]) AC_MSG_WARN([Upgrade to the official 1.8.2 release, or later]) fi fi SVN_CHECK_SWIG AC_ARG_VAR(SWIG_FEATURES, [SWIG feature flags common to all bindings]) AC_ARG_VAR(SWIG_RB_FEATURES, [SWIG feature flags specific to Ruby bindings]) AC_ARG_VAR(SWIG_PL_FEATURES, [SWIG feature flags specific to Perl bindings]) AC_ARG_VAR(SWIG_PY_FEATURES, [SWIG feature flags specific to Python bindings]) SVN_CHECK_CTYPESGEN dnl decide whether we want to link against the RA/FS libraries AC_ARG_ENABLE(runtime-module-search, AS_HELP_STRING([--enable-runtime-module-search], [Turn on dynamic loading of RA/FS libraries including third-party FS libraries]), [ if test "$enableval" = "yes"; then use_dso=yes if test "$svn_enable_shared" = "no"; then AC_MSG_ERROR([--enable-runtime-module-search conflicts with --disable-shared]) fi AC_DEFINE(SVN_USE_DSO, 1, [Defined if svn should try to load DSOs]) dnl Mac OS X uses libname.MAJOR.SOVERSION.dylib dnl Most other unixes use libname.MAJOR.so.SOVERSION case "$host" in *-*-darwin*) AC_DEFINE(SVN_DSO_SUFFIX_FMT, ["%d.%d.dylib"], [Shared library file name suffix format]) ;; *) AC_DEFINE(SVN_DSO_SUFFIX_FMT, ["%d.so.%d"], [Shared library file name suffix format]) ;; esac fi ]) if test "$svn_enable_shared" = "no" || test "$use_dso" != "yes"; then AC_DEFINE(SVN_LIBSVN_RA_LINKS_RA_LOCAL, 1, [Defined if libsvn_ra should link against libsvn_ra_local]) svn_ra_lib_deps="\$(RA_LOCAL_DEPS)" svn_ra_lib_install_deps="install-ramod-lib" svn_ra_lib_link="\$(RA_LOCAL_LINK)" AC_DEFINE(SVN_LIBSVN_RA_LINKS_RA_SVN, 1, [Defined if libsvn_ra should link against libsvn_ra_svn]) svn_ra_lib_deps="$svn_ra_lib_deps \$(RA_SVN_DEPS)" svn_ra_lib_link="$svn_ra_lib_link \$(RA_SVN_LINK)" if test "$svn_lib_serf" = "yes"; then AC_DEFINE(SVN_LIBSVN_RA_LINKS_RA_SERF, 1, [Defined if libsvn_ra should link against libsvn_ra_serf]) svn_ra_lib_deps="$svn_ra_lib_deps \$(RA_SERF_DEPS)" svn_ra_lib_install_deps="$svn_ra_lib_install_deps install-serf-lib" svn_ra_lib_link="$svn_ra_lib_link \$(RA_SERF_LINK)" fi SVN_RA_LIB_DEPS=$svn_ra_lib_deps SVN_RA_LIB_INSTALL_DEPS=$svn_ra_lib_install_deps SVN_RA_LIB_LINK=$svn_ra_lib_link AC_DEFINE(SVN_LIBSVN_FS_LINKS_FS_FS, 1, [Defined if libsvn_fs should link against libsvn_fs_fs]) svn_fs_lib_deps="\$(FS_FS_DEPS)" svn_fs_lib_install_deps="install-fsmod-lib" svn_fs_lib_link="\$(FS_FS_LINK)" AC_DEFINE(SVN_LIBSVN_FS_LINKS_FS_X, 1, [Defined if libsvn_fs should link against libsvn_fs_x]) svn_fs_lib_deps="$svn_fs_lib_deps \$(FS_X_DEPS)" svn_fs_lib_link="$svn_fs_lib_link \$(FS_X_LINK)" dnl FSFS already installs fsmod dnl svn_fs_lib_install_deps="$svn_fs_lib_install_deps install-fsmod-lib" if test "$svn_lib_berkeley_db" = "yes"; then AC_DEFINE(SVN_LIBSVN_FS_LINKS_FS_BASE, 1, [Defined if libsvn_fs should link against libsvn_fs_base]) svn_fs_lib_deps="$svn_fs_lib_deps \$(FS_BASE_DEPS)" svn_fs_lib_install_deps="$svn_fs_lib_install_deps install-bdb-lib" svn_fs_lib_link="$svn_fs_lib_link \$(FS_BASE_LINK)" fi SVN_FS_LIB_DEPS=$svn_fs_lib_deps SVN_FS_LIB_INSTALL_DEPS=$svn_fs_lib_install_deps SVN_FS_LIB_LINK=$svn_fs_lib_link fi AC_SUBST(SVN_RA_LIB_DEPS) AC_SUBST(SVN_RA_LIB_INSTALL_DEPS) AC_SUBST(SVN_RA_LIB_LINK) AC_SUBST(SVN_FS_LIB_DEPS) AC_SUBST(SVN_FS_LIB_INSTALL_DEPS) AC_SUBST(SVN_FS_LIB_LINK) # ==== JavaHL ================================================================ dnl Possibly compile JavaHL do_javahl_build=no AC_ARG_ENABLE(javahl, AS_HELP_STRING([--enable-javahl], [Enable compilation of Java high-level bindings (requires C++)]), [ if test "$enableval" = "yes" ; then do_javahl_build="yes" fi ]) JAVAHL_OBJDIR="" INSTALL_EXTRA_JAVAHL_LIB="" FIX_JAVAHL_LIB="" JAVAHL_TESTS_TARGET="" JAVAHL_COMPAT_TESTS_TARGET="" LT_CXX_LIBADD="" if test "$do_javahl_build" = "yes"; then dnl Check for suitable JDK if test "$JDK_SUITABLE" = "no"; then AC_MSG_ERROR([Cannot compile JavaHL without a suitable JDK. Please specify a suitable JDK using the --with-jdk option.]) fi dnl The temporary directory where libtool compiles libsvnjavahl. JAVAHL_OBJDIR='$(libsvnjavahl_PATH)/.libs' os_arch=`uname` if test "$os_arch" = "Darwin"; then dnl On Darwin, JNI libs must be installed as .jnilib INSTALL_EXTRA_JAVAHL_LIB='ln -sf $(libdir)/libsvnjavahl-1.dylib $(libdir)/libsvnjavahl-1.jnilib' FIX_JAVAHL_LIB="ln -sf libsvnjavahl-1.dylib $JAVAHL_OBJDIR/libsvnjavahl-1.jnilib" fi # This segment (and the rest of r10800) is very likely unnecessary # with libtool 1.5, which automatically adds libstdc++ as a # dependency to the C++ libraries it builds. So at some future time # when autogen.sh requires libtool 1.5 or higher, we can get rid of # it. AC_MSG_CHECKING([for additional flags to link C++ libraries]) if test "x$ac_compiler_gnu" = "xyes"; then case "$host" in *freebsd10*) AC_MSG_RESULT([none needed]) ;; *) LT_CXX_LIBADD="-lstdc++" AC_MSG_RESULT([$LT_CXX_LIBADD]) ;; esac else AC_MSG_RESULT([none needed]) fi fi AC_SUBST(INSTALL_EXTRA_JAVAHL_LIB) AC_SUBST(JAVAHL_OBJDIR) AC_SUBST(FIX_JAVAHL_LIB) AC_SUBST(LT_CXX_LIBADD) AC_ARG_WITH(junit, AS_HELP_STRING([--with-junit=PATH], [Specify a path to the junit JAR file.]), [ if test "$withval" != "no"; then if test -n "$JAVA_CLASSPATH"; then JAVA_CLASSPATH="$withval:$JAVA_CLASSPATH" else JAVA_CLASSPATH="$withval" fi JAVAHL_TESTS_TARGET="javahl-tests" JAVAHL_COMPAT_TESTS_TARGET="javahl-compat-tests" fi ]) AC_SUBST(JAVA_CLASSPATH) AC_SUBST(JAVAHL_TESTS_TARGET) AC_SUBST(JAVAHL_COMPAT_TESTS_TARGET) # ==== Miscellaneous bits ==================================================== AC_CHECK_HEADERS([stdbool.h stdint.h]) # Strip '-no-cpp-precomp' from CPPFLAGS for the clang compiler ### I think we get this flag from APR, so the fix probably belongs there if test "$CC" = "clang"; then SVN_STRIP_FLAG(CPPFLAGS, [-no-cpp-precomp ]) fi dnl Since this is used only on Unix-y systems, define the path separator as '/' AC_DEFINE_UNQUOTED(SVN_PATH_LOCAL_SEPARATOR, '/', [Defined to be the path separator used on your local filesystem]) AC_DEFINE_UNQUOTED(SVN_NULL_DEVICE_NAME, "/dev/null", [Defined to be the null device for the system]) DEFAULT_FS_TYPE="fsfs" AC_DEFINE_UNQUOTED(DEFAULT_FS_TYPE, "$DEFAULT_FS_TYPE", [The fs type to use by default]) DEFAULT_HTTP_LIBRARY="serf" AC_DEFINE_UNQUOTED(DEFAULT_HTTP_LIBRARY, "$DEFAULT_HTTP_LIBRARY", [The http library to use by default]) # BSD/OS (BSDi) needs to use a different include syntax in Makefile INCLUDE_OUTPUTS="include \$(top_srcdir)/build-outputs.mk" case "$host" in *bsdi*) # Check whether they've installed GNU make if ! make --version > /dev/null 2>&1; then # BSDi make INCLUDE_OUTPUTS=".include \"\$(top_srcdir)/build-outputs.mk\"" fi ;; esac AC_SUBST(INCLUDE_OUTPUTS) # ==== Detection complete - output and run config.status ===================== AC_CONFIG_HEADERS(subversion/svn_private_config.h.tmp:subversion/svn_private_config.h.in) AC_CONFIG_COMMANDS([svn_private_config.h.tmp], [svn_cf=subversion/svn_private_config.h; $SED -e "s/@SVN_DB_HEADER@/$SVN_DB_HEADER/" $svn_cf.tmp > $svn_cf.tmp.new cmp -s $svn_cf.tmp.new $svn_cf || mv -f $svn_cf.tmp.new $svn_cf rm -f $svn_cf.tmp.new $svn_cf.tmp], [SED="$SED" SVN_DB_HEADER="$SVN_DB_HEADER"]) AC_CONFIG_FILES([Makefile]) # Create pkg-config .pc files from .pc.in files for pc_in_file in "${abs_srcdir}"/subversion/libsvn_*/*.pc.in; do pc_file=${pc_in_file#${abs_srcdir}/} pc_file=${pc_file%.in} AC_CONFIG_FILES([${pc_file}]) done SVN_CONFIG_SCRIPT(tools/backup/hot-backup.py) SVN_CONFIG_SCRIPT(tools/hook-scripts/commit-access-control.pl) SVN_CONFIG_SCRIPT(subversion/bindings/swig/perl/native/Makefile.PL) if test -e packages/solaris/pkginfo.in; then SVN_CONFIG_SCRIPT(packages/solaris/pkginfo) fi AC_SUBST(SVN_CONFIG_SCRIPT_FILES) # Ensure that SWIG is checked after reconfiguration. rm -f .swig_checked dnl Provide ${host} for use in compiled code (for svn --version) AC_DEFINE_UNQUOTED([SVN_BUILD_HOST], "${host}", [Defined to the config.guess name of the build system]) dnl Provide ${target} for use in compiled code (for user-agent string) AC_DEFINE_UNQUOTED([SVN_BUILD_TARGET], "${target}", [Defined to the config.guess name of the build target]) AC_OUTPUT # ==== Print final messages to user ========================================== dnl Configure is long - users tend to miss warnings printed during it. dnl Hence, print a warnings about what we did and didn't configure at the dnl end, where people will actually see them. if test "$svn_have_berkeley_db" = "no6" && test "$enable_bdb6" != "no"; then AC_MSG_WARN([We have configured without BDB filesystem support Berkeley DB 6 was found, but not used. Please re-run configure (see ./config.nice) with the '--enable-bdb6' flag to use it, or explicitly specify '--disable-bdb6' or '--without-berkeley-db' to silence this warning. Please note that some versions of Berkeley DB 6+ are under the GNU Affero General Public License, version 3: https://oss.oracle.com/pipermail/bdb/2013-June/000056.html The AGPL-3.0 licence may impose special requirements for making available source code of server-side software. The text of the licence is: https://www.gnu.org/licenses/agpl-3.0.html http://opensource.org/licenses/AGPL-3.0 The Berkeley DB backend to Subversion is deprecated; see http://subversion.apache.org/docs/release-notes/1.8#bdb-deprecated The Subversion developers have not tested Subversion with Berkeley DB 6 for technical problems or bugs. ]) fi Index: vendor/subversion/dist/subversion/include/svn_version.h =================================================================== --- vendor/subversion/dist/subversion/include/svn_version.h (revision 339231) +++ vendor/subversion/dist/subversion/include/svn_version.h (revision 339232) @@ -1,452 +1,452 @@ /** * @copyright * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * ==================================================================== * @endcopyright * * @file svn_version.h * @brief Version information. */ #ifndef SVN_VERSION_H #define SVN_VERSION_H /* Hack to prevent the resource compiler from including apr and other headers. */ #ifndef SVN_WIN32_RESOURCE_COMPILATION #include #include #include "svn_types.h" #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* Symbols that define the version number. */ /* Version numbers: .. * * The version numbers in this file follow the rules established by: * * http://apr.apache.org/versioning.html */ /** Major version number. * * Modify when incompatible changes are made to published interfaces. */ #define SVN_VER_MAJOR 1 /** Minor version number. * * Modify when new functionality is added or new interfaces are * defined, but all changes are backward compatible. */ #define SVN_VER_MINOR 10 /** * Patch number. * * Modify for every released patch. * * @since New in 1.1. */ -#define SVN_VER_PATCH 0 +#define SVN_VER_PATCH 2 /** @deprecated Provided for backward compatibility with the 1.0 API. */ #define SVN_VER_MICRO SVN_VER_PATCH /** @deprecated Provided for backward compatibility with the 1.0 API. */ #define SVN_VER_LIBRARY SVN_VER_MAJOR /** Version tag: a string describing the version. * * This tag remains " (under development)" in the repository so that we can * always see from "svn --version" that the software has been built * from the repository rather than a "blessed" distribution. * * When rolling a tarball, we automatically replace this text with " (r1234)" * (where 1234 is the last revision on the branch prior to the release) * for final releases; in prereleases, it becomes " (Alpha 1)", * " (Beta 1)", etc., as appropriate. * * Always change this at the same time as SVN_VER_NUMTAG. */ -#define SVN_VER_TAG " (r1827917)" +#define SVN_VER_TAG " (r1835932)" /** Number tag: a string describing the version. * * This tag is used to generate a version number string to identify * the client and server in HTTP requests, for example. It must not * contain any spaces. This value remains "-dev" in the repository. * * When rolling a tarball, we automatically replace this text with "" * for final releases; in prereleases, it becomes "-alpha1, "-beta1", * etc., as appropriate. * * Always change this at the same time as SVN_VER_TAG. */ #define SVN_VER_NUMTAG "" /** Revision number: The repository revision number of this release. * * This constant is used to generate the build number part of the Windows * file version. Its value remains 0 in the repository except in release * tags where it is the revision from which the tag was created. */ -#define SVN_VER_REVISION 1827917 +#define SVN_VER_REVISION 1835932 /* Version strings composed from the above definitions. */ /** Version number */ #define SVN_VER_NUM APR_STRINGIFY(SVN_VER_MAJOR) \ "." APR_STRINGIFY(SVN_VER_MINOR) \ "." APR_STRINGIFY(SVN_VER_PATCH) /** Version number with tag (contains no whitespace) */ #define SVN_VER_NUMBER SVN_VER_NUM SVN_VER_NUMTAG /** Complete version string */ #define SVN_VERSION SVN_VER_NUMBER SVN_VER_TAG /* Version queries and compatibility checks */ /** * Version information. Each library contains a function called * svn_libname_version() that returns a pointer to a statically * allocated object of this type. * * @since New in 1.1. */ struct svn_version_t { int major; /**< Major version number */ int minor; /**< Minor version number */ int patch; /**< Patch number */ /** * The version tag (#SVN_VER_NUMTAG). Must always point to a * statically allocated string. */ const char *tag; }; /** * Define a static svn_version_t object. * * @since New in 1.1. */ #define SVN_VERSION_DEFINE(name) \ static const svn_version_t name = \ { \ SVN_VER_MAJOR, \ SVN_VER_MINOR, \ SVN_VER_PATCH, \ SVN_VER_NUMTAG \ } \ /** * Generate the implementation of a version query function. * * @since New in 1.1. * @since Since 1.9, embeds a string into the compiled object * file that can be queried with the 'what' utility. */ #define SVN_VERSION_BODY \ static struct versioninfo_t \ { \ const char *const str; \ const svn_version_t num; \ } const versioninfo = \ { \ "@(#)" SVN_VERSION, \ { \ SVN_VER_MAJOR, \ SVN_VER_MINOR, \ SVN_VER_PATCH, \ SVN_VER_NUMTAG \ } \ }; \ return &versioninfo.num /** * Check library version compatibility. Return #TRUE if the client's * version, given in @a my_version, is compatible with the library * version, provided in @a lib_version. * * This function checks for version compatibility as per our * guarantees, but requires an exact match when linking to an * unreleased library. A development client is always compatible with * a previous released library. * * @note Implements the #svn_ver_check_list2.@a comparator interface. * * @since New in 1.1. */ svn_boolean_t svn_ver_compatible(const svn_version_t *my_version, const svn_version_t *lib_version); /** * Check if @a my_version and @a lib_version encode the same version number. * * @note Implements the #svn_ver_check_list2.@a comparator interface. * * @since New in 1.2. */ svn_boolean_t svn_ver_equal(const svn_version_t *my_version, const svn_version_t *lib_version); /** * An entry in the compatibility checklist. * @see svn_ver_check_list() * * @since New in 1.1. */ typedef struct svn_version_checklist_t { const char *label; /**< Entry label */ /** Version query function for this entry */ const svn_version_t *(*version_query)(void); } svn_version_checklist_t; /** * Perform a series of version compatibility checks. Checks if @a * my_version is compatible with each entry in @a checklist. @a * checklist must end with an entry whose label is @c NULL. * * @a my_version is considered to be compatible with a version in @a checklist * if @a comparator returns #TRUE when called with @a my_version as the first * parammeter and the @a checklist version as the second parameter. * * @see svn_ver_compatible(), svn_ver_equal() * * @note Subversion's own code invariably uses svn_ver_equal() as @a comparator, * since the cmdline tools sometimes use non-public APIs (such as utility * functions that haven't been promoted to svn_cmdline.h). Third-party code * SHOULD use svn_ver_compatible() as @a comparator. * * @since New in 1.9. */ svn_error_t * svn_ver_check_list2(const svn_version_t *my_version, const svn_version_checklist_t *checklist, svn_boolean_t (*comparator)(const svn_version_t *, const svn_version_t *)); /** Similar to svn_ver_check_list2(), with @a comparator set to * #svn_ver_compatible. * * @deprecated Provided for backward compatibility with 1.8 API. */ SVN_DEPRECATED svn_error_t * svn_ver_check_list(const svn_version_t *my_version, const svn_version_checklist_t *checklist); /** * Type of function returning library version. * * @since New in 1.6. */ typedef const svn_version_t *(*svn_version_func_t)(void); /* libsvn_subr doesn't have an svn_subr header, so put the prototype here. */ /** * Get libsvn_subr version information. * * @since New in 1.1. */ const svn_version_t * svn_subr_version(void); /** * Extended version information, including info about the running system. * * @since New in 1.8. */ typedef struct svn_version_extended_t svn_version_extended_t; /** * Return version information for the running program. If @a verbose * is #TRUE, collect extra information that may be expensive to * retrieve (for example, the OS release name, list of shared * libraries, etc.). Use @a pool for all allocations. * * @note This function may allocate significant auxiliary resources * (memory and file descriptors) in @a pool. It is recommended to * copy the returned data to suitable longer-lived memory and clear * @a pool after calling this function. * * @since New in 1.8. */ const svn_version_extended_t * svn_version_extended(svn_boolean_t verbose, apr_pool_t *pool); /** * Accessor for svn_version_extended_t. * * @return The date when the libsvn_subr library was compiled, in the * format defined by the C standard macro @c __DATE__. * * @since New in 1.8. */ const char * svn_version_ext_build_date(const svn_version_extended_t *ext_info); /** * Accessor for svn_version_extended_t. * * @return The time when the libsvn_subr library was compiled, in the * format defined by the C standard macro @c __TIME__. * * @since New in 1.8. */ const char * svn_version_ext_build_time(const svn_version_extended_t *ext_info); /** * Accessor for svn_version_extended_t. * * @return The canonical host triplet (arch-vendor-osname) of the * system where libsvn_subr was compiled. * * @note On Unix-like systems (includng Mac OS X), this string is the * same as the output of the config.guess script. * * @since New in 1.8. */ const char * svn_version_ext_build_host(const svn_version_extended_t *ext_info); /** * Accessor for svn_version_extended_t. * * @return The localized copyright notice. * * @since New in 1.8. */ const char * svn_version_ext_copyright(const svn_version_extended_t *ext_info); /** * Accessor for svn_version_extended_t. * * @return The canonical host triplet (arch-vendor-osname) of the * system where the current process is running. * * @note This string may not be the same as the output of config.guess * on the same system. * * @since New in 1.8. */ const char * svn_version_ext_runtime_host(const svn_version_extended_t *ext_info); /** * Accessor for svn_version_extended_t. * * @return The "commercial" release name of the running operating * system, if available. Not to be confused with, e.g., the output of * "uname -v" or "uname -r". The returned value may be @c NULL. * * @since New in 1.8. */ const char * svn_version_ext_runtime_osname(const svn_version_extended_t *ext_info); /** * Dependent library information. * Describes the name and versions of known dependencies * used by libsvn_subr. * * @since New in 1.8. */ typedef struct svn_version_ext_linked_lib_t { const char *name; /**< Library name */ const char *compiled_version; /**< Compile-time version string */ const char *runtime_version; /**< Run-time version string (optional) */ } svn_version_ext_linked_lib_t; /** * Accessor for svn_version_extended_t. * * @return Array of svn_version_ext_linked_lib_t describing dependent * libraries. The returned value may be @c NULL. * * @since New in 1.8. */ const apr_array_header_t * svn_version_ext_linked_libs(const svn_version_extended_t *ext_info); /** * Loaded shared library information. * Describes the name and, where available, version of the shared libraries * loaded by the running program. * * @since New in 1.8. */ typedef struct svn_version_ext_loaded_lib_t { const char *name; /**< Library name */ const char *version; /**< Library version (optional) */ } svn_version_ext_loaded_lib_t; /** * Accessor for svn_version_extended_t. * * @return Array of svn_version_ext_loaded_lib_t describing loaded * shared libraries. The returned value may be @c NULL. * * @note On Mac OS X, the loaded frameworks, private frameworks and * system libraries will not be listed. * * @since New in 1.8. */ const apr_array_header_t * svn_version_ext_loaded_libs(const svn_version_extended_t *ext_info); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* SVN_VERSION_H */ Index: vendor/subversion/dist/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c =================================================================== --- vendor/subversion/dist/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c (revision 339231) +++ vendor/subversion/dist/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c (revision 339232) @@ -1,545 +1,551 @@ /* * gnome_keyring.c: GNOME Keyring provider for SVN_AUTH_CRED_* * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * ==================================================================== */ /* ==================================================================== */ /*** Includes. ***/ #include #include #include "svn_auth.h" #include "svn_hash.h" #include "svn_version.h" #include "private/svn_auth_private.h" #include "svn_private_config.h" #ifdef SVN_HAVE_LIBSECRET #include /* Return TRUE if the default collection is available and FALSE otherwise. In interactive mode the collection only has to exist to be available, it can be locked or unlocked. The default collection will be created if necessary. In non-interactive mode the collection is only available if it already exists and is unlocked. Such an available collection can be used without prompting. Strictly this is racy: nothing ensures the collection remains unlocked. A similar issue affects the KWallet and original GNOME Keyring providers. As a non-racy alternative one could override prompt_async in the _SecretServiceClass vtable, the get/set would still fail but there would be no prompt and no race. This "works" but it is not clear to me whether it is legitimate since the SecretService is a singleton and the effect would be application-wide. */ static svn_boolean_t available_collection(svn_boolean_t non_interactive, apr_pool_t *pool) { GError *gerror = NULL; SecretService *service = NULL; SecretCollection *collection = NULL; service = secret_service_get_sync(SECRET_SERVICE_NONE, NULL, &gerror); if (gerror || !service) goto error_return; collection = secret_collection_for_alias_sync(service, SECRET_COLLECTION_DEFAULT, SECRET_COLLECTION_NONE, NULL, &gerror); if (gerror) goto error_return; if (!collection) { if (non_interactive) goto error_return; /* "Default" is the label used by the old libgnome-keyring. */ collection = secret_collection_create_sync(service, "Default", SECRET_COLLECTION_DEFAULT, 0, NULL, &gerror); if (gerror || !collection) goto error_return; } if (non_interactive && secret_collection_get_locked(collection)) goto error_return; g_object_unref(collection); g_object_unref(service); return TRUE; error_return: if (gerror) g_error_free(gerror); if (collection) g_object_unref(collection); if (service) g_object_unref(service); return FALSE; } /* Implementation of svn_auth__password_get_t that retrieves the password using libsecret. */ static svn_error_t * password_get_gnome_keyring(svn_boolean_t *done, const char **password, apr_hash_t *creds, const char *realmstring, const char *username, apr_hash_t *parameters, svn_boolean_t non_interactive, apr_pool_t *pool) { GError *gerror = NULL; gchar *gpassword; + + *done = FALSE; if (!available_collection(non_interactive, pool)) return SVN_NO_ERROR; gpassword = secret_password_lookup_sync(SECRET_SCHEMA_COMPAT_NETWORK, NULL, &gerror, "domain", realmstring, "user", username, NULL); if (gerror) { + /* ### TODO: return or log the error? */ g_error_free(gerror); } else if (gpassword) { *password = apr_pstrdup(pool, gpassword); g_free(gpassword); *done = TRUE; } return SVN_NO_ERROR; } /* Implementation of svn_auth__password_set_t that stores the password using libsecret. */ static svn_error_t * password_set_gnome_keyring(svn_boolean_t *done, apr_hash_t *creds, const char *realmstring, const char *username, const char *password, apr_hash_t *parameters, svn_boolean_t non_interactive, apr_pool_t *pool) { GError *gerror = NULL; gboolean gstatus; + *done = FALSE; + if (!available_collection(non_interactive, pool)) return SVN_NO_ERROR; /* "network password" is the label used by the old libgnome-keyring. */ gstatus = secret_password_store_sync(SECRET_SCHEMA_COMPAT_NETWORK, SECRET_COLLECTION_DEFAULT, "network password", password, NULL, &gerror, "domain", realmstring, "user", username, NULL); if (gerror) { + /* ### TODO: return or log the error? */ g_error_free(gerror); } else if (gstatus) { *done = TRUE; } return SVN_NO_ERROR; } #endif /* SVN_HAVE_LIBSECRET */ #ifdef SVN_HAVE_GNOME_KEYRING #include #include /* Returns the default keyring name, allocated in RESULT_POOL. */ static char* get_default_keyring_name(apr_pool_t *result_pool) { char *name, *def; GnomeKeyringResult gkr; gkr = gnome_keyring_get_default_keyring_sync(&name); if (gkr != GNOME_KEYRING_RESULT_OK) return NULL; def = apr_pstrdup(result_pool, name); g_free(name); return def; } /* Returns TRUE if the KEYRING_NAME is locked. */ static svn_boolean_t check_keyring_is_locked(const char *keyring_name) { GnomeKeyringInfo *info; svn_boolean_t locked; GnomeKeyringResult gkr; gkr = gnome_keyring_get_info_sync(keyring_name, &info); if (gkr != GNOME_KEYRING_RESULT_OK) return FALSE; if (gnome_keyring_info_get_is_locked(info)) locked = TRUE; else locked = FALSE; gnome_keyring_info_free(info); return locked; } /* Unlock the KEYRING_NAME with the KEYRING_PASSWORD. If KEYRING was successfully unlocked return TRUE. */ static svn_boolean_t unlock_gnome_keyring(const char *keyring_name, const char *keyring_password, apr_pool_t *pool) { GnomeKeyringInfo *info; GnomeKeyringResult gkr; gkr = gnome_keyring_get_info_sync(keyring_name, &info); if (gkr != GNOME_KEYRING_RESULT_OK) return FALSE; gkr = gnome_keyring_unlock_sync(keyring_name, keyring_password); gnome_keyring_info_free(info); if (gkr != GNOME_KEYRING_RESULT_OK) return FALSE; return check_keyring_is_locked(keyring_name); } /* There is a race here: this ensures keyring is unlocked just now, but will it still be unlocked when we use it? */ static svn_error_t * ensure_gnome_keyring_is_unlocked(svn_boolean_t non_interactive, apr_hash_t *parameters, apr_pool_t *scratch_pool) { const char *default_keyring = get_default_keyring_name(scratch_pool); if (! non_interactive) { svn_auth_gnome_keyring_unlock_prompt_func_t unlock_prompt_func = svn_hash_gets(parameters, SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_FUNC); void *unlock_prompt_baton = svn_hash_gets(parameters, SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_BATON); char *keyring_password; if (unlock_prompt_func && check_keyring_is_locked(default_keyring)) { SVN_ERR((*unlock_prompt_func)(&keyring_password, default_keyring, unlock_prompt_baton, scratch_pool)); /* If keyring is locked give up and try the next provider. */ if (! unlock_gnome_keyring(default_keyring, keyring_password, scratch_pool)) return SVN_NO_ERROR; } } else { if (check_keyring_is_locked(default_keyring)) { return svn_error_create(SVN_ERR_AUTHN_CREDS_UNAVAILABLE, NULL, _("GNOME Keyring is locked and " "we are non-interactive")); } } return SVN_NO_ERROR; } /* Implementation of svn_auth__password_get_t that retrieves the password from GNOME Keyring. */ static svn_error_t * password_get_gnome_keyring(svn_boolean_t *done, const char **password, apr_hash_t *creds, const char *realmstring, const char *username, apr_hash_t *parameters, svn_boolean_t non_interactive, apr_pool_t *pool) { GnomeKeyringResult result; GList *items; *done = FALSE; SVN_ERR(ensure_gnome_keyring_is_unlocked(non_interactive, parameters, pool)); if (! svn_hash_gets(parameters, "gnome-keyring-opening-failed")) { result = gnome_keyring_find_network_password_sync(username, realmstring, NULL, NULL, NULL, NULL, 0, &items); } else { result = GNOME_KEYRING_RESULT_DENIED; } if (result == GNOME_KEYRING_RESULT_OK) { if (items && items->data) { GnomeKeyringNetworkPasswordData *item = items->data; if (item->password) { size_t len = strlen(item->password); if (len > 0) { *password = apr_pstrmemdup(pool, item->password, len); *done = TRUE; } } gnome_keyring_network_password_list_free(items); } } else { svn_hash_sets(parameters, "gnome-keyring-opening-failed", ""); } return SVN_NO_ERROR; } /* Implementation of svn_auth__password_set_t that stores the password in GNOME Keyring. */ static svn_error_t * password_set_gnome_keyring(svn_boolean_t *done, apr_hash_t *creds, const char *realmstring, const char *username, const char *password, apr_hash_t *parameters, svn_boolean_t non_interactive, apr_pool_t *pool) { GnomeKeyringResult result; guint32 item_id; *done = FALSE; SVN_ERR(ensure_gnome_keyring_is_unlocked(non_interactive, parameters, pool)); if (! svn_hash_gets(parameters, "gnome-keyring-opening-failed")) { result = gnome_keyring_set_network_password_sync(NULL, /* default keyring */ username, realmstring, NULL, NULL, NULL, NULL, 0, password, &item_id); } else { result = GNOME_KEYRING_RESULT_DENIED; } if (result != GNOME_KEYRING_RESULT_OK) { svn_hash_sets(parameters, "gnome-keyring-opening-failed", ""); } *done = (result == GNOME_KEYRING_RESULT_OK); return SVN_NO_ERROR; } #if GLIB_CHECK_VERSION(2,6,0) static void log_noop(const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data) { /* do nothing */ } #endif static void init_gnome_keyring(void) { const char *application_name = NULL; application_name = g_get_application_name(); if (!application_name) g_set_application_name("Subversion"); /* Ideally we call g_log_set_handler() with a log_domain specific to libgnome-keyring. Unfortunately, at least as of gnome-keyring 2.22.3, it doesn't have its own log_domain. As a result, we suppress stderr spam for not only libgnome-keyring, but for anything else the app is linked to that uses glib logging and doesn't specify a log_domain. */ #if GLIB_CHECK_VERSION(2,6,0) g_log_set_default_handler(log_noop, NULL); #endif } #endif /* SVN_HAVE_GNOME_KEYRING */ /*-----------------------------------------------------------------------*/ /* GNOME Keyring simple provider, puts passwords in GNOME Keyring */ /*-----------------------------------------------------------------------*/ /* Get cached encrypted credentials from the simple provider's cache. */ static svn_error_t * simple_gnome_keyring_first_creds(void **credentials, void **iter_baton, void *provider_baton, apr_hash_t *parameters, const char *realmstring, apr_pool_t *pool) { return svn_auth__simple_creds_cache_get(credentials, iter_baton, provider_baton, parameters, realmstring, password_get_gnome_keyring, SVN_AUTH__GNOME_KEYRING_PASSWORD_TYPE, pool); } /* Save encrypted credentials to the simple provider's cache. */ static svn_error_t * simple_gnome_keyring_save_creds(svn_boolean_t *saved, void *credentials, void *provider_baton, apr_hash_t *parameters, const char *realmstring, apr_pool_t *pool) { return svn_auth__simple_creds_cache_set(saved, credentials, provider_baton, parameters, realmstring, password_set_gnome_keyring, SVN_AUTH__GNOME_KEYRING_PASSWORD_TYPE, pool); } static const svn_auth_provider_t gnome_keyring_simple_provider = { SVN_AUTH_CRED_SIMPLE, simple_gnome_keyring_first_creds, NULL, simple_gnome_keyring_save_creds }; /* Public API */ void svn_auth_get_gnome_keyring_simple_provider (svn_auth_provider_object_t **provider, apr_pool_t *pool) { svn_auth_provider_object_t *po = apr_pcalloc(pool, sizeof(*po)); po->vtable = &gnome_keyring_simple_provider; *provider = po; #ifdef SVN_HAVE_GNOME_KEYRING init_gnome_keyring(); #endif } /*-----------------------------------------------------------------------*/ /* GNOME Keyring SSL client certificate passphrase provider, */ /* puts passphrases in GNOME Keyring */ /*-----------------------------------------------------------------------*/ /* Get cached encrypted credentials from the ssl client cert password provider's cache. */ static svn_error_t * ssl_client_cert_pw_gnome_keyring_first_creds(void **credentials, void **iter_baton, void *provider_baton, apr_hash_t *parameters, const char *realmstring, apr_pool_t *pool) { return svn_auth__ssl_client_cert_pw_cache_get( credentials, iter_baton, provider_baton, parameters, realmstring, password_get_gnome_keyring, SVN_AUTH__GNOME_KEYRING_PASSWORD_TYPE, pool); } /* Save encrypted credentials to the ssl client cert password provider's cache. */ static svn_error_t * ssl_client_cert_pw_gnome_keyring_save_creds(svn_boolean_t *saved, void *credentials, void *provider_baton, apr_hash_t *parameters, const char *realmstring, apr_pool_t *pool) { return svn_auth__ssl_client_cert_pw_cache_set( saved, credentials, provider_baton, parameters, realmstring, password_set_gnome_keyring, SVN_AUTH__GNOME_KEYRING_PASSWORD_TYPE, pool); } static const svn_auth_provider_t gnome_keyring_ssl_client_cert_pw_provider = { SVN_AUTH_CRED_SSL_CLIENT_CERT_PW, ssl_client_cert_pw_gnome_keyring_first_creds, NULL, ssl_client_cert_pw_gnome_keyring_save_creds }; /* Public API */ void svn_auth_get_gnome_keyring_ssl_client_cert_pw_provider (svn_auth_provider_object_t **provider, apr_pool_t *pool) { svn_auth_provider_object_t *po = apr_pcalloc(pool, sizeof(*po)); po->vtable = &gnome_keyring_ssl_client_cert_pw_provider; *provider = po; #ifdef SVN_HAVE_GNOME_KEYRING init_gnome_keyring(); #endif } Index: vendor/subversion/dist/subversion/libsvn_auth_gnome_keyring/libsvn_auth_gnome_keyring.pc.in =================================================================== --- vendor/subversion/dist/subversion/libsvn_auth_gnome_keyring/libsvn_auth_gnome_keyring.pc.in (revision 339231) +++ vendor/subversion/dist/subversion/libsvn_auth_gnome_keyring/libsvn_auth_gnome_keyring.pc.in (revision 339232) @@ -1,12 +1,12 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: libsvn_auth_gnome_keyring Description: Subversion GNOME Keyring Library Version: @PACKAGE_VERSION@ -Requires: apr-@SVN_APR_MAJOR_VERSION@ gnome-keyring-1 -Requires.private: libsvn_subr +Requires: apr-@SVN_APR_MAJOR_VERSION@ +Requires.private: libsvn_subr @SVN_GNOME_KEYRING_PCLIBS@ Libs: -L${libdir} -lsvn_auth_gnome_keyring Cflags: -I${includedir} Index: vendor/subversion/dist/subversion/libsvn_client/conflicts.c =================================================================== --- vendor/subversion/dist/subversion/libsvn_client/conflicts.c (revision 339231) +++ vendor/subversion/dist/subversion/libsvn_client/conflicts.c (revision 339232) @@ -1,11207 +1,11222 @@ /* * conflicts.c: conflict resolver implementation * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * ==================================================================== */ /* ==================================================================== */ /*** Includes. ***/ #include "svn_types.h" #include "svn_wc.h" #include "svn_client.h" #include "svn_error.h" #include "svn_dirent_uri.h" #include "svn_path.h" #include "svn_pools.h" #include "svn_props.h" #include "svn_hash.h" #include "svn_sorts.h" #include "svn_subst.h" #include "client.h" #include "private/svn_diff_tree.h" #include "private/svn_ra_private.h" #include "private/svn_sorts_private.h" #include "private/svn_token.h" #include "private/svn_wc_private.h" #include "svn_private_config.h" #define ARRAY_LEN(ary) ((sizeof (ary)) / (sizeof ((ary)[0]))) /*** Dealing with conflicts. ***/ /* Describe a tree conflict. */ typedef svn_error_t *(*tree_conflict_get_description_func_t)( const char **change_description, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool); /* Get more information about a tree conflict. * This function may contact the repository. */ typedef svn_error_t *(*tree_conflict_get_details_func_t)( svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool); struct svn_client_conflict_t { const char *local_abspath; apr_hash_t *prop_conflicts; /* Indicate which options were chosen to resolve a text or tree conflict * on the conflicted node. */ svn_client_conflict_option_id_t resolution_text; svn_client_conflict_option_id_t resolution_tree; /* A mapping from const char* property name to pointers to * svn_client_conflict_option_t for all properties which had their * conflicts resolved. Indicates which options were chosen to resolve * the property conflicts. */ apr_hash_t *resolved_props; /* Ask a tree conflict to describe itself. */ tree_conflict_get_description_func_t tree_conflict_get_incoming_description_func; tree_conflict_get_description_func_t tree_conflict_get_local_description_func; /* Ask a tree conflict to find out more information about itself * by contacting the repository. */ tree_conflict_get_details_func_t tree_conflict_get_incoming_details_func; tree_conflict_get_details_func_t tree_conflict_get_local_details_func; /* Any additional information found can be stored here and may be used * when describing a tree conflict. */ void *tree_conflict_incoming_details; void *tree_conflict_local_details; /* The pool this conflict was allocated from. */ apr_pool_t *pool; /* Conflict data provided by libsvn_wc. */ const svn_wc_conflict_description2_t *legacy_text_conflict; const char *legacy_prop_conflict_propname; const svn_wc_conflict_description2_t *legacy_tree_conflict; /* The recommended resolution option's ID. */ svn_client_conflict_option_id_t recommended_option_id; }; /* Resolves conflict to OPTION and sets CONFLICT->RESOLUTION accordingly. * * May raise an error in case the conflict could not be resolved. A common * case would be a tree conflict the resolution of which depends on other * tree conflicts to be resolved first. */ typedef svn_error_t *(*conflict_option_resolve_func_t)( svn_client_conflict_option_t *option, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool); struct svn_client_conflict_option_t { svn_client_conflict_option_id_t id; const char *label; const char *description; svn_client_conflict_t *conflict; conflict_option_resolve_func_t do_resolve_func; /* The pool this option was allocated from. */ apr_pool_t *pool; /* Data which is specific to particular conflicts and options. */ union { struct { /* Indicates the property to resolve in case of a property conflict. * If set to "", all properties are resolved to this option. */ const char *propname; /* A merged property value, if supplied by the API user, else NULL. */ const svn_string_t *merged_propval; } prop; } type_data; }; /* * Return a legacy conflict choice corresponding to OPTION_ID. * Return svn_wc_conflict_choose_undefined if no corresponding * legacy conflict choice exists. */ static svn_wc_conflict_choice_t conflict_option_id_to_wc_conflict_choice( svn_client_conflict_option_id_t option_id) { switch (option_id) { case svn_client_conflict_option_undefined: return svn_wc_conflict_choose_undefined; case svn_client_conflict_option_postpone: return svn_wc_conflict_choose_postpone; case svn_client_conflict_option_base_text: return svn_wc_conflict_choose_base; case svn_client_conflict_option_incoming_text: return svn_wc_conflict_choose_theirs_full; case svn_client_conflict_option_working_text: return svn_wc_conflict_choose_mine_full; case svn_client_conflict_option_incoming_text_where_conflicted: return svn_wc_conflict_choose_theirs_conflict; case svn_client_conflict_option_working_text_where_conflicted: return svn_wc_conflict_choose_mine_conflict; case svn_client_conflict_option_merged_text: return svn_wc_conflict_choose_merged; case svn_client_conflict_option_unspecified: return svn_wc_conflict_choose_unspecified; default: break; } return svn_wc_conflict_choose_undefined; } static void add_legacy_desc_to_conflict(const svn_wc_conflict_description2_t *desc, svn_client_conflict_t *conflict, apr_pool_t *result_pool) { switch (desc->kind) { case svn_wc_conflict_kind_text: conflict->legacy_text_conflict = desc; break; case svn_wc_conflict_kind_property: if (conflict->prop_conflicts == NULL) conflict->prop_conflicts = apr_hash_make(result_pool); svn_hash_sets(conflict->prop_conflicts, desc->property_name, desc); conflict->legacy_prop_conflict_propname = desc->property_name; break; case svn_wc_conflict_kind_tree: conflict->legacy_tree_conflict = desc; break; default: SVN_ERR_ASSERT_NO_RETURN(FALSE); /* unknown kind of conflict */ } } /* A map for svn_wc_conflict_action_t values to strings */ static const svn_token_map_t map_conflict_action[] = { { "edit", svn_wc_conflict_action_edit }, { "delete", svn_wc_conflict_action_delete }, { "add", svn_wc_conflict_action_add }, { "replace", svn_wc_conflict_action_replace }, { NULL, 0 } }; /* A map for svn_wc_conflict_reason_t values to strings */ static const svn_token_map_t map_conflict_reason[] = { { "edit", svn_wc_conflict_reason_edited }, { "delete", svn_wc_conflict_reason_deleted }, { "missing", svn_wc_conflict_reason_missing }, { "obstruction", svn_wc_conflict_reason_obstructed }, { "add", svn_wc_conflict_reason_added }, { "replace", svn_wc_conflict_reason_replaced }, { "unversioned", svn_wc_conflict_reason_unversioned }, { "moved-away", svn_wc_conflict_reason_moved_away }, { "moved-here", svn_wc_conflict_reason_moved_here }, { NULL, 0 } }; /* Describes a server-side move (really a copy+delete within the same * revision) which was identified by scanning the revision log. * This structure can represent one or more "chains" of moves, i.e. * multiple move operations which occurred across a range of revisions. */ struct repos_move_info { /* The revision in which this move was committed. */ svn_revnum_t rev; /* The author who commited the revision in which this move was committed. */ const char *rev_author; /* The repository relpath the node was moved from in this revision. */ const char *moved_from_repos_relpath; /* The repository relpath the node was moved to in this revision. */ const char *moved_to_repos_relpath; /* The copyfrom revision of the moved-to path. */ svn_revnum_t copyfrom_rev; /* The node kind of the item being moved. */ svn_node_kind_t node_kind; /* Prev pointer. NULL if no prior move exists in the chain. */ struct repos_move_info *prev; /* An array of struct repos_move_info * elements, each representing * a possible way forward in the move chain. NULL if no next move * exists in this chain. If the deleted node was copied only once in * this revision, then this array has only one element and the move * chain does not fork. But if this revision contains multiple copies of * the deleted node, each of these copies appears as an element of this * array, and each element represents a different path the next move * might have taken. */ apr_array_header_t *next; }; static svn_revnum_t rev_below(svn_revnum_t rev) { SVN_ERR_ASSERT_NO_RETURN(rev != SVN_INVALID_REVNUM); SVN_ERR_ASSERT_NO_RETURN(rev > 0); return rev == 1 ? 1 : rev - 1; } /* Set *RELATED to true if the deleted node DELETED_REPOS_RELPATH@DELETED_REV * is an ancestor of the copied node COPYFROM_PATH@COPYFROM_REV. * If CHECK_LAST_CHANGED_REV is non-zero, also ensure that the copied node * is a copy of the deleted node's last-changed revision's content, rather * than a copy of some older content. If it's not, set *RELATED to false. */ static svn_error_t * check_move_ancestry(svn_boolean_t *related, svn_ra_session_t *ra_session, const char *repos_root_url, const char *deleted_repos_relpath, svn_revnum_t deleted_rev, const char *copyfrom_path, svn_revnum_t copyfrom_rev, svn_boolean_t check_last_changed_rev, apr_pool_t *scratch_pool) { apr_hash_t *locations; const char *deleted_url; const char *deleted_location; apr_array_header_t *location_revisions; const char *old_session_url; location_revisions = apr_array_make(scratch_pool, 1, sizeof(svn_revnum_t)); APR_ARRAY_PUSH(location_revisions, svn_revnum_t) = copyfrom_rev; deleted_url = svn_uri_canonicalize(apr_pstrcat(scratch_pool, repos_root_url, "/", deleted_repos_relpath, NULL), scratch_pool); SVN_ERR(svn_client__ensure_ra_session_url(&old_session_url, ra_session, deleted_url, scratch_pool)); SVN_ERR(svn_ra_get_locations(ra_session, &locations, "", rev_below(deleted_rev), location_revisions, scratch_pool)); deleted_location = apr_hash_get(locations, ©from_rev, sizeof(svn_revnum_t)); if (deleted_location) { if (deleted_location[0] == '/') deleted_location++; if (strcmp(deleted_location, copyfrom_path) != 0) { *related = FALSE; return SVN_NO_ERROR; } } else { *related = FALSE; return SVN_NO_ERROR; } if (check_last_changed_rev) { svn_dirent_t *dirent; /* Verify that copyfrom_rev >= last-changed revision of the * deleted node. */ SVN_ERR(svn_ra_stat(ra_session, "", rev_below(deleted_rev), &dirent, scratch_pool)); if (dirent == NULL || copyfrom_rev < dirent->created_rev) { *related = FALSE; return SVN_NO_ERROR; } } *related = TRUE; return SVN_NO_ERROR; } struct copy_info { const char *copyto_path; const char *copyfrom_path; svn_revnum_t copyfrom_rev; svn_node_kind_t node_kind; }; /* Allocate and return a NEW_MOVE, and update MOVED_PATHS with this new move. */ static svn_error_t * add_new_move(struct repos_move_info **new_move, const char *deleted_repos_relpath, const char *copyto_path, svn_revnum_t copyfrom_rev, svn_node_kind_t node_kind, svn_revnum_t revision, const char *author, apr_hash_t *moved_paths, svn_ra_session_t *ra_session, const char *repos_root_url, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { struct repos_move_info *move; struct repos_move_info *next_move; move = apr_pcalloc(result_pool, sizeof(*move)); move->moved_from_repos_relpath = apr_pstrdup(result_pool, deleted_repos_relpath); move->moved_to_repos_relpath = apr_pstrdup(result_pool, copyto_path); move->rev = revision; move->rev_author = apr_pstrdup(result_pool, author); move->copyfrom_rev = copyfrom_rev; move->node_kind = node_kind; /* Link together multiple moves of the same node. * Note that we're traversing history backwards, so moves already * present in the list happened in younger revisions. */ next_move = svn_hash_gets(moved_paths, move->moved_to_repos_relpath); if (next_move) { svn_boolean_t related; /* Tracing back history of the delete-half of the next move * to the copyfrom-revision of the prior move we must end up * at the delete-half of the prior move. */ SVN_ERR(check_move_ancestry(&related, ra_session, repos_root_url, next_move->moved_from_repos_relpath, next_move->rev, move->moved_from_repos_relpath, move->copyfrom_rev, FALSE, scratch_pool)); if (related) { SVN_ERR_ASSERT(move->rev < next_move->rev); /* Prepend this move to the linked list. */ if (move->next == NULL) move->next = apr_array_make(result_pool, 1, sizeof (struct repos_move_info *)); APR_ARRAY_PUSH(move->next, struct repos_move_info *) = next_move; next_move->prev = move; } } /* Make this move the head of our next-move linking map. */ svn_hash_sets(moved_paths, move->moved_from_repos_relpath, move); *new_move = move; return SVN_NO_ERROR; } /* Push a MOVE into the MOVES_TABLE. */ static void push_move(struct repos_move_info *move, apr_hash_t *moves_table, apr_pool_t *result_pool) { apr_array_header_t *moves; /* Add this move to the list of moves in the revision. */ moves = apr_hash_get(moves_table, &move->rev, sizeof(svn_revnum_t)); if (moves == NULL) { /* It is the first move in this revision. Create the list. */ moves = apr_array_make(result_pool, 1, sizeof(struct repos_move_info *)); apr_hash_set(moves_table, &move->rev, sizeof(svn_revnum_t), moves); } APR_ARRAY_PUSH(moves, struct repos_move_info *) = move; } /* Find the youngest common ancestor of REPOS_RELPATH1@PEG_REV1 and * REPOS_RELPATH2@PEG_REV2. Return the result in *YCA_LOC. * Set *YCA_LOC to NULL if no common ancestor exists. */ static svn_error_t * find_yca(svn_client__pathrev_t **yca_loc, const char *repos_relpath1, svn_revnum_t peg_rev1, const char *repos_relpath2, svn_revnum_t peg_rev2, const char *repos_root_url, const char *repos_uuid, svn_ra_session_t *ra_session, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { svn_client__pathrev_t *loc1; svn_client__pathrev_t *loc2; *yca_loc = NULL; loc1 = svn_client__pathrev_create_with_relpath(repos_root_url, repos_uuid, peg_rev1, repos_relpath1, scratch_pool); loc2 = svn_client__pathrev_create_with_relpath(repos_root_url, repos_uuid, peg_rev2, repos_relpath2, scratch_pool); SVN_ERR(svn_client__get_youngest_common_ancestor(yca_loc, loc1, loc2, ra_session, ctx, result_pool, scratch_pool)); return SVN_NO_ERROR; } /* Like find_yca, expect that a YCA could also be found via a brute-force * search of parents of REPOS_RELPATH1 and REPOS_RELPATH2, if no "direct" * YCA exists. An implicit assumption is that some parent of REPOS_RELPATH1 * is a branch of some parent of REPOS_RELPATH2. * * This function can guess a "good enough" YCA for 'missing nodes' which do * not exist in the working copy, e.g. when a file edit is merged to a path * which does not exist in the working copy. */ static svn_error_t * find_nearest_yca(svn_client__pathrev_t **yca_locp, const char *repos_relpath1, svn_revnum_t peg_rev1, const char *repos_relpath2, svn_revnum_t peg_rev2, const char *repos_root_url, const char *repos_uuid, svn_ra_session_t *ra_session, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { svn_client__pathrev_t *yca_loc; svn_error_t *err; apr_pool_t *iterpool; const char *p1, *p2; apr_size_t c1, c2; *yca_locp = NULL; iterpool = svn_pool_create(scratch_pool); p1 = repos_relpath1; c1 = svn_path_component_count(repos_relpath1); while (c1--) { svn_pool_clear(iterpool); p2 = repos_relpath2; c2 = svn_path_component_count(repos_relpath2); while (c2--) { err = find_yca(&yca_loc, p1, peg_rev1, p2, peg_rev2, repos_root_url, repos_uuid, ra_session, ctx, result_pool, iterpool); if (err) { if (err->apr_err == SVN_ERR_FS_NOT_FOUND) { svn_error_clear(err); yca_loc = NULL; } else return svn_error_trace(err); } if (yca_loc) { *yca_locp = yca_loc; svn_pool_destroy(iterpool); return SVN_NO_ERROR; } p2 = svn_relpath_dirname(p2, scratch_pool); } p1 = svn_relpath_dirname(p1, scratch_pool); } svn_pool_destroy(iterpool); return SVN_NO_ERROR; } /* Check if the copied node described by COPY and the DELETED_PATH@DELETED_REV * share a common ancestor. If so, return new repos_move_info in *MOVE which * describes a move from the deleted path to that copy's destination. */ static svn_error_t * find_related_move(struct repos_move_info **move, struct copy_info *copy, const char *deleted_repos_relpath, svn_revnum_t deleted_rev, const char *author, apr_hash_t *moved_paths, const char *repos_root_url, const char *repos_uuid, svn_client_ctx_t *ctx, svn_ra_session_t *ra_session, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { svn_client__pathrev_t *yca_loc; svn_error_t *err; *move = NULL; err = find_yca(&yca_loc, copy->copyfrom_path, copy->copyfrom_rev, deleted_repos_relpath, rev_below(deleted_rev), repos_root_url, repos_uuid, ra_session, ctx, scratch_pool, scratch_pool); if (err) { if (err->apr_err == SVN_ERR_FS_NOT_FOUND) { svn_error_clear(err); yca_loc = NULL; } else return svn_error_trace(err); } if (yca_loc) SVN_ERR(add_new_move(move, deleted_repos_relpath, copy->copyto_path, copy->copyfrom_rev, copy->node_kind, deleted_rev, author, moved_paths, ra_session, repos_root_url, result_pool, scratch_pool)); return SVN_NO_ERROR; } /* Detect moves by matching DELETED_REPOS_RELPATH@DELETED_REV to the copies * in COPIES. Add any moves found to MOVES_TABLE and update MOVED_PATHS. */ static svn_error_t * match_copies_to_deletion(const char *deleted_repos_relpath, svn_revnum_t deleted_rev, const char *author, apr_hash_t *copies, apr_hash_t *moves_table, apr_hash_t *moved_paths, const char *repos_root_url, const char *repos_uuid, svn_ra_session_t *ra_session, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { apr_hash_index_t *hi; apr_pool_t *iterpool; iterpool = svn_pool_create(scratch_pool); for (hi = apr_hash_first(scratch_pool, copies); hi != NULL; hi = apr_hash_next(hi)) { const char *copyfrom_path = apr_hash_this_key(hi); apr_array_header_t *copies_with_same_source_path; int i; svn_pool_clear(iterpool); copies_with_same_source_path = apr_hash_this_val(hi); if (strcmp(copyfrom_path, deleted_repos_relpath) == 0) { /* We found a copyfrom path which matches a deleted node. * Check if the deleted node is an ancestor of the copied node. */ for (i = 0; i < copies_with_same_source_path->nelts; i++) { struct copy_info *copy; svn_boolean_t related; struct repos_move_info *move; copy = APR_ARRAY_IDX(copies_with_same_source_path, i, struct copy_info *); SVN_ERR(check_move_ancestry(&related, ra_session, repos_root_url, deleted_repos_relpath, deleted_rev, copy->copyfrom_path, copy->copyfrom_rev, TRUE, iterpool)); if (!related) continue; /* Remember details of this move. */ SVN_ERR(add_new_move(&move, deleted_repos_relpath, copy->copyto_path, copy->copyfrom_rev, copy->node_kind, deleted_rev, author, moved_paths, ra_session, repos_root_url, result_pool, iterpool)); push_move(move, moves_table, result_pool); } } else { /* Check if this deleted node is related to any copies in this * revision. These could be moves of the deleted node which * were merged here from other lines of history. */ for (i = 0; i < copies_with_same_source_path->nelts; i++) { struct copy_info *copy; struct repos_move_info *move = NULL; copy = APR_ARRAY_IDX(copies_with_same_source_path, i, struct copy_info *); SVN_ERR(find_related_move(&move, copy, deleted_repos_relpath, deleted_rev, author, moved_paths, repos_root_url, repos_uuid, ctx, ra_session, result_pool, iterpool)); if (move) push_move(move, moves_table, result_pool); } } } svn_pool_destroy(iterpool); return SVN_NO_ERROR; } /* Update MOVES_TABLE and MOVED_PATHS based on information from * revision data in LOG_ENTRY, COPIES, and DELETED_PATHS. * Use RA_SESSION to perform the necessary requests. */ static svn_error_t * find_moves_in_revision(svn_ra_session_t *ra_session, apr_hash_t *moves_table, apr_hash_t *moved_paths, svn_log_entry_t *log_entry, apr_hash_t *copies, apr_array_header_t *deleted_paths, const char *repos_root_url, const char *repos_uuid, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { apr_pool_t *iterpool; int i; const svn_string_t *author; author = svn_hash_gets(log_entry->revprops, SVN_PROP_REVISION_AUTHOR); iterpool = svn_pool_create(scratch_pool); for (i = 0; i < deleted_paths->nelts; i++) { const char *deleted_repos_relpath; svn_pool_clear(iterpool); deleted_repos_relpath = APR_ARRAY_IDX(deleted_paths, i, const char *); SVN_ERR(match_copies_to_deletion(deleted_repos_relpath, log_entry->revision, author ? author->data : _("unknown author"), copies, moves_table, moved_paths, repos_root_url, repos_uuid, ra_session, ctx, result_pool, iterpool)); } svn_pool_destroy(iterpool); return SVN_NO_ERROR; } struct find_deleted_rev_baton { /* Variables below are arguments provided by the caller of * svn_ra_get_log2(). */ const char *deleted_repos_relpath; const char *related_repos_relpath; svn_revnum_t related_peg_rev; const char *repos_root_url; const char *repos_uuid; svn_client_ctx_t *ctx; const char *victim_abspath; /* for notifications */ /* Variables below are results for the caller of svn_ra_get_log2(). */ svn_revnum_t deleted_rev; const char *deleted_rev_author; svn_node_kind_t replacing_node_kind; apr_pool_t *result_pool; apr_hash_t *moves_table; /* Obtained from find_moves_in_revision(). */ struct repos_move_info *move; /* Last known move which affected the node. */ /* Extra RA session that can be used to make additional requests. */ svn_ra_session_t *extra_ra_session; }; /* If DELETED_RELPATH matches the moved-from path of a move in MOVES, * or if DELETED_RELPATH is a child of a moved-to path in MOVES, return * a struct move_info for the corresponding move. Else, return NULL. */ static struct repos_move_info * map_deleted_path_to_move(const char *deleted_relpath, apr_array_header_t *moves, apr_pool_t *scratch_pool) { struct repos_move_info *closest_move = NULL; apr_size_t min_components = 0; int i; for (i = 0; i < moves->nelts; i++) { const char *relpath; struct repos_move_info *move; move = APR_ARRAY_IDX(moves, i, struct repos_move_info *); if (strcmp(move->moved_from_repos_relpath, deleted_relpath) == 0) return move; relpath = svn_relpath_skip_ancestor(move->moved_to_repos_relpath, deleted_relpath); if (relpath) { /* This could be a nested move. Return the path-wise closest move. */ const apr_size_t c = svn_path_component_count(relpath); if (c == 0) return move; else if (min_components == 0 || c < min_components) { min_components = c; closest_move = move; } } } if (closest_move) { const char *relpath; const char *moved_along_path; struct repos_move_info *move; /* See if we can find an even closer move for this moved-along path. */ relpath = svn_relpath_skip_ancestor(closest_move->moved_to_repos_relpath, deleted_relpath); moved_along_path = svn_relpath_join(closest_move->moved_from_repos_relpath, relpath, scratch_pool); move = map_deleted_path_to_move(moved_along_path, moves, scratch_pool); if (move) return move; } return closest_move; } /* Search for nested moves in REVISION, given the already found MOVES, * all DELETED_PATHS, and all COPIES, from the same revision. * Append any nested moves to the MOVES array. */ static svn_error_t * find_nested_moves(apr_array_header_t *moves, apr_hash_t *copies, apr_array_header_t *deleted_paths, apr_hash_t *moved_paths, svn_revnum_t revision, const char *author, const char *repos_root_url, const char *repos_uuid, svn_ra_session_t *ra_session, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { apr_array_header_t *nested_moves; int i; apr_pool_t *iterpool; nested_moves = apr_array_make(result_pool, 0, sizeof(struct repos_move_info *)); iterpool = svn_pool_create(scratch_pool); for (i = 0; i < deleted_paths->nelts; i++) { const char *deleted_path; const char *child_relpath; const char *moved_along_repos_relpath; struct repos_move_info *move; apr_array_header_t *copies_with_same_source_path; int j; svn_boolean_t related; svn_pool_clear(iterpool); deleted_path = APR_ARRAY_IDX(deleted_paths, i, const char *); move = map_deleted_path_to_move(deleted_path, moves, iterpool); if (move == NULL) continue; child_relpath = svn_relpath_skip_ancestor(move->moved_to_repos_relpath, deleted_path); if (child_relpath == NULL || child_relpath[0] == '\0') continue; /* not a nested move */ /* Consider: svn mv A B; svn mv B/foo C/foo * Copyfrom for C/foo is A/foo, even though C/foo was moved here from * B/foo. A/foo was not deleted. It is B/foo which was deleted. * We now know about the move A->B and moved-along child_relpath "foo". * Try to detect an ancestral relationship between A/foo and the * moved-along path. */ moved_along_repos_relpath = svn_relpath_join(move->moved_from_repos_relpath, child_relpath, iterpool); copies_with_same_source_path = svn_hash_gets(copies, moved_along_repos_relpath); if (copies_with_same_source_path == NULL) continue; /* not a nested move */ for (j = 0; j < copies_with_same_source_path->nelts; j++) { struct copy_info *copy; copy = APR_ARRAY_IDX(copies_with_same_source_path, j, struct copy_info *); SVN_ERR(check_move_ancestry(&related, ra_session, repos_root_url, moved_along_repos_relpath, revision, copy->copyfrom_path, copy->copyfrom_rev, TRUE, iterpool)); if (related) { struct repos_move_info *nested_move; /* Remember details of this move. */ SVN_ERR(add_new_move(&nested_move, moved_along_repos_relpath, copy->copyto_path, copy->copyfrom_rev, copy->node_kind, revision, author, moved_paths, ra_session, repos_root_url, result_pool, iterpool)); /* Add this move to the list of nested moves in this revision. */ APR_ARRAY_PUSH(nested_moves, struct repos_move_info *) = nested_move; } } } svn_pool_destroy(iterpool); /* Add all nested moves found to the list of all moves in this revision. */ apr_array_cat(moves, nested_moves); return SVN_NO_ERROR; } /* Make a shallow copy of the copied LOG_ITEM in COPIES. */ static void cache_copied_item(apr_hash_t *copies, const char *changed_path, svn_log_changed_path2_t *log_item) { apr_pool_t *result_pool = apr_hash_pool_get(copies); struct copy_info *copy = apr_palloc(result_pool, sizeof(*copy)); apr_array_header_t *copies_with_same_source_path; copy->copyfrom_path = log_item->copyfrom_path; if (log_item->copyfrom_path[0] == '/') copy->copyfrom_path++; copy->copyto_path = changed_path; copy->copyfrom_rev = log_item->copyfrom_rev; copy->node_kind = log_item->node_kind; copies_with_same_source_path = apr_hash_get(copies, copy->copyfrom_path, APR_HASH_KEY_STRING); if (copies_with_same_source_path == NULL) { copies_with_same_source_path = apr_array_make(result_pool, 1, sizeof(struct copy_info *)); apr_hash_set(copies, copy->copyfrom_path, APR_HASH_KEY_STRING, copies_with_same_source_path); } APR_ARRAY_PUSH(copies_with_same_source_path, struct copy_info *) = copy; } /* Implements svn_log_entry_receiver_t. * * Find the revision in which a node, optionally ancestrally related to the * node specified via find_deleted_rev_baton, was deleted, When the revision * was found, store it in BATON->DELETED_REV and abort the log operation * by raising SVN_ERR_CEASE_INVOCATION. * * If no such revision can be found, leave BATON->DELETED_REV and * BATON->REPLACING_NODE_KIND alone. * * If the node was replaced, set BATON->REPLACING_NODE_KIND to the node * kind of the node which replaced the original node. If the node was not * replaced, set BATON->REPLACING_NODE_KIND to svn_node_none. * * This function answers the same question as svn_ra_get_deleted_rev() but * works in cases where we do not already know a revision in which the deleted * node once used to exist. * * If the node was moved, rather than deleted, return move information * in BATON->MOVE. */ static svn_error_t * find_deleted_rev(void *baton, svn_log_entry_t *log_entry, apr_pool_t *scratch_pool) { struct find_deleted_rev_baton *b = baton; apr_hash_index_t *hi; apr_pool_t *iterpool; svn_boolean_t deleted_node_found = FALSE; svn_node_kind_t replacing_node_kind = svn_node_none; if (b->ctx->notify_func2) { svn_wc_notify_t *notify; notify = svn_wc_create_notify( b->victim_abspath, svn_wc_notify_tree_conflict_details_progress, scratch_pool), notify->revision = log_entry->revision; b->ctx->notify_func2(b->ctx->notify_baton2, notify, scratch_pool); } /* No paths were changed in this revision. Nothing to do. */ if (! log_entry->changed_paths2) return SVN_NO_ERROR; iterpool = svn_pool_create(scratch_pool); for (hi = apr_hash_first(scratch_pool, log_entry->changed_paths2); hi != NULL; hi = apr_hash_next(hi)) { const char *changed_path = apr_hash_this_key(hi); svn_log_changed_path2_t *log_item = apr_hash_this_val(hi); svn_pool_clear(iterpool); /* ### Remove leading slash from paths in log entries. */ if (changed_path[0] == '/') changed_path++; /* Check if we already found the deleted node we're looking for. */ if (!deleted_node_found && svn_path_compare_paths(b->deleted_repos_relpath, changed_path) == 0 && (log_item->action == 'D' || log_item->action == 'R')) { deleted_node_found = TRUE; if (b->related_repos_relpath != NULL && b->related_peg_rev != SVN_INVALID_REVNUM) { svn_client__pathrev_t *yca_loc; svn_error_t *err; /* We found a deleted node which occupies the correct path. * To be certain that this is the deleted node we're looking for, * we must establish whether it is ancestrally related to the * "related node" specified in our baton. */ err = find_yca(&yca_loc, b->related_repos_relpath, b->related_peg_rev, b->deleted_repos_relpath, rev_below(log_entry->revision), b->repos_root_url, b->repos_uuid, b->extra_ra_session, b->ctx, iterpool, iterpool); if (err) { /* ### Happens for moves within other moves and copies. */ if (err->apr_err == SVN_ERR_FS_NOT_FOUND) { svn_error_clear(err); yca_loc = NULL; } else return svn_error_trace(err); } deleted_node_found = (yca_loc != NULL); } if (deleted_node_found && log_item->action == 'R') replacing_node_kind = log_item->node_kind; } } svn_pool_destroy(iterpool); if (!deleted_node_found) { apr_array_header_t *moves; moves = apr_hash_get(b->moves_table, &log_entry->revision, sizeof(svn_revnum_t)); if (moves) { struct repos_move_info *move; move = map_deleted_path_to_move(b->deleted_repos_relpath, moves, scratch_pool); if (move) { const char *relpath; /* The node was moved. Update our search path accordingly. */ b->move = move; relpath = svn_relpath_skip_ancestor(move->moved_to_repos_relpath, b->deleted_repos_relpath); if (relpath) b->deleted_repos_relpath = svn_relpath_join(move->moved_from_repos_relpath, relpath, b->result_pool); } } } else { svn_string_t *author; b->deleted_rev = log_entry->revision; author = svn_hash_gets(log_entry->revprops, SVN_PROP_REVISION_AUTHOR); if (author) b->deleted_rev_author = apr_pstrdup(b->result_pool, author->data); else b->deleted_rev_author = _("unknown author"); b->replacing_node_kind = replacing_node_kind; /* We're done. Abort the log operation. */ return svn_error_create(SVN_ERR_CEASE_INVOCATION, NULL, NULL); } return SVN_NO_ERROR; } /* Return a localised string representation of the local part of a tree conflict on a file. */ static svn_error_t * describe_local_file_node_change(const char **description, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { svn_wc_conflict_reason_t local_change; svn_wc_operation_t operation; local_change = svn_client_conflict_get_local_change(conflict); operation = svn_client_conflict_get_operation(conflict); switch (local_change) { case svn_wc_conflict_reason_edited: if (operation == svn_wc_operation_update || operation == svn_wc_operation_switch) *description = _("A file containing uncommitted changes was " "found in the working copy."); else if (operation == svn_wc_operation_merge) *description = _("A file which differs from the corresponding " "file on the merge source branch was found " "in the working copy."); break; case svn_wc_conflict_reason_obstructed: *description = _("A file which already occupies this path was found " "in the working copy."); break; case svn_wc_conflict_reason_unversioned: *description = _("An unversioned file was found in the working " "copy."); break; case svn_wc_conflict_reason_deleted: *description = _("A deleted file was found in the working copy."); break; case svn_wc_conflict_reason_missing: if (operation == svn_wc_operation_update || operation == svn_wc_operation_switch) *description = _("No such file was found in the working copy."); else if (operation == svn_wc_operation_merge) { /* ### display deleted revision */ *description = _("No such file was found in the merge target " "working copy.\nPerhaps the file has been " "deleted or moved away in the repository's " "history?"); } break; case svn_wc_conflict_reason_added: case svn_wc_conflict_reason_replaced: { /* ### show more details about copies or replacements? */ *description = _("A file scheduled to be added to the " "repository in the next commit was found in " "the working copy."); } break; case svn_wc_conflict_reason_moved_away: { const char *moved_to_abspath; svn_error_t *err; err = svn_wc__node_was_moved_away(&moved_to_abspath, NULL, ctx->wc_ctx, conflict->local_abspath, scratch_pool, scratch_pool); if (err) { if (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND) { moved_to_abspath = NULL; svn_error_clear(err); } else return svn_error_trace(err); } if (operation == svn_wc_operation_update || operation == svn_wc_operation_switch) { if (moved_to_abspath == NULL) { /* The move no longer exists. */ *description = _("The file in the working copy had " "been moved away at the time this " "conflict was recorded."); } else { const char *wcroot_abspath; SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx, conflict->local_abspath, scratch_pool, scratch_pool)); *description = apr_psprintf( result_pool, _("The file in the working copy was " "moved away to\n'%s'."), svn_dirent_local_style( svn_dirent_skip_ancestor( wcroot_abspath, moved_to_abspath), scratch_pool)); } } else if (operation == svn_wc_operation_merge) { if (moved_to_abspath == NULL) { /* The move probably happened in branch history. * This case cannot happen until we detect incoming * moves, which we currently don't do. */ /* ### find deleted/moved revision? */ *description = _("The file in the working copy had " "been moved away at the time this " "conflict was recorded."); } else { /* This is a local move in the working copy. */ const char *wcroot_abspath; SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx, conflict->local_abspath, scratch_pool, scratch_pool)); *description = apr_psprintf( result_pool, _("The file in the working copy was " "moved away to\n'%s'."), svn_dirent_local_style( svn_dirent_skip_ancestor( wcroot_abspath, moved_to_abspath), scratch_pool)); } } break; } case svn_wc_conflict_reason_moved_here: { const char *moved_from_abspath; SVN_ERR(svn_wc__node_was_moved_here(&moved_from_abspath, NULL, ctx->wc_ctx, conflict->local_abspath, scratch_pool, scratch_pool)); if (operation == svn_wc_operation_update || operation == svn_wc_operation_switch) { if (moved_from_abspath == NULL) { /* The move no longer exists. */ *description = _("A file had been moved here in the " "working copy at the time this " "conflict was recorded."); } else { const char *wcroot_abspath; SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx, conflict->local_abspath, scratch_pool, scratch_pool)); *description = apr_psprintf( result_pool, _("A file was moved here in the " "working copy from\n'%s'."), svn_dirent_local_style( svn_dirent_skip_ancestor( wcroot_abspath, moved_from_abspath), scratch_pool)); } } else if (operation == svn_wc_operation_merge) { if (moved_from_abspath == NULL) { /* The move probably happened in branch history. * This case cannot happen until we detect incoming * moves, which we currently don't do. */ /* ### find deleted/moved revision? */ *description = _("A file had been moved here in the " "working copy at the time this " "conflict was recorded."); } else { const char *wcroot_abspath; SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx, conflict->local_abspath, scratch_pool, scratch_pool)); /* This is a local move in the working copy. */ *description = apr_psprintf( result_pool, _("A file was moved here in the " "working copy from\n'%s'."), svn_dirent_local_style( svn_dirent_skip_ancestor( wcroot_abspath, moved_from_abspath), scratch_pool)); } } break; } } return SVN_NO_ERROR; } /* Return a localised string representation of the local part of a tree conflict on a directory. */ static svn_error_t * describe_local_dir_node_change(const char **description, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { svn_wc_conflict_reason_t local_change; svn_wc_operation_t operation; local_change = svn_client_conflict_get_local_change(conflict); operation = svn_client_conflict_get_operation(conflict); switch (local_change) { case svn_wc_conflict_reason_edited: if (operation == svn_wc_operation_update || operation == svn_wc_operation_switch) *description = _("A directory containing uncommitted changes " "was found in the working copy."); else if (operation == svn_wc_operation_merge) *description = _("A directory which differs from the " "corresponding directory on the merge source " "branch was found in the working copy."); break; case svn_wc_conflict_reason_obstructed: *description = _("A directory which already occupies this path was " "found in the working copy."); break; case svn_wc_conflict_reason_unversioned: *description = _("An unversioned directory was found in the " "working copy."); break; case svn_wc_conflict_reason_deleted: *description = _("A deleted directory was found in the " "working copy."); break; case svn_wc_conflict_reason_missing: if (operation == svn_wc_operation_update || operation == svn_wc_operation_switch) *description = _("No such directory was found in the working copy."); else if (operation == svn_wc_operation_merge) { /* ### display deleted revision */ *description = _("No such directory was found in the merge " "target working copy.\nPerhaps the " "directory has been deleted or moved away " "in the repository's history?"); } break; case svn_wc_conflict_reason_added: case svn_wc_conflict_reason_replaced: { /* ### show more details about copies or replacements? */ *description = _("A directory scheduled to be added to the " "repository in the next commit was found in " "the working copy."); } break; case svn_wc_conflict_reason_moved_away: { const char *moved_to_abspath; svn_error_t *err; err = svn_wc__node_was_moved_away(&moved_to_abspath, NULL, ctx->wc_ctx, conflict->local_abspath, scratch_pool, scratch_pool); if (err) { if (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND) { moved_to_abspath = NULL; svn_error_clear(err); } else return svn_error_trace(err); } if (operation == svn_wc_operation_update || operation == svn_wc_operation_switch) { if (moved_to_abspath == NULL) { /* The move no longer exists. */ *description = _("The directory in the working copy " "had been moved away at the time " "this conflict was recorded."); } else { const char *wcroot_abspath; SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx, conflict->local_abspath, scratch_pool, scratch_pool)); *description = apr_psprintf( result_pool, _("The directory in the working copy " "was moved away to\n'%s'."), svn_dirent_local_style( svn_dirent_skip_ancestor( wcroot_abspath, moved_to_abspath), scratch_pool)); } } else if (operation == svn_wc_operation_merge) { if (moved_to_abspath == NULL) { /* The move probably happened in branch history. * This case cannot happen until we detect incoming * moves, which we currently don't do. */ /* ### find deleted/moved revision? */ *description = _("The directory had been moved away " "at the time this conflict was " "recorded."); } else { /* This is a local move in the working copy. */ const char *wcroot_abspath; SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx, conflict->local_abspath, scratch_pool, scratch_pool)); *description = apr_psprintf( result_pool, _("The directory was moved away to\n" "'%s'."), svn_dirent_local_style( svn_dirent_skip_ancestor( wcroot_abspath, moved_to_abspath), scratch_pool)); } } } break; case svn_wc_conflict_reason_moved_here: { const char *moved_from_abspath; SVN_ERR(svn_wc__node_was_moved_here(&moved_from_abspath, NULL, ctx->wc_ctx, conflict->local_abspath, scratch_pool, scratch_pool)); if (operation == svn_wc_operation_update || operation == svn_wc_operation_switch) { if (moved_from_abspath == NULL) { /* The move no longer exists. */ *description = _("A directory had been moved here at " "the time this conflict was " "recorded."); } else { const char *wcroot_abspath; SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx, conflict->local_abspath, scratch_pool, scratch_pool)); *description = apr_psprintf( result_pool, _("A directory was moved here from\n" "'%s'."), svn_dirent_local_style( svn_dirent_skip_ancestor( wcroot_abspath, moved_from_abspath), scratch_pool)); } } else if (operation == svn_wc_operation_merge) { if (moved_from_abspath == NULL) { /* The move probably happened in branch history. * This case cannot happen until we detect incoming * moves, which we currently don't do. */ /* ### find deleted/moved revision? */ *description = _("A directory had been moved here at " "the time this conflict was " "recorded."); } else { /* This is a local move in the working copy. */ const char *wcroot_abspath; SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx, conflict->local_abspath, scratch_pool, scratch_pool)); *description = apr_psprintf( result_pool, _("A directory was moved here in " "the working copy from\n'%s'."), svn_dirent_local_style( svn_dirent_skip_ancestor( wcroot_abspath, moved_from_abspath), scratch_pool)); } } } } return SVN_NO_ERROR; } struct find_moves_baton { /* Variables below are arguments provided by the caller of * svn_ra_get_log2(). */ const char *repos_root_url; const char *repos_uuid; svn_client_ctx_t *ctx; const char *victim_abspath; /* for notifications */ apr_pool_t *result_pool; /* A hash table mapping a revision number to an array of struct * repos_move_info * elements, describing moves. * * Must be allocated in RESULT_POOL by the caller of svn_ra_get_log2(). * * If the node was moved, the DELETED_REV is present in this table, * perhaps along with additional revisions. * * Given a sequence of moves which happened in the repository, such as: * rA: mv x->z * rA: mv a->b * rB: mv b->c * rC: mv c->d * we map each revision number to all the moves which happened in the * revision, which looks as follows: * rA : [(x->z), (a->b)] * rB : [(b->c)] * rC : [(c->d)] * This allows us to later find relevant moves based on a revision number. * * Additionally, we embed the number of the revision in which a move was * found inside the repos_move_info structure: * rA : [(rA, x->z), (rA, a->b)] * rB : [(rB, b->c)] * rC : [(rC, c->d)] * And also, all moves pertaining to the same node are chained into a * doubly-linked list via 'next' and 'prev' pointers (see definition of * struct repos_move_info). This can be visualized as follows: * rA : [(rA, x->z, prev=>NULL, next=>NULL), * (rA, a->b, prev=>NULL, next=>(rB, b->c))] * rB : [(rB, b->c), prev=>(rA, a->b), next=>(rC, c->d)] * rC : [(rC, c->d), prev=>(rB, c->d), next=>NULL] * This way, we can look up all moves relevant to a node, forwards and * backwards in history, once we have located one move in the chain. * * In the above example, the data tells us that within the revision * range rA:C, a was moved to d. However, within the revision range * rA;B, a was moved to b. */ apr_hash_t *moves_table; /* Variables below hold state for find_moves() and are not * intended to be used by the caller of svn_ra_get_log2(). * Like all other variables, they must be initialized, however. */ /* Temporary map of moved paths to struct repos_move_info. * Used to link multiple moves of the same node across revisions. */ apr_hash_t *moved_paths; /* Extra RA session that can be used to make additional requests. */ svn_ra_session_t *extra_ra_session; }; /* Implements svn_log_entry_receiver_t. */ static svn_error_t * find_moves(void *baton, svn_log_entry_t *log_entry, apr_pool_t *scratch_pool) { struct find_moves_baton *b = baton; apr_hash_index_t *hi; apr_pool_t *iterpool; apr_array_header_t *deleted_paths; apr_hash_t *copies; apr_array_header_t *moves; if (b->ctx->notify_func2) { svn_wc_notify_t *notify; notify = svn_wc_create_notify( b->victim_abspath, svn_wc_notify_tree_conflict_details_progress, scratch_pool), notify->revision = log_entry->revision; b->ctx->notify_func2(b->ctx->notify_baton2, notify, scratch_pool); } /* No paths were changed in this revision. Nothing to do. */ if (! log_entry->changed_paths2) return SVN_NO_ERROR; copies = apr_hash_make(scratch_pool); deleted_paths = apr_array_make(scratch_pool, 0, sizeof(const char *)); iterpool = svn_pool_create(scratch_pool); for (hi = apr_hash_first(scratch_pool, log_entry->changed_paths2); hi != NULL; hi = apr_hash_next(hi)) { const char *changed_path = apr_hash_this_key(hi); svn_log_changed_path2_t *log_item = apr_hash_this_val(hi); svn_pool_clear(iterpool); /* ### Remove leading slash from paths in log entries. */ if (changed_path[0] == '/') changed_path++; /* For move detection, scan for copied nodes in this revision. */ if (log_item->action == 'A' && log_item->copyfrom_path) cache_copied_item(copies, changed_path, log_item); /* For move detection, store all deleted_paths. */ if (log_item->action == 'D' || log_item->action == 'R') APR_ARRAY_PUSH(deleted_paths, const char *) = apr_pstrdup(scratch_pool, changed_path); } svn_pool_destroy(iterpool); /* Check for moves in this revision */ SVN_ERR(find_moves_in_revision(b->extra_ra_session, b->moves_table, b->moved_paths, log_entry, copies, deleted_paths, b->repos_root_url, b->repos_uuid, b->ctx, b->result_pool, scratch_pool)); moves = apr_hash_get(b->moves_table, &log_entry->revision, sizeof(svn_revnum_t)); if (moves) { const svn_string_t *author; author = svn_hash_gets(log_entry->revprops, SVN_PROP_REVISION_AUTHOR); SVN_ERR(find_nested_moves(moves, copies, deleted_paths, b->moved_paths, log_entry->revision, author ? author->data : _("unknown author"), b->repos_root_url, b->repos_uuid, b->extra_ra_session, b->ctx, b->result_pool, scratch_pool)); } return SVN_NO_ERROR; } /* Find all moves which occured in repository history starting at * REPOS_RELPATH@START_REV until END_REV (where START_REV > END_REV). * Return results in *MOVES_TABLE (see struct find_moves_baton for details). */ static svn_error_t * find_moves_in_revision_range(struct apr_hash_t **moves_table, const char *repos_relpath, const char *repos_root_url, const char *repos_uuid, const char *victim_abspath, svn_revnum_t start_rev, svn_revnum_t end_rev, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { svn_ra_session_t *ra_session; const char *url; const char *corrected_url; apr_array_header_t *paths; apr_array_header_t *revprops; struct find_moves_baton b = { 0 }; SVN_ERR_ASSERT(start_rev > end_rev); url = svn_path_url_add_component2(repos_root_url, repos_relpath, scratch_pool); SVN_ERR(svn_client__open_ra_session_internal(&ra_session, &corrected_url, url, NULL, NULL, FALSE, FALSE, ctx, scratch_pool, scratch_pool)); paths = apr_array_make(scratch_pool, 1, sizeof(const char *)); APR_ARRAY_PUSH(paths, const char *) = ""; revprops = apr_array_make(scratch_pool, 1, sizeof(const char *)); APR_ARRAY_PUSH(revprops, const char *) = SVN_PROP_REVISION_AUTHOR; b.repos_root_url = repos_root_url; b.repos_uuid = repos_uuid; b.ctx = ctx; b.victim_abspath = victim_abspath; b.moves_table = apr_hash_make(result_pool); b.moved_paths = apr_hash_make(scratch_pool); b.result_pool = result_pool; SVN_ERR(svn_ra__dup_session(&b.extra_ra_session, ra_session, NULL, scratch_pool, scratch_pool)); SVN_ERR(svn_ra_get_log2(ra_session, paths, start_rev, end_rev, 0, /* no limit */ TRUE, /* need the changed paths list */ FALSE, /* need to traverse copies */ FALSE, /* no need for merged revisions */ revprops, find_moves, &b, scratch_pool)); *moves_table = b.moves_table; return SVN_NO_ERROR; } /* Return new move information for a moved-along child MOVED_ALONG_RELPATH. * Set MOVE->NODE_KIND to MOVED_ALONG_NODE_KIND. * Do not copy MOVE->NEXT and MOVE-PREV. * If MOVED_ALONG_RELPATH is empty, this effectively copies MOVE to * RESULT_POOL with NEXT and PREV pointers cleared. */ static struct repos_move_info * new_path_adjusted_move(struct repos_move_info *move, const char *moved_along_relpath, svn_node_kind_t moved_along_node_kind, apr_pool_t *result_pool) { struct repos_move_info *new_move; new_move = apr_pcalloc(result_pool, sizeof(*new_move)); new_move->moved_from_repos_relpath = svn_relpath_join(move->moved_from_repos_relpath, moved_along_relpath, result_pool); new_move->moved_to_repos_relpath = svn_relpath_join(move->moved_to_repos_relpath, moved_along_relpath, result_pool); new_move->rev = move->rev; new_move->rev_author = apr_pstrdup(result_pool, move->rev_author); new_move->copyfrom_rev = move->copyfrom_rev; new_move->node_kind = moved_along_node_kind; /* Ignore prev and next pointers. Caller will set them if needed. */ return new_move; } /* Given a list of MOVES_IN_REVISION, figure out which of these moves again * move the node which was already moved by PREV_MOVE in the past . */ static svn_error_t * find_next_moves_in_revision(apr_array_header_t **next_moves, apr_array_header_t *moves_in_revision, struct repos_move_info *prev_move, svn_ra_session_t *ra_session, const char *repos_root_url, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { int i; apr_pool_t *iterpool; iterpool = svn_pool_create(scratch_pool); for (i = 0; i < moves_in_revision->nelts; i++) { struct repos_move_info *move; const char *relpath; const char *deleted_repos_relpath; svn_boolean_t related; svn_error_t *err; svn_pool_clear(iterpool); /* Check if this move affects the current known path of our node. */ move = APR_ARRAY_IDX(moves_in_revision, i, struct repos_move_info *); relpath = svn_relpath_skip_ancestor(move->moved_from_repos_relpath, prev_move->moved_to_repos_relpath); if (relpath == NULL) continue; /* It does. So our node must have been deleted again. */ deleted_repos_relpath = svn_relpath_join(move->moved_from_repos_relpath, relpath, iterpool); /* Tracing back history of the delete-half of this move to the * copyfrom-revision of the prior move we must end up at the * delete-half of the prior move. */ err = check_move_ancestry(&related, ra_session, repos_root_url, deleted_repos_relpath, move->rev, prev_move->moved_from_repos_relpath, prev_move->copyfrom_rev, FALSE, scratch_pool); if (err && err->apr_err == SVN_ERR_FS_NOT_FOUND) { svn_error_clear(err); continue; } else SVN_ERR(err); if (related) { struct repos_move_info *new_move; /* We have a winner. */ new_move = new_path_adjusted_move(move, relpath, prev_move->node_kind, result_pool); if (*next_moves == NULL) *next_moves = apr_array_make(result_pool, 1, sizeof(struct repos_move_info *)); APR_ARRAY_PUSH(*next_moves, struct repos_move_info *) = new_move; } } svn_pool_destroy(iterpool); return SVN_NO_ERROR; } static int compare_items_as_revs(const svn_sort__item_t *a, const svn_sort__item_t *b) { return svn_sort_compare_revisions(a->key, b->key); } /* Starting at MOVE->REV, loop over future revisions which contain moves, * and look for matching next moves in each. Once found, return a list of * (ambiguous, if more than one) moves in *NEXT_MOVES. */ static svn_error_t * find_next_moves(apr_array_header_t **next_moves, apr_hash_t *moves_table, struct repos_move_info *move, svn_ra_session_t *ra_session, const char *repos_root_url, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { apr_array_header_t *moves; apr_array_header_t *revisions; apr_pool_t *iterpool; int i; *next_moves = NULL; revisions = svn_sort__hash(moves_table, compare_items_as_revs, scratch_pool); iterpool = svn_pool_create(scratch_pool); for (i = 0; i < revisions->nelts; i++) { svn_sort__item_t item = APR_ARRAY_IDX(revisions, i, svn_sort__item_t); svn_revnum_t rev = *(svn_revnum_t *)item.key; svn_pool_clear(iterpool); if (rev <= move->rev) continue; moves = apr_hash_get(moves_table, &rev, sizeof(rev)); SVN_ERR(find_next_moves_in_revision(next_moves, moves, move, ra_session, repos_root_url, result_pool, iterpool)); if (*next_moves) break; } svn_pool_destroy(iterpool); return SVN_NO_ERROR; } /* Trace all future moves of the node moved by MOVE. * Update MOVE->PREV and MOVE->NEXT accordingly. */ static svn_error_t * trace_moved_node(apr_hash_t *moves_table, struct repos_move_info *move, svn_ra_session_t *ra_session, const char *repos_root_url, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { apr_array_header_t *next_moves; SVN_ERR(find_next_moves(&next_moves, moves_table, move, ra_session, repos_root_url, result_pool, scratch_pool)); if (next_moves) { int i; apr_pool_t *iterpool; move->next = next_moves; iterpool = svn_pool_create(scratch_pool); for (i = 0; i < next_moves->nelts; i++) { struct repos_move_info *next_move; svn_pool_clear(iterpool); next_move = APR_ARRAY_IDX(next_moves, i, struct repos_move_info *); next_move->prev = move; SVN_ERR(trace_moved_node(moves_table, next_move, ra_session, repos_root_url, result_pool, iterpool)); } svn_pool_destroy(iterpool); } return SVN_NO_ERROR; } /* Given a list of MOVES_IN_REVISION, figure out which of these moves * move the node which was later on moved by NEXT_MOVE. */ static svn_error_t * find_prev_move_in_revision(struct repos_move_info **prev_move, apr_array_header_t *moves_in_revision, struct repos_move_info *next_move, svn_ra_session_t *ra_session, const char *repos_root_url, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { int i; apr_pool_t *iterpool; *prev_move = NULL; iterpool = svn_pool_create(scratch_pool); for (i = 0; i < moves_in_revision->nelts; i++) { struct repos_move_info *move; const char *relpath; const char *deleted_repos_relpath; svn_boolean_t related; svn_error_t *err; svn_pool_clear(iterpool); /* Check if this move affects the current known path of our node. */ move = APR_ARRAY_IDX(moves_in_revision, i, struct repos_move_info *); relpath = svn_relpath_skip_ancestor(next_move->moved_from_repos_relpath, move->moved_to_repos_relpath); if (relpath == NULL) continue; /* It does. So our node must have been deleted. */ deleted_repos_relpath = svn_relpath_join( next_move->moved_from_repos_relpath, relpath, iterpool); /* Tracing back history of the delete-half of the next move to the * copyfrom-revision of the prior move we must end up at the * delete-half of the prior move. */ err = check_move_ancestry(&related, ra_session, repos_root_url, deleted_repos_relpath, next_move->rev, move->moved_from_repos_relpath, move->copyfrom_rev, FALSE, scratch_pool); if (err && err->apr_err == SVN_ERR_FS_NOT_FOUND) { svn_error_clear(err); continue; } else SVN_ERR(err); if (related) { /* We have a winner. */ *prev_move = new_path_adjusted_move(move, relpath, next_move->node_kind, result_pool); break; } } svn_pool_destroy(iterpool); return SVN_NO_ERROR; } static int compare_items_as_revs_reverse(const svn_sort__item_t *a, const svn_sort__item_t *b) { int c = svn_sort_compare_revisions(a->key, b->key); if (c < 0) return 1; if (c > 0) return -1; return c; } /* Starting at MOVE->REV, loop over past revisions which contain moves, * and look for a matching previous move in each. Once found, return * it in *PREV_MOVE */ static svn_error_t * find_prev_move(struct repos_move_info **prev_move, apr_hash_t *moves_table, struct repos_move_info *move, svn_ra_session_t *ra_session, const char *repos_root_url, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { apr_array_header_t *moves; apr_array_header_t *revisions; apr_pool_t *iterpool; int i; *prev_move = NULL; revisions = svn_sort__hash(moves_table, compare_items_as_revs_reverse, scratch_pool); iterpool = svn_pool_create(scratch_pool); for (i = 0; i < revisions->nelts; i++) { svn_sort__item_t item = APR_ARRAY_IDX(revisions, i, svn_sort__item_t); svn_revnum_t rev = *(svn_revnum_t *)item.key; svn_pool_clear(iterpool); if (rev >= move->rev) continue; moves = apr_hash_get(moves_table, &rev, sizeof(rev)); SVN_ERR(find_prev_move_in_revision(prev_move, moves, move, ra_session, repos_root_url, result_pool, iterpool)); if (*prev_move) break; } svn_pool_destroy(iterpool); return SVN_NO_ERROR; } /* Trace all past moves of the node moved by MOVE. * Update MOVE->PREV and MOVE->NEXT accordingly. */ static svn_error_t * trace_moved_node_backwards(apr_hash_t *moves_table, struct repos_move_info *move, svn_ra_session_t *ra_session, const char *repos_root_url, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { struct repos_move_info *prev_move; SVN_ERR(find_prev_move(&prev_move, moves_table, move, ra_session, repos_root_url, result_pool, scratch_pool)); if (prev_move) { move->prev = prev_move; prev_move->next = apr_array_make(result_pool, 1, sizeof(struct repos_move_info *)); APR_ARRAY_PUSH(prev_move->next, struct repos_move_info *) = move; SVN_ERR(trace_moved_node_backwards(moves_table, prev_move, ra_session, repos_root_url, result_pool, scratch_pool)); } return SVN_NO_ERROR; } static svn_error_t * reparent_session_and_fetch_node_kind(svn_node_kind_t *node_kind, svn_ra_session_t *ra_session, const char *url, svn_revnum_t peg_rev, apr_pool_t *scratch_pool) { svn_error_t *err; err = svn_ra_reparent(ra_session, url, scratch_pool); if (err) { if (err->apr_err == SVN_ERR_RA_ILLEGAL_URL) { svn_error_clear(err); *node_kind = svn_node_unknown; return SVN_NO_ERROR; } return svn_error_trace(err); } SVN_ERR(svn_ra_check_path(ra_session, "", peg_rev, node_kind, scratch_pool)); return SVN_NO_ERROR; } /* Scan MOVES_TABLE for moves which affect a particular deleted node, and * build a set of new move information for this node. * Return heads of all possible move chains in *MOVES. * * MOVES_TABLE describes moves which happened at arbitrary paths in the * repository. DELETED_REPOS_RELPATH may have been moved directly or it * may have been moved along with a parent path. Move information returned * from this function represents how DELETED_REPOS_RELPATH itself was moved * from one path to another, effectively "zooming in" on the effective move * operations which occurred for this particular node. */ static svn_error_t * find_operative_moves(apr_array_header_t **moves, apr_hash_t *moves_table, const char *deleted_repos_relpath, svn_revnum_t deleted_rev, svn_ra_session_t *ra_session, const char *repos_root_url, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { apr_array_header_t *moves_in_deleted_rev; int i; apr_pool_t *iterpool; const char *session_url, *url = NULL; moves_in_deleted_rev = apr_hash_get(moves_table, &deleted_rev, sizeof(deleted_rev)); if (moves_in_deleted_rev == NULL) { *moves = NULL; return SVN_NO_ERROR; } SVN_ERR(svn_ra_get_session_url(ra_session, &session_url, scratch_pool)); /* Look for operative moves in the revision where the node was deleted. */ *moves = apr_array_make(scratch_pool, 0, sizeof(struct repos_move_info *)); iterpool = svn_pool_create(scratch_pool); for (i = 0; i < moves_in_deleted_rev->nelts; i++) { struct repos_move_info *move; const char *relpath; svn_pool_clear(iterpool); move = APR_ARRAY_IDX(moves_in_deleted_rev, i, struct repos_move_info *); relpath = svn_relpath_skip_ancestor(move->moved_from_repos_relpath, deleted_repos_relpath); if (relpath && relpath[0] != '\0') { svn_node_kind_t node_kind; url = svn_path_url_add_component2(repos_root_url, deleted_repos_relpath, iterpool); SVN_ERR(reparent_session_and_fetch_node_kind(&node_kind, ra_session, url, rev_below(deleted_rev), iterpool)); move = new_path_adjusted_move(move, relpath, node_kind, result_pool); } APR_ARRAY_PUSH(*moves, struct repos_move_info *) = move; } if (url != NULL) SVN_ERR(svn_ra_reparent(ra_session, session_url, scratch_pool)); /* If we didn't find any applicable moves, return NULL. */ if ((*moves)->nelts == 0) { *moves = NULL; svn_pool_destroy(iterpool); return SVN_NO_ERROR; } /* Figure out what happened to these moves in future revisions. */ for (i = 0; i < (*moves)->nelts; i++) { struct repos_move_info *move; svn_pool_clear(iterpool); move = APR_ARRAY_IDX(*moves, i, struct repos_move_info *); SVN_ERR(trace_moved_node(moves_table, move, ra_session, repos_root_url, result_pool, iterpool)); } svn_pool_destroy(iterpool); return SVN_NO_ERROR; } /* Try to find a revision older than START_REV, and its author, which deleted * DELETED_BASENAME in the directory PARENT_REPOS_RELPATH. Assume the deleted * node is ancestrally related to RELATED_REPOS_RELPATH@RELATED_PEG_REV. * If no such revision can be found, set *DELETED_REV to SVN_INVALID_REVNUM * and *DELETED_REV_AUTHOR to NULL. * If the node was replaced rather than deleted, set *REPLACING_NODE_KIND to * the node kind of the replacing node. Else, set it to svn_node_unknown. * Only request the log for revisions up to END_REV from the server. * If the deleted node was moved, provide heads of move chains in *MOVES. * If the node was not moved,set *MOVES to NULL. */ static svn_error_t * find_revision_for_suspected_deletion(svn_revnum_t *deleted_rev, const char **deleted_rev_author, svn_node_kind_t *replacing_node_kind, struct apr_array_header_t **moves, svn_client_conflict_t *conflict, const char *deleted_basename, const char *parent_repos_relpath, svn_revnum_t start_rev, svn_revnum_t end_rev, const char *related_repos_relpath, svn_revnum_t related_peg_rev, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { svn_ra_session_t *ra_session; const char *url; const char *corrected_url; apr_array_header_t *paths; apr_array_header_t *revprops; const char *repos_root_url; const char *repos_uuid; struct find_deleted_rev_baton b = { 0 }; const char *victim_abspath; svn_error_t *err; apr_hash_t *moves_table; SVN_ERR_ASSERT(start_rev > end_rev); SVN_ERR(svn_client_conflict_get_repos_info(&repos_root_url, &repos_uuid, conflict, scratch_pool, scratch_pool)); victim_abspath = svn_client_conflict_get_local_abspath(conflict); SVN_ERR(find_moves_in_revision_range(&moves_table, parent_repos_relpath, repos_root_url, repos_uuid, victim_abspath, start_rev, end_rev, ctx, result_pool, scratch_pool)); url = svn_path_url_add_component2(repos_root_url, parent_repos_relpath, scratch_pool); SVN_ERR(svn_client__open_ra_session_internal(&ra_session, &corrected_url, url, NULL, NULL, FALSE, FALSE, ctx, scratch_pool, scratch_pool)); paths = apr_array_make(scratch_pool, 1, sizeof(const char *)); APR_ARRAY_PUSH(paths, const char *) = ""; revprops = apr_array_make(scratch_pool, 1, sizeof(const char *)); APR_ARRAY_PUSH(revprops, const char *) = SVN_PROP_REVISION_AUTHOR; b.victim_abspath = victim_abspath; b.deleted_repos_relpath = svn_relpath_join(parent_repos_relpath, deleted_basename, scratch_pool); b.related_repos_relpath = related_repos_relpath; b.related_peg_rev = related_peg_rev; b.deleted_rev = SVN_INVALID_REVNUM; b.replacing_node_kind = svn_node_unknown; b.repos_root_url = repos_root_url; b.repos_uuid = repos_uuid; b.ctx = ctx; b.moves_table = moves_table; b.result_pool = result_pool; SVN_ERR(svn_ra__dup_session(&b.extra_ra_session, ra_session, NULL, scratch_pool, scratch_pool)); err = svn_ra_get_log2(ra_session, paths, start_rev, end_rev, 0, /* no limit */ TRUE, /* need the changed paths list */ FALSE, /* need to traverse copies */ FALSE, /* no need for merged revisions */ revprops, find_deleted_rev, &b, scratch_pool); if (err) { if (err->apr_err == SVN_ERR_CEASE_INVOCATION && b.deleted_rev != SVN_INVALID_REVNUM) { /* Log operation was aborted because we found deleted rev. */ svn_error_clear(err); } else return svn_error_trace(err); } if (b.deleted_rev == SVN_INVALID_REVNUM) { struct repos_move_info *move = b.move; if (move) { *deleted_rev = move->rev; *deleted_rev_author = move->rev_author; *replacing_node_kind = b.replacing_node_kind; SVN_ERR(find_operative_moves(moves, moves_table, b.deleted_repos_relpath, move->rev, ra_session, repos_root_url, result_pool, scratch_pool)); } else { /* We could not determine the revision in which the node was * deleted. */ *deleted_rev = SVN_INVALID_REVNUM; *deleted_rev_author = NULL; *replacing_node_kind = svn_node_unknown; *moves = NULL; } return SVN_NO_ERROR; } else { *deleted_rev = b.deleted_rev; *deleted_rev_author = b.deleted_rev_author; *replacing_node_kind = b.replacing_node_kind; SVN_ERR(find_operative_moves(moves, moves_table, b.deleted_repos_relpath, b.deleted_rev, ra_session, repos_root_url, result_pool, scratch_pool)); } return SVN_NO_ERROR; } /* Details for tree conflicts involving a locally missing node. */ struct conflict_tree_local_missing_details { /* If not SVN_INVALID_REVNUM, the node was deleted in DELETED_REV. */ svn_revnum_t deleted_rev; /* Author who committed DELETED_REV. */ const char *deleted_rev_author; /* The path which was deleted relative to the repository root. */ const char *deleted_repos_relpath; /* Move information about the conflict victim. If not NULL, this is an * array of repos_move_info elements. Each element is the head of a * move chain which starts in DELETED_REV. */ apr_array_header_t *moves; /* Move information about siblings. Siblings are nodes which share * a youngest common ancestor with the conflict victim. E.g. in case * of a merge operation they are part of the merge source branch. * If not NULL, this is an array of repos_move_info elements. * Each element is the head of a move chain, which starts at some * point in history after siblings and conflict victim forked off * their common ancestor. */ apr_array_header_t *sibling_moves; /* If not NULL, this is the move target abspath. */ const char *moved_to_abspath; }; static svn_error_t * find_related_node(const char **related_repos_relpath, svn_revnum_t *related_peg_rev, const char *younger_related_repos_relpath, svn_revnum_t younger_related_peg_rev, const char *older_repos_relpath, svn_revnum_t older_peg_rev, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { const char *repos_root_url; const char *related_url; const char *corrected_url; svn_node_kind_t related_node_kind; svn_ra_session_t *ra_session; *related_repos_relpath = NULL; *related_peg_rev = SVN_INVALID_REVNUM; SVN_ERR(svn_client_conflict_get_repos_info(&repos_root_url, NULL, conflict, scratch_pool, scratch_pool)); related_url = svn_path_url_add_component2(repos_root_url, younger_related_repos_relpath, scratch_pool); SVN_ERR(svn_client__open_ra_session_internal(&ra_session, &corrected_url, related_url, NULL, NULL, FALSE, FALSE, ctx, scratch_pool, scratch_pool)); SVN_ERR(svn_ra_check_path(ra_session, "", younger_related_peg_rev, &related_node_kind, scratch_pool)); if (related_node_kind == svn_node_none) { svn_revnum_t related_deleted_rev; const char *related_deleted_rev_author; svn_node_kind_t related_replacing_node_kind; const char *related_basename; const char *related_parent_repos_relpath; apr_array_header_t *related_moves; /* Looks like the younger node, which we'd like to use as our * 'related node', was deleted. Try to find its deleted revision * so we can calculate a peg revision at which it exists. * The younger node is related to the older node, so we can use * the older node to guide us in our search. */ related_basename = svn_relpath_basename(younger_related_repos_relpath, scratch_pool); related_parent_repos_relpath = svn_relpath_dirname(younger_related_repos_relpath, scratch_pool); SVN_ERR(find_revision_for_suspected_deletion( &related_deleted_rev, &related_deleted_rev_author, &related_replacing_node_kind, &related_moves, conflict, related_basename, related_parent_repos_relpath, younger_related_peg_rev, 0, older_repos_relpath, older_peg_rev, ctx, conflict->pool, scratch_pool)); /* If we can't find a related node, bail. */ if (related_deleted_rev == SVN_INVALID_REVNUM) return SVN_NO_ERROR; /* The node should exist in the revision before it was deleted. */ *related_repos_relpath = younger_related_repos_relpath; *related_peg_rev = rev_below(related_deleted_rev); } else { *related_repos_relpath = younger_related_repos_relpath; *related_peg_rev = younger_related_peg_rev; } return SVN_NO_ERROR; } /* Determine if REPOS_RELPATH@PEG_REV was moved at some point in its history. * History's range of interest ends at END_REV which must be older than PEG_REV. * * VICTIM_ABSPATH is the abspath of a conflict victim in the working copy and * will be used in notifications. * * Return any applicable move chain heads in *MOVES. * If no moves can be found, set *MOVES to NULL. */ static svn_error_t * find_moves_in_natural_history(apr_array_header_t **moves, const char *repos_relpath, svn_revnum_t peg_rev, svn_node_kind_t node_kind, svn_revnum_t end_rev, const char *victim_abspath, const char *repos_root_url, const char *repos_uuid, svn_ra_session_t *ra_session, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { apr_hash_t *moves_table; apr_array_header_t *revs; apr_array_header_t *most_recent_moves = NULL; int i; apr_pool_t *iterpool; *moves = NULL; SVN_ERR(find_moves_in_revision_range(&moves_table, repos_relpath, repos_root_url, repos_uuid, victim_abspath, peg_rev, end_rev, ctx, scratch_pool, scratch_pool)); iterpool = svn_pool_create(scratch_pool); /* Scan the moves table for applicable moves. */ revs = svn_sort__hash(moves_table, compare_items_as_revs, scratch_pool); for (i = revs->nelts - 1; i >= 0; i--) { svn_sort__item_t item = APR_ARRAY_IDX(revs, i, svn_sort__item_t); apr_array_header_t *moves_in_rev = apr_hash_get(moves_table, item.key, sizeof(svn_revnum_t)); int j; svn_pool_clear(iterpool); /* Was repos relpath moved to its location in this revision? */ for (j = 0; j < moves_in_rev->nelts; j++) { struct repos_move_info *move; const char *relpath; move = APR_ARRAY_IDX(moves_in_rev, j, struct repos_move_info *); relpath = svn_relpath_skip_ancestor(move->moved_to_repos_relpath, repos_relpath); if (relpath) { /* If the move did not happen in our peg revision, make * sure this move happened on the same line of history. */ if (move->rev != peg_rev) { svn_client__pathrev_t *yca_loc; svn_error_t *err; err = find_yca(&yca_loc, repos_relpath, peg_rev, repos_relpath, move->rev, repos_root_url, repos_uuid, NULL, ctx, iterpool, iterpool); if (err) { if (err->apr_err == SVN_ERR_FS_NOT_FOUND) { svn_error_clear(err); yca_loc = NULL; } else return svn_error_trace(err); } if (yca_loc == NULL || yca_loc->rev != move->rev) continue; } if (most_recent_moves == NULL) most_recent_moves = apr_array_make(result_pool, 1, sizeof(struct repos_move_info *)); /* Copy the move to result pool (even if relpath is ""). */ move = new_path_adjusted_move(move, relpath, node_kind, result_pool); APR_ARRAY_PUSH(most_recent_moves, struct repos_move_info *) = move; } } /* If we found one move, or several ambiguous moves, we're done. */ if (most_recent_moves) break; } if (most_recent_moves && most_recent_moves->nelts > 0) { *moves = apr_array_make(result_pool, 1, sizeof(struct repos_move_info *)); /* Figure out what happened to the most recent moves in prior * revisions and build move chains. */ for (i = 0; i < most_recent_moves->nelts; i++) { struct repos_move_info *move; svn_pool_clear(iterpool); move = APR_ARRAY_IDX(most_recent_moves, i, struct repos_move_info *); SVN_ERR(trace_moved_node_backwards(moves_table, move, ra_session, repos_root_url, result_pool, iterpool)); /* Follow the move chain backwards. */ while (move->prev) move = move->prev; /* Return move heads. */ APR_ARRAY_PUSH(*moves, struct repos_move_info *) = move; } } svn_pool_destroy(iterpool); return SVN_NO_ERROR; } /* Implements tree_conflict_get_details_func_t. */ static svn_error_t * conflict_tree_get_details_local_missing(svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { const char *old_repos_relpath; const char *new_repos_relpath; const char *parent_repos_relpath; svn_revnum_t parent_peg_rev; svn_revnum_t old_rev; svn_revnum_t new_rev; svn_revnum_t deleted_rev; const char *deleted_rev_author; svn_node_kind_t replacing_node_kind; const char *deleted_basename; struct conflict_tree_local_missing_details *details; apr_array_header_t *moves = NULL; apr_array_header_t *sibling_moves = NULL; const char *related_repos_relpath; svn_revnum_t related_peg_rev; const char *repos_root_url; const char *repos_uuid; + const char *url, *corrected_url; + svn_ra_session_t *ra_session; + svn_client__pathrev_t *yca_loc; + svn_revnum_t end_rev; SVN_ERR(svn_client_conflict_get_incoming_old_repos_location( &old_repos_relpath, &old_rev, NULL, conflict, scratch_pool, scratch_pool)); SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( &new_repos_relpath, &new_rev, NULL, conflict, scratch_pool, scratch_pool)); /* Scan the conflict victim's parent's log to find a revision which * deleted the node. */ deleted_basename = svn_dirent_basename(conflict->local_abspath, scratch_pool); SVN_ERR(svn_wc__node_get_repos_info(&parent_peg_rev, &parent_repos_relpath, &repos_root_url, &repos_uuid, ctx->wc_ctx, svn_dirent_dirname( conflict->local_abspath, scratch_pool), scratch_pool, scratch_pool)); /* Pick the younger incoming node as our 'related node' which helps * pin-pointing the deleted conflict victim in history. */ related_repos_relpath = (old_rev < new_rev ? new_repos_relpath : old_repos_relpath); related_peg_rev = (old_rev < new_rev ? new_rev : old_rev); /* Make sure we're going to search the related node in a revision where * it exists. The younger incoming node might have been deleted in HEAD. */ if (related_repos_relpath != NULL && related_peg_rev != SVN_INVALID_REVNUM) SVN_ERR(find_related_node( &related_repos_relpath, &related_peg_rev, related_repos_relpath, related_peg_rev, (old_rev < new_rev ? old_repos_relpath : new_repos_relpath), (old_rev < new_rev ? old_rev : new_rev), conflict, ctx, scratch_pool, scratch_pool)); - + + /* Set END_REV to our best guess of the nearest YCA revision. */ + url = svn_path_url_add_component2(repos_root_url, related_repos_relpath, + scratch_pool); + SVN_ERR(svn_client__open_ra_session_internal(&ra_session, + &corrected_url, + url, NULL, NULL, + FALSE, + FALSE, + ctx, + scratch_pool, + scratch_pool)); + SVN_ERR(find_nearest_yca(&yca_loc, related_repos_relpath, related_peg_rev, + parent_repos_relpath, parent_peg_rev, + repos_root_url, repos_uuid, ra_session, ctx, + scratch_pool, scratch_pool)); + if (yca_loc) + { + end_rev = yca_loc->rev; + + /* END_REV must be smaller than PARENT_PEG_REV, else the call to + * find_revision_for_suspected_deletion() below will abort. */ + if (end_rev >= parent_peg_rev) + end_rev = parent_peg_rev > 0 ? parent_peg_rev - 1 : 0; + } + else + end_rev = 0; /* ### We might walk through all of history... */ + SVN_ERR(find_revision_for_suspected_deletion( &deleted_rev, &deleted_rev_author, &replacing_node_kind, &moves, conflict, deleted_basename, parent_repos_relpath, - parent_peg_rev, 0, related_repos_relpath, related_peg_rev, + parent_peg_rev, end_rev, related_repos_relpath, related_peg_rev, ctx, conflict->pool, scratch_pool)); /* If the victim was not deleted then check if the related path was moved. */ if (deleted_rev == SVN_INVALID_REVNUM) { const char *victim_abspath; - svn_ra_session_t *ra_session; - const char *url, *corrected_url; - svn_client__pathrev_t *yca_loc; - svn_revnum_t end_rev; svn_node_kind_t related_node_kind; /* ### The following describes all moves in terms of forward-merges, * should do we something else for reverse-merges? */ victim_abspath = svn_client_conflict_get_local_abspath(conflict); - url = svn_path_url_add_component2(repos_root_url, related_repos_relpath, - scratch_pool); - SVN_ERR(svn_client__open_ra_session_internal(&ra_session, - &corrected_url, - url, NULL, NULL, - FALSE, - FALSE, - ctx, - scratch_pool, - scratch_pool)); - /* Set END_REV to our best guess of the nearest YCA revision. */ - SVN_ERR(find_nearest_yca(&yca_loc, related_repos_relpath, related_peg_rev, - parent_repos_relpath, parent_peg_rev, - repos_root_url, repos_uuid, ra_session, ctx, - scratch_pool, scratch_pool)); - if (yca_loc == NULL) - return SVN_NO_ERROR; - end_rev = yca_loc->rev; + if (yca_loc) + { + end_rev = yca_loc->rev; - /* END_REV must be smaller than RELATED_PEG_REV, else the call - to find_moves_in_natural_history() below will error out. */ - if (end_rev >= related_peg_rev) - end_rev = related_peg_rev > 0 ? related_peg_rev - 1 : 0; + /* END_REV must be smaller than RELATED_PEG_REV, else the call + to find_moves_in_natural_history() below will error out. */ + if (end_rev >= related_peg_rev) + end_rev = related_peg_rev > 0 ? related_peg_rev - 1 : 0; + } + else + end_rev = 0; /* ### We might walk through all of history... */ SVN_ERR(svn_ra_check_path(ra_session, "", related_peg_rev, &related_node_kind, scratch_pool)); SVN_ERR(find_moves_in_natural_history(&sibling_moves, related_repos_relpath, related_peg_rev, related_node_kind, end_rev, victim_abspath, repos_root_url, repos_uuid, ra_session, ctx, conflict->pool, scratch_pool)); if (sibling_moves == NULL) return SVN_NO_ERROR; /* ## TODO: Find the missing node in the WC. */ } details = apr_pcalloc(conflict->pool, sizeof(*details)); details->deleted_rev = deleted_rev; details->deleted_rev_author = deleted_rev_author; if (deleted_rev != SVN_INVALID_REVNUM) details->deleted_repos_relpath = svn_relpath_join(parent_repos_relpath, deleted_basename, conflict->pool); details->moves = moves; details->sibling_moves = sibling_moves; conflict->tree_conflict_local_details = details; return SVN_NO_ERROR; } /* Return a localised string representation of the local part of a tree conflict on a non-existent node. */ static svn_error_t * describe_local_none_node_change(const char **description, svn_client_conflict_t *conflict, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { svn_wc_conflict_reason_t local_change; svn_wc_operation_t operation; local_change = svn_client_conflict_get_local_change(conflict); operation = svn_client_conflict_get_operation(conflict); switch (local_change) { case svn_wc_conflict_reason_edited: *description = _("An item containing uncommitted changes was " "found in the working copy."); break; case svn_wc_conflict_reason_obstructed: *description = _("An item which already occupies this path was found in " "the working copy."); break; case svn_wc_conflict_reason_deleted: *description = _("A deleted item was found in the working copy."); break; case svn_wc_conflict_reason_missing: if (operation == svn_wc_operation_update || operation == svn_wc_operation_switch) *description = _("No such file or directory was found in the " "working copy."); else if (operation == svn_wc_operation_merge) { /* ### display deleted revision */ *description = _("No such file or directory was found in the " "merge target working copy.\nThe item may " "have been deleted or moved away in the " "repository's history."); } break; case svn_wc_conflict_reason_unversioned: *description = _("An unversioned item was found in the working " "copy."); break; case svn_wc_conflict_reason_added: case svn_wc_conflict_reason_replaced: *description = _("An item scheduled to be added to the repository " "in the next commit was found in the working " "copy."); break; case svn_wc_conflict_reason_moved_away: *description = _("The item in the working copy had been moved " "away at the time this conflict was recorded."); break; case svn_wc_conflict_reason_moved_here: *description = _("An item had been moved here in the working copy " "at the time this conflict was recorded."); break; } return SVN_NO_ERROR; } /* Append a description of a move chain beginning at NEXT to DESCRIPTION. */ static const char * append_moved_to_chain_description(const char *description, apr_array_header_t *next, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { if (next == NULL) return description; while (next) { struct repos_move_info *move; /* Describe the first possible move chain only. Adding multiple chains * to the description would just be confusing. The user may select a * different move destination while resolving the conflict. */ move = APR_ARRAY_IDX(next, 0, struct repos_move_info *); description = apr_psprintf(scratch_pool, _("%s\nAnd then moved away to '^/%s' by " "%s in r%ld."), description, move->moved_to_repos_relpath, move->rev_author, move->rev); next = move->next; } return apr_pstrdup(result_pool, description); } /* Implements tree_conflict_get_description_func_t. */ static svn_error_t * conflict_tree_get_local_description_generic(const char **description, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { svn_node_kind_t victim_node_kind; victim_node_kind = svn_client_conflict_tree_get_victim_node_kind(conflict); *description = NULL; switch (victim_node_kind) { case svn_node_file: case svn_node_symlink: SVN_ERR(describe_local_file_node_change(description, conflict, ctx, result_pool, scratch_pool)); break; case svn_node_dir: SVN_ERR(describe_local_dir_node_change(description, conflict, ctx, result_pool, scratch_pool)); break; case svn_node_none: case svn_node_unknown: SVN_ERR(describe_local_none_node_change(description, conflict, result_pool, scratch_pool)); break; } return SVN_NO_ERROR; } /* Implements tree_conflict_get_description_func_t. */ static svn_error_t * conflict_tree_get_description_local_missing(const char **description, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { struct conflict_tree_local_missing_details *details; details = conflict->tree_conflict_local_details; if (details == NULL) return svn_error_trace(conflict_tree_get_local_description_generic( description, conflict, ctx, result_pool, scratch_pool)); if (details->moves || details->sibling_moves) { struct repos_move_info *move; *description = _("No such file or directory was found in the " "merge target working copy.\n"); if (details->moves) { move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); if (move->node_kind == svn_node_file) *description = apr_psprintf( result_pool, _("%sThe file was moved to '^/%s' in r%ld by %s."), *description, move->moved_to_repos_relpath, move->rev, move->rev_author); else if (move->node_kind == svn_node_dir) *description = apr_psprintf( result_pool, _("%sThe directory was moved to '^/%s' in " "r%ld by %s."), *description, move->moved_to_repos_relpath, move->rev, move->rev_author); else *description = apr_psprintf( result_pool, _("%sThe item was moved to '^/%s' in r%ld by %s."), *description, move->moved_to_repos_relpath, move->rev, move->rev_author); *description = append_moved_to_chain_description(*description, move->next, result_pool, scratch_pool); } if (details->sibling_moves) { move = APR_ARRAY_IDX(details->sibling_moves, 0, struct repos_move_info *); if (move->node_kind == svn_node_file) *description = apr_psprintf( result_pool, _("%sThe file '^/%s' was moved to '^/%s' " "in r%ld by %s."), *description, move->moved_from_repos_relpath, move->moved_to_repos_relpath, move->rev, move->rev_author); else if (move->node_kind == svn_node_dir) *description = apr_psprintf( result_pool, _("%sThe directory '^/%s' was moved to '^/%s' " "in r%ld by %s."), *description, move->moved_from_repos_relpath, move->moved_to_repos_relpath, move->rev, move->rev_author); else *description = apr_psprintf( result_pool, _("%sThe item '^/%s' was moved to '^/%s' " "in r%ld by %s."), *description, move->moved_from_repos_relpath, move->moved_to_repos_relpath, move->rev, move->rev_author); *description = append_moved_to_chain_description(*description, move->next, result_pool, scratch_pool); } } else *description = apr_psprintf( result_pool, _("No such file or directory was found in the " "merge target working copy.\n'^/%s' was deleted " "in r%ld by %s."), details->deleted_repos_relpath, details->deleted_rev, details->deleted_rev_author); return SVN_NO_ERROR; } /* Return a localised string representation of the incoming part of a conflict; NULL for non-localised odd cases. */ static const char * describe_incoming_change(svn_node_kind_t kind, svn_wc_conflict_action_t action, svn_wc_operation_t operation) { switch (kind) { case svn_node_file: case svn_node_symlink: if (operation == svn_wc_operation_update) { switch (action) { case svn_wc_conflict_action_edit: return _("An update operation tried to edit a file."); case svn_wc_conflict_action_add: return _("An update operation tried to add a file."); case svn_wc_conflict_action_delete: return _("An update operation tried to delete or move " "a file."); case svn_wc_conflict_action_replace: return _("An update operation tried to replace a file."); } } else if (operation == svn_wc_operation_switch) { switch (action) { case svn_wc_conflict_action_edit: return _("A switch operation tried to edit a file."); case svn_wc_conflict_action_add: return _("A switch operation tried to add a file."); case svn_wc_conflict_action_delete: return _("A switch operation tried to delete or move " "a file."); case svn_wc_conflict_action_replace: return _("A switch operation tried to replace a file."); } } else if (operation == svn_wc_operation_merge) { switch (action) { case svn_wc_conflict_action_edit: return _("A merge operation tried to edit a file."); case svn_wc_conflict_action_add: return _("A merge operation tried to add a file."); case svn_wc_conflict_action_delete: return _("A merge operation tried to delete or move " "a file."); case svn_wc_conflict_action_replace: return _("A merge operation tried to replace a file."); } } break; case svn_node_dir: if (operation == svn_wc_operation_update) { switch (action) { case svn_wc_conflict_action_edit: return _("An update operation tried to change a directory."); case svn_wc_conflict_action_add: return _("An update operation tried to add a directory."); case svn_wc_conflict_action_delete: return _("An update operation tried to delete or move " "a directory."); case svn_wc_conflict_action_replace: return _("An update operation tried to replace a directory."); } } else if (operation == svn_wc_operation_switch) { switch (action) { case svn_wc_conflict_action_edit: return _("A switch operation tried to edit a directory."); case svn_wc_conflict_action_add: return _("A switch operation tried to add a directory."); case svn_wc_conflict_action_delete: return _("A switch operation tried to delete or move " "a directory."); case svn_wc_conflict_action_replace: return _("A switch operation tried to replace a directory."); } } else if (operation == svn_wc_operation_merge) { switch (action) { case svn_wc_conflict_action_edit: return _("A merge operation tried to edit a directory."); case svn_wc_conflict_action_add: return _("A merge operation tried to add a directory."); case svn_wc_conflict_action_delete: return _("A merge operation tried to delete or move " "a directory."); case svn_wc_conflict_action_replace: return _("A merge operation tried to replace a directory."); } } break; case svn_node_none: case svn_node_unknown: if (operation == svn_wc_operation_update) { switch (action) { case svn_wc_conflict_action_edit: return _("An update operation tried to edit an item."); case svn_wc_conflict_action_add: return _("An update operation tried to add an item."); case svn_wc_conflict_action_delete: return _("An update operation tried to delete or move " "an item."); case svn_wc_conflict_action_replace: return _("An update operation tried to replace an item."); } } else if (operation == svn_wc_operation_switch) { switch (action) { case svn_wc_conflict_action_edit: return _("A switch operation tried to edit an item."); case svn_wc_conflict_action_add: return _("A switch operation tried to add an item."); case svn_wc_conflict_action_delete: return _("A switch operation tried to delete or move " "an item."); case svn_wc_conflict_action_replace: return _("A switch operation tried to replace an item."); } } else if (operation == svn_wc_operation_merge) { switch (action) { case svn_wc_conflict_action_edit: return _("A merge operation tried to edit an item."); case svn_wc_conflict_action_add: return _("A merge operation tried to add an item."); case svn_wc_conflict_action_delete: return _("A merge operation tried to delete or move " "an item."); case svn_wc_conflict_action_replace: return _("A merge operation tried to replace an item."); } } break; } return NULL; } /* Return a localised string representation of the operation part of a conflict. */ static const char * operation_str(svn_wc_operation_t operation) { switch (operation) { case svn_wc_operation_update: return _("upon update"); case svn_wc_operation_switch: return _("upon switch"); case svn_wc_operation_merge: return _("upon merge"); case svn_wc_operation_none: return _("upon none"); } SVN_ERR_MALFUNCTION_NO_RETURN(); return NULL; } svn_error_t * svn_client_conflict_prop_get_description(const char **description, svn_client_conflict_t *conflict, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { const char *reason_str, *action_str; /* We provide separately translatable strings for the values that we * know about, and a fall-back in case any other values occur. */ switch (svn_client_conflict_get_local_change(conflict)) { case svn_wc_conflict_reason_edited: reason_str = _("local edit"); break; case svn_wc_conflict_reason_added: reason_str = _("local add"); break; case svn_wc_conflict_reason_deleted: reason_str = _("local delete"); break; case svn_wc_conflict_reason_obstructed: reason_str = _("local obstruction"); break; default: reason_str = apr_psprintf( scratch_pool, _("local %s"), svn_token__to_word( map_conflict_reason, svn_client_conflict_get_local_change(conflict))); break; } switch (svn_client_conflict_get_incoming_change(conflict)) { case svn_wc_conflict_action_edit: action_str = _("incoming edit"); break; case svn_wc_conflict_action_add: action_str = _("incoming add"); break; case svn_wc_conflict_action_delete: action_str = _("incoming delete"); break; default: action_str = apr_psprintf( scratch_pool, _("incoming %s"), svn_token__to_word( map_conflict_action, svn_client_conflict_get_incoming_change(conflict))); break; } SVN_ERR_ASSERT(reason_str && action_str); *description = apr_psprintf(result_pool, _("%s, %s %s"), reason_str, action_str, operation_str( svn_client_conflict_get_operation(conflict))); return SVN_NO_ERROR; } /* Implements tree_conflict_get_description_func_t. */ static svn_error_t * conflict_tree_get_incoming_description_generic( const char **incoming_change_description, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { const char *action; svn_node_kind_t incoming_kind; svn_wc_conflict_action_t conflict_action; svn_wc_operation_t conflict_operation; conflict_action = svn_client_conflict_get_incoming_change(conflict); conflict_operation = svn_client_conflict_get_operation(conflict); /* Determine the node kind of the incoming change. */ incoming_kind = svn_node_unknown; if (conflict_action == svn_wc_conflict_action_edit || conflict_action == svn_wc_conflict_action_delete) { /* Change is acting on 'src_left' version of the node. */ SVN_ERR(svn_client_conflict_get_incoming_old_repos_location( NULL, NULL, &incoming_kind, conflict, scratch_pool, scratch_pool)); } else if (conflict_action == svn_wc_conflict_action_add || conflict_action == svn_wc_conflict_action_replace) { /* Change is acting on 'src_right' version of the node. * * ### For 'replace', the node kind is ambiguous. However, src_left * ### is NULL for replace, so we must use src_right. */ SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( NULL, NULL, &incoming_kind, conflict, scratch_pool, scratch_pool)); } action = describe_incoming_change(incoming_kind, conflict_action, conflict_operation); if (action) { *incoming_change_description = apr_pstrdup(result_pool, action); } else { /* A catch-all message for very rare or nominally impossible cases. It will not be pretty, but is closer to an internal error than an ordinary user-facing string. */ *incoming_change_description = apr_psprintf(result_pool, _("incoming %s %s"), svn_node_kind_to_word(incoming_kind), svn_token__to_word(map_conflict_action, conflict_action)); } return SVN_NO_ERROR; } /* Details for tree conflicts involving incoming deletions and replacements. */ struct conflict_tree_incoming_delete_details { /* If not SVN_INVALID_REVNUM, the node was deleted in DELETED_REV. */ svn_revnum_t deleted_rev; /* If not SVN_INVALID_REVNUM, the node was added in ADDED_REV. The incoming * delete is the result of a reverse application of this addition. */ svn_revnum_t added_rev; /* The path which was deleted/added relative to the repository root. */ const char *repos_relpath; /* Author who committed DELETED_REV/ADDED_REV. */ const char *rev_author; /* New node kind for a replaced node. This is svn_node_none for deletions. */ svn_node_kind_t replacing_node_kind; /* Move information. If not NULL, this is an array of repos_move_info * * elements. Each element is the head of a move chain which starts in * DELETED_REV or in ADDED_REV (in which case moves should be interpreted * in reverse). */ apr_array_header_t *moves; /* A map of repos_relpaths and working copy nodes for an incoming move. * * Each key is a "const char *" repository relpath corresponding to a * possible repository-side move destination node in the revision which * is the target revision in case of update and switch, or the merge-right * revision in case of a merge. * * Each value is an apr_array_header_t *. * Each array consists of "const char *" absolute paths to working copy * nodes which correspond to the repository node selected by the map key. * Each such working copy node is a potential local move target which can * be chosen to "follow" the incoming move when resolving a tree conflict. * * This may be an empty hash map in case if there is no move target path * in the working copy. */ apr_hash_t *wc_move_targets; /* The preferred move target repository relpath. This is our key into * the WC_MOVE_TARGETS map above (can be overridden by the user). */ const char *move_target_repos_relpath; /* The current index into the list of working copy nodes corresponding to * MOVE_TARGET_REPOS_REPLATH (can be overridden by the user). */ int wc_move_target_idx; }; /* Get the currently selected repository-side move target path. * If none was selected yet, determine and return a default one. */ static const char * get_moved_to_repos_relpath( struct conflict_tree_incoming_delete_details *details, apr_pool_t *scratch_pool) { struct repos_move_info *move; if (details->move_target_repos_relpath) return details->move_target_repos_relpath; if (details->wc_move_targets && apr_hash_count(details->wc_move_targets) > 0) { svn_sort__item_t item; apr_array_header_t *repos_relpaths; repos_relpaths = svn_sort__hash(details->wc_move_targets, svn_sort_compare_items_as_paths, scratch_pool); item = APR_ARRAY_IDX(repos_relpaths, 0, svn_sort__item_t); return (const char *)item.key; } move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); return move->moved_to_repos_relpath; } static const char * describe_incoming_deletion_upon_update( struct conflict_tree_incoming_delete_details *details, svn_node_kind_t victim_node_kind, svn_revnum_t old_rev, svn_revnum_t new_rev, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { if (details->replacing_node_kind == svn_node_file || details->replacing_node_kind == svn_node_symlink) { if (victim_node_kind == svn_node_dir) { const char *description = apr_psprintf(result_pool, _("Directory updated from r%ld to r%ld was " "replaced with a file by %s in r%ld."), old_rev, new_rev, details->rev_author, details->deleted_rev); if (details->moves) { struct repos_move_info *move; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); description = apr_psprintf(result_pool, _("%s\nThe replaced directory was moved to " "'^/%s'."), description, get_moved_to_repos_relpath(details, scratch_pool)); return append_moved_to_chain_description(description, move->next, result_pool, scratch_pool); } return description; } else if (victim_node_kind == svn_node_file || victim_node_kind == svn_node_symlink) { const char *description = apr_psprintf(result_pool, _("File updated from r%ld to r%ld was replaced " "with a file from another line of history by " "%s in r%ld."), old_rev, new_rev, details->rev_author, details->deleted_rev); if (details->moves) { struct repos_move_info *move; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); description = apr_psprintf(result_pool, _("%s\nThe replaced file was moved to '^/%s'."), description, get_moved_to_repos_relpath(details, scratch_pool)); return append_moved_to_chain_description(description, move->next, result_pool, scratch_pool); } return description; } else { const char *description = apr_psprintf(result_pool, _("Item updated from r%ld to r%ld was replaced " "with a file by %s in r%ld."), old_rev, new_rev, details->rev_author, details->deleted_rev); if (details->moves) { struct repos_move_info *move; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); description = apr_psprintf(result_pool, _("%s\nThe replaced item was moved to '^/%s'."), description, get_moved_to_repos_relpath(details, scratch_pool)); return append_moved_to_chain_description(description, move->next, result_pool, scratch_pool); } return description; } } else if (details->replacing_node_kind == svn_node_dir) { if (victim_node_kind == svn_node_dir) { const char *description = apr_psprintf(result_pool, _("Directory updated from r%ld to r%ld was " "replaced with a directory from another line " "of history by %s in r%ld."), old_rev, new_rev, details->rev_author, details->deleted_rev); if (details->moves) { struct repos_move_info *move; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); description = apr_psprintf(result_pool, _("%s\nThe replaced directory was moved to " "'^/%s'."), description, get_moved_to_repos_relpath(details, scratch_pool)); return append_moved_to_chain_description(description, move->next, result_pool, scratch_pool); } return description; } else if (victim_node_kind == svn_node_file || victim_node_kind == svn_node_symlink) { const char *description = apr_psprintf(result_pool, _("File updated from r%ld to r%ld was " "replaced with a directory by %s in r%ld."), old_rev, new_rev, details->rev_author, details->deleted_rev); if (details->moves) { struct repos_move_info *move; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); description = apr_psprintf(result_pool, _("%s\nThe replaced file was moved to '^/%s'."), description, get_moved_to_repos_relpath(details, scratch_pool)); return append_moved_to_chain_description(description, move->next, result_pool, scratch_pool); } return description; } else { const char *description = apr_psprintf(result_pool, _("Item updated from r%ld to r%ld was replaced " "by %s in r%ld."), old_rev, new_rev, details->rev_author, details->deleted_rev); if (details->moves) { struct repos_move_info *move; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); description = apr_psprintf(result_pool, _("%s\nThe replaced item was moved to '^/%s'."), description, get_moved_to_repos_relpath(details, scratch_pool)); return append_moved_to_chain_description(description, move->next, result_pool, scratch_pool); } return description; } } else { if (victim_node_kind == svn_node_dir) { if (details->moves) { const char *description; struct repos_move_info *move; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); description = apr_psprintf(result_pool, _("Directory updated from r%ld to r%ld was " "moved to '^/%s' by %s in r%ld."), old_rev, new_rev, get_moved_to_repos_relpath(details, scratch_pool), details->rev_author, details->deleted_rev); return append_moved_to_chain_description(description, move->next, result_pool, scratch_pool); } else return apr_psprintf(result_pool, _("Directory updated from r%ld to r%ld was " "deleted by %s in r%ld."), old_rev, new_rev, details->rev_author, details->deleted_rev); } else if (victim_node_kind == svn_node_file || victim_node_kind == svn_node_symlink) { if (details->moves) { struct repos_move_info *move; const char *description; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); description = apr_psprintf(result_pool, _("File updated from r%ld to r%ld was moved " "to '^/%s' by %s in r%ld."), old_rev, new_rev, get_moved_to_repos_relpath(details, scratch_pool), details->rev_author, details->deleted_rev); return append_moved_to_chain_description(description, move->next, result_pool, scratch_pool); } else return apr_psprintf(result_pool, _("File updated from r%ld to r%ld was " "deleted by %s in r%ld."), old_rev, new_rev, details->rev_author, details->deleted_rev); } else { if (details->moves) { const char *description; struct repos_move_info *move; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); description = apr_psprintf(result_pool, _("Item updated from r%ld to r%ld was moved " "to '^/%s' by %s in r%ld."), old_rev, new_rev, get_moved_to_repos_relpath(details, scratch_pool), details->rev_author, details->deleted_rev); return append_moved_to_chain_description(description, move->next, result_pool, scratch_pool); } else return apr_psprintf(result_pool, _("Item updated from r%ld to r%ld was " "deleted by %s in r%ld."), old_rev, new_rev, details->rev_author, details->deleted_rev); } } } static const char * describe_incoming_reverse_addition_upon_update( struct conflict_tree_incoming_delete_details *details, svn_node_kind_t victim_node_kind, svn_revnum_t old_rev, svn_revnum_t new_rev, apr_pool_t *result_pool) { if (details->replacing_node_kind == svn_node_file || details->replacing_node_kind == svn_node_symlink) { if (victim_node_kind == svn_node_dir) return apr_psprintf(result_pool, _("Directory updated backwards from r%ld to r%ld " "was a file before the replacement made by %s " "in r%ld."), old_rev, new_rev, details->rev_author, details->added_rev); else if (victim_node_kind == svn_node_file || victim_node_kind == svn_node_symlink) return apr_psprintf(result_pool, _("File updated backwards from r%ld to r%ld was a " "file from another line of history before the " "replacement made by %s in r%ld."), old_rev, new_rev, details->rev_author, details->added_rev); else return apr_psprintf(result_pool, _("Item updated backwards from r%ld to r%ld was " "replaced with a file by %s in r%ld."), old_rev, new_rev, details->rev_author, details->added_rev); } else if (details->replacing_node_kind == svn_node_dir) { if (victim_node_kind == svn_node_dir) return apr_psprintf(result_pool, _("Directory updated backwards from r%ld to r%ld " "was a directory from another line of history " "before the replacement made by %s in " "r%ld."), old_rev, new_rev, details->rev_author, details->added_rev); else if (victim_node_kind == svn_node_file || victim_node_kind == svn_node_symlink) return apr_psprintf(result_pool, _("File updated backwards from r%ld to r%ld was a " "directory before the replacement made by %s " "in r%ld."), old_rev, new_rev, details->rev_author, details->added_rev); else return apr_psprintf(result_pool, _("Item updated backwards from r%ld to r%ld was " "replaced with a directory by %s in r%ld."), old_rev, new_rev, details->rev_author, details->added_rev); } else { if (victim_node_kind == svn_node_dir) return apr_psprintf(result_pool, _("Directory updated backwards from r%ld to r%ld " "did not exist before it was added by %s in " "r%ld."), old_rev, new_rev, details->rev_author, details->added_rev); else if (victim_node_kind == svn_node_file || victim_node_kind == svn_node_symlink) return apr_psprintf(result_pool, _("File updated backwards from r%ld to r%ld did " "not exist before it was added by %s in r%ld."), old_rev, new_rev, details->rev_author, details->added_rev); else return apr_psprintf(result_pool, _("Item updated backwards from r%ld to r%ld did " "not exist before it was added by %s in r%ld."), old_rev, new_rev, details->rev_author, details->added_rev); } } static const char * describe_incoming_deletion_upon_switch( struct conflict_tree_incoming_delete_details *details, svn_node_kind_t victim_node_kind, const char *old_repos_relpath, svn_revnum_t old_rev, const char *new_repos_relpath, svn_revnum_t new_rev, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { if (details->replacing_node_kind == svn_node_file || details->replacing_node_kind == svn_node_symlink) { if (victim_node_kind == svn_node_dir) { const char *description = apr_psprintf(result_pool, _("Directory switched from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\n" "was replaced with a file by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->deleted_rev); if (details->moves) { struct repos_move_info *move; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); description = apr_psprintf(result_pool, _("%s\nThe replaced directory was moved " "to '^/%s'."), description, get_moved_to_repos_relpath(details, scratch_pool)); return append_moved_to_chain_description(description, move->next, result_pool, scratch_pool); } return description; } else if (victim_node_kind == svn_node_file || victim_node_kind == svn_node_symlink) { const char *description = apr_psprintf(result_pool, _("File switched from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\nwas " "replaced with a file from another line of " "history by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->deleted_rev); if (details->moves) { struct repos_move_info *move; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); description = apr_psprintf(result_pool, _("%s\nThe replaced file was moved to '^/%s'."), description, get_moved_to_repos_relpath(details, scratch_pool)); return append_moved_to_chain_description(description, move->next, result_pool, scratch_pool); } return description; } else { const char *description = apr_psprintf(result_pool, _("Item switched from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\nwas " "replaced with a file by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->deleted_rev); if (details->moves) { struct repos_move_info *move; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); description = apr_psprintf(result_pool, _("%s\nThe replaced item was moved to '^/%s'."), description, get_moved_to_repos_relpath(details, scratch_pool)); return append_moved_to_chain_description(description, move->next, result_pool, scratch_pool); } return description; } } else if (details->replacing_node_kind == svn_node_dir) { if (victim_node_kind == svn_node_dir) { const char *description = apr_psprintf(result_pool, _("Directory switched from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\n" "was replaced with a directory from another " "line of history by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->deleted_rev); if (details->moves) { struct repos_move_info *move; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); description = apr_psprintf(result_pool, _("%s\nThe replaced directory was moved to " "'^/%s'."), description, get_moved_to_repos_relpath(details, scratch_pool)); return append_moved_to_chain_description(description, move->next, result_pool, scratch_pool); } return description; } else if (victim_node_kind == svn_node_file || victim_node_kind == svn_node_symlink) { const char *description = apr_psprintf(result_pool, _("File switched from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\n" "was replaced with a directory by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->deleted_rev); if (details->moves) { struct repos_move_info *move; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); description = apr_psprintf(result_pool, _("%s\nThe replaced file was moved to '^/%s'."), description, get_moved_to_repos_relpath(details, scratch_pool)); return append_moved_to_chain_description(description, move->next, result_pool, scratch_pool); } return description; } else { const char *description = apr_psprintf(result_pool, _("Item switched from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\nwas " "replaced with a directory by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->deleted_rev); if (details->moves) { struct repos_move_info *move; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); description = apr_psprintf(result_pool, _("%s\nThe replaced item was moved to '^/%s'."), description, get_moved_to_repos_relpath(details, scratch_pool)); return append_moved_to_chain_description(description, move->next, result_pool, scratch_pool); } return description; } } else { if (victim_node_kind == svn_node_dir) { if (details->moves) { struct repos_move_info *move; const char *description; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); description = apr_psprintf(result_pool, _("Directory switched from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\n" "was moved to '^/%s' by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, get_moved_to_repos_relpath(details, scratch_pool), details->rev_author, details->deleted_rev); return append_moved_to_chain_description(description, move->next, result_pool, scratch_pool); } else return apr_psprintf(result_pool, _("Directory switched from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\n" "was deleted by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->deleted_rev); } else if (victim_node_kind == svn_node_file || victim_node_kind == svn_node_symlink) { if (details->moves) { struct repos_move_info *move; const char *description; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); description = apr_psprintf(result_pool, _("File switched from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\nwas " "moved to '^/%s' by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, get_moved_to_repos_relpath(details, scratch_pool), details->rev_author, details->deleted_rev); return append_moved_to_chain_description(description, move->next, result_pool, scratch_pool); } else return apr_psprintf(result_pool, _("File switched from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\nwas " "deleted by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->deleted_rev); } else { if (details->moves) { struct repos_move_info *move; const char *description; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); description = apr_psprintf(result_pool, _("Item switched from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\nwas " "moved to '^/%s' by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, get_moved_to_repos_relpath(details, scratch_pool), details->rev_author, details->deleted_rev); return append_moved_to_chain_description(description, move->next, result_pool, scratch_pool); } else return apr_psprintf(result_pool, _("Item switched from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\nwas " "deleted by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->deleted_rev); } } } static const char * describe_incoming_reverse_addition_upon_switch( struct conflict_tree_incoming_delete_details *details, svn_node_kind_t victim_node_kind, const char *old_repos_relpath, svn_revnum_t old_rev, const char *new_repos_relpath, svn_revnum_t new_rev, apr_pool_t *result_pool) { if (details->replacing_node_kind == svn_node_file || details->replacing_node_kind == svn_node_symlink) { if (victim_node_kind == svn_node_dir) return apr_psprintf(result_pool, _("Directory switched from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\n" "was a file before the replacement made by %s " "in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->added_rev); else if (victim_node_kind == svn_node_file || victim_node_kind == svn_node_symlink) return apr_psprintf(result_pool, _("File switched from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\nwas a " "file from another line of history before the " "replacement made by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->added_rev); else return apr_psprintf(result_pool, _("Item switched from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\nwas " "replaced with a file by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->added_rev); } else if (details->replacing_node_kind == svn_node_dir) { if (victim_node_kind == svn_node_dir) return apr_psprintf(result_pool, _("Directory switched from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\n" "was a directory from another line of history " "before the replacement made by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->added_rev); else if (victim_node_kind == svn_node_file || victim_node_kind == svn_node_symlink) return apr_psprintf(result_pool, _("Directory switched from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\n" "was a file before the replacement made by %s " "in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->added_rev); else return apr_psprintf(result_pool, _("Item switched from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\nwas " "replaced with a directory by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->added_rev); } else { if (victim_node_kind == svn_node_dir) return apr_psprintf(result_pool, _("Directory switched from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\n" "did not exist before it was added by %s in " "r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->added_rev); else if (victim_node_kind == svn_node_file || victim_node_kind == svn_node_symlink) return apr_psprintf(result_pool, _("File switched from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\ndid " "not exist before it was added by %s in " "r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->added_rev); else return apr_psprintf(result_pool, _("Item switched from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\ndid " "not exist before it was added by %s in " "r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->added_rev); } } static const char * describe_incoming_deletion_upon_merge( struct conflict_tree_incoming_delete_details *details, svn_node_kind_t victim_node_kind, const char *old_repos_relpath, svn_revnum_t old_rev, const char *new_repos_relpath, svn_revnum_t new_rev, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { if (details->replacing_node_kind == svn_node_file || details->replacing_node_kind == svn_node_symlink) { if (victim_node_kind == svn_node_dir) { const char *description = apr_psprintf(result_pool, _("Directory merged from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\n" "was replaced with a file by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->deleted_rev); if (details->moves) { struct repos_move_info *move; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); description = apr_psprintf(result_pool, _("%s\nThe replaced directory was moved to " "'^/%s'."), description, get_moved_to_repos_relpath(details, scratch_pool)); return append_moved_to_chain_description(description, move->next, result_pool, scratch_pool); } return description; } else if (victim_node_kind == svn_node_file || victim_node_kind == svn_node_symlink) { const char *description = apr_psprintf(result_pool, _("File merged from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\nwas " "replaced with a file from another line of " "history by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->deleted_rev); if (details->moves) { struct repos_move_info *move; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); description = apr_psprintf(result_pool, _("%s\nThe replaced file was moved to '^/%s'."), description, get_moved_to_repos_relpath(details, scratch_pool)); return append_moved_to_chain_description(description, move->next, result_pool, scratch_pool); } return description; } else return apr_psprintf(result_pool, _("Item merged from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\nwas " "replaced with a file by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->deleted_rev); } else if (details->replacing_node_kind == svn_node_dir) { if (victim_node_kind == svn_node_dir) { const char *description = apr_psprintf(result_pool, _("Directory merged from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\n" "was replaced with a directory from another " "line of history by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->deleted_rev); if (details->moves) { struct repos_move_info *move; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); description = apr_psprintf(result_pool, _("%s\nThe replaced directory was moved to " "'^/%s'."), description, get_moved_to_repos_relpath(details, scratch_pool)); return append_moved_to_chain_description(description, move->next, result_pool, scratch_pool); } return description; } else if (victim_node_kind == svn_node_file || victim_node_kind == svn_node_symlink) { const char *description = apr_psprintf(result_pool, _("File merged from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\n" "was replaced with a directory by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->deleted_rev); if (details->moves) { struct repos_move_info *move; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); description = apr_psprintf(result_pool, _("%s\nThe replaced file was moved to '^/%s'."), description, get_moved_to_repos_relpath(details, scratch_pool)); return append_moved_to_chain_description(description, move->next, result_pool, scratch_pool); } return description; } else { const char *description = apr_psprintf(result_pool, _("Item merged from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\nwas " "replaced with a directory by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->deleted_rev); if (details->moves) { struct repos_move_info *move; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); description = apr_psprintf(result_pool, _("%s\nThe replaced item was moved to '^/%s'."), description, get_moved_to_repos_relpath(details, scratch_pool)); return append_moved_to_chain_description(description, move->next, result_pool, scratch_pool); } return description; } } else { if (victim_node_kind == svn_node_dir) { if (details->moves) { struct repos_move_info *move; const char *description; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); description = apr_psprintf(result_pool, _("Directory merged from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\nwas " "moved to '^/%s' by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, get_moved_to_repos_relpath(details, scratch_pool), details->rev_author, details->deleted_rev); return append_moved_to_chain_description(description, move->next, result_pool, scratch_pool); } else return apr_psprintf(result_pool, _("Directory merged from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\nwas " "deleted by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->deleted_rev); } else if (victim_node_kind == svn_node_file || victim_node_kind == svn_node_symlink) { if (details->moves) { struct repos_move_info *move; const char *description; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); description = apr_psprintf(result_pool, _("File merged from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\nwas " "moved to '^/%s' by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, get_moved_to_repos_relpath(details, scratch_pool), details->rev_author, details->deleted_rev); return append_moved_to_chain_description(description, move->next, result_pool, scratch_pool); } else return apr_psprintf(result_pool, _("File merged from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\nwas " "deleted by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->deleted_rev); } else { if (details->moves) { struct repos_move_info *move; const char *description; move = APR_ARRAY_IDX(details->moves, 0, struct repos_move_info *); description = apr_psprintf(result_pool, _("Item merged from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\nwas " "moved to '^/%s' by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, get_moved_to_repos_relpath(details, scratch_pool), details->rev_author, details->deleted_rev); return append_moved_to_chain_description(description, move->next, result_pool, scratch_pool); } else return apr_psprintf(result_pool, _("Item merged from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\nwas " "deleted by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->deleted_rev); } } } static const char * describe_incoming_reverse_addition_upon_merge( struct conflict_tree_incoming_delete_details *details, svn_node_kind_t victim_node_kind, const char *old_repos_relpath, svn_revnum_t old_rev, const char *new_repos_relpath, svn_revnum_t new_rev, apr_pool_t *result_pool) { if (details->replacing_node_kind == svn_node_file || details->replacing_node_kind == svn_node_symlink) { if (victim_node_kind == svn_node_dir) return apr_psprintf(result_pool, _("Directory reverse-merged from\n'^/%s@%ld'\nto " "^/%s@%ld was a file before the replacement " "made by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->added_rev); else if (victim_node_kind == svn_node_file || victim_node_kind == svn_node_symlink) return apr_psprintf(result_pool, _("File reverse-merged from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\n" "was a file from another line of history before " "the replacement made by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->added_rev); else return apr_psprintf(result_pool, _("Item reverse-merged from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\n" "was replaced with a file by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->added_rev); } else if (details->replacing_node_kind == svn_node_dir) { if (victim_node_kind == svn_node_dir) return apr_psprintf(result_pool, _("Directory reverse-merged from\n'^/%s@%ld'\nto " "^/%s@%ld was a directory from another line " "of history before the replacement made by %s " "in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->added_rev); else if (victim_node_kind == svn_node_file || victim_node_kind == svn_node_symlink) return apr_psprintf(result_pool, _("Directory reverse-merged from\n'^/%s@%ld'\nto " "^/%s@%ld was a file before the replacement " "made by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->added_rev); else return apr_psprintf(result_pool, _("Item reverse-merged from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\n" "was replaced with a directory by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->added_rev); } else { if (victim_node_kind == svn_node_dir) return apr_psprintf(result_pool, _("Directory reverse-merged from\n'^/%s@%ld'\nto " "^/%s@%ld did not exist before it was added " "by %s in r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->added_rev); else if (victim_node_kind == svn_node_file || victim_node_kind == svn_node_symlink) return apr_psprintf(result_pool, _("File reverse-merged from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\n" "did not exist before it was added by %s in " "r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->added_rev); else return apr_psprintf(result_pool, _("Item reverse-merged from\n" "'^/%s@%ld'\nto\n'^/%s@%ld'\n" "did not exist before it was added by %s in " "r%ld."), old_repos_relpath, old_rev, new_repos_relpath, new_rev, details->rev_author, details->added_rev); } } /* Implements tree_conflict_get_description_func_t. */ static svn_error_t * conflict_tree_get_description_incoming_delete( const char **incoming_change_description, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { const char *action; svn_node_kind_t victim_node_kind; svn_wc_operation_t conflict_operation; const char *old_repos_relpath; svn_revnum_t old_rev; const char *new_repos_relpath; svn_revnum_t new_rev; struct conflict_tree_incoming_delete_details *details; if (conflict->tree_conflict_incoming_details == NULL) return svn_error_trace(conflict_tree_get_incoming_description_generic( incoming_change_description, conflict, ctx, result_pool, scratch_pool)); conflict_operation = svn_client_conflict_get_operation(conflict); victim_node_kind = svn_client_conflict_tree_get_victim_node_kind(conflict); SVN_ERR(svn_client_conflict_get_incoming_old_repos_location( &old_repos_relpath, &old_rev, NULL, conflict, scratch_pool, scratch_pool)); SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( &new_repos_relpath, &new_rev, NULL, conflict, scratch_pool, scratch_pool)); details = conflict->tree_conflict_incoming_details; if (conflict_operation == svn_wc_operation_update) { if (details->deleted_rev != SVN_INVALID_REVNUM) { action = describe_incoming_deletion_upon_update(details, victim_node_kind, old_rev, new_rev, result_pool, scratch_pool); } else /* details->added_rev != SVN_INVALID_REVNUM */ { /* This deletion is really the reverse change of an addition. */ action = describe_incoming_reverse_addition_upon_update( details, victim_node_kind, old_rev, new_rev, result_pool); } } else if (conflict_operation == svn_wc_operation_switch) { if (details->deleted_rev != SVN_INVALID_REVNUM) { action = describe_incoming_deletion_upon_switch(details, victim_node_kind, old_repos_relpath, old_rev, new_repos_relpath, new_rev, result_pool, scratch_pool); } else /* details->added_rev != SVN_INVALID_REVNUM */ { /* This deletion is really the reverse change of an addition. */ action = describe_incoming_reverse_addition_upon_switch( details, victim_node_kind, old_repos_relpath, old_rev, new_repos_relpath, new_rev, result_pool); } } else if (conflict_operation == svn_wc_operation_merge) { if (details->deleted_rev != SVN_INVALID_REVNUM) { action = describe_incoming_deletion_upon_merge(details, victim_node_kind, old_repos_relpath, old_rev, new_repos_relpath, new_rev, result_pool, scratch_pool); } else /* details->added_rev != SVN_INVALID_REVNUM */ { /* This deletion is really the reverse change of an addition. */ action = describe_incoming_reverse_addition_upon_merge( details, victim_node_kind, old_repos_relpath, old_rev, new_repos_relpath, new_rev, result_pool); } } *incoming_change_description = apr_pstrdup(result_pool, action); return SVN_NO_ERROR; } /* Baton for find_added_rev(). */ struct find_added_rev_baton { const char *victim_abspath; svn_client_ctx_t *ctx; svn_revnum_t added_rev; const char *repos_relpath; const char *parent_repos_relpath; apr_pool_t *pool; }; /* Implements svn_location_segment_receiver_t. * Finds the revision in which a node was added by tracing 'start' * revisions in location segments reported for the node. * If the PARENT_REPOS_RELPATH in the baton is not NULL, only consider * segments in which the node existed somwhere beneath this path. */ static svn_error_t * find_added_rev(svn_location_segment_t *segment, void *baton, apr_pool_t *scratch_pool) { struct find_added_rev_baton *b = baton; if (b->ctx->notify_func2) { svn_wc_notify_t *notify; notify = svn_wc_create_notify( b->victim_abspath, svn_wc_notify_tree_conflict_details_progress, scratch_pool), notify->revision = segment->range_start; b->ctx->notify_func2(b->ctx->notify_baton2, notify, scratch_pool); } if (segment->path) /* not interested in gaps */ { if (b->parent_repos_relpath == NULL || svn_relpath_skip_ancestor(b->parent_repos_relpath, segment->path) != NULL) { b->added_rev = segment->range_start; b->repos_relpath = apr_pstrdup(b->pool, segment->path); } } return SVN_NO_ERROR; } /* Find conflict details in the case where a revision which added a node was * applied in reverse, resulting in an incoming deletion. */ static svn_error_t * get_incoming_delete_details_for_reverse_addition( struct conflict_tree_incoming_delete_details **details, const char *repos_root_url, const char *old_repos_relpath, svn_revnum_t old_rev, svn_revnum_t new_rev, svn_client_ctx_t *ctx, const char *victim_abspath, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { svn_ra_session_t *ra_session; const char *url; const char *corrected_url; svn_string_t *author_revprop; struct find_added_rev_baton b = { 0 }; url = svn_path_url_add_component2(repos_root_url, old_repos_relpath, scratch_pool); SVN_ERR(svn_client__open_ra_session_internal(&ra_session, &corrected_url, url, NULL, NULL, FALSE, FALSE, ctx, scratch_pool, scratch_pool)); *details = apr_pcalloc(result_pool, sizeof(**details)); b.ctx = ctx; b.victim_abspath = victim_abspath; b.added_rev = SVN_INVALID_REVNUM; b.repos_relpath = NULL; b.parent_repos_relpath = NULL; b.pool = scratch_pool; /* Figure out when this node was added. */ SVN_ERR(svn_ra_get_location_segments(ra_session, "", old_rev, old_rev, new_rev, find_added_rev, &b, scratch_pool)); SVN_ERR(svn_ra_rev_prop(ra_session, b.added_rev, SVN_PROP_REVISION_AUTHOR, &author_revprop, scratch_pool)); (*details)->deleted_rev = SVN_INVALID_REVNUM; (*details)->added_rev = b.added_rev; (*details)->repos_relpath = apr_pstrdup(result_pool, b.repos_relpath); if (author_revprop) (*details)->rev_author = apr_pstrdup(result_pool, author_revprop->data); else (*details)->rev_author = _("unknown author"); /* Check for replacement. */ (*details)->replacing_node_kind = svn_node_none; if ((*details)->added_rev > 0) { svn_node_kind_t replaced_node_kind; SVN_ERR(svn_ra_check_path(ra_session, "", rev_below((*details)->added_rev), &replaced_node_kind, scratch_pool)); if (replaced_node_kind != svn_node_none) SVN_ERR(svn_ra_check_path(ra_session, "", (*details)->added_rev, &(*details)->replacing_node_kind, scratch_pool)); } return SVN_NO_ERROR; } /* Follow each move chain starting a MOVE all the way to the end to find * the possible working copy locations for VICTIM_ABSPATH which corresponds * to VICTIM_REPOS_REPLATH@VICTIM_REVISION. * Add each such location to the WC_MOVE_TARGETS hash table, keyed on the * repos_relpath which is the corresponding move destination in the repository. * This function is recursive. */ static svn_error_t * follow_move_chains(apr_hash_t *wc_move_targets, struct repos_move_info *move, svn_client_ctx_t *ctx, const char *victim_abspath, svn_node_kind_t victim_node_kind, const char *victim_repos_relpath, svn_revnum_t victim_revision, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { /* If this is the end of a move chain, look for matching paths in * the working copy and add them to our collection if found. */ if (move->next == NULL) { apr_array_header_t *candidate_abspaths; /* Gather candidate nodes which represent this moved_to_repos_relpath. */ SVN_ERR(svn_wc__guess_incoming_move_target_nodes( &candidate_abspaths, ctx->wc_ctx, victim_abspath, victim_node_kind, move->moved_to_repos_relpath, scratch_pool, scratch_pool)); if (candidate_abspaths->nelts > 0) { apr_array_header_t *moved_to_abspaths; int i; apr_pool_t *iterpool = svn_pool_create(scratch_pool); moved_to_abspaths = apr_array_make(result_pool, 1, sizeof (const char *)); for (i = 0; i < candidate_abspaths->nelts; i++) { const char *candidate_abspath; const char *repos_root_url; const char *repos_uuid; const char *candidate_repos_relpath; svn_revnum_t candidate_revision; svn_pool_clear(iterpool); candidate_abspath = APR_ARRAY_IDX(candidate_abspaths, i, const char *); SVN_ERR(svn_wc__node_get_origin(NULL, &candidate_revision, &candidate_repos_relpath, &repos_root_url, &repos_uuid, NULL, NULL, ctx->wc_ctx, candidate_abspath, FALSE, iterpool, iterpool)); if (candidate_revision == SVN_INVALID_REVNUM) continue; /* If the conflict victim and the move target candidate * are not from the same revision we must ensure that * they are related. */ if (candidate_revision != victim_revision) { svn_client__pathrev_t *yca_loc; svn_error_t *err; err = find_yca(&yca_loc, victim_repos_relpath, victim_revision, candidate_repos_relpath, candidate_revision, repos_root_url, repos_uuid, NULL, ctx, iterpool, iterpool); if (err) { if (err->apr_err == SVN_ERR_FS_NOT_FOUND) { svn_error_clear(err); yca_loc = NULL; } else return svn_error_trace(err); } if (yca_loc == NULL) continue; } APR_ARRAY_PUSH(moved_to_abspaths, const char *) = apr_pstrdup(result_pool, candidate_abspath); } svn_pool_destroy(iterpool); svn_hash_sets(wc_move_targets, move->moved_to_repos_relpath, moved_to_abspaths); } } else { int i; apr_pool_t *iterpool; /* Recurse into each of the possible move chains. */ iterpool = svn_pool_create(scratch_pool); for (i = 0; i < move->next->nelts; i++) { struct repos_move_info *next_move; svn_pool_clear(iterpool); next_move = APR_ARRAY_IDX(move->next, i, struct repos_move_info *); SVN_ERR(follow_move_chains(wc_move_targets, next_move, ctx, victim_abspath, victim_node_kind, victim_repos_relpath, victim_revision, result_pool, iterpool)); } svn_pool_destroy(iterpool); } return SVN_NO_ERROR; } static svn_error_t * init_wc_move_targets(struct conflict_tree_incoming_delete_details *details, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { int i; const char *victim_abspath; svn_node_kind_t victim_node_kind; const char *incoming_new_repos_relpath; svn_revnum_t incoming_new_pegrev; svn_wc_operation_t operation; victim_abspath = svn_client_conflict_get_local_abspath(conflict); victim_node_kind = svn_client_conflict_tree_get_victim_node_kind(conflict); operation = svn_client_conflict_get_operation(conflict); /* ### Should we get the old location in case of reverse-merges? */ SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( &incoming_new_repos_relpath, &incoming_new_pegrev, NULL, conflict, scratch_pool, scratch_pool)); details->wc_move_targets = apr_hash_make(conflict->pool); for (i = 0; i < details->moves->nelts; i++) { struct repos_move_info *move; move = APR_ARRAY_IDX(details->moves, i, struct repos_move_info *); SVN_ERR(follow_move_chains(details->wc_move_targets, move, ctx, victim_abspath, victim_node_kind, incoming_new_repos_relpath, incoming_new_pegrev, conflict->pool, scratch_pool)); } /* Initialize to the first possible move target. Hopefully, * in most cases there will only be one candidate anyway. */ details->move_target_repos_relpath = get_moved_to_repos_relpath(details, scratch_pool); details->wc_move_target_idx = 0; /* If only one move target exists after an update or switch, * recommend a resolution option which follows the incoming move. */ if (apr_hash_count(details->wc_move_targets) == 1 && (operation == svn_wc_operation_update || operation == svn_wc_operation_switch)) { apr_array_header_t *wc_abspaths; wc_abspaths = svn_hash_gets(details->wc_move_targets, details->move_target_repos_relpath); if (wc_abspaths->nelts == 1) { svn_client_conflict_option_id_t recommended[] = { /* Only one of these will be present for any given conflict. */ svn_client_conflict_option_incoming_move_file_text_merge, svn_client_conflict_option_incoming_move_dir_merge, svn_client_conflict_option_local_move_file_text_merge }; apr_array_header_t *options; SVN_ERR(svn_client_conflict_tree_get_resolution_options( &options, conflict, ctx, scratch_pool, scratch_pool)); for (i = 0; i < (sizeof(recommended) / sizeof(recommended[0])); i++) { svn_client_conflict_option_id_t option_id = recommended[i]; if (svn_client_conflict_option_find_by_id(options, option_id)) { conflict->recommended_option_id = option_id; break; } } } } return SVN_NO_ERROR; } /* Implements tree_conflict_get_details_func_t. * Find the revision in which the victim was deleted in the repository. */ static svn_error_t * conflict_tree_get_details_incoming_delete(svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { const char *old_repos_relpath; const char *new_repos_relpath; const char *repos_root_url; svn_revnum_t old_rev; svn_revnum_t new_rev; svn_node_kind_t old_kind; svn_node_kind_t new_kind; struct conflict_tree_incoming_delete_details *details; svn_wc_operation_t operation; SVN_ERR(svn_client_conflict_get_incoming_old_repos_location( &old_repos_relpath, &old_rev, &old_kind, conflict, scratch_pool, scratch_pool)); SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( &new_repos_relpath, &new_rev, &new_kind, conflict, scratch_pool, scratch_pool)); SVN_ERR(svn_client_conflict_get_repos_info(&repos_root_url, NULL, conflict, scratch_pool, scratch_pool)); operation = svn_client_conflict_get_operation(conflict); if (operation == svn_wc_operation_update) { if (old_rev < new_rev) { const char *parent_repos_relpath; svn_revnum_t parent_peg_rev; svn_revnum_t deleted_rev; const char *deleted_rev_author; svn_node_kind_t replacing_node_kind; apr_array_header_t *moves; const char *related_repos_relpath; svn_revnum_t related_peg_rev; /* The update operation went forward in history. */ SVN_ERR(svn_wc__node_get_repos_info(&parent_peg_rev, &parent_repos_relpath, NULL, NULL, ctx->wc_ctx, svn_dirent_dirname( conflict->local_abspath, scratch_pool), scratch_pool, scratch_pool)); if (new_kind == svn_node_none) { SVN_ERR(find_related_node(&related_repos_relpath, &related_peg_rev, new_repos_relpath, new_rev, old_repos_relpath, old_rev, conflict, ctx, scratch_pool, scratch_pool)); } else { /* related to self */ related_repos_relpath = NULL; related_peg_rev = SVN_INVALID_REVNUM; } SVN_ERR(find_revision_for_suspected_deletion( &deleted_rev, &deleted_rev_author, &replacing_node_kind, &moves, conflict, svn_dirent_basename(conflict->local_abspath, scratch_pool), parent_repos_relpath, parent_peg_rev, new_kind == svn_node_none ? 0 : old_rev, related_repos_relpath, related_peg_rev, ctx, conflict->pool, scratch_pool)); if (deleted_rev == SVN_INVALID_REVNUM) { /* We could not determine the revision in which the node was * deleted. We cannot provide the required details so the best * we can do is fall back to the default description. */ return SVN_NO_ERROR; } details = apr_pcalloc(conflict->pool, sizeof(*details)); details->deleted_rev = deleted_rev; details->added_rev = SVN_INVALID_REVNUM; details->repos_relpath = apr_pstrdup(conflict->pool, new_repos_relpath); details->rev_author = deleted_rev_author; details->replacing_node_kind = replacing_node_kind; details->moves = moves; } else /* new_rev < old_rev */ { /* The update operation went backwards in history. * Figure out when this node was added. */ SVN_ERR(get_incoming_delete_details_for_reverse_addition( &details, repos_root_url, old_repos_relpath, old_rev, new_rev, ctx, svn_client_conflict_get_local_abspath(conflict), conflict->pool, scratch_pool)); } } else if (operation == svn_wc_operation_switch || operation == svn_wc_operation_merge) { if (old_rev < new_rev) { svn_revnum_t deleted_rev; const char *deleted_rev_author; svn_node_kind_t replacing_node_kind; apr_array_header_t *moves; /* The switch/merge operation went forward in history. * * The deletion of the node happened on the branch we switched to * or merged from. Scan new_repos_relpath's parent's log to find * the revision which deleted the node. */ SVN_ERR(find_revision_for_suspected_deletion( &deleted_rev, &deleted_rev_author, &replacing_node_kind, &moves, conflict, svn_relpath_basename(new_repos_relpath, scratch_pool), svn_relpath_dirname(new_repos_relpath, scratch_pool), new_rev, old_rev, old_repos_relpath, old_rev, ctx, conflict->pool, scratch_pool)); if (deleted_rev == SVN_INVALID_REVNUM) { /* We could not determine the revision in which the node was * deleted. We cannot provide the required details so the best * we can do is fall back to the default description. */ return SVN_NO_ERROR; } details = apr_pcalloc(conflict->pool, sizeof(*details)); details->deleted_rev = deleted_rev; details->added_rev = SVN_INVALID_REVNUM; details->repos_relpath = apr_pstrdup(conflict->pool, new_repos_relpath); details->rev_author = apr_pstrdup(conflict->pool, deleted_rev_author); details->replacing_node_kind = replacing_node_kind; details->moves = moves; } else /* new_rev < old_rev */ { /* The switch/merge operation went backwards in history. * Figure out when the node we switched away from, or merged * from another branch, was added. */ SVN_ERR(get_incoming_delete_details_for_reverse_addition( &details, repos_root_url, old_repos_relpath, old_rev, new_rev, ctx, svn_client_conflict_get_local_abspath(conflict), conflict->pool, scratch_pool)); } } else { details = NULL; } conflict->tree_conflict_incoming_details = details; if (details && details->moves) SVN_ERR(init_wc_move_targets(details, conflict, ctx, scratch_pool)); return SVN_NO_ERROR; } /* Details for tree conflicts involving incoming additions. */ struct conflict_tree_incoming_add_details { /* If not SVN_INVALID_REVNUM, the node was added in ADDED_REV. */ svn_revnum_t added_rev; /* If not SVN_INVALID_REVNUM, the node was deleted in DELETED_REV. * Note that both ADDED_REV and DELETED_REV may be valid for update/switch. * See comment in conflict_tree_get_details_incoming_add() for details. */ svn_revnum_t deleted_rev; /* The path which was added/deleted relative to the repository root. */ const char *repos_relpath; /* Authors who committed ADDED_REV/DELETED_REV. */ const char *added_rev_author; const char *deleted_rev_author; /* Move information. If not NULL, this is an array of repos_move_info * * elements. Each element is the head of a move chain which starts in * ADDED_REV or in DELETED_REV (in which case moves should be interpreted * in reverse). */ apr_array_header_t *moves; }; /* Implements tree_conflict_get_details_func_t. * Find the revision in which the victim was added in the repository. */ static svn_error_t * conflict_tree_get_details_incoming_add(svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { const char *old_repos_relpath; const char *new_repos_relpath; const char *repos_root_url; svn_revnum_t old_rev; svn_revnum_t new_rev; struct conflict_tree_incoming_add_details *details; svn_wc_operation_t operation; SVN_ERR(svn_client_conflict_get_incoming_old_repos_location( &old_repos_relpath, &old_rev, NULL, conflict, scratch_pool, scratch_pool)); SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( &new_repos_relpath, &new_rev, NULL, conflict, scratch_pool, scratch_pool)); SVN_ERR(svn_client_conflict_get_repos_info(&repos_root_url, NULL, conflict, scratch_pool, scratch_pool)); operation = svn_client_conflict_get_operation(conflict); if (operation == svn_wc_operation_update || operation == svn_wc_operation_switch) { /* Only the new repository location is recorded for the node which * caused an incoming addition. There is no pre-update/pre-switch * revision to be recorded for the node since it does not exist in * the repository at that revision. * The implication is that we cannot know whether the operation went * forward or backwards in history. So always try to find an added * and a deleted revision for the node. Users must figure out by whether * the addition or deletion caused the conflict. */ const char *url; const char *corrected_url; svn_string_t *author_revprop; struct find_added_rev_baton b = { 0 }; svn_ra_session_t *ra_session; svn_revnum_t deleted_rev; svn_revnum_t head_rev; url = svn_path_url_add_component2(repos_root_url, new_repos_relpath, scratch_pool); SVN_ERR(svn_client__open_ra_session_internal(&ra_session, &corrected_url, url, NULL, NULL, FALSE, FALSE, ctx, scratch_pool, scratch_pool)); details = apr_pcalloc(conflict->pool, sizeof(*details)); b.ctx = ctx, b.victim_abspath = svn_client_conflict_get_local_abspath(conflict), b.added_rev = SVN_INVALID_REVNUM; b.repos_relpath = NULL; b.parent_repos_relpath = NULL; b.pool = scratch_pool; /* Figure out when this node was added. */ SVN_ERR(svn_ra_get_location_segments(ra_session, "", new_rev, new_rev, SVN_INVALID_REVNUM, find_added_rev, &b, scratch_pool)); SVN_ERR(svn_ra_rev_prop(ra_session, b.added_rev, SVN_PROP_REVISION_AUTHOR, &author_revprop, scratch_pool)); details->repos_relpath = apr_pstrdup(conflict->pool, b.repos_relpath); details->added_rev = b.added_rev; if (author_revprop) details->added_rev_author = apr_pstrdup(conflict->pool, author_revprop->data); else details->added_rev_author = _("unknown author"); details->deleted_rev = SVN_INVALID_REVNUM; details->deleted_rev_author = NULL; /* Figure out whether this node was deleted later. * ### Could probably optimize by infering both addition and deletion * ### from svn_ra_get_location_segments() call above. */ SVN_ERR(svn_ra_get_latest_revnum(ra_session, &head_rev, scratch_pool)); if (new_rev < head_rev) { SVN_ERR(svn_ra_get_deleted_rev(ra_session, "", new_rev, head_rev, &deleted_rev, scratch_pool)); if (SVN_IS_VALID_REVNUM(deleted_rev)) { SVN_ERR(svn_ra_rev_prop(ra_session, deleted_rev, SVN_PROP_REVISION_AUTHOR, &author_revprop, scratch_pool)); details->deleted_rev = deleted_rev; if (author_revprop) details->deleted_rev_author = apr_pstrdup(conflict->pool, author_revprop->data); else details->deleted_rev_author = _("unknown author"); } } } else if (operation == svn_wc_operation_merge) { if (old_rev < new_rev) { /* The merge operation went forwards in history. * The addition of the node happened on the branch we merged form. * Scan the nodes's history to find the revision which added it. */ const char *url; const char *corrected_url; svn_string_t *author_revprop; struct find_added_rev_baton b = { 0 }; svn_ra_session_t *ra_session; url = svn_path_url_add_component2(repos_root_url, new_repos_relpath, scratch_pool); SVN_ERR(svn_client__open_ra_session_internal(&ra_session, &corrected_url, url, NULL, NULL, FALSE, FALSE, ctx, scratch_pool, scratch_pool)); details = apr_pcalloc(conflict->pool, sizeof(*details)); b.victim_abspath = svn_client_conflict_get_local_abspath(conflict); b.ctx = ctx; b.added_rev = SVN_INVALID_REVNUM; b.repos_relpath = NULL; b.parent_repos_relpath = NULL; b.pool = scratch_pool; /* Figure out when this node was added. */ SVN_ERR(svn_ra_get_location_segments(ra_session, "", new_rev, new_rev, old_rev, find_added_rev, &b, scratch_pool)); SVN_ERR(svn_ra_rev_prop(ra_session, b.added_rev, SVN_PROP_REVISION_AUTHOR, &author_revprop, scratch_pool)); details->repos_relpath = apr_pstrdup(conflict->pool, b.repos_relpath); details->added_rev = b.added_rev; if (author_revprop) details->added_rev_author = apr_pstrdup(conflict->pool, author_revprop->data); else details->added_rev_author = _("unknown author"); details->deleted_rev = SVN_INVALID_REVNUM; details->deleted_rev_author = NULL; } else { /* The merge operation was a reverse-merge. * This addition is in fact a deletion, applied in reverse, * which happened on the branch we merged from. * Find the revision which deleted the node. */ svn_revnum_t deleted_rev; const char *deleted_rev_author; svn_node_kind_t replacing_node_kind; apr_array_header_t *moves; SVN_ERR(find_revision_for_suspected_deletion( &deleted_rev, &deleted_rev_author, &replacing_node_kind, &moves, conflict, svn_relpath_basename(old_repos_relpath, scratch_pool), svn_relpath_dirname(old_repos_relpath, scratch_pool), old_rev, new_rev, NULL, SVN_INVALID_REVNUM, /* related to self */ ctx, conflict->pool, scratch_pool)); if (deleted_rev == SVN_INVALID_REVNUM) { /* We could not determine the revision in which the node was * deleted. We cannot provide the required details so the best * we can do is fall back to the default description. */ return SVN_NO_ERROR; } details = apr_pcalloc(conflict->pool, sizeof(*details)); details->repos_relpath = apr_pstrdup(conflict->pool, new_repos_relpath); details->deleted_rev = deleted_rev; details->deleted_rev_author = apr_pstrdup(conflict->pool, deleted_rev_author); details->added_rev = SVN_INVALID_REVNUM; details->added_rev_author = NULL; details->moves = moves; } } else { details = NULL; } conflict->tree_conflict_incoming_details = details; return SVN_NO_ERROR; } static const char * describe_incoming_add_upon_update( struct conflict_tree_incoming_add_details *details, svn_node_kind_t new_node_kind, svn_revnum_t new_rev, apr_pool_t *result_pool) { if (new_node_kind == svn_node_dir) { if (SVN_IS_VALID_REVNUM(details->added_rev) && SVN_IS_VALID_REVNUM(details->deleted_rev)) return apr_psprintf(result_pool, _("A new directory appeared during update to r%ld; " "it was added by %s in r%ld and later deleted " "by %s in r%ld."), new_rev, details->added_rev_author, details->added_rev, details->deleted_rev_author, details->deleted_rev); else if (SVN_IS_VALID_REVNUM(details->added_rev)) return apr_psprintf(result_pool, _("A new directory appeared during update to r%ld; " "it was added by %s in r%ld."), new_rev, details->added_rev_author, details->added_rev); else return apr_psprintf(result_pool, _("A new directory appeared during update to r%ld; " "it was deleted by %s in r%ld."), new_rev, details->deleted_rev_author, details->deleted_rev); } else if (new_node_kind == svn_node_file || new_node_kind == svn_node_symlink) { if (SVN_IS_VALID_REVNUM(details->added_rev) && SVN_IS_VALID_REVNUM(details->deleted_rev)) return apr_psprintf(result_pool, _("A new file appeared during update to r%ld; " "it was added by %s in r%ld and later deleted " "by %s in r%ld."), new_rev, details->added_rev_author, details->added_rev, details->deleted_rev_author, details->deleted_rev); else if (SVN_IS_VALID_REVNUM(details->added_rev)) return apr_psprintf(result_pool, _("A new file appeared during update to r%ld; " "it was added by %s in r%ld."), new_rev, details->added_rev_author, details->added_rev); else return apr_psprintf(result_pool, _("A new file appeared during update to r%ld; " "it was deleted by %s in r%ld."), new_rev, details->deleted_rev_author, details->deleted_rev); } else { if (SVN_IS_VALID_REVNUM(details->added_rev) && SVN_IS_VALID_REVNUM(details->deleted_rev)) return apr_psprintf(result_pool, _("A new item appeared during update to r%ld; " "it was added by %s in r%ld and later deleted " "by %s in r%ld."), new_rev, details->added_rev_author, details->added_rev, details->deleted_rev_author, details->deleted_rev); else if (SVN_IS_VALID_REVNUM(details->added_rev)) return apr_psprintf(result_pool, _("A new item appeared during update to r%ld; " "it was added by %s in r%ld."), new_rev, details->added_rev_author, details->added_rev); else return apr_psprintf(result_pool, _("A new item appeared during update to r%ld; " "it was deleted by %s in r%ld."), new_rev, details->deleted_rev_author, details->deleted_rev); } } static const char * describe_incoming_add_upon_switch( struct conflict_tree_incoming_add_details *details, svn_node_kind_t victim_node_kind, const char *new_repos_relpath, svn_revnum_t new_rev, apr_pool_t *result_pool) { if (victim_node_kind == svn_node_dir) { if (SVN_IS_VALID_REVNUM(details->added_rev) && SVN_IS_VALID_REVNUM(details->deleted_rev)) return apr_psprintf(result_pool, _("A new directory appeared during switch to\n" "'^/%s@%ld'.\n" "It was added by %s in r%ld and later deleted " "by %s in r%ld."), new_repos_relpath, new_rev, details->added_rev_author, details->added_rev, details->deleted_rev_author, details->deleted_rev); else if (SVN_IS_VALID_REVNUM(details->added_rev)) return apr_psprintf(result_pool, _("A new directory appeared during switch to\n" "'^/%s@%ld'.\nIt was added by %s in r%ld."), new_repos_relpath, new_rev, details->added_rev_author, details->added_rev); else return apr_psprintf(result_pool, _("A new directory appeared during switch to\n" "'^/%s@%ld'.\nIt was deleted by %s in r%ld."), new_repos_relpath, new_rev, details->deleted_rev_author, details->deleted_rev); } else if (victim_node_kind == svn_node_file || victim_node_kind == svn_node_symlink) { if (SVN_IS_VALID_REVNUM(details->added_rev) && SVN_IS_VALID_REVNUM(details->deleted_rev)) return apr_psprintf(result_pool, _("A new file appeared during switch to\n" "'^/%s@%ld'.\n" "It was added by %s in r%ld and later deleted " "by %s in r%ld."), new_repos_relpath, new_rev, details->added_rev_author, details->added_rev, details->deleted_rev_author, details->deleted_rev); else if (SVN_IS_VALID_REVNUM(details->added_rev)) return apr_psprintf(result_pool, _("A new file appeared during switch to\n" "'^/%s@%ld'.\n" "It was added by %s in r%ld."), new_repos_relpath, new_rev, details->added_rev_author, details->added_rev); else return apr_psprintf(result_pool, _("A new file appeared during switch to\n" "'^/%s@%ld'.\n" "It was deleted by %s in r%ld."), new_repos_relpath, new_rev, details->deleted_rev_author, details->deleted_rev); } else { if (SVN_IS_VALID_REVNUM(details->added_rev) && SVN_IS_VALID_REVNUM(details->deleted_rev)) return apr_psprintf(result_pool, _("A new item appeared during switch to\n" "'^/%s@%ld'.\n" "It was added by %s in r%ld and later deleted " "by %s in r%ld."), new_repos_relpath, new_rev, details->added_rev_author, details->added_rev, details->deleted_rev_author, details->deleted_rev); else if (SVN_IS_VALID_REVNUM(details->added_rev)) return apr_psprintf(result_pool, _("A new item appeared during switch to\n" "'^/%s@%ld'.\n" "It was added by %s in r%ld."), new_repos_relpath, new_rev, details->added_rev_author, details->added_rev); else return apr_psprintf(result_pool, _("A new item appeared during switch to\n" "'^/%s@%ld'.\n" "It was deleted by %s in r%ld."), new_repos_relpath, new_rev, details->deleted_rev_author, details->deleted_rev); } } static const char * describe_incoming_add_upon_merge( struct conflict_tree_incoming_add_details *details, svn_node_kind_t new_node_kind, svn_revnum_t old_rev, const char *new_repos_relpath, svn_revnum_t new_rev, apr_pool_t *result_pool) { if (new_node_kind == svn_node_dir) { if (old_rev + 1 == new_rev) return apr_psprintf(result_pool, _("A new directory appeared during merge of\n" "'^/%s:%ld'.\nIt was added by %s in r%ld."), new_repos_relpath, new_rev, details->added_rev_author, details->added_rev); else return apr_psprintf(result_pool, _("A new directory appeared during merge of\n" "'^/%s:%ld-%ld'.\nIt was added by %s in r%ld."), new_repos_relpath, old_rev + 1, new_rev, details->added_rev_author, details->added_rev); } else if (new_node_kind == svn_node_file || new_node_kind == svn_node_symlink) { if (old_rev + 1 == new_rev) return apr_psprintf(result_pool, _("A new file appeared during merge of\n" "'^/%s:%ld'.\nIt was added by %s in r%ld."), new_repos_relpath, new_rev, details->added_rev_author, details->added_rev); else return apr_psprintf(result_pool, _("A new file appeared during merge of\n" "'^/%s:%ld-%ld'.\nIt was added by %s in r%ld."), new_repos_relpath, old_rev + 1, new_rev, details->added_rev_author, details->added_rev); } else { if (old_rev + 1 == new_rev) return apr_psprintf(result_pool, _("A new item appeared during merge of\n" "'^/%s:%ld'.\nIt was added by %s in r%ld."), new_repos_relpath, new_rev, details->added_rev_author, details->added_rev); else return apr_psprintf(result_pool, _("A new item appeared during merge of\n" "'^/%s:%ld-%ld'.\nIt was added by %s in r%ld."), new_repos_relpath, old_rev + 1, new_rev, details->added_rev_author, details->added_rev); } } static const char * describe_incoming_reverse_deletion_upon_merge( struct conflict_tree_incoming_add_details *details, svn_node_kind_t new_node_kind, const char *old_repos_relpath, svn_revnum_t old_rev, svn_revnum_t new_rev, apr_pool_t *result_pool) { if (new_node_kind == svn_node_dir) { if (new_rev + 1 == old_rev) return apr_psprintf(result_pool, _("A new directory appeared during reverse-merge of" "\n'^/%s:%ld'.\nIt was deleted by %s in r%ld."), old_repos_relpath, old_rev, details->deleted_rev_author, details->deleted_rev); else return apr_psprintf(result_pool, _("A new directory appeared during reverse-merge " "of\n'^/%s:%ld-%ld'.\n" "It was deleted by %s in r%ld."), old_repos_relpath, new_rev, rev_below(old_rev), details->deleted_rev_author, details->deleted_rev); } else if (new_node_kind == svn_node_file || new_node_kind == svn_node_symlink) { if (new_rev + 1 == old_rev) return apr_psprintf(result_pool, _("A new file appeared during reverse-merge of\n" "'^/%s:%ld'.\nIt was deleted by %s in r%ld."), old_repos_relpath, old_rev, details->deleted_rev_author, details->deleted_rev); else return apr_psprintf(result_pool, _("A new file appeared during reverse-merge of\n" "'^/%s:%ld-%ld'.\nIt was deleted by %s in r%ld."), old_repos_relpath, new_rev + 1, old_rev, details->deleted_rev_author, details->deleted_rev); } else { if (new_rev + 1 == old_rev) return apr_psprintf(result_pool, _("A new item appeared during reverse-merge of\n" "'^/%s:%ld'.\nIt was deleted by %s in r%ld."), old_repos_relpath, old_rev, details->deleted_rev_author, details->deleted_rev); else return apr_psprintf(result_pool, _("A new item appeared during reverse-merge of\n" "'^/%s:%ld-%ld'.\nIt was deleted by %s in r%ld."), old_repos_relpath, new_rev + 1, old_rev, details->deleted_rev_author, details->deleted_rev); } } /* Implements tree_conflict_get_description_func_t. */ static svn_error_t * conflict_tree_get_description_incoming_add( const char **incoming_change_description, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { const char *action; svn_node_kind_t victim_node_kind; svn_wc_operation_t conflict_operation; const char *old_repos_relpath; svn_revnum_t old_rev; svn_node_kind_t old_node_kind; const char *new_repos_relpath; svn_revnum_t new_rev; svn_node_kind_t new_node_kind; struct conflict_tree_incoming_add_details *details; if (conflict->tree_conflict_incoming_details == NULL) return svn_error_trace(conflict_tree_get_incoming_description_generic( incoming_change_description, conflict, ctx, result_pool, scratch_pool)); conflict_operation = svn_client_conflict_get_operation(conflict); victim_node_kind = svn_client_conflict_tree_get_victim_node_kind(conflict); SVN_ERR(svn_client_conflict_get_incoming_old_repos_location( &old_repos_relpath, &old_rev, &old_node_kind, conflict, scratch_pool, scratch_pool)); SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( &new_repos_relpath, &new_rev, &new_node_kind, conflict, scratch_pool, scratch_pool)); details = conflict->tree_conflict_incoming_details; if (conflict_operation == svn_wc_operation_update) { action = describe_incoming_add_upon_update(details, new_node_kind, new_rev, result_pool); } else if (conflict_operation == svn_wc_operation_switch) { action = describe_incoming_add_upon_switch(details, victim_node_kind, new_repos_relpath, new_rev, result_pool); } else if (conflict_operation == svn_wc_operation_merge) { if (old_rev < new_rev) action = describe_incoming_add_upon_merge(details, new_node_kind, old_rev, new_repos_relpath, new_rev, result_pool); else action = describe_incoming_reverse_deletion_upon_merge( details, new_node_kind, old_repos_relpath, old_rev, new_rev, result_pool); } *incoming_change_description = apr_pstrdup(result_pool, action); return SVN_NO_ERROR; } /* Details for tree conflicts involving incoming edits. * Note that we store an array of these. Each element corresponds to a * revision within the old/new range in which a modification occured. */ struct conflict_tree_incoming_edit_details { /* The revision in which the edit ocurred. */ svn_revnum_t rev; /* The author of the revision. */ const char *author; /** Is the text modified? May be svn_tristate_unknown. */ svn_tristate_t text_modified; /** Are properties modified? May be svn_tristate_unknown. */ svn_tristate_t props_modified; /** For directories, are children modified? * May be svn_tristate_unknown. */ svn_tristate_t children_modified; /* The path which was edited, relative to the repository root. */ const char *repos_relpath; }; /* Baton for find_modified_rev(). */ struct find_modified_rev_baton { const char *victim_abspath; svn_client_ctx_t *ctx; apr_array_header_t *edits; const char *repos_relpath; svn_node_kind_t node_kind; apr_pool_t *result_pool; apr_pool_t *scratch_pool; }; /* Implements svn_log_entry_receiver_t. */ static svn_error_t * find_modified_rev(void *baton, svn_log_entry_t *log_entry, apr_pool_t *scratch_pool) { struct find_modified_rev_baton *b = baton; struct conflict_tree_incoming_edit_details *details = NULL; svn_string_t *author; apr_hash_index_t *hi; apr_pool_t *iterpool; if (b->ctx->notify_func2) { svn_wc_notify_t *notify; notify = svn_wc_create_notify( b->victim_abspath, svn_wc_notify_tree_conflict_details_progress, scratch_pool), notify->revision = log_entry->revision; b->ctx->notify_func2(b->ctx->notify_baton2, notify, scratch_pool); } /* No paths were changed in this revision. Nothing to do. */ if (! log_entry->changed_paths2) return SVN_NO_ERROR; details = apr_pcalloc(b->result_pool, sizeof(*details)); details->rev = log_entry->revision; author = svn_hash_gets(log_entry->revprops, SVN_PROP_REVISION_AUTHOR); if (author) details->author = apr_pstrdup(b->result_pool, author->data); else details->author = _("unknown author"); details->text_modified = svn_tristate_unknown; details->props_modified = svn_tristate_unknown; details->children_modified = svn_tristate_unknown; iterpool = svn_pool_create(scratch_pool); for (hi = apr_hash_first(scratch_pool, log_entry->changed_paths2); hi != NULL; hi = apr_hash_next(hi)) { void *val; const char *path; svn_log_changed_path2_t *log_item; svn_pool_clear(iterpool); apr_hash_this(hi, (void *) &path, NULL, &val); log_item = val; /* ### Remove leading slash from paths in log entries. */ if (path[0] == '/') path = svn_relpath_canonicalize(path, iterpool); if (svn_path_compare_paths(b->repos_relpath, path) == 0 && (log_item->action == 'M' || log_item->action == 'A')) { details->text_modified = log_item->text_modified; details->props_modified = log_item->props_modified; details->repos_relpath = apr_pstrdup(b->result_pool, path); if (log_item->copyfrom_path) b->repos_relpath = apr_pstrdup(b->scratch_pool, log_item->copyfrom_path); } else if (b->node_kind == svn_node_dir && svn_relpath_skip_ancestor(b->repos_relpath, path) != NULL) details->children_modified = svn_tristate_true; } if (b->node_kind == svn_node_dir && details->children_modified == svn_tristate_unknown) details->children_modified = svn_tristate_false; APR_ARRAY_PUSH(b->edits, struct conflict_tree_incoming_edit_details *) = details; svn_pool_destroy(iterpool); return SVN_NO_ERROR; } /* Implements tree_conflict_get_details_func_t. * Find one or more revisions in which the victim was modified in the * repository. */ static svn_error_t * conflict_tree_get_details_incoming_edit(svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { const char *old_repos_relpath; const char *new_repos_relpath; const char *repos_root_url; svn_revnum_t old_rev; svn_revnum_t new_rev; svn_node_kind_t old_node_kind; svn_node_kind_t new_node_kind; svn_wc_operation_t operation; const char *url; const char *corrected_url; svn_ra_session_t *ra_session; apr_array_header_t *paths; apr_array_header_t *revprops; struct find_modified_rev_baton b = { 0 }; SVN_ERR(svn_client_conflict_get_incoming_old_repos_location( &old_repos_relpath, &old_rev, &old_node_kind, conflict, scratch_pool, scratch_pool)); SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( &new_repos_relpath, &new_rev, &new_node_kind, conflict, scratch_pool, scratch_pool)); SVN_ERR(svn_client_conflict_get_repos_info(&repos_root_url, NULL, conflict, scratch_pool, scratch_pool)); operation = svn_client_conflict_get_operation(conflict); if (operation == svn_wc_operation_update) { b.node_kind = old_rev < new_rev ? new_node_kind : old_node_kind; /* If there is no node then we cannot find any edits. */ if (b.node_kind == svn_node_none) return SVN_NO_ERROR; url = svn_path_url_add_component2(repos_root_url, old_rev < new_rev ? new_repos_relpath : old_repos_relpath, scratch_pool); b.repos_relpath = old_rev < new_rev ? new_repos_relpath : old_repos_relpath; } else if (operation == svn_wc_operation_switch || operation == svn_wc_operation_merge) { url = svn_path_url_add_component2(repos_root_url, new_repos_relpath, scratch_pool); b.repos_relpath = new_repos_relpath; b.node_kind = new_node_kind; } SVN_ERR(svn_client__open_ra_session_internal(&ra_session, &corrected_url, url, NULL, NULL, FALSE, FALSE, ctx, scratch_pool, scratch_pool)); paths = apr_array_make(scratch_pool, 1, sizeof(const char *)); APR_ARRAY_PUSH(paths, const char *) = ""; revprops = apr_array_make(scratch_pool, 1, sizeof(const char *)); APR_ARRAY_PUSH(revprops, const char *) = SVN_PROP_REVISION_AUTHOR; b.ctx = ctx; b.victim_abspath = svn_client_conflict_get_local_abspath(conflict); b.result_pool = conflict->pool; b.scratch_pool = scratch_pool; b.edits = apr_array_make( conflict->pool, 0, sizeof(struct conflict_tree_incoming_edit_details *)); SVN_ERR(svn_ra_get_log2(ra_session, paths, old_rev < new_rev ? old_rev : new_rev, old_rev < new_rev ? new_rev : old_rev, 0, /* no limit */ TRUE, /* need the changed paths list */ FALSE, /* need to traverse copies */ FALSE, /* no need for merged revisions */ revprops, find_modified_rev, &b, scratch_pool)); conflict->tree_conflict_incoming_details = b.edits; return SVN_NO_ERROR; } static const char * describe_incoming_edit_upon_update(svn_revnum_t old_rev, svn_revnum_t new_rev, svn_node_kind_t old_node_kind, svn_node_kind_t new_node_kind, apr_pool_t *result_pool) { if (old_rev < new_rev) { if (new_node_kind == svn_node_dir) return apr_psprintf(result_pool, _("Changes destined for a directory arrived " "via the following revisions during update " "from r%ld to r%ld."), old_rev, new_rev); else if (new_node_kind == svn_node_file || new_node_kind == svn_node_symlink) return apr_psprintf(result_pool, _("Changes destined for a file arrived " "via the following revisions during update " "from r%ld to r%ld"), old_rev, new_rev); else return apr_psprintf(result_pool, _("Changes from the following revisions arrived " "during update from r%ld to r%ld"), old_rev, new_rev); } else { if (new_node_kind == svn_node_dir) return apr_psprintf(result_pool, _("Changes destined for a directory arrived " "via the following revisions during backwards " "update from r%ld to r%ld"), old_rev, new_rev); else if (new_node_kind == svn_node_file || new_node_kind == svn_node_symlink) return apr_psprintf(result_pool, _("Changes destined for a file arrived " "via the following revisions during backwards " "update from r%ld to r%ld"), old_rev, new_rev); else return apr_psprintf(result_pool, _("Changes from the following revisions arrived " "during backwards update from r%ld to r%ld"), old_rev, new_rev); } } static const char * describe_incoming_edit_upon_switch(const char *new_repos_relpath, svn_revnum_t new_rev, svn_node_kind_t new_node_kind, apr_pool_t *result_pool) { if (new_node_kind == svn_node_dir) return apr_psprintf(result_pool, _("Changes destined for a directory arrived via " "the following revisions during switch to\n" "'^/%s@r%ld'"), new_repos_relpath, new_rev); else if (new_node_kind == svn_node_file || new_node_kind == svn_node_symlink) return apr_psprintf(result_pool, _("Changes destined for a directory arrived via " "the following revisions during switch to\n" "'^/%s@r%ld'"), new_repos_relpath, new_rev); else return apr_psprintf(result_pool, _("Changes from the following revisions arrived " "during switch to\n'^/%s@r%ld'"), new_repos_relpath, new_rev); } /* Return a string showing the list of revisions in EDITS, ensuring * the string won't grow too large for display. */ static const char * describe_incoming_edit_list_modified_revs(apr_array_header_t *edits, apr_pool_t *result_pool) { int num_revs_to_skip; static const int min_revs_for_skipping = 5; static const int max_revs_to_display = 8; const char *s = ""; int i; if (edits->nelts <= max_revs_to_display) num_revs_to_skip = 0; else { /* Check if we should insert a placeholder for some revisions because * the string would grow too long for display otherwise. */ num_revs_to_skip = edits->nelts - max_revs_to_display; if (num_revs_to_skip < min_revs_for_skipping) { /* Don't bother with the placeholder. Just list all revisions. */ num_revs_to_skip = 0; } } for (i = 0; i < edits->nelts; i++) { struct conflict_tree_incoming_edit_details *details; details = APR_ARRAY_IDX(edits, i, struct conflict_tree_incoming_edit_details *); if (num_revs_to_skip > 0) { /* Insert a placeholder for revisions falling into the middle of * the range so we'll get something that looks like: * 1, 2, 3, 4, 5 [ placeholder ] 95, 96, 97, 98, 99 */ if (i < max_revs_to_display / 2) s = apr_psprintf(result_pool, _("%s r%ld by %s%s"), s, details->rev, details->author, i < edits->nelts - 1 ? "," : ""); else if (i >= max_revs_to_display / 2 && i < edits->nelts - (max_revs_to_display / 2)) continue; else { if (i == edits->nelts - (max_revs_to_display / 2)) s = apr_psprintf(result_pool, _("%s\n [%d revisions omitted for " "brevity],\n"), s, num_revs_to_skip); s = apr_psprintf(result_pool, _("%s r%ld by %s%s"), s, details->rev, details->author, i < edits->nelts - 1 ? "," : ""); } } else s = apr_psprintf(result_pool, _("%s r%ld by %s%s"), s, details->rev, details->author, i < edits->nelts - 1 ? "," : ""); } return s; } /* Implements tree_conflict_get_description_func_t. */ static svn_error_t * conflict_tree_get_description_incoming_edit( const char **incoming_change_description, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { const char *action; svn_wc_operation_t conflict_operation; const char *old_repos_relpath; svn_revnum_t old_rev; svn_node_kind_t old_node_kind; const char *new_repos_relpath; svn_revnum_t new_rev; svn_node_kind_t new_node_kind; apr_array_header_t *edits; if (conflict->tree_conflict_incoming_details == NULL) return svn_error_trace(conflict_tree_get_incoming_description_generic( incoming_change_description, conflict, ctx, result_pool, scratch_pool)); SVN_ERR(svn_client_conflict_get_incoming_old_repos_location( &old_repos_relpath, &old_rev, &old_node_kind, conflict, scratch_pool, scratch_pool)); SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( &new_repos_relpath, &new_rev, &new_node_kind, conflict, scratch_pool, scratch_pool)); conflict_operation = svn_client_conflict_get_operation(conflict); edits = conflict->tree_conflict_incoming_details; if (conflict_operation == svn_wc_operation_update) action = describe_incoming_edit_upon_update(old_rev, new_rev, old_node_kind, new_node_kind, scratch_pool); else if (conflict_operation == svn_wc_operation_switch) action = describe_incoming_edit_upon_switch(new_repos_relpath, new_rev, new_node_kind, scratch_pool); else if (conflict_operation == svn_wc_operation_merge) { /* Handle merge inline because it returns early sometimes. */ if (old_rev < new_rev) { if (old_rev + 1 == new_rev) { if (new_node_kind == svn_node_dir) action = apr_psprintf(scratch_pool, _("Changes destined for a directory " "arrived during merge of\n" "'^/%s:%ld'."), new_repos_relpath, new_rev); else if (new_node_kind == svn_node_file || new_node_kind == svn_node_symlink) action = apr_psprintf(scratch_pool, _("Changes destined for a file " "arrived during merge of\n" "'^/%s:%ld'."), new_repos_relpath, new_rev); else action = apr_psprintf(scratch_pool, _("Changes arrived during merge of\n" "'^/%s:%ld'."), new_repos_relpath, new_rev); *incoming_change_description = apr_pstrdup(result_pool, action); return SVN_NO_ERROR; } else { if (new_node_kind == svn_node_dir) action = apr_psprintf(scratch_pool, _("Changes destined for a directory " "arrived via the following revisions " "during merge of\n'^/%s:%ld-%ld'"), new_repos_relpath, old_rev + 1, new_rev); else if (new_node_kind == svn_node_file || new_node_kind == svn_node_symlink) action = apr_psprintf(scratch_pool, _("Changes destined for a file " "arrived via the following revisions " "during merge of\n'^/%s:%ld-%ld'"), new_repos_relpath, old_rev + 1, new_rev); else action = apr_psprintf(scratch_pool, _("Changes from the following revisions " "arrived during merge of\n" "'^/%s:%ld-%ld'"), new_repos_relpath, old_rev + 1, new_rev); } } else { if (new_rev + 1 == old_rev) { if (new_node_kind == svn_node_dir) action = apr_psprintf(scratch_pool, _("Changes destined for a directory " "arrived during reverse-merge of\n" "'^/%s:%ld'."), new_repos_relpath, old_rev); else if (new_node_kind == svn_node_file || new_node_kind == svn_node_symlink) action = apr_psprintf(scratch_pool, _("Changes destined for a file " "arrived during reverse-merge of\n" "'^/%s:%ld'."), new_repos_relpath, old_rev); else action = apr_psprintf(scratch_pool, _("Changes arrived during reverse-merge " "of\n'^/%s:%ld'."), new_repos_relpath, old_rev); *incoming_change_description = apr_pstrdup(result_pool, action); return SVN_NO_ERROR; } else { if (new_node_kind == svn_node_dir) action = apr_psprintf(scratch_pool, _("Changes destined for a directory " "arrived via the following revisions " "during reverse-merge of\n" "'^/%s:%ld-%ld'"), new_repos_relpath, new_rev + 1, old_rev); else if (new_node_kind == svn_node_file || new_node_kind == svn_node_symlink) action = apr_psprintf(scratch_pool, _("Changes destined for a file " "arrived via the following revisions " "during reverse-merge of\n" "'^/%s:%ld-%ld'"), new_repos_relpath, new_rev + 1, old_rev); else action = apr_psprintf(scratch_pool, _("Changes from the following revisions " "arrived during reverse-merge of\n" "'^/%s:%ld-%ld'"), new_repos_relpath, new_rev + 1, old_rev); } } } action = apr_psprintf(scratch_pool, "%s:\n%s", action, describe_incoming_edit_list_modified_revs( edits, scratch_pool)); *incoming_change_description = apr_pstrdup(result_pool, action); return SVN_NO_ERROR; } svn_error_t * svn_client_conflict_tree_get_description( const char **incoming_change_description, const char **local_change_description, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { SVN_ERR(conflict->tree_conflict_get_incoming_description_func( incoming_change_description, conflict, ctx, result_pool, scratch_pool)); SVN_ERR(conflict->tree_conflict_get_local_description_func( local_change_description, conflict, ctx, result_pool, scratch_pool)); return SVN_NO_ERROR; } void svn_client_conflict_option_set_merged_propval( svn_client_conflict_option_t *option, const svn_string_t *merged_propval) { option->type_data.prop.merged_propval = svn_string_dup(merged_propval, option->pool); } /* Implements conflict_option_resolve_func_t. */ static svn_error_t * resolve_postpone(svn_client_conflict_option_t *option, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { return SVN_NO_ERROR; /* Nothing to do. */ } /* Implements conflict_option_resolve_func_t. */ static svn_error_t * resolve_text_conflict(svn_client_conflict_option_t *option, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { svn_client_conflict_option_id_t option_id; const char *local_abspath; const char *lock_abspath; svn_wc_conflict_choice_t conflict_choice; svn_error_t *err; option_id = svn_client_conflict_option_get_id(option); conflict_choice = conflict_option_id_to_wc_conflict_choice(option_id); local_abspath = svn_client_conflict_get_local_abspath(conflict); SVN_ERR(svn_wc__acquire_write_lock_for_resolve(&lock_abspath, ctx->wc_ctx, local_abspath, scratch_pool, scratch_pool)); err = svn_wc__conflict_text_mark_resolved(ctx->wc_ctx, local_abspath, conflict_choice, ctx->cancel_func, ctx->cancel_baton, ctx->notify_func2, ctx->notify_baton2, scratch_pool); err = svn_error_compose_create(err, svn_wc__release_write_lock(ctx->wc_ctx, lock_abspath, scratch_pool)); svn_io_sleep_for_timestamps(local_abspath, scratch_pool); SVN_ERR(err); conflict->resolution_text = option_id; return SVN_NO_ERROR; } /* Implements conflict_option_resolve_func_t. */ static svn_error_t * resolve_prop_conflict(svn_client_conflict_option_t *option, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { svn_client_conflict_option_id_t option_id; svn_wc_conflict_choice_t conflict_choice; const char *local_abspath; const char *lock_abspath; const char *propname = option->type_data.prop.propname; svn_error_t *err; const svn_string_t *merged_value; option_id = svn_client_conflict_option_get_id(option); conflict_choice = conflict_option_id_to_wc_conflict_choice(option_id); local_abspath = svn_client_conflict_get_local_abspath(conflict); if (option_id == svn_client_conflict_option_merged_text) merged_value = option->type_data.prop.merged_propval; else merged_value = NULL; SVN_ERR(svn_wc__acquire_write_lock_for_resolve(&lock_abspath, ctx->wc_ctx, local_abspath, scratch_pool, scratch_pool)); err = svn_wc__conflict_prop_mark_resolved(ctx->wc_ctx, local_abspath, propname, conflict_choice, merged_value, ctx->notify_func2, ctx->notify_baton2, scratch_pool); err = svn_error_compose_create(err, svn_wc__release_write_lock(ctx->wc_ctx, lock_abspath, scratch_pool)); svn_io_sleep_for_timestamps(local_abspath, scratch_pool); SVN_ERR(err); if (propname[0] == '\0') { apr_hash_index_t *hi; /* All properties have been resolved to the same option. */ for (hi = apr_hash_first(scratch_pool, conflict->prop_conflicts); hi; hi = apr_hash_next(hi)) { const char *this_propname = apr_hash_this_key(hi); svn_hash_sets(conflict->resolved_props, apr_pstrdup(apr_hash_pool_get(conflict->resolved_props), this_propname), option); svn_hash_sets(conflict->prop_conflicts, this_propname, NULL); } conflict->legacy_prop_conflict_propname = NULL; } else { svn_hash_sets(conflict->resolved_props, apr_pstrdup(apr_hash_pool_get(conflict->resolved_props), propname), option); svn_hash_sets(conflict->prop_conflicts, propname, NULL); if (apr_hash_count(conflict->prop_conflicts) > 0) conflict->legacy_prop_conflict_propname = apr_hash_this_key(apr_hash_first(scratch_pool, conflict->prop_conflicts)); else conflict->legacy_prop_conflict_propname = NULL; } return SVN_NO_ERROR; } /* Implements conflict_option_resolve_func_t. */ static svn_error_t * resolve_accept_current_wc_state(svn_client_conflict_option_t *option, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { svn_client_conflict_option_id_t option_id; const char *local_abspath; const char *lock_abspath; svn_error_t *err; option_id = svn_client_conflict_option_get_id(option); local_abspath = svn_client_conflict_get_local_abspath(conflict); if (option_id != svn_client_conflict_option_accept_current_wc_state) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Tree conflict on '%s' can only be resolved " "to the current working copy state"), svn_dirent_local_style(local_abspath, scratch_pool)); SVN_ERR(svn_wc__acquire_write_lock_for_resolve(&lock_abspath, ctx->wc_ctx, local_abspath, scratch_pool, scratch_pool)); /* Resolve to current working copy state. */ err = svn_wc__del_tree_conflict(ctx->wc_ctx, local_abspath, scratch_pool); /* svn_wc__del_tree_conflict doesn't handle notification for us */ if (ctx->notify_func2) ctx->notify_func2(ctx->notify_baton2, svn_wc_create_notify(local_abspath, svn_wc_notify_resolved_tree, scratch_pool), scratch_pool); err = svn_error_compose_create(err, svn_wc__release_write_lock(ctx->wc_ctx, lock_abspath, scratch_pool)); SVN_ERR(err); conflict->resolution_tree = option_id; return SVN_NO_ERROR; } /* Implements conflict_option_resolve_func_t. */ static svn_error_t * resolve_update_break_moved_away(svn_client_conflict_option_t *option, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { const char *local_abspath; const char *lock_abspath; svn_error_t *err; local_abspath = svn_client_conflict_get_local_abspath(conflict); SVN_ERR(svn_wc__acquire_write_lock_for_resolve(&lock_abspath, ctx->wc_ctx, local_abspath, scratch_pool, scratch_pool)); err = svn_wc__conflict_tree_update_break_moved_away(ctx->wc_ctx, local_abspath, ctx->cancel_func, ctx->cancel_baton, ctx->notify_func2, ctx->notify_baton2, scratch_pool); err = svn_error_compose_create(err, svn_wc__release_write_lock(ctx->wc_ctx, lock_abspath, scratch_pool)); SVN_ERR(err); conflict->resolution_tree = svn_client_conflict_option_get_id(option); return SVN_NO_ERROR; } /* Implements conflict_option_resolve_func_t. */ static svn_error_t * resolve_update_raise_moved_away(svn_client_conflict_option_t *option, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { const char *local_abspath; const char *lock_abspath; svn_error_t *err; local_abspath = svn_client_conflict_get_local_abspath(conflict); SVN_ERR(svn_wc__acquire_write_lock_for_resolve(&lock_abspath, ctx->wc_ctx, local_abspath, scratch_pool, scratch_pool)); err = svn_wc__conflict_tree_update_raise_moved_away(ctx->wc_ctx, local_abspath, ctx->cancel_func, ctx->cancel_baton, ctx->notify_func2, ctx->notify_baton2, scratch_pool); err = svn_error_compose_create(err, svn_wc__release_write_lock(ctx->wc_ctx, lock_abspath, scratch_pool)); SVN_ERR(err); conflict->resolution_tree = svn_client_conflict_option_get_id(option); return SVN_NO_ERROR; } /* Implements conflict_option_resolve_func_t. */ static svn_error_t * resolve_update_moved_away_node(svn_client_conflict_option_t *option, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { const char *local_abspath; const char *lock_abspath; svn_error_t *err; local_abspath = svn_client_conflict_get_local_abspath(conflict); SVN_ERR(svn_wc__acquire_write_lock_for_resolve(&lock_abspath, ctx->wc_ctx, local_abspath, scratch_pool, scratch_pool)); err = svn_wc__conflict_tree_update_moved_away_node(ctx->wc_ctx, local_abspath, ctx->cancel_func, ctx->cancel_baton, ctx->notify_func2, ctx->notify_baton2, scratch_pool); err = svn_error_compose_create(err, svn_wc__release_write_lock(ctx->wc_ctx, lock_abspath, scratch_pool)); svn_io_sleep_for_timestamps(local_abspath, scratch_pool); SVN_ERR(err); conflict->resolution_tree = svn_client_conflict_option_get_id(option); return SVN_NO_ERROR; } /* Verify the local working copy state matches what we expect when an * incoming add vs add tree conflict exists after an update operation. * We assume the update operation leaves the working copy in a state which * prefers the local change and cancels the incoming addition. * Run a quick sanity check and error out if it looks as if the * working copy was modified since, even though it's not easy to make * such modifications without also clearing the conflict marker. */ static svn_error_t * verify_local_state_for_incoming_add_upon_update( svn_client_conflict_t *conflict, svn_client_conflict_option_t *option, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { const char *local_abspath; svn_client_conflict_option_id_t option_id; const char *wcroot_abspath; svn_wc_operation_t operation; const char *incoming_new_repos_relpath; svn_revnum_t incoming_new_pegrev; svn_node_kind_t incoming_new_kind; const char *base_repos_relpath; svn_revnum_t base_rev; svn_node_kind_t base_kind; const char *local_style_relpath; svn_boolean_t is_added; svn_error_t *err; local_abspath = svn_client_conflict_get_local_abspath(conflict); option_id = svn_client_conflict_option_get_id(option); SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx, local_abspath, scratch_pool, scratch_pool)); operation = svn_client_conflict_get_operation(conflict); SVN_ERR_ASSERT(operation == svn_wc_operation_update); SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( &incoming_new_repos_relpath, &incoming_new_pegrev, &incoming_new_kind, conflict, scratch_pool, scratch_pool)); local_style_relpath = svn_dirent_local_style( svn_dirent_skip_ancestor(wcroot_abspath, local_abspath), scratch_pool); /* Check if a local addition addition replaces the incoming new node. */ err = svn_wc__node_get_base(&base_kind, &base_rev, &base_repos_relpath, NULL, NULL, NULL, ctx->wc_ctx, local_abspath, FALSE, scratch_pool, scratch_pool); if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND) { if (option_id == svn_client_conflict_option_incoming_add_ignore) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, err, _("Cannot resolve tree conflict on '%s' " "(expected a base node but found none)"), local_style_relpath); else if (option_id == svn_client_conflict_option_incoming_added_dir_replace) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, err, _("Cannot resolve tree conflict on '%s' " "(expected a base node but found none)"), local_style_relpath); else return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, err, _("Unexpected option id '%d'"), option_id); } else if (err) return svn_error_trace(err); if (base_kind != incoming_new_kind) { if (option_id == svn_client_conflict_option_incoming_add_ignore) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Cannot resolve tree conflict on '%s' " "(expected base node kind '%s', " "but found '%s')"), local_style_relpath, svn_node_kind_to_word(incoming_new_kind), svn_node_kind_to_word(base_kind)); else if (option_id == svn_client_conflict_option_incoming_added_dir_replace) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Cannot resolve tree conflict on '%s' " "(expected base node kind '%s', " "but found '%s')"), local_style_relpath, svn_node_kind_to_word(incoming_new_kind), svn_node_kind_to_word(base_kind)); else return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Unexpected option id '%d'"), option_id); } if (strcmp(base_repos_relpath, incoming_new_repos_relpath) != 0 || base_rev != incoming_new_pegrev) { if (option_id == svn_client_conflict_option_incoming_add_ignore) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Cannot resolve tree conflict on '%s' " "(expected base node from '^/%s@%ld', " "but found '^/%s@%ld')"), local_style_relpath, incoming_new_repos_relpath, incoming_new_pegrev, base_repos_relpath, base_rev); else if (option_id == svn_client_conflict_option_incoming_added_dir_replace) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Cannot resolve tree conflict on '%s' " "(expected base node from '^/%s@%ld', " "but found '^/%s@%ld')"), local_style_relpath, incoming_new_repos_relpath, incoming_new_pegrev, base_repos_relpath, base_rev); else return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Unexpected option id '%d'"), option_id); } SVN_ERR(svn_wc__node_is_added(&is_added, ctx->wc_ctx, local_abspath, scratch_pool)); if (!is_added) { if (option_id == svn_client_conflict_option_incoming_add_ignore) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Cannot resolve tree conflict on '%s' " "(expected an added item, but the item " "is not added)"), local_style_relpath); else if (option_id == svn_client_conflict_option_incoming_added_dir_replace) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Cannot resolve tree conflict on '%s' " "(expected an added item, but the item " "is not added)"), local_style_relpath); else return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Unexpected option id '%d'"), option_id); } return SVN_NO_ERROR; } /* Implements conflict_option_resolve_func_t. */ static svn_error_t * resolve_incoming_add_ignore(svn_client_conflict_option_t *option, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { const char *local_abspath; const char *lock_abspath; svn_wc_operation_t operation; svn_error_t *err; local_abspath = svn_client_conflict_get_local_abspath(conflict); operation = svn_client_conflict_get_operation(conflict); SVN_ERR(svn_wc__acquire_write_lock_for_resolve(&lock_abspath, ctx->wc_ctx, local_abspath, scratch_pool, scratch_pool)); if (operation == svn_wc_operation_update) { err = verify_local_state_for_incoming_add_upon_update(conflict, option, ctx, scratch_pool); if (err) goto unlock_wc; } /* All other options for this conflict actively fetch the incoming * new node. We can ignore the incoming new node by doing nothing. */ /* Resolve to current working copy state. */ err = svn_wc__del_tree_conflict(ctx->wc_ctx, local_abspath, scratch_pool); /* svn_wc__del_tree_conflict doesn't handle notification for us */ if (ctx->notify_func2) ctx->notify_func2(ctx->notify_baton2, svn_wc_create_notify(local_abspath, svn_wc_notify_resolved_tree, scratch_pool), scratch_pool); unlock_wc: err = svn_error_compose_create(err, svn_wc__release_write_lock(ctx->wc_ctx, lock_abspath, scratch_pool)); SVN_ERR(err); conflict->resolution_tree = svn_client_conflict_option_get_id(option); return SVN_NO_ERROR; } /* Delete entry and wc props from a set of properties. */ static void filter_props(apr_hash_t *props, apr_pool_t *scratch_pool) { apr_hash_index_t *hi; for (hi = apr_hash_first(scratch_pool, props); hi != NULL; hi = apr_hash_next(hi)) { const char *propname = apr_hash_this_key(hi); if (!svn_wc_is_normal_prop(propname)) svn_hash_sets(props, propname, NULL); } } /* Implements conflict_option_resolve_func_t. */ static svn_error_t * resolve_merge_incoming_added_file_text_update( svn_client_conflict_option_t *option, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { const char *wc_tmpdir; const char *local_abspath; const char *lock_abspath; svn_wc_merge_outcome_t merge_content_outcome; svn_wc_notify_state_t merge_props_outcome; const char *empty_file_abspath; const char *working_file_tmp_abspath; svn_stream_t *working_file_stream; svn_stream_t *working_file_tmp_stream; apr_hash_t *working_props; apr_array_header_t *propdiffs; svn_error_t *err; local_abspath = svn_client_conflict_get_local_abspath(conflict); /* Set up tempory storage for the working version of file. */ SVN_ERR(svn_wc__get_tmpdir(&wc_tmpdir, ctx->wc_ctx, local_abspath, scratch_pool, scratch_pool)); SVN_ERR(svn_stream_open_unique(&working_file_tmp_stream, &working_file_tmp_abspath, wc_tmpdir, /* Don't delete automatically! */ svn_io_file_del_none, scratch_pool, scratch_pool)); /* Copy the detranslated working file to temporary storage. */ SVN_ERR(svn_wc__translated_stream(&working_file_stream, ctx->wc_ctx, local_abspath, local_abspath, SVN_WC_TRANSLATE_TO_NF, scratch_pool, scratch_pool)); SVN_ERR(svn_stream_copy3(working_file_stream, working_file_tmp_stream, ctx->cancel_func, ctx->cancel_baton, scratch_pool)); /* Get a copy of the working file's properties. */ SVN_ERR(svn_wc_prop_list2(&working_props, ctx->wc_ctx, local_abspath, scratch_pool, scratch_pool)); filter_props(working_props, scratch_pool); /* Create an empty file as fake "merge-base" for the two added files. * The files are not ancestrally related so this is the best we can do. */ SVN_ERR(svn_io_open_unique_file3(NULL, &empty_file_abspath, NULL, svn_io_file_del_on_pool_cleanup, scratch_pool, scratch_pool)); /* Create a property diff which shows all props as added. */ SVN_ERR(svn_prop_diffs(&propdiffs, working_props, apr_hash_make(scratch_pool), scratch_pool)); /* ### The following WC modifications should be atomic. */ SVN_ERR(svn_wc__acquire_write_lock_for_resolve(&lock_abspath, ctx->wc_ctx, local_abspath, scratch_pool, scratch_pool)); /* Revert the path in order to restore the repository's line of * history, which is part of the BASE tree. This revert operation * is why are being careful about not losing the temporary copy. */ err = svn_wc_revert5(ctx->wc_ctx, local_abspath, svn_depth_empty, FALSE, NULL, TRUE, FALSE, NULL, NULL, /* no cancellation */ ctx->notify_func2, ctx->notify_baton2, scratch_pool); if (err) goto unlock_wc; /* Perform the file merge. ### Merge into tempfile and then rename on top? */ err = svn_wc_merge5(&merge_content_outcome, &merge_props_outcome, ctx->wc_ctx, empty_file_abspath, working_file_tmp_abspath, local_abspath, NULL, NULL, NULL, /* labels */ NULL, NULL, /* conflict versions */ FALSE, /* dry run */ NULL, NULL, /* diff3_cmd, merge_options */ NULL, propdiffs, NULL, NULL, /* conflict func/baton */ NULL, NULL, /* don't allow user to cancel here */ scratch_pool); unlock_wc: if (err) err = svn_error_quick_wrapf( err, _("If needed, a backup copy of '%s' can be found at '%s'"), svn_dirent_local_style(local_abspath, scratch_pool), svn_dirent_local_style(working_file_tmp_abspath, scratch_pool)); err = svn_error_compose_create(err, svn_wc__release_write_lock(ctx->wc_ctx, lock_abspath, scratch_pool)); svn_io_sleep_for_timestamps(local_abspath, scratch_pool); SVN_ERR(err); if (ctx->notify_func2) { svn_wc_notify_t *notify; /* Tell the world about the file merge that just happened. */ notify = svn_wc_create_notify(local_abspath, svn_wc_notify_update_update, scratch_pool); if (merge_content_outcome == svn_wc_merge_conflict) notify->content_state = svn_wc_notify_state_conflicted; else notify->content_state = svn_wc_notify_state_merged; notify->prop_state = merge_props_outcome; notify->kind = svn_node_file; ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool); /* And also about the successfully resolved tree conflict. */ notify = svn_wc_create_notify(local_abspath, svn_wc_notify_resolved_tree, scratch_pool); ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool); } conflict->resolution_tree = svn_client_conflict_option_get_id(option); /* All is good -- remove temporary copy of the working file. */ SVN_ERR(svn_io_remove_file2(working_file_tmp_abspath, TRUE, scratch_pool)); return SVN_NO_ERROR; } /* Implements conflict_option_resolve_func_t. */ static svn_error_t * resolve_merge_incoming_added_file_text_merge( svn_client_conflict_option_t *option, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { svn_ra_session_t *ra_session; const char *url; const char *corrected_url; const char *repos_root_url; const char *wc_tmpdir; const char *incoming_new_repos_relpath; svn_revnum_t incoming_new_pegrev; const char *local_abspath; const char *lock_abspath; svn_wc_merge_outcome_t merge_content_outcome; svn_wc_notify_state_t merge_props_outcome; apr_file_t *incoming_new_file; const char *incoming_new_tmp_abspath; const char *empty_file_abspath; svn_stream_t *incoming_new_stream; apr_hash_t *incoming_new_props; apr_array_header_t *propdiffs; svn_error_t *err; local_abspath = svn_client_conflict_get_local_abspath(conflict); /* Set up temporary storage for the repository version of file. */ SVN_ERR(svn_wc__get_tmpdir(&wc_tmpdir, ctx->wc_ctx, local_abspath, scratch_pool, scratch_pool)); SVN_ERR(svn_io_open_unique_file3(&incoming_new_file, &incoming_new_tmp_abspath, wc_tmpdir, svn_io_file_del_on_pool_cleanup, scratch_pool, scratch_pool)); incoming_new_stream = svn_stream_from_aprfile2(incoming_new_file, TRUE, scratch_pool); /* Fetch the incoming added file from the repository. */ SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( &incoming_new_repos_relpath, &incoming_new_pegrev, NULL, conflict, scratch_pool, scratch_pool)); SVN_ERR(svn_client_conflict_get_repos_info(&repos_root_url, NULL, conflict, scratch_pool, scratch_pool)); url = svn_path_url_add_component2(repos_root_url, incoming_new_repos_relpath, scratch_pool); SVN_ERR(svn_client__open_ra_session_internal(&ra_session, &corrected_url, url, NULL, NULL, FALSE, FALSE, ctx, scratch_pool, scratch_pool)); SVN_ERR(svn_ra_get_file(ra_session, "", incoming_new_pegrev, incoming_new_stream, NULL, /* fetched_rev */ &incoming_new_props, scratch_pool)); /* Flush file to disk. */ SVN_ERR(svn_stream_close(incoming_new_stream)); SVN_ERR(svn_io_file_flush(incoming_new_file, scratch_pool)); filter_props(incoming_new_props, scratch_pool); /* Create an empty file as fake "merge-base" for the two added files. * The files are not ancestrally related so this is the best we can do. */ SVN_ERR(svn_io_open_unique_file3(NULL, &empty_file_abspath, NULL, svn_io_file_del_on_pool_cleanup, scratch_pool, scratch_pool)); /* Create a property diff which shows all props as added. */ SVN_ERR(svn_prop_diffs(&propdiffs, incoming_new_props, apr_hash_make(scratch_pool), scratch_pool)); /* ### The following WC modifications should be atomic. */ SVN_ERR(svn_wc__acquire_write_lock_for_resolve(&lock_abspath, ctx->wc_ctx, local_abspath, scratch_pool, scratch_pool)); /* Resolve to current working copy state. svn_wc_merge5() requires this. */ err = svn_wc__del_tree_conflict(ctx->wc_ctx, local_abspath, scratch_pool); if (err) return svn_error_compose_create(err, svn_wc__release_write_lock(ctx->wc_ctx, lock_abspath, scratch_pool)); /* Perform the file merge. ### Merge into tempfile and then rename on top? */ err = svn_wc_merge5(&merge_content_outcome, &merge_props_outcome, ctx->wc_ctx, empty_file_abspath, incoming_new_tmp_abspath, local_abspath, NULL, NULL, NULL, /* labels */ NULL, NULL, /* conflict versions */ FALSE, /* dry run */ NULL, NULL, /* diff3_cmd, merge_options */ NULL, propdiffs, NULL, NULL, /* conflict func/baton */ NULL, NULL, /* don't allow user to cancel here */ scratch_pool); err = svn_error_compose_create(err, svn_wc__release_write_lock(ctx->wc_ctx, lock_abspath, scratch_pool)); svn_io_sleep_for_timestamps(local_abspath, scratch_pool); SVN_ERR(err); if (ctx->notify_func2) { svn_wc_notify_t *notify; /* Tell the world about the file merge that just happened. */ notify = svn_wc_create_notify(local_abspath, svn_wc_notify_update_update, scratch_pool); if (merge_content_outcome == svn_wc_merge_conflict) notify->content_state = svn_wc_notify_state_conflicted; else notify->content_state = svn_wc_notify_state_merged; notify->prop_state = merge_props_outcome; notify->kind = svn_node_file; ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool); /* And also about the successfully resolved tree conflict. */ notify = svn_wc_create_notify(local_abspath, svn_wc_notify_resolved_tree, scratch_pool); ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool); } conflict->resolution_tree = svn_client_conflict_option_get_id(option); return SVN_NO_ERROR; } /* Implements conflict_option_resolve_func_t. */ static svn_error_t * resolve_merge_incoming_added_file_replace_and_merge( svn_client_conflict_option_t *option, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { svn_ra_session_t *ra_session; const char *url; const char *corrected_url; const char *repos_root_url; const char *incoming_new_repos_relpath; svn_revnum_t incoming_new_pegrev; apr_file_t *incoming_new_file; svn_stream_t *incoming_new_stream; apr_hash_t *incoming_new_props; const char *local_abspath; const char *lock_abspath; const char *wc_tmpdir; svn_stream_t *working_file_tmp_stream; const char *working_file_tmp_abspath; svn_stream_t *working_file_stream; apr_hash_t *working_props; svn_error_t *err; svn_wc_merge_outcome_t merge_content_outcome; svn_wc_notify_state_t merge_props_outcome; apr_file_t *empty_file; const char *empty_file_abspath; apr_array_header_t *propdiffs; local_abspath = svn_client_conflict_get_local_abspath(conflict); /* Set up tempory storage for the working version of file. */ SVN_ERR(svn_wc__get_tmpdir(&wc_tmpdir, ctx->wc_ctx, local_abspath, scratch_pool, scratch_pool)); SVN_ERR(svn_stream_open_unique(&working_file_tmp_stream, &working_file_tmp_abspath, wc_tmpdir, svn_io_file_del_on_pool_cleanup, scratch_pool, scratch_pool)); /* Copy the detranslated working file to temporary storage. */ SVN_ERR(svn_wc__translated_stream(&working_file_stream, ctx->wc_ctx, local_abspath, local_abspath, SVN_WC_TRANSLATE_TO_NF, scratch_pool, scratch_pool)); SVN_ERR(svn_stream_copy3(working_file_stream, working_file_tmp_stream, ctx->cancel_func, ctx->cancel_baton, scratch_pool)); /* Get a copy of the working file's properties. */ SVN_ERR(svn_wc_prop_list2(&working_props, ctx->wc_ctx, local_abspath, scratch_pool, scratch_pool)); /* Fetch the incoming added file from the repository. */ SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( &incoming_new_repos_relpath, &incoming_new_pegrev, NULL, conflict, scratch_pool, scratch_pool)); SVN_ERR(svn_client_conflict_get_repos_info(&repos_root_url, NULL, conflict, scratch_pool, scratch_pool)); url = svn_path_url_add_component2(repos_root_url, incoming_new_repos_relpath, scratch_pool); SVN_ERR(svn_client__open_ra_session_internal(&ra_session, &corrected_url, url, NULL, NULL, FALSE, FALSE, ctx, scratch_pool, scratch_pool)); if (corrected_url) url = corrected_url; SVN_ERR(svn_io_open_unique_file3(&incoming_new_file, NULL, wc_tmpdir, svn_io_file_del_on_pool_cleanup, scratch_pool, scratch_pool)); incoming_new_stream = svn_stream_from_aprfile2(incoming_new_file, TRUE, scratch_pool); SVN_ERR(svn_ra_get_file(ra_session, "", incoming_new_pegrev, incoming_new_stream, NULL, /* fetched_rev */ &incoming_new_props, scratch_pool)); /* Flush file to disk. */ SVN_ERR(svn_io_file_flush(incoming_new_file, scratch_pool)); /* Reset the stream in preparation for adding its content to WC. */ SVN_ERR(svn_stream_reset(incoming_new_stream)); SVN_ERR(svn_wc__acquire_write_lock_for_resolve(&lock_abspath, ctx->wc_ctx, local_abspath, scratch_pool, scratch_pool)); /* ### The following WC modifications should be atomic. */ /* Replace the working file with the file from the repository. */ err = svn_wc_delete4(ctx->wc_ctx, local_abspath, FALSE, FALSE, NULL, NULL, /* don't allow user to cancel here */ ctx->notify_func2, ctx->notify_baton2, scratch_pool); if (err) goto unlock_wc; err = svn_wc_add_repos_file4(ctx->wc_ctx, local_abspath, incoming_new_stream, NULL, /* ### could we merge first, then set ### the merged content here? */ incoming_new_props, NULL, /* ### merge props first, set here? */ url, incoming_new_pegrev, NULL, NULL, /* don't allow user to cancel here */ scratch_pool); if (err) goto unlock_wc; if (ctx->notify_func2) { svn_wc_notify_t *notify = svn_wc_create_notify(local_abspath, svn_wc_notify_add, scratch_pool); notify->kind = svn_node_file; ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool); } /* Resolve to current working copy state. svn_wc_merge5() requires this. */ err = svn_wc__del_tree_conflict(ctx->wc_ctx, local_abspath, scratch_pool); if (err) goto unlock_wc; /* Create an empty file as fake "merge-base" for the two added files. * The files are not ancestrally related so this is the best we can do. */ err = svn_io_open_unique_file3(&empty_file, &empty_file_abspath, NULL, svn_io_file_del_on_pool_cleanup, scratch_pool, scratch_pool); if (err) goto unlock_wc; filter_props(incoming_new_props, scratch_pool); /* Create a property diff for the files. */ err = svn_prop_diffs(&propdiffs, incoming_new_props, working_props, scratch_pool); if (err) goto unlock_wc; /* Perform the file merge. */ err = svn_wc_merge5(&merge_content_outcome, &merge_props_outcome, ctx->wc_ctx, empty_file_abspath, working_file_tmp_abspath, local_abspath, NULL, NULL, NULL, /* labels */ NULL, NULL, /* conflict versions */ FALSE, /* dry run */ NULL, NULL, /* diff3_cmd, merge_options */ NULL, propdiffs, NULL, NULL, /* conflict func/baton */ NULL, NULL, /* don't allow user to cancel here */ scratch_pool); if (err) goto unlock_wc; if (ctx->notify_func2) { svn_wc_notify_t *notify = svn_wc_create_notify( local_abspath, svn_wc_notify_update_update, scratch_pool); if (merge_content_outcome == svn_wc_merge_conflict) notify->content_state = svn_wc_notify_state_conflicted; else notify->content_state = svn_wc_notify_state_merged; notify->prop_state = merge_props_outcome; notify->kind = svn_node_file; ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool); } unlock_wc: err = svn_error_compose_create(err, svn_wc__release_write_lock(ctx->wc_ctx, lock_abspath, scratch_pool)); svn_io_sleep_for_timestamps(local_abspath, scratch_pool); SVN_ERR(err); SVN_ERR(svn_stream_close(incoming_new_stream)); if (ctx->notify_func2) { svn_wc_notify_t *notify = svn_wc_create_notify( local_abspath, svn_wc_notify_resolved_tree, scratch_pool); ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool); } conflict->resolution_tree = svn_client_conflict_option_get_id(option); return SVN_NO_ERROR; } static svn_error_t * raise_tree_conflict(const char *local_abspath, svn_wc_conflict_action_t incoming_change, svn_wc_conflict_reason_t local_change, svn_node_kind_t local_node_kind, svn_node_kind_t merge_left_kind, svn_node_kind_t merge_right_kind, const char *repos_root_url, const char *repos_uuid, const char *repos_relpath, svn_revnum_t merge_left_rev, svn_revnum_t merge_right_rev, svn_wc_context_t *wc_ctx, svn_wc_notify_func2_t notify_func2, void *notify_baton2, apr_pool_t *scratch_pool) { svn_wc_conflict_description2_t *conflict; const svn_wc_conflict_version_t *left_version; const svn_wc_conflict_version_t *right_version; left_version = svn_wc_conflict_version_create2(repos_root_url, repos_uuid, repos_relpath, merge_left_rev, merge_left_kind, scratch_pool); right_version = svn_wc_conflict_version_create2(repos_root_url, repos_uuid, repos_relpath, merge_right_rev, merge_right_kind, scratch_pool); conflict = svn_wc_conflict_description_create_tree2(local_abspath, local_node_kind, svn_wc_operation_merge, left_version, right_version, scratch_pool); conflict->action = incoming_change; conflict->reason = local_change; SVN_ERR(svn_wc__add_tree_conflict(wc_ctx, conflict, scratch_pool)); if (notify_func2) { svn_wc_notify_t *notify; notify = svn_wc_create_notify(local_abspath, svn_wc_notify_tree_conflict, scratch_pool); notify->kind = local_node_kind; notify_func2(notify_baton2, notify, scratch_pool); } return SVN_NO_ERROR; } struct merge_newly_added_dir_baton { const char *target_abspath; svn_client_ctx_t *ctx; const char *repos_root_url; const char *repos_uuid; const char *added_repos_relpath; svn_revnum_t merge_left_rev; svn_revnum_t merge_right_rev; }; static svn_error_t * merge_added_dir_props(const char *target_abspath, const char *added_repos_relpath, apr_hash_t *added_props, const char *repos_root_url, const char *repos_uuid, svn_revnum_t merge_left_rev, svn_revnum_t merge_right_rev, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { svn_wc_notify_state_t property_state; apr_array_header_t *propchanges; const svn_wc_conflict_version_t *left_version; const svn_wc_conflict_version_t *right_version; apr_hash_index_t *hi; left_version = svn_wc_conflict_version_create2( repos_root_url, repos_uuid, added_repos_relpath, merge_left_rev, svn_node_none, scratch_pool); right_version = svn_wc_conflict_version_create2( repos_root_url, repos_uuid, added_repos_relpath, merge_right_rev, svn_node_dir, scratch_pool); propchanges = apr_array_make(scratch_pool, apr_hash_count(added_props), sizeof(svn_prop_t)); for (hi = apr_hash_first(scratch_pool, added_props); hi; hi = apr_hash_next(hi)) { svn_prop_t prop; prop.name = apr_hash_this_key(hi); prop.value = apr_hash_this_val(hi); if (svn_wc_is_normal_prop(prop.name)) APR_ARRAY_PUSH(propchanges, svn_prop_t) = prop; } SVN_ERR(svn_wc_merge_props3(&property_state, ctx->wc_ctx, target_abspath, left_version, right_version, apr_hash_make(scratch_pool), propchanges, FALSE, /* not a dry-run */ NULL, NULL, NULL, NULL, scratch_pool)); if (ctx->notify_func2) { svn_wc_notify_t *notify; notify = svn_wc_create_notify(target_abspath, svn_wc_notify_update_update, scratch_pool); notify->kind = svn_node_dir; notify->content_state = svn_wc_notify_state_unchanged;; notify->prop_state = property_state; ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool); } return SVN_NO_ERROR; } /* An svn_diff_tree_processor_t callback. */ static svn_error_t * diff_dir_added(const char *relpath, const svn_diff_source_t *copyfrom_source, const svn_diff_source_t *right_source, apr_hash_t *copyfrom_props, apr_hash_t *right_props, void *dir_baton, const struct svn_diff_tree_processor_t *processor, apr_pool_t *scratch_pool) { struct merge_newly_added_dir_baton *b = processor->baton; const char *local_abspath; const char *copyfrom_url; svn_node_kind_t db_kind; svn_node_kind_t on_disk_kind; apr_hash_index_t *hi; /* Handle the root of the added directory tree. */ if (relpath[0] == '\0') { /* ### svn_wc_merge_props3() requires this... */ SVN_ERR(svn_wc__del_tree_conflict(b->ctx->wc_ctx, b->target_abspath, scratch_pool)); SVN_ERR(merge_added_dir_props(b->target_abspath, b->added_repos_relpath, right_props, b->repos_root_url, b->repos_uuid, b->merge_left_rev, b->merge_right_rev, b->ctx, scratch_pool)); return SVN_NO_ERROR; } local_abspath = svn_dirent_join(b->target_abspath, relpath, scratch_pool); SVN_ERR(svn_wc_read_kind2(&db_kind, b->ctx->wc_ctx, local_abspath, FALSE, FALSE, scratch_pool)); SVN_ERR(svn_io_check_path(local_abspath, &on_disk_kind, scratch_pool)); if (db_kind == svn_node_dir && on_disk_kind == svn_node_dir) { SVN_ERR(merge_added_dir_props(svn_dirent_join(b->target_abspath, relpath, scratch_pool), b->added_repos_relpath, right_props, b->repos_root_url, b->repos_uuid, b->merge_left_rev, b->merge_right_rev, b->ctx, scratch_pool)); return SVN_NO_ERROR; } if (db_kind != svn_node_none && db_kind != svn_node_unknown) { SVN_ERR(raise_tree_conflict( local_abspath, svn_wc_conflict_action_add, svn_wc_conflict_reason_obstructed, db_kind, svn_node_none, svn_node_dir, b->repos_root_url, b->repos_uuid, svn_relpath_join(b->added_repos_relpath, relpath, scratch_pool), b->merge_left_rev, b->merge_right_rev, b->ctx->wc_ctx, b->ctx->notify_func2, b->ctx->notify_baton2, scratch_pool)); return SVN_NO_ERROR; } if (on_disk_kind != svn_node_none) { SVN_ERR(raise_tree_conflict( local_abspath, svn_wc_conflict_action_add, svn_wc_conflict_reason_obstructed, db_kind, svn_node_none, svn_node_dir, b->repos_root_url, b->repos_uuid, svn_relpath_join(b->added_repos_relpath, relpath, scratch_pool), b->merge_left_rev, b->merge_right_rev, b->ctx->wc_ctx, b->ctx->notify_func2, b->ctx->notify_baton2, scratch_pool)); return SVN_NO_ERROR; } SVN_ERR(svn_io_dir_make(local_abspath, APR_OS_DEFAULT, scratch_pool)); copyfrom_url = apr_pstrcat(scratch_pool, b->repos_root_url, "/", right_source->repos_relpath, SVN_VA_NULL); SVN_ERR(svn_wc_add4(b->ctx->wc_ctx, local_abspath, svn_depth_infinity, copyfrom_url, right_source->revision, NULL, NULL, /* cancel func/baton */ b->ctx->notify_func2, b->ctx->notify_baton2, scratch_pool)); for (hi = apr_hash_first(scratch_pool, right_props); hi; hi = apr_hash_next(hi)) { const char *propname = apr_hash_this_key(hi); const svn_string_t *propval = apr_hash_this_val(hi); SVN_ERR(svn_wc_prop_set4(b->ctx->wc_ctx, local_abspath, propname, propval, svn_depth_empty, FALSE, NULL /* do not skip checks */, NULL, NULL, /* cancel func/baton */ b->ctx->notify_func2, b->ctx->notify_baton2, scratch_pool)); } return SVN_NO_ERROR; } static svn_error_t * merge_added_files(const char *local_abspath, const char *incoming_added_file_abspath, apr_hash_t *incoming_added_file_props, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { svn_wc_merge_outcome_t merge_content_outcome; svn_wc_notify_state_t merge_props_outcome; apr_file_t *empty_file; const char *empty_file_abspath; apr_array_header_t *propdiffs; apr_hash_t *working_props; /* Create an empty file as fake "merge-base" for the two added files. * The files are not ancestrally related so this is the best we can do. */ SVN_ERR(svn_io_open_unique_file3(&empty_file, &empty_file_abspath, NULL, svn_io_file_del_on_pool_cleanup, scratch_pool, scratch_pool)); /* Get a copy of the working file's properties. */ SVN_ERR(svn_wc_prop_list2(&working_props, ctx->wc_ctx, local_abspath, scratch_pool, scratch_pool)); /* Create a property diff for the files. */ SVN_ERR(svn_prop_diffs(&propdiffs, incoming_added_file_props, working_props, scratch_pool)); /* Perform the file merge. */ SVN_ERR(svn_wc_merge5(&merge_content_outcome, &merge_props_outcome, ctx->wc_ctx, empty_file_abspath, incoming_added_file_abspath, local_abspath, NULL, NULL, NULL, /* labels */ NULL, NULL, /* conflict versions */ FALSE, /* dry run */ NULL, NULL, /* diff3_cmd, merge_options */ NULL, propdiffs, NULL, NULL, /* conflict func/baton */ NULL, NULL, /* don't allow user to cancel here */ scratch_pool)); if (ctx->notify_func2) { svn_wc_notify_t *notify = svn_wc_create_notify( local_abspath, svn_wc_notify_update_update, scratch_pool); if (merge_content_outcome == svn_wc_merge_conflict) notify->content_state = svn_wc_notify_state_conflicted; else notify->content_state = svn_wc_notify_state_merged; notify->prop_state = merge_props_outcome; notify->kind = svn_node_file; ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool); } return SVN_NO_ERROR; } /* An svn_diff_tree_processor_t callback. */ static svn_error_t * diff_file_added(const char *relpath, const svn_diff_source_t *copyfrom_source, const svn_diff_source_t *right_source, const char *copyfrom_file, const char *right_file, apr_hash_t *copyfrom_props, apr_hash_t *right_props, void *file_baton, const struct svn_diff_tree_processor_t *processor, apr_pool_t *scratch_pool) { struct merge_newly_added_dir_baton *b = processor->baton; const char *local_abspath; svn_node_kind_t db_kind; svn_node_kind_t on_disk_kind; apr_array_header_t *propsarray; apr_array_header_t *regular_props; local_abspath = svn_dirent_join(b->target_abspath, relpath, scratch_pool); SVN_ERR(svn_wc_read_kind2(&db_kind, b->ctx->wc_ctx, local_abspath, FALSE, FALSE, scratch_pool)); SVN_ERR(svn_io_check_path(local_abspath, &on_disk_kind, scratch_pool)); if (db_kind == svn_node_file && on_disk_kind == svn_node_file) { propsarray = svn_prop_hash_to_array(right_props, scratch_pool); SVN_ERR(svn_categorize_props(propsarray, NULL, NULL, ®ular_props, scratch_pool)); SVN_ERR(merge_added_files(local_abspath, right_file, svn_prop_array_to_hash(regular_props, scratch_pool), b->ctx, scratch_pool)); return SVN_NO_ERROR; } if (db_kind != svn_node_none && db_kind != svn_node_unknown) { SVN_ERR(raise_tree_conflict( local_abspath, svn_wc_conflict_action_add, svn_wc_conflict_reason_obstructed, db_kind, svn_node_none, svn_node_file, b->repos_root_url, b->repos_uuid, svn_relpath_join(b->added_repos_relpath, relpath, scratch_pool), b->merge_left_rev, b->merge_right_rev, b->ctx->wc_ctx, b->ctx->notify_func2, b->ctx->notify_baton2, scratch_pool)); return SVN_NO_ERROR; } if (on_disk_kind != svn_node_none) { SVN_ERR(raise_tree_conflict( local_abspath, svn_wc_conflict_action_add, svn_wc_conflict_reason_obstructed, db_kind, svn_node_none, svn_node_file, b->repos_root_url, b->repos_uuid, svn_relpath_join(b->added_repos_relpath, relpath, scratch_pool), b->merge_left_rev, b->merge_right_rev, b->ctx->wc_ctx, b->ctx->notify_func2, b->ctx->notify_baton2, scratch_pool)); return SVN_NO_ERROR; } propsarray = svn_prop_hash_to_array(right_props, scratch_pool); SVN_ERR(svn_categorize_props(propsarray, NULL, NULL, ®ular_props, scratch_pool)); SVN_ERR(svn_io_copy_file(right_file, local_abspath, FALSE, scratch_pool)); SVN_ERR(svn_wc_add_from_disk3(b->ctx->wc_ctx, local_abspath, svn_prop_array_to_hash(regular_props, scratch_pool), FALSE, b->ctx->notify_func2, b->ctx->notify_baton2, scratch_pool)); return SVN_NO_ERROR; } /* Merge a newly added directory into TARGET_ABSPATH in the working copy. * * This uses a diff-tree processor because our standard merge operation * is not set up for merges where the merge-source anchor is itself an * added directory (i.e. does not exist on one side of the diff). * The standard merge will only merge additions of children of a path * that exists across the entire revision range being merged. * But in our case, SOURCE1 does not yet exist in REV1, but SOURCE2 * does exist in REV2. Thus we use a diff processor. */ static svn_error_t * merge_newly_added_dir(const char *added_repos_relpath, const char *source1, svn_revnum_t rev1, const char *source2, svn_revnum_t rev2, const char *target_abspath, svn_boolean_t reverse_merge, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { svn_diff_tree_processor_t *processor; struct merge_newly_added_dir_baton baton = { 0 }; const svn_diff_tree_processor_t *diff_processor; svn_ra_session_t *ra_session; const char *corrected_url; svn_ra_session_t *extra_ra_session; const svn_ra_reporter3_t *reporter; void *reporter_baton; const svn_delta_editor_t *diff_editor; void *diff_edit_baton; const char *anchor1; const char *anchor2; const char *target1; const char *target2; svn_uri_split(&anchor1, &target1, source1, scratch_pool); svn_uri_split(&anchor2, &target2, source2, scratch_pool); baton.target_abspath = target_abspath; baton.ctx = ctx; baton.added_repos_relpath = added_repos_relpath; SVN_ERR(svn_wc__node_get_repos_info(NULL, NULL, &baton.repos_root_url, &baton.repos_uuid, ctx->wc_ctx, target_abspath, scratch_pool, scratch_pool)); baton.merge_left_rev = rev1; baton.merge_right_rev = rev2; processor = svn_diff__tree_processor_create(&baton, scratch_pool); processor->dir_added = diff_dir_added; processor->file_added = diff_file_added; diff_processor = processor; if (reverse_merge) diff_processor = svn_diff__tree_processor_reverse_create(diff_processor, NULL, scratch_pool); /* Filter the first path component using a filter processor, until we fixed the diff processing to handle this directly */ diff_processor = svn_diff__tree_processor_filter_create( diff_processor, target1, scratch_pool); SVN_ERR(svn_client__open_ra_session_internal(&ra_session, &corrected_url, anchor2, NULL, NULL, FALSE, FALSE, ctx, scratch_pool, scratch_pool)); if (corrected_url) anchor2 = corrected_url; /* Extra RA session is used during the editor calls to fetch file contents. */ SVN_ERR(svn_ra__dup_session(&extra_ra_session, ra_session, anchor2, scratch_pool, scratch_pool)); /* Create a repos-repos diff editor. */ SVN_ERR(svn_client__get_diff_editor2( &diff_editor, &diff_edit_baton, extra_ra_session, svn_depth_infinity, rev1, TRUE, diff_processor, ctx->cancel_func, ctx->cancel_baton, scratch_pool)); /* We want to switch our txn into URL2 */ SVN_ERR(svn_ra_do_diff3(ra_session, &reporter, &reporter_baton, rev2, target1, svn_depth_infinity, TRUE, TRUE, source2, diff_editor, diff_edit_baton, scratch_pool)); /* Drive the reporter; do the diff. */ SVN_ERR(reporter->set_path(reporter_baton, "", rev1, svn_depth_infinity, FALSE, NULL, scratch_pool)); SVN_ERR(reporter->finish_report(reporter_baton, scratch_pool)); return SVN_NO_ERROR; } /* Implements conflict_option_resolve_func_t. */ static svn_error_t * resolve_merge_incoming_added_dir_merge(svn_client_conflict_option_t *option, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { const char *repos_root_url; const char *incoming_old_repos_relpath; svn_revnum_t incoming_old_pegrev; const char *incoming_new_repos_relpath; svn_revnum_t incoming_new_pegrev; const char *local_abspath; const char *lock_abspath; struct conflict_tree_incoming_add_details *details; const char *added_repos_relpath; const char *source1; svn_revnum_t rev1; const char *source2; svn_revnum_t rev2; svn_error_t *err; local_abspath = svn_client_conflict_get_local_abspath(conflict); details = conflict->tree_conflict_incoming_details; if (details == NULL) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Conflict resolution option '%d' requires " "details for tree conflict at '%s' to be " "fetched from the repository"), option->id, svn_dirent_local_style(local_abspath, scratch_pool)); /* Set up merge sources to merge the entire incoming added directory tree. */ SVN_ERR(svn_client_conflict_get_repos_info(&repos_root_url, NULL, conflict, scratch_pool, scratch_pool)); source1 = svn_path_url_add_component2(repos_root_url, details->repos_relpath, scratch_pool); SVN_ERR(svn_client_conflict_get_incoming_old_repos_location( &incoming_old_repos_relpath, &incoming_old_pegrev, NULL, conflict, scratch_pool, scratch_pool)); SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( &incoming_new_repos_relpath, &incoming_new_pegrev, NULL, conflict, scratch_pool, scratch_pool)); if (incoming_old_pegrev < incoming_new_pegrev) /* forward merge */ { if (details->added_rev == SVN_INVALID_REVNUM) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Could not determine when '%s' was " "added the repository"), svn_dirent_local_style(local_abspath, scratch_pool)); rev1 = rev_below(details->added_rev); source2 = svn_path_url_add_component2(repos_root_url, incoming_new_repos_relpath, scratch_pool); rev2 = incoming_new_pegrev; added_repos_relpath = incoming_new_repos_relpath; } else /* reverse-merge */ { if (details->deleted_rev == SVN_INVALID_REVNUM) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Could not determine when '%s' was " "deleted from the repository"), svn_dirent_local_style(local_abspath, scratch_pool)); rev1 = details->deleted_rev; source2 = svn_path_url_add_component2(repos_root_url, incoming_old_repos_relpath, scratch_pool); rev2 = incoming_old_pegrev; added_repos_relpath = incoming_new_repos_relpath; } /* ### The following WC modifications should be atomic. */ SVN_ERR(svn_wc__acquire_write_lock_for_resolve(&lock_abspath, ctx->wc_ctx, local_abspath, scratch_pool, scratch_pool)); /* ### wrap in a transaction */ err = merge_newly_added_dir(added_repos_relpath, source1, rev1, source2, rev2, local_abspath, (incoming_old_pegrev > incoming_new_pegrev), ctx, scratch_pool, scratch_pool); if (!err) err = svn_wc__del_tree_conflict(ctx->wc_ctx, local_abspath, scratch_pool); err = svn_error_compose_create(err, svn_wc__release_write_lock(ctx->wc_ctx, lock_abspath, scratch_pool)); svn_io_sleep_for_timestamps(local_abspath, scratch_pool); SVN_ERR(err); if (ctx->notify_func2) ctx->notify_func2(ctx->notify_baton2, svn_wc_create_notify(local_abspath, svn_wc_notify_resolved_tree, scratch_pool), scratch_pool); conflict->resolution_tree = svn_client_conflict_option_get_id(option); return SVN_NO_ERROR; } /* Implements conflict_option_resolve_func_t. */ static svn_error_t * resolve_update_incoming_added_dir_merge(svn_client_conflict_option_t *option, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { const char *local_abspath; const char *lock_abspath; svn_error_t *err; local_abspath = svn_client_conflict_get_local_abspath(conflict); SVN_ERR(svn_wc__acquire_write_lock_for_resolve( &lock_abspath, ctx->wc_ctx, local_abspath, scratch_pool, scratch_pool)); err = svn_wc__conflict_tree_update_local_add(ctx->wc_ctx, local_abspath, ctx->cancel_func, ctx->cancel_baton, ctx->notify_func2, ctx->notify_baton2, scratch_pool); err = svn_error_compose_create(err, svn_wc__release_write_lock(ctx->wc_ctx, lock_abspath, scratch_pool)); SVN_ERR(err); return SVN_NO_ERROR; } /* A baton for notification_adjust_func(). */ struct notification_adjust_baton { svn_wc_notify_func2_t inner_func; void *inner_baton; const char *checkout_abspath; const char *final_abspath; }; /* A svn_wc_notify_func2_t function that wraps BATON->inner_func (whose * baton is BATON->inner_baton) and adjusts the notification paths that * start with BATON->checkout_abspath to start instead with * BATON->final_abspath. */ static void notification_adjust_func(void *baton, const svn_wc_notify_t *notify, apr_pool_t *pool) { struct notification_adjust_baton *nb = baton; svn_wc_notify_t *inner_notify = svn_wc_dup_notify(notify, pool); const char *relpath; relpath = svn_dirent_skip_ancestor(nb->checkout_abspath, notify->path); inner_notify->path = svn_dirent_join(nb->final_abspath, relpath, pool); if (nb->inner_func) nb->inner_func(nb->inner_baton, inner_notify, pool); } /* Resolve a dir/dir "incoming add vs local obstruction" tree conflict by * replacing the local directory with the incoming directory. * If MERGE_DIRS is set, also merge the directories after replacing. */ static svn_error_t * merge_incoming_added_dir_replace(svn_client_conflict_option_t *option, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, svn_boolean_t merge_dirs, apr_pool_t *scratch_pool) { svn_ra_session_t *ra_session; const char *url; const char *corrected_url; const char *repos_root_url; const char *incoming_new_repos_relpath; svn_revnum_t incoming_new_pegrev; const char *local_abspath; const char *lock_abspath; const char *tmpdir_abspath, *tmp_abspath; svn_error_t *err; svn_revnum_t copy_src_revnum; svn_opt_revision_t copy_src_peg_revision; svn_boolean_t timestamp_sleep; svn_wc_notify_func2_t old_notify_func2 = ctx->notify_func2; void *old_notify_baton2 = ctx->notify_baton2; struct notification_adjust_baton nb; local_abspath = svn_client_conflict_get_local_abspath(conflict); /* Find the URL of the incoming added directory in the repository. */ SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( &incoming_new_repos_relpath, &incoming_new_pegrev, NULL, conflict, scratch_pool, scratch_pool)); SVN_ERR(svn_client_conflict_get_repos_info(&repos_root_url, NULL, conflict, scratch_pool, scratch_pool)); url = svn_path_url_add_component2(repos_root_url, incoming_new_repos_relpath, scratch_pool); SVN_ERR(svn_client__open_ra_session_internal(&ra_session, &corrected_url, url, NULL, NULL, FALSE, FALSE, ctx, scratch_pool, scratch_pool)); if (corrected_url) url = corrected_url; /* Find a temporary location in which to check out the copy source. */ SVN_ERR(svn_wc__get_tmpdir(&tmpdir_abspath, ctx->wc_ctx, local_abspath, scratch_pool, scratch_pool)); SVN_ERR(svn_io_open_unique_file3(NULL, &tmp_abspath, tmpdir_abspath, svn_io_file_del_on_close, scratch_pool, scratch_pool)); /* Make a new checkout of the requested source. While doing so, * resolve copy_src_revnum to an actual revision number in case it * was until now 'invalid' meaning 'head'. Ask this function not to * sleep for timestamps, by passing a sleep_needed output param. * Send notifications for all nodes except the root node, and adjust * them to refer to the destination rather than this temporary path. */ nb.inner_func = ctx->notify_func2; nb.inner_baton = ctx->notify_baton2; nb.checkout_abspath = tmp_abspath; nb.final_abspath = local_abspath; ctx->notify_func2 = notification_adjust_func; ctx->notify_baton2 = &nb; copy_src_peg_revision.kind = svn_opt_revision_number; copy_src_peg_revision.value.number = incoming_new_pegrev; err = svn_client__checkout_internal(©_src_revnum, ×tamp_sleep, url, tmp_abspath, ©_src_peg_revision, ©_src_peg_revision, svn_depth_infinity, TRUE, /* we want to ignore externals */ FALSE, /* we don't allow obstructions */ ra_session, ctx, scratch_pool); ctx->notify_func2 = old_notify_func2; ctx->notify_baton2 = old_notify_baton2; SVN_ERR(err); /* ### The following WC modifications should be atomic. */ SVN_ERR(svn_wc__acquire_write_lock_for_resolve(&lock_abspath, ctx->wc_ctx, svn_dirent_dirname( local_abspath, scratch_pool), scratch_pool, scratch_pool)); /* Remove the working directory. */ err = svn_wc_delete4(ctx->wc_ctx, local_abspath, FALSE, FALSE, NULL, NULL, /* don't allow user to cancel here */ ctx->notify_func2, ctx->notify_baton2, scratch_pool); if (err) goto unlock_wc; /* Schedule dst_path for addition in parent, with copy history. Don't send any notification here. Then remove the temporary checkout's .svn dir in preparation for moving the rest of it into the final destination. */ err = svn_wc_copy3(ctx->wc_ctx, tmp_abspath, local_abspath, TRUE /* metadata_only */, NULL, NULL, /* don't allow user to cancel here */ NULL, NULL, scratch_pool); if (err) goto unlock_wc; err = svn_wc__acquire_write_lock(NULL, ctx->wc_ctx, tmp_abspath, FALSE, scratch_pool, scratch_pool); if (err) goto unlock_wc; err = svn_wc_remove_from_revision_control2(ctx->wc_ctx, tmp_abspath, FALSE, FALSE, NULL, NULL, /* don't cancel */ scratch_pool); if (err) goto unlock_wc; /* Move the temporary disk tree into place. */ err = svn_io_file_rename2(tmp_abspath, local_abspath, FALSE, scratch_pool); if (err) goto unlock_wc; if (ctx->notify_func2) { svn_wc_notify_t *notify = svn_wc_create_notify(local_abspath, svn_wc_notify_add, scratch_pool); notify->kind = svn_node_dir; ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool); } /* Resolve to current working copy state. * svn_client__merge_locked() requires this. */ err = svn_wc__del_tree_conflict(ctx->wc_ctx, local_abspath, scratch_pool); if (err) goto unlock_wc; if (merge_dirs) { svn_revnum_t base_revision; const char *base_repos_relpath; struct find_added_rev_baton b = { 0 }; /* Find the URL and revision of the directory we have just replaced. */ err = svn_wc__node_get_base(NULL, &base_revision, &base_repos_relpath, NULL, NULL, NULL, ctx->wc_ctx, local_abspath, FALSE, scratch_pool, scratch_pool); if (err) goto unlock_wc; url = svn_path_url_add_component2(repos_root_url, base_repos_relpath, scratch_pool); /* Trace the replaced directory's history to its origin. */ err = svn_ra_reparent(ra_session, url, scratch_pool); if (err) goto unlock_wc; b.victim_abspath = local_abspath; b.ctx = ctx; b.added_rev = SVN_INVALID_REVNUM; b.repos_relpath = NULL; b.parent_repos_relpath = svn_relpath_dirname(base_repos_relpath, scratch_pool); b.pool = scratch_pool; err = svn_ra_get_location_segments(ra_session, "", base_revision, base_revision, SVN_INVALID_REVNUM, find_added_rev, &b, scratch_pool); if (err) goto unlock_wc; if (b.added_rev == SVN_INVALID_REVNUM) { err = svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Could not determine the revision in " "which '^/%s' was added to the " "repository.\n"), base_repos_relpath); goto unlock_wc; } /* Merge the replaced directory into the directory which replaced it. * We do not need to consider a reverse-merge here since the source of * this merge was part of the merge target working copy, not a branch * in the repository. */ err = merge_newly_added_dir(base_repos_relpath, url, rev_below(b.added_rev), url, base_revision, local_abspath, FALSE, ctx, scratch_pool, scratch_pool); if (err) goto unlock_wc; } unlock_wc: err = svn_error_compose_create(err, svn_wc__release_write_lock(ctx->wc_ctx, lock_abspath, scratch_pool)); svn_io_sleep_for_timestamps(local_abspath, scratch_pool); SVN_ERR(err); if (ctx->notify_func2) { svn_wc_notify_t *notify = svn_wc_create_notify( local_abspath, svn_wc_notify_resolved_tree, scratch_pool); ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool); } conflict->resolution_tree = svn_client_conflict_option_get_id(option); return SVN_NO_ERROR; } /* Implements conflict_option_resolve_func_t. */ static svn_error_t * resolve_merge_incoming_added_dir_replace(svn_client_conflict_option_t *option, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { return svn_error_trace(merge_incoming_added_dir_replace(option, conflict, ctx, FALSE, scratch_pool)); } /* Implements conflict_option_resolve_func_t. */ static svn_error_t * resolve_merge_incoming_added_dir_replace_and_merge( svn_client_conflict_option_t *option, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { return svn_error_trace(merge_incoming_added_dir_replace(option, conflict, ctx, TRUE, scratch_pool)); } /* Verify the local working copy state matches what we expect when an * incoming deletion tree conflict exists. * We assume update/merge/switch operations leave the working copy in a * state which prefers the local change and cancels the deletion. * Run a quick sanity check and error out if it looks as if the * working copy was modified since, even though it's not easy to make * such modifications without also clearing the conflict marker. */ static svn_error_t * verify_local_state_for_incoming_delete(svn_client_conflict_t *conflict, svn_client_conflict_option_t *option, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { const char *local_abspath; const char *wcroot_abspath; svn_wc_operation_t operation; local_abspath = svn_client_conflict_get_local_abspath(conflict); SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx, local_abspath, scratch_pool, scratch_pool)); operation = svn_client_conflict_get_operation(conflict); if (operation == svn_wc_operation_update || operation == svn_wc_operation_switch) { struct conflict_tree_incoming_delete_details *details; svn_boolean_t is_copy; svn_revnum_t copyfrom_rev; const char *copyfrom_repos_relpath; details = conflict->tree_conflict_incoming_details; if (details == NULL) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Conflict resolution option '%d' requires " "details for tree conflict at '%s' to be " "fetched from the repository."), option->id, svn_dirent_local_style(local_abspath, scratch_pool)); /* Ensure that the item is a copy of itself from before it was deleted. * Update and switch are supposed to set this up when flagging the * conflict. */ SVN_ERR(svn_wc__node_get_origin(&is_copy, ©from_rev, ©from_repos_relpath, NULL, NULL, NULL, NULL, ctx->wc_ctx, local_abspath, FALSE, scratch_pool, scratch_pool)); if (!is_copy) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Cannot resolve tree conflict on '%s' " "(expected a copied item, but the item " "is not a copy)"), svn_dirent_local_style( svn_dirent_skip_ancestor( wcroot_abspath, conflict->local_abspath), scratch_pool)); else if (details->deleted_rev == SVN_INVALID_REVNUM && details->added_rev == SVN_INVALID_REVNUM) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Could not find the revision in which '%s' " "was deleted from the repository"), svn_dirent_local_style( svn_dirent_skip_ancestor( wcroot_abspath, conflict->local_abspath), scratch_pool)); else if (details->deleted_rev != SVN_INVALID_REVNUM && copyfrom_rev >= details->deleted_rev) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Cannot resolve tree conflict on '%s' " "(expected an item copied from a revision " "smaller than r%ld, but the item was " "copied from r%ld)"), svn_dirent_local_style( svn_dirent_skip_ancestor( wcroot_abspath, conflict->local_abspath), scratch_pool), details->deleted_rev, copyfrom_rev); else if (details->added_rev != SVN_INVALID_REVNUM && copyfrom_rev < details->added_rev) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Cannot resolve tree conflict on '%s' " "(expected an item copied from a revision " "larger than r%ld, but the item was " "copied from r%ld)"), svn_dirent_local_style( svn_dirent_skip_ancestor( wcroot_abspath, conflict->local_abspath), scratch_pool), details->added_rev, copyfrom_rev); else if (operation == svn_wc_operation_update) { const char *old_repos_relpath; SVN_ERR(svn_client_conflict_get_incoming_old_repos_location( &old_repos_relpath, NULL, NULL, conflict, scratch_pool, scratch_pool)); if (strcmp(copyfrom_repos_relpath, details->repos_relpath) != 0 && strcmp(copyfrom_repos_relpath, old_repos_relpath) != 0) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Cannot resolve tree conflict on '%s' " "(expected an item copied from '^/%s' " "or from '^/%s' but the item was " "copied from '^/%s@%ld')"), svn_dirent_local_style( svn_dirent_skip_ancestor( wcroot_abspath, conflict->local_abspath), scratch_pool), details->repos_relpath, old_repos_relpath, copyfrom_repos_relpath, copyfrom_rev); } else if (operation == svn_wc_operation_switch) { const char *old_repos_relpath; SVN_ERR(svn_client_conflict_get_incoming_old_repos_location( &old_repos_relpath, NULL, NULL, conflict, scratch_pool, scratch_pool)); if (strcmp(copyfrom_repos_relpath, old_repos_relpath) != 0) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Cannot resolve tree conflict on '%s' " "(expected an item copied from '^/%s', " "but the item was copied from " "'^/%s@%ld')"), svn_dirent_local_style( svn_dirent_skip_ancestor( wcroot_abspath, conflict->local_abspath), scratch_pool), old_repos_relpath, copyfrom_repos_relpath, copyfrom_rev); } } else if (operation == svn_wc_operation_merge) { svn_node_kind_t victim_node_kind; svn_node_kind_t on_disk_kind; /* For merge, all we can do is ensure that the item still exists. */ victim_node_kind = svn_client_conflict_tree_get_victim_node_kind(conflict); SVN_ERR(svn_io_check_path(local_abspath, &on_disk_kind, scratch_pool)); if (victim_node_kind != on_disk_kind) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Cannot resolve tree conflict on '%s' " "(expected node kind '%s' but found '%s')"), svn_dirent_local_style( svn_dirent_skip_ancestor( wcroot_abspath, conflict->local_abspath), scratch_pool), svn_node_kind_to_word(victim_node_kind), svn_node_kind_to_word(on_disk_kind)); } return SVN_NO_ERROR; } /* Implements conflict_option_resolve_func_t. */ static svn_error_t * resolve_incoming_delete_ignore(svn_client_conflict_option_t *option, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { svn_client_conflict_option_id_t option_id; const char *local_abspath; const char *lock_abspath; svn_error_t *err; option_id = svn_client_conflict_option_get_id(option); local_abspath = svn_client_conflict_get_local_abspath(conflict); SVN_ERR(svn_wc__acquire_write_lock_for_resolve(&lock_abspath, ctx->wc_ctx, local_abspath, scratch_pool, scratch_pool)); err = verify_local_state_for_incoming_delete(conflict, option, ctx, scratch_pool); if (err) goto unlock_wc; /* Resolve to the current working copy state. */ err = svn_wc__del_tree_conflict(ctx->wc_ctx, local_abspath, scratch_pool); /* svn_wc__del_tree_conflict doesn't handle notification for us */ if (ctx->notify_func2) ctx->notify_func2(ctx->notify_baton2, svn_wc_create_notify(local_abspath, svn_wc_notify_resolved_tree, scratch_pool), scratch_pool); unlock_wc: err = svn_error_compose_create(err, svn_wc__release_write_lock(ctx->wc_ctx, lock_abspath, scratch_pool)); SVN_ERR(err); conflict->resolution_tree = option_id; return SVN_NO_ERROR; } /* Implements conflict_option_resolve_func_t. */ static svn_error_t * resolve_incoming_delete_accept(svn_client_conflict_option_t *option, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { svn_client_conflict_option_id_t option_id; const char *local_abspath; const char *parent_abspath; const char *lock_abspath; svn_error_t *err; option_id = svn_client_conflict_option_get_id(option); local_abspath = svn_client_conflict_get_local_abspath(conflict); /* Deleting a node requires a lock on the node's parent. */ parent_abspath = svn_dirent_dirname(local_abspath, scratch_pool); SVN_ERR(svn_wc__acquire_write_lock_for_resolve(&lock_abspath, ctx->wc_ctx, parent_abspath, scratch_pool, scratch_pool)); err = verify_local_state_for_incoming_delete(conflict, option, ctx, scratch_pool); if (err) goto unlock_wc; /* Delete the tree conflict victim. Marks the conflict resolved. */ err = svn_wc_delete4(ctx->wc_ctx, local_abspath, FALSE, FALSE, NULL, NULL, /* don't allow user to cancel here */ ctx->notify_func2, ctx->notify_baton2, scratch_pool); if (err) { if (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND) { /* Not a versioned path. This can happen if the victim has already * been deleted in our branche's history, for example. Either way, * the item is gone, which is what we want, so don't treat this as * a fatal error. */ svn_error_clear(err); /* Resolve to current working copy state. */ err = svn_wc__del_tree_conflict(ctx->wc_ctx, local_abspath, scratch_pool); } if (err) goto unlock_wc; } if (ctx->notify_func2) ctx->notify_func2(ctx->notify_baton2, svn_wc_create_notify(local_abspath, svn_wc_notify_resolved_tree, scratch_pool), scratch_pool); unlock_wc: err = svn_error_compose_create(err, svn_wc__release_write_lock(ctx->wc_ctx, lock_abspath, scratch_pool)); SVN_ERR(err); conflict->resolution_tree = option_id; return SVN_NO_ERROR; } /* Implements conflict_option_resolve_func_t. */ static svn_error_t * resolve_incoming_move_file_text_merge(svn_client_conflict_option_t *option, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { svn_client_conflict_option_id_t option_id; const char *local_abspath; svn_wc_operation_t operation; const char *lock_abspath; svn_error_t *err; const char *repos_root_url; const char *incoming_old_repos_relpath; svn_revnum_t incoming_old_pegrev; const char *incoming_new_repos_relpath; svn_revnum_t incoming_new_pegrev; const char *wc_tmpdir; const char *ancestor_abspath; svn_stream_t *ancestor_stream; apr_hash_t *ancestor_props; apr_hash_t *victim_props; apr_hash_t *move_target_props; const char *ancestor_url; const char *corrected_url; svn_ra_session_t *ra_session; svn_wc_merge_outcome_t merge_content_outcome; svn_wc_notify_state_t merge_props_outcome; apr_array_header_t *propdiffs; struct conflict_tree_incoming_delete_details *details; apr_array_header_t *possible_moved_to_abspaths; const char *moved_to_abspath; const char *incoming_abspath = NULL; local_abspath = svn_client_conflict_get_local_abspath(conflict); operation = svn_client_conflict_get_operation(conflict); details = conflict->tree_conflict_incoming_details; if (details == NULL || details->moves == NULL) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("The specified conflict resolution option " "requires details for tree conflict at '%s' " "to be fetched from the repository first."), svn_dirent_local_style(local_abspath, scratch_pool)); if (operation == svn_wc_operation_none) return svn_error_createf(SVN_ERR_WC_CORRUPT, NULL, _("Invalid operation code '%d' recorded for " "conflict at '%s'"), operation, svn_dirent_local_style(local_abspath, scratch_pool)); option_id = svn_client_conflict_option_get_id(option); SVN_ERR_ASSERT(option_id == svn_client_conflict_option_incoming_move_file_text_merge || option_id == svn_client_conflict_option_incoming_move_dir_merge); SVN_ERR(svn_client_conflict_get_repos_info(&repos_root_url, NULL, conflict, scratch_pool, scratch_pool)); SVN_ERR(svn_client_conflict_get_incoming_old_repos_location( &incoming_old_repos_relpath, &incoming_old_pegrev, NULL, conflict, scratch_pool, scratch_pool)); SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( &incoming_new_repos_relpath, &incoming_new_pegrev, NULL, conflict, scratch_pool, scratch_pool)); /* Set up temporary storage for the common ancestor version of the file. */ SVN_ERR(svn_wc__get_tmpdir(&wc_tmpdir, ctx->wc_ctx, local_abspath, scratch_pool, scratch_pool)); SVN_ERR(svn_stream_open_unique(&ancestor_stream, &ancestor_abspath, wc_tmpdir, svn_io_file_del_on_pool_cleanup, scratch_pool, scratch_pool)); /* Fetch the ancestor file's content. */ ancestor_url = svn_path_url_add_component2(repos_root_url, incoming_old_repos_relpath, scratch_pool); SVN_ERR(svn_client__open_ra_session_internal(&ra_session, &corrected_url, ancestor_url, NULL, NULL, FALSE, FALSE, ctx, scratch_pool, scratch_pool)); SVN_ERR(svn_ra_get_file(ra_session, "", incoming_old_pegrev, ancestor_stream, NULL, /* fetched_rev */ &ancestor_props, scratch_pool)); filter_props(ancestor_props, scratch_pool); /* Close stream to flush ancestor file to disk. */ SVN_ERR(svn_stream_close(ancestor_stream)); possible_moved_to_abspaths = svn_hash_gets(details->wc_move_targets, get_moved_to_repos_relpath(details, scratch_pool)); moved_to_abspath = APR_ARRAY_IDX(possible_moved_to_abspaths, details->wc_move_target_idx, const char *); /* ### The following WC modifications should be atomic. */ SVN_ERR(svn_wc__acquire_write_lock_for_resolve( &lock_abspath, ctx->wc_ctx, svn_dirent_get_longest_ancestor(local_abspath, moved_to_abspath, scratch_pool), scratch_pool, scratch_pool)); err = verify_local_state_for_incoming_delete(conflict, option, ctx, scratch_pool); if (err) goto unlock_wc; /* Get a copy of the conflict victim's properties. */ err = svn_wc_prop_list2(&victim_props, ctx->wc_ctx, local_abspath, scratch_pool, scratch_pool); if (err) goto unlock_wc; /* Get a copy of the move target's properties. */ err = svn_wc_prop_list2(&move_target_props, ctx->wc_ctx, moved_to_abspath, scratch_pool, scratch_pool); if (err) goto unlock_wc; /* Create a property diff for the files. */ err = svn_prop_diffs(&propdiffs, move_target_props, victim_props, scratch_pool); if (err) goto unlock_wc; if (operation == svn_wc_operation_update || operation == svn_wc_operation_switch) { svn_stream_t *working_stream; svn_stream_t *incoming_stream; /* Create a temporary copy of the working file in repository-normal form. * Set up this temporary file to be automatically removed. */ err = svn_stream_open_unique(&incoming_stream, &incoming_abspath, wc_tmpdir, svn_io_file_del_on_pool_cleanup, scratch_pool, scratch_pool); if (err) goto unlock_wc; err = svn_wc__translated_stream(&working_stream, ctx->wc_ctx, local_abspath, local_abspath, SVN_WC_TRANSLATE_TO_NF, scratch_pool, scratch_pool); if (err) goto unlock_wc; err = svn_stream_copy3(working_stream, incoming_stream, NULL, NULL, /* no cancellation */ scratch_pool); if (err) goto unlock_wc; } else if (operation == svn_wc_operation_merge) { svn_stream_t *incoming_stream; svn_stream_t *move_target_stream; /* Set aside the current move target file. This is required to apply * the move, and only then perform a three-way text merge between * the ancestor's file, our working file (which we would move to * the destination), and the file that we have set aside, which * contains the incoming fulltext. * Set up this temporary file to NOT be automatically removed. */ err = svn_stream_open_unique(&incoming_stream, &incoming_abspath, wc_tmpdir, svn_io_file_del_none, scratch_pool, scratch_pool); if (err) goto unlock_wc; err = svn_wc__translated_stream(&move_target_stream, ctx->wc_ctx, moved_to_abspath, moved_to_abspath, SVN_WC_TRANSLATE_TO_NF, scratch_pool, scratch_pool); if (err) goto unlock_wc; err = svn_stream_copy3(move_target_stream, incoming_stream, NULL, NULL, /* no cancellation */ scratch_pool); if (err) goto unlock_wc; /* Apply the incoming move. */ err = svn_io_remove_file2(moved_to_abspath, FALSE, scratch_pool); if (err) goto unlock_wc; err = svn_wc__move2(ctx->wc_ctx, local_abspath, moved_to_abspath, FALSE, /* ordinary (not meta-data only) move */ FALSE, /* mixed-revisions don't apply to files */ NULL, NULL, /* don't allow user to cancel here */ NULL, NULL, /* no extra notification */ scratch_pool); if (err) goto unlock_wc; } else SVN_ERR_MALFUNCTION(); /* Perform the file merge. */ err = svn_wc_merge5(&merge_content_outcome, &merge_props_outcome, ctx->wc_ctx, ancestor_abspath, incoming_abspath, moved_to_abspath, NULL, NULL, NULL, /* labels */ NULL, NULL, /* conflict versions */ FALSE, /* dry run */ NULL, NULL, /* diff3_cmd, merge_options */ apr_hash_count(ancestor_props) ? ancestor_props : NULL, propdiffs, NULL, NULL, /* conflict func/baton */ NULL, NULL, /* don't allow user to cancel here */ scratch_pool); svn_io_sleep_for_timestamps(moved_to_abspath, scratch_pool); if (err) goto unlock_wc; if (operation == svn_wc_operation_merge && incoming_abspath) { err = svn_io_remove_file2(incoming_abspath, TRUE, scratch_pool); if (err) goto unlock_wc; incoming_abspath = NULL; } if (ctx->notify_func2) { svn_wc_notify_t *notify; /* Tell the world about the file merge that just happened. */ notify = svn_wc_create_notify(moved_to_abspath, svn_wc_notify_update_update, scratch_pool); if (merge_content_outcome == svn_wc_merge_conflict) notify->content_state = svn_wc_notify_state_conflicted; else notify->content_state = svn_wc_notify_state_merged; notify->prop_state = merge_props_outcome; notify->kind = svn_node_file; ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool); } if (operation == svn_wc_operation_update || operation == svn_wc_operation_switch) { /* Delete the tree conflict victim (clears the tree conflict marker). */ err = svn_wc_delete4(ctx->wc_ctx, local_abspath, FALSE, FALSE, NULL, NULL, /* don't allow user to cancel here */ NULL, NULL, /* no extra notification */ scratch_pool); if (err) goto unlock_wc; } if (ctx->notify_func2) { svn_wc_notify_t *notify; notify = svn_wc_create_notify(local_abspath, svn_wc_notify_resolved_tree, scratch_pool); ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool); } conflict->resolution_tree = option_id; unlock_wc: if (err && operation == svn_wc_operation_merge && incoming_abspath) err = svn_error_quick_wrapf( err, _("If needed, a backup copy of '%s' can be found at '%s'"), svn_dirent_local_style(moved_to_abspath, scratch_pool), svn_dirent_local_style(incoming_abspath, scratch_pool)); err = svn_error_compose_create(err, svn_wc__release_write_lock(ctx->wc_ctx, lock_abspath, scratch_pool)); SVN_ERR(err); return SVN_NO_ERROR; } /* Implements conflict_option_resolve_func_t. */ static svn_error_t * resolve_incoming_move_dir_merge(svn_client_conflict_option_t *option, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { svn_client_conflict_option_id_t option_id; const char *local_abspath; svn_wc_operation_t operation; const char *lock_abspath; svn_error_t *err; const char *repos_root_url; const char *repos_uuid; const char *incoming_old_repos_relpath; svn_revnum_t incoming_old_pegrev; const char *incoming_new_repos_relpath; svn_revnum_t incoming_new_pegrev; const char *victim_repos_relpath; svn_revnum_t victim_peg_rev; const char *moved_to_repos_relpath; svn_revnum_t moved_to_peg_rev; struct conflict_tree_incoming_delete_details *details; apr_array_header_t *possible_moved_to_abspaths; const char *moved_to_abspath; svn_client__pathrev_t *yca_loc; svn_opt_revision_t yca_opt_rev; svn_client__conflict_report_t *conflict_report; svn_boolean_t is_copy; svn_boolean_t is_modified; local_abspath = svn_client_conflict_get_local_abspath(conflict); operation = svn_client_conflict_get_operation(conflict); details = conflict->tree_conflict_incoming_details; if (details == NULL || details->moves == NULL) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("The specified conflict resolution option " "requires details for tree conflict at '%s' " "to be fetched from the repository first."), svn_dirent_local_style(local_abspath, scratch_pool)); option_id = svn_client_conflict_option_get_id(option); SVN_ERR_ASSERT(option_id == svn_client_conflict_option_incoming_move_dir_merge); SVN_ERR(svn_client_conflict_get_repos_info(&repos_root_url, &repos_uuid, conflict, scratch_pool, scratch_pool)); SVN_ERR(svn_client_conflict_get_incoming_old_repos_location( &incoming_old_repos_relpath, &incoming_old_pegrev, NULL, conflict, scratch_pool, scratch_pool)); SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( &incoming_new_repos_relpath, &incoming_new_pegrev, NULL, conflict, scratch_pool, scratch_pool)); /* Get repository location of the moved-away node (the conflict victim). */ if (operation == svn_wc_operation_update || operation == svn_wc_operation_switch) { victim_repos_relpath = incoming_old_repos_relpath; victim_peg_rev = incoming_old_pegrev; } else if (operation == svn_wc_operation_merge) SVN_ERR(svn_wc__node_get_repos_info(&victim_peg_rev, &victim_repos_relpath, NULL, NULL, ctx->wc_ctx, local_abspath, scratch_pool, scratch_pool)); /* Get repository location of the moved-here node (incoming move). */ possible_moved_to_abspaths = svn_hash_gets(details->wc_move_targets, get_moved_to_repos_relpath(details, scratch_pool)); moved_to_abspath = APR_ARRAY_IDX(possible_moved_to_abspaths, details->wc_move_target_idx, const char *); /* ### The following WC modifications should be atomic. */ SVN_ERR(svn_wc__acquire_write_lock_for_resolve( &lock_abspath, ctx->wc_ctx, svn_dirent_get_longest_ancestor(local_abspath, moved_to_abspath, scratch_pool), scratch_pool, scratch_pool)); err = svn_wc__node_get_origin(&is_copy, &moved_to_peg_rev, &moved_to_repos_relpath, NULL, NULL, NULL, NULL, ctx->wc_ctx, moved_to_abspath, FALSE, scratch_pool, scratch_pool); if (err) goto unlock_wc; if (!is_copy && operation == svn_wc_operation_merge) { err = svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Cannot resolve tree conflict on '%s' " "(expected a copied item at '%s', but the " "item is not a copy)"), svn_dirent_local_style(local_abspath, scratch_pool), svn_dirent_local_style(moved_to_abspath, scratch_pool)); goto unlock_wc; } if (moved_to_repos_relpath == NULL || moved_to_peg_rev == SVN_INVALID_REVNUM) { err = svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Cannot resolve tree conflict on '%s' " "(could not determine origin of '%s')"), svn_dirent_local_style(local_abspath, scratch_pool), svn_dirent_local_style(moved_to_abspath, scratch_pool)); goto unlock_wc; } /* Now find the youngest common ancestor of these nodes. */ err = find_yca(&yca_loc, victim_repos_relpath, victim_peg_rev, moved_to_repos_relpath, moved_to_peg_rev, repos_root_url, repos_uuid, NULL, ctx, scratch_pool, scratch_pool); if (err) goto unlock_wc; if (yca_loc == NULL) { err = svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Cannot resolve tree conflict on '%s' " "(could not find common ancestor of '^/%s@%ld' " " and '^/%s@%ld')"), svn_dirent_local_style(local_abspath, scratch_pool), victim_repos_relpath, victim_peg_rev, moved_to_repos_relpath, moved_to_peg_rev); goto unlock_wc; } yca_opt_rev.kind = svn_opt_revision_number; yca_opt_rev.value.number = yca_loc->rev; err = verify_local_state_for_incoming_delete(conflict, option, ctx, scratch_pool); if (err) goto unlock_wc; if (operation == svn_wc_operation_merge) { const char *move_target_url; svn_opt_revision_t incoming_new_opt_rev; /* Revert the incoming move target directory. */ SVN_ERR(svn_wc_revert5(ctx->wc_ctx, moved_to_abspath, svn_depth_infinity, FALSE, NULL, TRUE, FALSE, NULL, NULL, /* no cancellation */ ctx->notify_func2, ctx->notify_baton2, scratch_pool)); /* The move operation is not part of natural history. We must replicate * this move in our history. Record a move in the working copy. */ err = svn_wc__move2(ctx->wc_ctx, local_abspath, moved_to_abspath, FALSE, /* this is not a meta-data only move */ TRUE, /* allow mixed-revisions just in case */ NULL, NULL, /* don't allow user to cancel here */ ctx->notify_func2, ctx->notify_baton2, scratch_pool); if (err) goto unlock_wc; /* Merge YCA_URL@YCA_REV->MOVE_TARGET_URL@MERGE_RIGHT into move target. */ move_target_url = apr_pstrcat(scratch_pool, repos_root_url, "/", get_moved_to_repos_relpath(details, scratch_pool), SVN_VA_NULL); incoming_new_opt_rev.kind = svn_opt_revision_number; incoming_new_opt_rev.value.number = incoming_new_pegrev; err = svn_client__merge_locked(&conflict_report, yca_loc->url, &yca_opt_rev, move_target_url, &incoming_new_opt_rev, moved_to_abspath, svn_depth_infinity, TRUE, TRUE, /* do a no-ancestry merge */ FALSE, FALSE, FALSE, TRUE, /* Allow mixed-rev just in case, * since conflict victims can't be * updated to straighten out * mixed-rev trees. */ NULL, ctx, scratch_pool, scratch_pool); if (err) goto unlock_wc; } else { SVN_ERR_ASSERT(operation == svn_wc_operation_update || operation == svn_wc_operation_switch); /* Merge local modifications into the incoming move target dir. */ err = svn_wc__has_local_mods(&is_modified, ctx->wc_ctx, local_abspath, TRUE, ctx->cancel_func, ctx->cancel_baton, scratch_pool); if (err) goto unlock_wc; if (is_modified) { err = svn_wc__conflict_tree_update_incoming_move(ctx->wc_ctx, local_abspath, moved_to_abspath, ctx->cancel_func, ctx->cancel_baton, ctx->notify_func2, ctx->notify_baton2, scratch_pool); if (err) goto unlock_wc; } /* The move operation is part of our natural history. * Delete the tree conflict victim (clears the tree conflict marker). */ err = svn_wc_delete4(ctx->wc_ctx, local_abspath, FALSE, FALSE, NULL, NULL, /* don't allow user to cancel here */ NULL, NULL, /* no extra notification */ scratch_pool); if (err) goto unlock_wc; } if (ctx->notify_func2) { svn_wc_notify_t *notify; notify = svn_wc_create_notify(local_abspath, svn_wc_notify_resolved_tree, scratch_pool); ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool); } conflict->resolution_tree = option_id; unlock_wc: err = svn_error_compose_create(err, svn_wc__release_write_lock(ctx->wc_ctx, lock_abspath, scratch_pool)); SVN_ERR(err); return SVN_NO_ERROR; } /* Implements conflict_option_resolve_func_t. */ static svn_error_t * resolve_local_move_file_merge(svn_client_conflict_option_t *option, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { const char *lock_abspath; svn_error_t *err; const char *repos_root_url; const char *incoming_old_repos_relpath; svn_revnum_t incoming_old_pegrev; const char *incoming_new_repos_relpath; svn_revnum_t incoming_new_pegrev; const char *wc_tmpdir; const char *ancestor_tmp_abspath; const char *incoming_tmp_abspath; apr_hash_t *ancestor_props; apr_hash_t *incoming_props; svn_stream_t *stream; const char *url; const char *corrected_url; const char *old_session_url; svn_ra_session_t *ra_session; svn_wc_merge_outcome_t merge_content_outcome; svn_wc_notify_state_t merge_props_outcome; apr_array_header_t *propdiffs; struct conflict_tree_local_missing_details *details; details = conflict->tree_conflict_local_details; SVN_ERR(svn_client_conflict_get_repos_info(&repos_root_url, NULL, conflict, scratch_pool, scratch_pool)); SVN_ERR(svn_client_conflict_get_incoming_old_repos_location( &incoming_old_repos_relpath, &incoming_old_pegrev, NULL, conflict, scratch_pool, scratch_pool)); SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( &incoming_new_repos_relpath, &incoming_new_pegrev, NULL, conflict, scratch_pool, scratch_pool)); SVN_ERR(svn_wc__get_tmpdir(&wc_tmpdir, ctx->wc_ctx, details->moved_to_abspath, scratch_pool, scratch_pool)); /* Fetch the common ancestor file's content. */ SVN_ERR(svn_stream_open_unique(&stream, &ancestor_tmp_abspath, wc_tmpdir, svn_io_file_del_on_pool_cleanup, scratch_pool, scratch_pool)); url = svn_path_url_add_component2(repos_root_url, incoming_old_repos_relpath, scratch_pool); SVN_ERR(svn_client__open_ra_session_internal(&ra_session, &corrected_url, url, NULL, NULL, FALSE, FALSE, ctx, scratch_pool, scratch_pool)); SVN_ERR(svn_ra_get_file(ra_session, "", incoming_old_pegrev, stream, NULL, &ancestor_props, scratch_pool)); filter_props(ancestor_props, scratch_pool); /* Close stream to flush the file to disk. */ SVN_ERR(svn_stream_close(stream)); /* Do the same for the incoming file's content. */ SVN_ERR(svn_stream_open_unique(&stream, &incoming_tmp_abspath, wc_tmpdir, svn_io_file_del_on_pool_cleanup, scratch_pool, scratch_pool)); url = svn_path_url_add_component2(repos_root_url, incoming_new_repos_relpath, scratch_pool); SVN_ERR(svn_client__ensure_ra_session_url(&old_session_url, ra_session, url, scratch_pool)); SVN_ERR(svn_ra_get_file(ra_session, "", incoming_new_pegrev, stream, NULL, &incoming_props, scratch_pool)); /* Close stream to flush the file to disk. */ SVN_ERR(svn_stream_close(stream)); filter_props(incoming_props, scratch_pool); /* Create a property diff for the files. */ SVN_ERR(svn_prop_diffs(&propdiffs, incoming_props, ancestor_props, scratch_pool)); /* ### The following WC modifications should be atomic. */ SVN_ERR(svn_wc__acquire_write_lock_for_resolve( &lock_abspath, ctx->wc_ctx, svn_dirent_get_longest_ancestor(conflict->local_abspath, details->moved_to_abspath, scratch_pool), scratch_pool, scratch_pool)); /* Perform the file merge. */ err = svn_wc_merge5(&merge_content_outcome, &merge_props_outcome, ctx->wc_ctx, ancestor_tmp_abspath, incoming_tmp_abspath, details->moved_to_abspath, NULL, NULL, NULL, /* labels */ NULL, NULL, /* conflict versions */ FALSE, /* dry run */ NULL, NULL, /* diff3_cmd, merge_options */ apr_hash_count(ancestor_props) ? ancestor_props : NULL, propdiffs, NULL, NULL, /* conflict func/baton */ NULL, NULL, /* don't allow user to cancel here */ scratch_pool); svn_io_sleep_for_timestamps(details->moved_to_abspath, scratch_pool); if (err) return svn_error_compose_create(err, svn_wc__release_write_lock(ctx->wc_ctx, lock_abspath, scratch_pool)); err = svn_wc__del_tree_conflict(ctx->wc_ctx, conflict->local_abspath, scratch_pool); err = svn_error_compose_create(err, svn_wc__release_write_lock(ctx->wc_ctx, lock_abspath, scratch_pool)); if (err) return svn_error_trace(err); if (ctx->notify_func2) { svn_wc_notify_t *notify; /* Tell the world about the file merge that just happened. */ notify = svn_wc_create_notify(details->moved_to_abspath, svn_wc_notify_update_update, scratch_pool); if (merge_content_outcome == svn_wc_merge_conflict) notify->content_state = svn_wc_notify_state_conflicted; else notify->content_state = svn_wc_notify_state_merged; notify->prop_state = merge_props_outcome; notify->kind = svn_node_file; ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool); /* And also about the successfully resolved tree conflict. */ notify = svn_wc_create_notify(conflict->local_abspath, svn_wc_notify_resolved_tree, scratch_pool); ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool); } conflict->resolution_tree = svn_client_conflict_option_get_id(option); return SVN_NO_ERROR; } static svn_error_t * assert_text_conflict(svn_client_conflict_t *conflict, apr_pool_t *scratch_pool) { svn_boolean_t text_conflicted; SVN_ERR(svn_client_conflict_get_conflicted(&text_conflicted, NULL, NULL, conflict, scratch_pool, scratch_pool)); SVN_ERR_ASSERT(text_conflicted); /* ### return proper error? */ return SVN_NO_ERROR; } static svn_error_t * assert_prop_conflict(svn_client_conflict_t *conflict, apr_pool_t *scratch_pool) { apr_array_header_t *props_conflicted; SVN_ERR(svn_client_conflict_get_conflicted(NULL, &props_conflicted, NULL, conflict, scratch_pool, scratch_pool)); /* ### return proper error? */ SVN_ERR_ASSERT(props_conflicted && props_conflicted->nelts > 0); return SVN_NO_ERROR; } static svn_error_t * assert_tree_conflict(svn_client_conflict_t *conflict, apr_pool_t *scratch_pool) { svn_boolean_t tree_conflicted; SVN_ERR(svn_client_conflict_get_conflicted(NULL, NULL, &tree_conflicted, conflict, scratch_pool, scratch_pool)); SVN_ERR_ASSERT(tree_conflicted); /* ### return proper error? */ return SVN_NO_ERROR; } /* Helper to add to conflict resolution option to array of OPTIONS. * Resolution option object will be allocated from OPTIONS->POOL * and DESCRIPTION will be copied to this pool. * Returns pointer to the created conflict resolution option. */ static svn_client_conflict_option_t * add_resolution_option(apr_array_header_t *options, svn_client_conflict_t *conflict, svn_client_conflict_option_id_t id, const char *label, const char *description, conflict_option_resolve_func_t resolve_func) { svn_client_conflict_option_t *option; option = apr_pcalloc(options->pool, sizeof(*option)); option->pool = options->pool; option->id = id; option->label = apr_pstrdup(option->pool, label); option->description = apr_pstrdup(option->pool, description); option->conflict = conflict; option->do_resolve_func = resolve_func; APR_ARRAY_PUSH(options, const svn_client_conflict_option_t *) = option; return option; } svn_error_t * svn_client_conflict_text_get_resolution_options(apr_array_header_t **options, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { const char *mime_type; SVN_ERR(assert_text_conflict(conflict, scratch_pool)); *options = apr_array_make(result_pool, 7, sizeof(svn_client_conflict_option_t *)); add_resolution_option(*options, conflict, svn_client_conflict_option_postpone, _("Postpone"), _("skip this conflict and leave it unresolved"), resolve_postpone); mime_type = svn_client_conflict_text_get_mime_type(conflict); if (mime_type && svn_mime_type_is_binary(mime_type)) { /* Resolver options for a binary file conflict. */ add_resolution_option(*options, conflict, svn_client_conflict_option_base_text, _("Accept base"), _("discard local and incoming changes for this binary file"), resolve_text_conflict); add_resolution_option(*options, conflict, svn_client_conflict_option_incoming_text, _("Accept incoming"), _("accept incoming version of binary file"), resolve_text_conflict); add_resolution_option(*options, conflict, svn_client_conflict_option_working_text, _("Mark as resolved"), _("accept binary file as it appears in the working copy"), resolve_text_conflict); } else { /* Resolver options for a text file conflict. */ add_resolution_option(*options, conflict, svn_client_conflict_option_base_text, _("Accept base"), _("discard local and incoming changes for this file"), resolve_text_conflict); add_resolution_option(*options, conflict, svn_client_conflict_option_incoming_text, _("Accept incoming"), _("accept incoming version of entire file"), resolve_text_conflict); add_resolution_option(*options, conflict, svn_client_conflict_option_working_text, _("Reject incoming"), _("reject all incoming changes for this file"), resolve_text_conflict); add_resolution_option(*options, conflict, svn_client_conflict_option_incoming_text_where_conflicted, _("Accept incoming for conflicts"), _("accept changes only where they conflict"), resolve_text_conflict); add_resolution_option(*options, conflict, svn_client_conflict_option_working_text_where_conflicted, _("Reject conflicts"), _("reject changes which conflict and accept the rest"), resolve_text_conflict); add_resolution_option(*options, conflict, svn_client_conflict_option_merged_text, _("Mark as resolved"), _("accept the file as it appears in the working copy"), resolve_text_conflict); } return SVN_NO_ERROR; } svn_error_t * svn_client_conflict_prop_get_resolution_options(apr_array_header_t **options, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { SVN_ERR(assert_prop_conflict(conflict, scratch_pool)); *options = apr_array_make(result_pool, 7, sizeof(svn_client_conflict_option_t *)); add_resolution_option(*options, conflict, svn_client_conflict_option_postpone, _("Postpone"), _("skip this conflict and leave it unresolved"), resolve_postpone); add_resolution_option(*options, conflict, svn_client_conflict_option_base_text, _("Accept base"), _("discard local and incoming changes for this property"), resolve_prop_conflict); add_resolution_option(*options, conflict, svn_client_conflict_option_incoming_text, _("Accept incoming"), _("accept incoming version of entire property value"), resolve_prop_conflict); add_resolution_option(*options, conflict, svn_client_conflict_option_working_text, _("Mark as resolved"), _("accept working copy version of entire property value"), resolve_prop_conflict); add_resolution_option(*options, conflict, svn_client_conflict_option_incoming_text_where_conflicted, _("Accept incoming for conflicts"), _("accept incoming changes only where they conflict"), resolve_prop_conflict); add_resolution_option(*options, conflict, svn_client_conflict_option_working_text_where_conflicted, _("Reject conflicts"), _("reject changes which conflict and accept the rest"), resolve_prop_conflict); add_resolution_option(*options, conflict, svn_client_conflict_option_merged_text, _("Accept merged"), _("accept merged version of property value"), resolve_prop_conflict); return SVN_NO_ERROR; } /* Configure 'accept current wc state' resolution option for a tree conflict. */ static svn_error_t * configure_option_accept_current_wc_state(svn_client_conflict_t *conflict, apr_array_header_t *options) { svn_wc_operation_t operation; svn_wc_conflict_action_t incoming_change; svn_wc_conflict_reason_t local_change; conflict_option_resolve_func_t do_resolve_func; operation = svn_client_conflict_get_operation(conflict); incoming_change = svn_client_conflict_get_incoming_change(conflict); local_change = svn_client_conflict_get_local_change(conflict); if ((operation == svn_wc_operation_update || operation == svn_wc_operation_switch) && (local_change == svn_wc_conflict_reason_moved_away || local_change == svn_wc_conflict_reason_deleted || local_change == svn_wc_conflict_reason_replaced) && incoming_change == svn_wc_conflict_action_edit) { /* We must break moves if the user accepts the current working copy * state instead of updating a moved-away node or updating children * moved outside of deleted or replaced directory nodes. * Else such moves would be left in an invalid state. */ do_resolve_func = resolve_update_break_moved_away; } else do_resolve_func = resolve_accept_current_wc_state; add_resolution_option(options, conflict, svn_client_conflict_option_accept_current_wc_state, _("Mark as resolved"), _("accept current working copy state"), do_resolve_func); return SVN_NO_ERROR; } /* Configure 'update move destination' resolution option for a tree conflict. */ static svn_error_t * configure_option_update_move_destination(svn_client_conflict_t *conflict, apr_array_header_t *options) { svn_wc_operation_t operation; svn_wc_conflict_action_t incoming_change; svn_wc_conflict_reason_t local_change; operation = svn_client_conflict_get_operation(conflict); incoming_change = svn_client_conflict_get_incoming_change(conflict); local_change = svn_client_conflict_get_local_change(conflict); if ((operation == svn_wc_operation_update || operation == svn_wc_operation_switch) && incoming_change == svn_wc_conflict_action_edit && local_change == svn_wc_conflict_reason_moved_away) { add_resolution_option( options, conflict, svn_client_conflict_option_update_move_destination, _("Update move destination"), _("apply incoming changes to move destination"), resolve_update_moved_away_node); } return SVN_NO_ERROR; } /* Configure 'update raise moved away children' resolution option for a tree * conflict. */ static svn_error_t * configure_option_update_raise_moved_away_children( svn_client_conflict_t *conflict, apr_array_header_t *options) { svn_wc_operation_t operation; svn_wc_conflict_action_t incoming_change; svn_wc_conflict_reason_t local_change; svn_node_kind_t victim_node_kind; operation = svn_client_conflict_get_operation(conflict); incoming_change = svn_client_conflict_get_incoming_change(conflict); local_change = svn_client_conflict_get_local_change(conflict); victim_node_kind = svn_client_conflict_tree_get_victim_node_kind(conflict); if ((operation == svn_wc_operation_update || operation == svn_wc_operation_switch) && incoming_change == svn_wc_conflict_action_edit && (local_change == svn_wc_conflict_reason_deleted || local_change == svn_wc_conflict_reason_replaced) && victim_node_kind == svn_node_dir) { add_resolution_option( options, conflict, svn_client_conflict_option_update_any_moved_away_children, _("Update any moved-away children"), _("prepare for updating moved-away children, if any"), resolve_update_raise_moved_away); } return SVN_NO_ERROR; } /* Configure 'incoming add ignore' resolution option for a tree conflict. */ static svn_error_t * configure_option_incoming_add_ignore(svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_array_header_t *options, apr_pool_t *scratch_pool) { svn_wc_operation_t operation; svn_wc_conflict_action_t incoming_change; svn_wc_conflict_reason_t local_change; const char *incoming_new_repos_relpath; svn_revnum_t incoming_new_pegrev; svn_node_kind_t victim_node_kind; operation = svn_client_conflict_get_operation(conflict); incoming_change = svn_client_conflict_get_incoming_change(conflict); local_change = svn_client_conflict_get_local_change(conflict); victim_node_kind = svn_client_conflict_tree_get_victim_node_kind(conflict); SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( &incoming_new_repos_relpath, &incoming_new_pegrev, NULL, conflict, scratch_pool, scratch_pool)); /* This option is only available for directories. */ if (victim_node_kind == svn_node_dir && incoming_change == svn_wc_conflict_action_add && (local_change == svn_wc_conflict_reason_obstructed || local_change == svn_wc_conflict_reason_added)) { const char *description; const char *wcroot_abspath; SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx, conflict->local_abspath, scratch_pool, scratch_pool)); if (operation == svn_wc_operation_merge) description = apr_psprintf(scratch_pool, _("ignore and do not add '^/%s@%ld' here"), incoming_new_repos_relpath, incoming_new_pegrev); else if (operation == svn_wc_operation_update || operation == svn_wc_operation_switch) { if (victim_node_kind == svn_node_file) description = apr_psprintf(scratch_pool, _("replace '^/%s@%ld' with the locally added file"), incoming_new_repos_relpath, incoming_new_pegrev); else if (victim_node_kind == svn_node_dir) description = apr_psprintf(scratch_pool, _("replace '^/%s@%ld' with the locally added " "directory"), incoming_new_repos_relpath, incoming_new_pegrev); else description = apr_psprintf(scratch_pool, _("replace '^/%s@%ld' with the locally added item"), incoming_new_repos_relpath, incoming_new_pegrev); } else return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("unexpected operation code '%d'"), operation); add_resolution_option( options, conflict, svn_client_conflict_option_incoming_add_ignore, _("Ignore incoming addition"), description, resolve_incoming_add_ignore); } return SVN_NO_ERROR; } /* Configure 'incoming added file text merge' resolution option for a tree * conflict. */ static svn_error_t * configure_option_incoming_added_file_text_merge(svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_array_header_t *options, apr_pool_t *scratch_pool) { svn_wc_operation_t operation; svn_wc_conflict_action_t incoming_change; svn_wc_conflict_reason_t local_change; svn_node_kind_t victim_node_kind; const char *incoming_new_repos_relpath; svn_revnum_t incoming_new_pegrev; svn_node_kind_t incoming_new_kind; operation = svn_client_conflict_get_operation(conflict); incoming_change = svn_client_conflict_get_incoming_change(conflict); local_change = svn_client_conflict_get_local_change(conflict); victim_node_kind = svn_client_conflict_tree_get_victim_node_kind(conflict); SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( &incoming_new_repos_relpath, &incoming_new_pegrev, &incoming_new_kind, conflict, scratch_pool, scratch_pool)); if (victim_node_kind == svn_node_file && incoming_new_kind == svn_node_file && incoming_change == svn_wc_conflict_action_add && (local_change == svn_wc_conflict_reason_obstructed || local_change == svn_wc_conflict_reason_added)) { const char *description; const char *wcroot_abspath; SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx, conflict->local_abspath, scratch_pool, scratch_pool)); if (operation == svn_wc_operation_merge) description = apr_psprintf(scratch_pool, _("merge '^/%s@%ld' into '%s'"), incoming_new_repos_relpath, incoming_new_pegrev, svn_dirent_local_style( svn_dirent_skip_ancestor(wcroot_abspath, conflict->local_abspath), scratch_pool)); else description = apr_psprintf(scratch_pool, _("merge local '%s' and '^/%s@%ld'"), svn_dirent_local_style( svn_dirent_skip_ancestor(wcroot_abspath, conflict->local_abspath), scratch_pool), incoming_new_repos_relpath, incoming_new_pegrev); add_resolution_option( options, conflict, svn_client_conflict_option_incoming_added_file_text_merge, _("Merge the files"), description, operation == svn_wc_operation_merge ? resolve_merge_incoming_added_file_text_merge : resolve_merge_incoming_added_file_text_update); } return SVN_NO_ERROR; } /* Configure 'incoming added file replace and merge' resolution option for a * tree conflict. */ static svn_error_t * configure_option_incoming_added_file_replace_and_merge( svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_array_header_t *options, apr_pool_t *scratch_pool) { svn_wc_operation_t operation; svn_wc_conflict_action_t incoming_change; svn_wc_conflict_reason_t local_change; svn_node_kind_t victim_node_kind; const char *incoming_new_repos_relpath; svn_revnum_t incoming_new_pegrev; svn_node_kind_t incoming_new_kind; operation = svn_client_conflict_get_operation(conflict); incoming_change = svn_client_conflict_get_incoming_change(conflict); local_change = svn_client_conflict_get_local_change(conflict); victim_node_kind = svn_client_conflict_tree_get_victim_node_kind(conflict); SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( &incoming_new_repos_relpath, &incoming_new_pegrev, &incoming_new_kind, conflict, scratch_pool, scratch_pool)); if (operation == svn_wc_operation_merge && victim_node_kind == svn_node_file && incoming_new_kind == svn_node_file && incoming_change == svn_wc_conflict_action_add && local_change == svn_wc_conflict_reason_obstructed) { const char *wcroot_abspath; const char *description; SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx, conflict->local_abspath, scratch_pool, scratch_pool)); description = apr_psprintf(scratch_pool, _("delete '%s', copy '^/%s@%ld' here, and merge the files"), svn_dirent_local_style( svn_dirent_skip_ancestor(wcroot_abspath, conflict->local_abspath), scratch_pool), incoming_new_repos_relpath, incoming_new_pegrev); add_resolution_option( options, conflict, svn_client_conflict_option_incoming_added_file_replace_and_merge, _("Replace and merge"), description, resolve_merge_incoming_added_file_replace_and_merge); } return SVN_NO_ERROR; } /* Configure 'incoming added dir merge' resolution option for a tree * conflict. */ static svn_error_t * configure_option_incoming_added_dir_merge(svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_array_header_t *options, apr_pool_t *scratch_pool) { svn_wc_operation_t operation; svn_wc_conflict_action_t incoming_change; svn_wc_conflict_reason_t local_change; svn_node_kind_t victim_node_kind; const char *incoming_new_repos_relpath; svn_revnum_t incoming_new_pegrev; svn_node_kind_t incoming_new_kind; operation = svn_client_conflict_get_operation(conflict); incoming_change = svn_client_conflict_get_incoming_change(conflict); local_change = svn_client_conflict_get_local_change(conflict); victim_node_kind = svn_client_conflict_tree_get_victim_node_kind(conflict); SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( &incoming_new_repos_relpath, &incoming_new_pegrev, &incoming_new_kind, conflict, scratch_pool, scratch_pool)); if (victim_node_kind == svn_node_dir && incoming_new_kind == svn_node_dir && incoming_change == svn_wc_conflict_action_add && (local_change == svn_wc_conflict_reason_added || (operation == svn_wc_operation_merge && local_change == svn_wc_conflict_reason_obstructed))) { const char *description; const char *wcroot_abspath; SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx, conflict->local_abspath, scratch_pool, scratch_pool)); if (operation == svn_wc_operation_merge) description = apr_psprintf(scratch_pool, _("merge '^/%s@%ld' into '%s'"), incoming_new_repos_relpath, incoming_new_pegrev, svn_dirent_local_style( svn_dirent_skip_ancestor(wcroot_abspath, conflict->local_abspath), scratch_pool)); else description = apr_psprintf(scratch_pool, _("merge local '%s' and '^/%s@%ld'"), svn_dirent_local_style( svn_dirent_skip_ancestor(wcroot_abspath, conflict->local_abspath), scratch_pool), incoming_new_repos_relpath, incoming_new_pegrev); add_resolution_option(options, conflict, svn_client_conflict_option_incoming_added_dir_merge, _("Merge the directories"), description, operation == svn_wc_operation_merge ? resolve_merge_incoming_added_dir_merge : resolve_update_incoming_added_dir_merge); } return SVN_NO_ERROR; } /* Configure 'incoming added dir replace' resolution option for a tree * conflict. */ static svn_error_t * configure_option_incoming_added_dir_replace(svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_array_header_t *options, apr_pool_t *scratch_pool) { svn_wc_operation_t operation; svn_wc_conflict_action_t incoming_change; svn_wc_conflict_reason_t local_change; svn_node_kind_t victim_node_kind; const char *incoming_new_repos_relpath; svn_revnum_t incoming_new_pegrev; svn_node_kind_t incoming_new_kind; operation = svn_client_conflict_get_operation(conflict); incoming_change = svn_client_conflict_get_incoming_change(conflict); local_change = svn_client_conflict_get_local_change(conflict); victim_node_kind = svn_client_conflict_tree_get_victim_node_kind(conflict); SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( &incoming_new_repos_relpath, &incoming_new_pegrev, &incoming_new_kind, conflict, scratch_pool, scratch_pool)); if (operation == svn_wc_operation_merge && victim_node_kind == svn_node_dir && incoming_new_kind == svn_node_dir && incoming_change == svn_wc_conflict_action_add && local_change == svn_wc_conflict_reason_obstructed) { const char *description; const char *wcroot_abspath; SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx, conflict->local_abspath, scratch_pool, scratch_pool)); description = apr_psprintf(scratch_pool, _("delete '%s' and copy '^/%s@%ld' here"), svn_dirent_local_style( svn_dirent_skip_ancestor(wcroot_abspath, conflict->local_abspath), scratch_pool), incoming_new_repos_relpath, incoming_new_pegrev); add_resolution_option( options, conflict, svn_client_conflict_option_incoming_added_dir_replace, _("Delete my directory and replace it with incoming directory"), description, resolve_merge_incoming_added_dir_replace); } return SVN_NO_ERROR; } /* Configure 'incoming added dir replace and merge' resolution option * for a tree conflict. */ static svn_error_t * configure_option_incoming_added_dir_replace_and_merge( svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_array_header_t *options, apr_pool_t *scratch_pool) { svn_wc_operation_t operation; svn_wc_conflict_action_t incoming_change; svn_wc_conflict_reason_t local_change; svn_node_kind_t victim_node_kind; const char *incoming_new_repos_relpath; svn_revnum_t incoming_new_pegrev; svn_node_kind_t incoming_new_kind; operation = svn_client_conflict_get_operation(conflict); incoming_change = svn_client_conflict_get_incoming_change(conflict); local_change = svn_client_conflict_get_local_change(conflict); victim_node_kind = svn_client_conflict_tree_get_victim_node_kind(conflict); SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( &incoming_new_repos_relpath, &incoming_new_pegrev, &incoming_new_kind, conflict, scratch_pool, scratch_pool)); if (operation == svn_wc_operation_merge && victim_node_kind == svn_node_dir && incoming_new_kind == svn_node_dir && incoming_change == svn_wc_conflict_action_add && local_change == svn_wc_conflict_reason_obstructed) { const char *description; const char *wcroot_abspath; SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx, conflict->local_abspath, scratch_pool, scratch_pool)); description = apr_psprintf(scratch_pool, _("delete '%s', copy '^/%s@%ld' here, and merge the directories"), svn_dirent_local_style( svn_dirent_skip_ancestor(wcroot_abspath, conflict->local_abspath), scratch_pool), incoming_new_repos_relpath, incoming_new_pegrev); add_resolution_option( options, conflict, svn_client_conflict_option_incoming_added_dir_replace_and_merge, _("Replace and merge"), description, resolve_merge_incoming_added_dir_replace_and_merge); } return SVN_NO_ERROR; } /* Configure 'incoming delete ignore' resolution option for a tree conflict. */ static svn_error_t * configure_option_incoming_delete_ignore(svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_array_header_t *options, apr_pool_t *scratch_pool) { svn_wc_operation_t operation; svn_wc_conflict_action_t incoming_change; svn_wc_conflict_reason_t local_change; const char *incoming_new_repos_relpath; svn_revnum_t incoming_new_pegrev; operation = svn_client_conflict_get_operation(conflict); incoming_change = svn_client_conflict_get_incoming_change(conflict); local_change = svn_client_conflict_get_local_change(conflict); SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( &incoming_new_repos_relpath, &incoming_new_pegrev, NULL, conflict, scratch_pool, scratch_pool)); if (incoming_change == svn_wc_conflict_action_delete) { const char *description; struct conflict_tree_incoming_delete_details *incoming_details; svn_boolean_t is_incoming_move; incoming_details = conflict->tree_conflict_incoming_details; is_incoming_move = (incoming_details != NULL && incoming_details->moves != NULL); if (local_change == svn_wc_conflict_reason_moved_away || local_change == svn_wc_conflict_reason_edited) { /* An option which ignores the incoming deletion makes no sense * if we know there was a local move and/or an incoming move. */ if (is_incoming_move) return SVN_NO_ERROR; } else if (local_change == svn_wc_conflict_reason_deleted) { /* If the local item was deleted and conflict details were fetched * and indicate that there was no move, then this is an actual * 'delete vs delete' situation. An option which ignores the incoming * deletion makes no sense in that case because there is no local * node to preserve. */ if (!is_incoming_move) return SVN_NO_ERROR; } else if (local_change == svn_wc_conflict_reason_missing && operation == svn_wc_operation_merge) { struct conflict_tree_local_missing_details *local_details; svn_boolean_t is_local_move; /* "local" to branch history */ local_details = conflict->tree_conflict_local_details; is_local_move = (local_details != NULL && local_details->moves != NULL); if (!is_incoming_move && !is_local_move) return SVN_NO_ERROR; } description = apr_psprintf(scratch_pool, _("ignore the deletion of '^/%s@%ld'"), incoming_new_repos_relpath, incoming_new_pegrev); add_resolution_option(options, conflict, svn_client_conflict_option_incoming_delete_ignore, _("Ignore incoming deletion"), description, resolve_incoming_delete_ignore); } return SVN_NO_ERROR; } /* Configure 'incoming delete accept' resolution option for a tree conflict. */ static svn_error_t * configure_option_incoming_delete_accept(svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_array_header_t *options, apr_pool_t *scratch_pool) { svn_wc_conflict_action_t incoming_change; svn_wc_conflict_reason_t local_change; const char *incoming_new_repos_relpath; svn_revnum_t incoming_new_pegrev; incoming_change = svn_client_conflict_get_incoming_change(conflict); local_change = svn_client_conflict_get_local_change(conflict); SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( &incoming_new_repos_relpath, &incoming_new_pegrev, NULL, conflict, scratch_pool, scratch_pool)); if (incoming_change == svn_wc_conflict_action_delete) { struct conflict_tree_incoming_delete_details *incoming_details; svn_boolean_t is_incoming_move; incoming_details = conflict->tree_conflict_incoming_details; is_incoming_move = (incoming_details != NULL && incoming_details->moves != NULL); if (is_incoming_move && (local_change == svn_wc_conflict_reason_edited || local_change == svn_wc_conflict_reason_moved_away)) { /* An option which accepts the incoming deletion makes no sense * if we know there was a local move and/or an incoming move. */ return SVN_NO_ERROR; } else { const char *description; const char *wcroot_abspath; const char *local_abspath; SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx, conflict->local_abspath, scratch_pool, scratch_pool)); local_abspath = svn_client_conflict_get_local_abspath(conflict); description = apr_psprintf(scratch_pool, _("accept the deletion of '%s'"), svn_dirent_local_style(svn_dirent_skip_ancestor(wcroot_abspath, local_abspath), scratch_pool)); add_resolution_option( options, conflict, svn_client_conflict_option_incoming_delete_accept, _("Accept incoming deletion"), description, resolve_incoming_delete_accept); } } return SVN_NO_ERROR; } static svn_error_t * describe_incoming_move_merge_conflict_option( const char **description, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, struct conflict_tree_incoming_delete_details *details, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { apr_array_header_t *move_target_wc_abspaths; svn_wc_operation_t operation; const char *victim_abspath; const char *moved_to_abspath; const char *wcroot_abspath; move_target_wc_abspaths = svn_hash_gets(details->wc_move_targets, get_moved_to_repos_relpath(details, scratch_pool)); moved_to_abspath = APR_ARRAY_IDX(move_target_wc_abspaths, details->wc_move_target_idx, const char *); victim_abspath = svn_client_conflict_get_local_abspath(conflict); SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx, victim_abspath, scratch_pool, scratch_pool)); operation = svn_client_conflict_get_operation(conflict); if (operation == svn_wc_operation_merge) *description = apr_psprintf( result_pool, _("move '%s' to '%s' and merge"), svn_dirent_local_style(svn_dirent_skip_ancestor(wcroot_abspath, victim_abspath), scratch_pool), svn_dirent_local_style(svn_dirent_skip_ancestor(wcroot_abspath, moved_to_abspath), scratch_pool)); else *description = apr_psprintf( result_pool, _("move and merge local changes from '%s' into '%s'"), svn_dirent_local_style(svn_dirent_skip_ancestor(wcroot_abspath, victim_abspath), scratch_pool), svn_dirent_local_style(svn_dirent_skip_ancestor(wcroot_abspath, moved_to_abspath), scratch_pool)); return SVN_NO_ERROR; } /* Configure 'incoming move file merge' resolution option for * a tree conflict. */ static svn_error_t * configure_option_incoming_move_file_merge(svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_array_header_t *options, apr_pool_t *scratch_pool) { svn_node_kind_t victim_node_kind; svn_wc_conflict_action_t incoming_change; const char *incoming_old_repos_relpath; svn_revnum_t incoming_old_pegrev; svn_node_kind_t incoming_old_kind; const char *incoming_new_repos_relpath; svn_revnum_t incoming_new_pegrev; svn_node_kind_t incoming_new_kind; incoming_change = svn_client_conflict_get_incoming_change(conflict); victim_node_kind = svn_client_conflict_tree_get_victim_node_kind(conflict); SVN_ERR(svn_client_conflict_get_incoming_old_repos_location( &incoming_old_repos_relpath, &incoming_old_pegrev, &incoming_old_kind, conflict, scratch_pool, scratch_pool)); SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( &incoming_new_repos_relpath, &incoming_new_pegrev, &incoming_new_kind, conflict, scratch_pool, scratch_pool)); if (victim_node_kind == svn_node_file && incoming_old_kind == svn_node_file && incoming_new_kind == svn_node_none && incoming_change == svn_wc_conflict_action_delete) { struct conflict_tree_incoming_delete_details *details; const char *description; details = conflict->tree_conflict_incoming_details; if (details == NULL || details->moves == NULL) return SVN_NO_ERROR; if (apr_hash_count(details->wc_move_targets) == 0) return SVN_NO_ERROR; SVN_ERR(describe_incoming_move_merge_conflict_option(&description, conflict, ctx, details, scratch_pool, scratch_pool)); add_resolution_option( options, conflict, svn_client_conflict_option_incoming_move_file_text_merge, _("Move and merge"), description, resolve_incoming_move_file_text_merge); } return SVN_NO_ERROR; } /* Configure 'incoming move dir merge' resolution option for * a tree conflict. */ static svn_error_t * configure_option_incoming_dir_merge(svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_array_header_t *options, apr_pool_t *scratch_pool) { svn_node_kind_t victim_node_kind; svn_wc_conflict_action_t incoming_change; svn_wc_conflict_reason_t local_change; const char *incoming_old_repos_relpath; svn_revnum_t incoming_old_pegrev; svn_node_kind_t incoming_old_kind; const char *incoming_new_repos_relpath; svn_revnum_t incoming_new_pegrev; svn_node_kind_t incoming_new_kind; incoming_change = svn_client_conflict_get_incoming_change(conflict); local_change = svn_client_conflict_get_local_change(conflict); victim_node_kind = svn_client_conflict_tree_get_victim_node_kind(conflict); SVN_ERR(svn_client_conflict_get_incoming_old_repos_location( &incoming_old_repos_relpath, &incoming_old_pegrev, &incoming_old_kind, conflict, scratch_pool, scratch_pool)); SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( &incoming_new_repos_relpath, &incoming_new_pegrev, &incoming_new_kind, conflict, scratch_pool, scratch_pool)); if (victim_node_kind == svn_node_dir && incoming_old_kind == svn_node_dir && incoming_new_kind == svn_node_none && incoming_change == svn_wc_conflict_action_delete && local_change == svn_wc_conflict_reason_edited) { struct conflict_tree_incoming_delete_details *details; const char *description; details = conflict->tree_conflict_incoming_details; if (details == NULL || details->moves == NULL) return SVN_NO_ERROR; if (apr_hash_count(details->wc_move_targets) == 0) return SVN_NO_ERROR; SVN_ERR(describe_incoming_move_merge_conflict_option(&description, conflict, ctx, details, scratch_pool, scratch_pool)); add_resolution_option(options, conflict, svn_client_conflict_option_incoming_move_dir_merge, _("Move and merge"), description, resolve_incoming_move_dir_merge); } return SVN_NO_ERROR; } /* Configure 'local move file merge' resolution option for * a tree conflict. */ static svn_error_t * configure_option_local_move_file_merge(svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_array_header_t *options, apr_pool_t *scratch_pool) { svn_wc_operation_t operation; svn_wc_conflict_action_t incoming_change; svn_wc_conflict_reason_t local_change; const char *incoming_new_repos_relpath; svn_revnum_t incoming_new_pegrev; operation = svn_client_conflict_get_operation(conflict); incoming_change = svn_client_conflict_get_incoming_change(conflict); local_change = svn_client_conflict_get_local_change(conflict); SVN_ERR(svn_client_conflict_get_incoming_new_repos_location( &incoming_new_repos_relpath, &incoming_new_pegrev, NULL, conflict, scratch_pool, scratch_pool)); if (operation == svn_wc_operation_merge && incoming_change == svn_wc_conflict_action_edit && local_change == svn_wc_conflict_reason_missing) { struct conflict_tree_local_missing_details *details; details = conflict->tree_conflict_local_details; if (details != NULL && details->moves != NULL) { apr_hash_t *wc_move_targets = apr_hash_make(scratch_pool); apr_pool_t *iterpool; int i; iterpool = svn_pool_create(scratch_pool); for (i = 0; i < details->moves->nelts; i++) { struct repos_move_info *move; svn_pool_clear(iterpool); move = APR_ARRAY_IDX(details->moves, i, struct repos_move_info *); SVN_ERR(follow_move_chains(wc_move_targets, move, ctx, conflict->local_abspath, svn_node_file, incoming_new_repos_relpath, incoming_new_pegrev, scratch_pool, iterpool)); } svn_pool_destroy(iterpool); if (apr_hash_count(wc_move_targets) > 0) { apr_array_header_t *move_target_repos_relpaths; const svn_sort__item_t *item; apr_array_header_t *moved_to_abspaths; const char *description; const char *wcroot_abspath; /* Initialize to the first possible move target. Hopefully, * in most cases there will only be one candidate anyway. */ move_target_repos_relpaths = svn_sort__hash( wc_move_targets, svn_sort_compare_items_as_paths, scratch_pool); item = &APR_ARRAY_IDX(move_target_repos_relpaths, 0, svn_sort__item_t); moved_to_abspaths = item->value; details->moved_to_abspath = apr_pstrdup(conflict->pool, APR_ARRAY_IDX(moved_to_abspaths, 0, const char *)); SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx, conflict->local_abspath, scratch_pool, scratch_pool)); description = apr_psprintf( scratch_pool, _("apply changes to move destination '%s'"), svn_dirent_local_style( svn_dirent_skip_ancestor(wcroot_abspath, details->moved_to_abspath), scratch_pool)); add_resolution_option( options, conflict, svn_client_conflict_option_local_move_file_text_merge, _("Apply to move destination"), description, resolve_local_move_file_merge); } else details->moved_to_abspath = NULL; } } return SVN_NO_ERROR; } svn_error_t * svn_client_conflict_option_get_moved_to_repos_relpath_candidates( apr_array_header_t **possible_moved_to_repos_relpaths, svn_client_conflict_option_t *option, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { svn_client_conflict_t *conflict = option->conflict; struct conflict_tree_incoming_delete_details *details; const char *victim_abspath; apr_array_header_t *sorted_repos_relpaths; int i; SVN_ERR_ASSERT(svn_client_conflict_option_get_id(option) == svn_client_conflict_option_incoming_move_file_text_merge || svn_client_conflict_option_get_id(option) == svn_client_conflict_option_incoming_move_dir_merge); victim_abspath = svn_client_conflict_get_local_abspath(conflict); details = conflict->tree_conflict_incoming_details; if (details == NULL || details->wc_move_targets == NULL) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Getting a list of possible move targets " "requires details for tree conflict at '%s' " "to be fetched from the repository first"), svn_dirent_local_style(victim_abspath, scratch_pool)); /* Return a copy of the repos replath candidate list. */ sorted_repos_relpaths = svn_sort__hash(details->wc_move_targets, svn_sort_compare_items_as_paths, scratch_pool); *possible_moved_to_repos_relpaths = apr_array_make( result_pool, sorted_repos_relpaths->nelts, sizeof (const char *)); for (i = 0; i < sorted_repos_relpaths->nelts; i++) { svn_sort__item_t item; const char *repos_relpath; item = APR_ARRAY_IDX(sorted_repos_relpaths, i, svn_sort__item_t); repos_relpath = item.key; APR_ARRAY_PUSH(*possible_moved_to_repos_relpaths, const char *) = apr_pstrdup(result_pool, repos_relpath); } return SVN_NO_ERROR; } svn_error_t * svn_client_conflict_option_set_moved_to_repos_relpath( svn_client_conflict_option_t *option, int preferred_move_target_idx, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { svn_client_conflict_t *conflict = option->conflict; struct conflict_tree_incoming_delete_details *details; const char *victim_abspath; apr_array_header_t *move_target_repos_relpaths; svn_sort__item_t item; const char *move_target_repos_relpath; apr_hash_index_t *hi; SVN_ERR_ASSERT(svn_client_conflict_option_get_id(option) == svn_client_conflict_option_incoming_move_file_text_merge || svn_client_conflict_option_get_id(option) == svn_client_conflict_option_incoming_move_dir_merge); victim_abspath = svn_client_conflict_get_local_abspath(conflict); details = conflict->tree_conflict_incoming_details; if (details == NULL || details->wc_move_targets == NULL) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Setting a move target requires details " "for tree conflict at '%s' to be fetched " "from the repository first"), svn_dirent_local_style(victim_abspath, scratch_pool)); if (preferred_move_target_idx < 0 || preferred_move_target_idx >= apr_hash_count(details->wc_move_targets)) return svn_error_createf(SVN_ERR_INCORRECT_PARAMS, NULL, _("Index '%d' is out of bounds of the possible " "move target list for '%s'"), preferred_move_target_idx, svn_dirent_local_style(victim_abspath, scratch_pool)); /* Translate the index back into a hash table key. */ move_target_repos_relpaths = svn_sort__hash(details->wc_move_targets, svn_sort_compare_items_as_paths, scratch_pool); item = APR_ARRAY_IDX(move_target_repos_relpaths, preferred_move_target_idx, svn_sort__item_t); move_target_repos_relpath = item.key; /* Find our copy of the hash key and remember the user's preference. */ for (hi = apr_hash_first(scratch_pool, details->wc_move_targets); hi != NULL; hi = apr_hash_next(hi)) { const char *repos_relpath = apr_hash_this_key(hi); if (strcmp(move_target_repos_relpath, repos_relpath) == 0) { details->move_target_repos_relpath = repos_relpath; /* Update option description. */ SVN_ERR(describe_incoming_move_merge_conflict_option( &option->description, conflict, ctx, details, conflict->pool, scratch_pool)); return SVN_NO_ERROR; } } return svn_error_createf(SVN_ERR_INCORRECT_PARAMS, NULL, _("Repository path '%s' not found in list of " "possible move targets for '%s'"), move_target_repos_relpath, svn_dirent_local_style(victim_abspath, scratch_pool)); } svn_error_t * svn_client_conflict_option_get_moved_to_abspath_candidates( apr_array_header_t **possible_moved_to_abspaths, svn_client_conflict_option_t *option, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { svn_client_conflict_t *conflict = option->conflict; struct conflict_tree_incoming_delete_details *details; const char *victim_abspath; apr_array_header_t *move_target_wc_abspaths; int i; SVN_ERR_ASSERT(svn_client_conflict_option_get_id(option) == svn_client_conflict_option_incoming_move_file_text_merge || svn_client_conflict_option_get_id(option) == svn_client_conflict_option_incoming_move_dir_merge); victim_abspath = svn_client_conflict_get_local_abspath(conflict); details = conflict->tree_conflict_incoming_details; if (details == NULL || details->wc_move_targets == NULL) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Getting a list of possible move targets " "requires details for tree conflict at '%s' " "to be fetched from the repository first"), svn_dirent_local_style(victim_abspath, scratch_pool)); move_target_wc_abspaths = svn_hash_gets(details->wc_move_targets, get_moved_to_repos_relpath(details, scratch_pool)); /* Return a copy of the option's move target candidate list. */ *possible_moved_to_abspaths = apr_array_make(result_pool, move_target_wc_abspaths->nelts, sizeof (const char *)); for (i = 0; i < move_target_wc_abspaths->nelts; i++) { const char *moved_to_abspath; moved_to_abspath = APR_ARRAY_IDX(move_target_wc_abspaths, i, const char *); APR_ARRAY_PUSH(*possible_moved_to_abspaths, const char *) = apr_pstrdup(result_pool, moved_to_abspath); } return SVN_NO_ERROR; } svn_error_t * svn_client_conflict_option_set_moved_to_abspath( svn_client_conflict_option_t *option, int preferred_move_target_idx, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { svn_client_conflict_t *conflict = option->conflict; struct conflict_tree_incoming_delete_details *details; const char *victim_abspath; apr_array_header_t *move_target_wc_abspaths; SVN_ERR_ASSERT(svn_client_conflict_option_get_id(option) == svn_client_conflict_option_incoming_move_file_text_merge || svn_client_conflict_option_get_id(option) == svn_client_conflict_option_incoming_move_dir_merge); victim_abspath = svn_client_conflict_get_local_abspath(conflict); details = conflict->tree_conflict_incoming_details; if (details == NULL || details->wc_move_targets == NULL) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Setting a move target requires details " "for tree conflict at '%s' to be fetched " "from the repository first"), svn_dirent_local_style(victim_abspath, scratch_pool)); move_target_wc_abspaths = svn_hash_gets(details->wc_move_targets, get_moved_to_repos_relpath(details, scratch_pool)); if (preferred_move_target_idx < 0 || preferred_move_target_idx > move_target_wc_abspaths->nelts) return svn_error_createf(SVN_ERR_INCORRECT_PARAMS, NULL, _("Index '%d' is out of bounds of the possible " "move target list for '%s'"), preferred_move_target_idx, svn_dirent_local_style(victim_abspath, scratch_pool)); /* Record the user's preference. */ details->wc_move_target_idx = preferred_move_target_idx; /* Update option description. */ SVN_ERR(describe_incoming_move_merge_conflict_option(&option->description, conflict, ctx, details, conflict->pool, scratch_pool)); return SVN_NO_ERROR; } svn_error_t * svn_client_conflict_tree_get_resolution_options(apr_array_header_t **options, svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { SVN_ERR(assert_tree_conflict(conflict, scratch_pool)); *options = apr_array_make(result_pool, 2, sizeof(svn_client_conflict_option_t *)); /* Add postpone option. */ add_resolution_option(*options, conflict, svn_client_conflict_option_postpone, _("Postpone"), _("skip this conflict and leave it unresolved"), resolve_postpone); /* Add an option which marks the conflict resolved. */ SVN_ERR(configure_option_accept_current_wc_state(conflict, *options)); /* Configure options which offer automatic resolution. */ SVN_ERR(configure_option_update_move_destination(conflict, *options)); SVN_ERR(configure_option_update_raise_moved_away_children(conflict, *options)); SVN_ERR(configure_option_incoming_add_ignore(conflict, ctx, *options, scratch_pool)); SVN_ERR(configure_option_incoming_added_file_text_merge(conflict, ctx, *options, scratch_pool)); SVN_ERR(configure_option_incoming_added_file_replace_and_merge(conflict, ctx, *options, scratch_pool)); SVN_ERR(configure_option_incoming_added_dir_merge(conflict, ctx, *options, scratch_pool)); SVN_ERR(configure_option_incoming_added_dir_replace(conflict, ctx, *options, scratch_pool)); SVN_ERR(configure_option_incoming_added_dir_replace_and_merge(conflict, ctx, *options, scratch_pool)); SVN_ERR(configure_option_incoming_delete_ignore(conflict, ctx, *options, scratch_pool)); SVN_ERR(configure_option_incoming_delete_accept(conflict, ctx, *options, scratch_pool)); SVN_ERR(configure_option_incoming_move_file_merge(conflict, ctx, *options, scratch_pool)); SVN_ERR(configure_option_incoming_dir_merge(conflict, ctx, *options, scratch_pool)); SVN_ERR(configure_option_local_move_file_merge(conflict, ctx, *options, scratch_pool)); return SVN_NO_ERROR; } /* Swallow authz failures and return SVN_NO_ERROR in that case. * Otherwise, return ERR unchanged. */ static svn_error_t * ignore_authz_failures(svn_error_t *err) { if (err && ( svn_error_find_cause(err, SVN_ERR_AUTHZ_UNREADABLE) || svn_error_find_cause(err, SVN_ERR_RA_NOT_AUTHORIZED) || svn_error_find_cause(err, SVN_ERR_RA_DAV_FORBIDDEN))) { svn_error_clear(err); err = SVN_NO_ERROR; } return err; } svn_error_t * svn_client_conflict_tree_get_details(svn_client_conflict_t *conflict, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { SVN_ERR(assert_tree_conflict(conflict, scratch_pool)); if (ctx->notify_func2) { svn_wc_notify_t *notify; notify = svn_wc_create_notify( svn_client_conflict_get_local_abspath(conflict), svn_wc_notify_begin_search_tree_conflict_details, scratch_pool), ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool); } /* Collecting conflict details may fail due to insufficient access rights. * This is not a failure but simply restricts our future options. */ if (conflict->tree_conflict_get_incoming_details_func) SVN_ERR(ignore_authz_failures( conflict->tree_conflict_get_incoming_details_func(conflict, ctx, scratch_pool))); if (conflict->tree_conflict_get_local_details_func) SVN_ERR(ignore_authz_failures( conflict->tree_conflict_get_local_details_func(conflict, ctx, scratch_pool))); if (ctx->notify_func2) { svn_wc_notify_t *notify; notify = svn_wc_create_notify( svn_client_conflict_get_local_abspath(conflict), svn_wc_notify_end_search_tree_conflict_details, scratch_pool), ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool); } return SVN_NO_ERROR; } svn_client_conflict_option_id_t svn_client_conflict_option_get_id(svn_client_conflict_option_t *option) { return option->id; } const char * svn_client_conflict_option_get_label(svn_client_conflict_option_t *option, apr_pool_t *result_pool) { return apr_pstrdup(result_pool, option->label); } const char * svn_client_conflict_option_get_description(svn_client_conflict_option_t *option, apr_pool_t *result_pool) { return apr_pstrdup(result_pool, option->description); } svn_client_conflict_option_id_t svn_client_conflict_get_recommended_option_id(svn_client_conflict_t *conflict) { return conflict->recommended_option_id; } svn_error_t * svn_client_conflict_text_resolve(svn_client_conflict_t *conflict, svn_client_conflict_option_t *option, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { SVN_ERR(assert_text_conflict(conflict, scratch_pool)); SVN_ERR(option->do_resolve_func(option, conflict, ctx, scratch_pool)); return SVN_NO_ERROR; } svn_client_conflict_option_t * svn_client_conflict_option_find_by_id(apr_array_header_t *options, svn_client_conflict_option_id_t option_id) { int i; for (i = 0; i < options->nelts; i++) { svn_client_conflict_option_t *this_option; svn_client_conflict_option_id_t this_option_id; this_option = APR_ARRAY_IDX(options, i, svn_client_conflict_option_t *); this_option_id = svn_client_conflict_option_get_id(this_option); if (this_option_id == option_id) return this_option; } return NULL; } svn_error_t * svn_client_conflict_text_resolve_by_id( svn_client_conflict_t *conflict, svn_client_conflict_option_id_t option_id, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { apr_array_header_t *resolution_options; svn_client_conflict_option_t *option; SVN_ERR(svn_client_conflict_text_get_resolution_options( &resolution_options, conflict, ctx, scratch_pool, scratch_pool)); option = svn_client_conflict_option_find_by_id(resolution_options, option_id); if (option == NULL) return svn_error_createf(SVN_ERR_CLIENT_CONFLICT_OPTION_NOT_APPLICABLE, NULL, _("Inapplicable conflict resolution option " "given for conflicted path '%s'"), svn_dirent_local_style(conflict->local_abspath, scratch_pool)); SVN_ERR(svn_client_conflict_text_resolve(conflict, option, ctx, scratch_pool)); return SVN_NO_ERROR; } svn_client_conflict_option_id_t svn_client_conflict_text_get_resolution(svn_client_conflict_t *conflict) { return conflict->resolution_text; } svn_error_t * svn_client_conflict_prop_resolve(svn_client_conflict_t *conflict, const char *propname, svn_client_conflict_option_t *option, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { SVN_ERR(assert_prop_conflict(conflict, scratch_pool)); option->type_data.prop.propname = propname; SVN_ERR(option->do_resolve_func(option, conflict, ctx, scratch_pool)); return SVN_NO_ERROR; } svn_error_t * svn_client_conflict_prop_resolve_by_id( svn_client_conflict_t *conflict, const char *propname, svn_client_conflict_option_id_t option_id, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { apr_array_header_t *resolution_options; svn_client_conflict_option_t *option; SVN_ERR(svn_client_conflict_prop_get_resolution_options( &resolution_options, conflict, ctx, scratch_pool, scratch_pool)); option = svn_client_conflict_option_find_by_id(resolution_options, option_id); if (option == NULL) return svn_error_createf(SVN_ERR_CLIENT_CONFLICT_OPTION_NOT_APPLICABLE, NULL, _("Inapplicable conflict resolution option " "given for conflicted path '%s'"), svn_dirent_local_style(conflict->local_abspath, scratch_pool)); SVN_ERR(svn_client_conflict_prop_resolve(conflict, propname, option, ctx, scratch_pool)); return SVN_NO_ERROR; } svn_client_conflict_option_id_t svn_client_conflict_prop_get_resolution(svn_client_conflict_t *conflict, const char *propname) { svn_client_conflict_option_t *option; option = svn_hash_gets(conflict->resolved_props, propname); if (option == NULL) return svn_client_conflict_option_unspecified; return svn_client_conflict_option_get_id(option); } svn_error_t * svn_client_conflict_tree_resolve(svn_client_conflict_t *conflict, svn_client_conflict_option_t *option, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { SVN_ERR(assert_tree_conflict(conflict, scratch_pool)); SVN_ERR(option->do_resolve_func(option, conflict, ctx, scratch_pool)); return SVN_NO_ERROR; } svn_error_t * svn_client_conflict_tree_resolve_by_id( svn_client_conflict_t *conflict, svn_client_conflict_option_id_t option_id, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { apr_array_header_t *resolution_options; svn_client_conflict_option_t *option; SVN_ERR(svn_client_conflict_tree_get_resolution_options( &resolution_options, conflict, ctx, scratch_pool, scratch_pool)); option = svn_client_conflict_option_find_by_id(resolution_options, option_id); if (option == NULL) return svn_error_createf(SVN_ERR_CLIENT_CONFLICT_OPTION_NOT_APPLICABLE, NULL, _("Inapplicable conflict resolution option " "given for conflicted path '%s'"), svn_dirent_local_style(conflict->local_abspath, scratch_pool)); SVN_ERR(svn_client_conflict_tree_resolve(conflict, option, ctx, scratch_pool)); return SVN_NO_ERROR; } svn_client_conflict_option_id_t svn_client_conflict_tree_get_resolution(svn_client_conflict_t *conflict) { return conflict->resolution_tree; } /* Return the legacy conflict descriptor which is wrapped by CONFLICT. */ static const svn_wc_conflict_description2_t * get_conflict_desc2_t(svn_client_conflict_t *conflict) { if (conflict->legacy_text_conflict) return conflict->legacy_text_conflict; if (conflict->legacy_tree_conflict) return conflict->legacy_tree_conflict; if (conflict->prop_conflicts && conflict->legacy_prop_conflict_propname) return svn_hash_gets(conflict->prop_conflicts, conflict->legacy_prop_conflict_propname); return NULL; } svn_error_t * svn_client_conflict_get_conflicted(svn_boolean_t *text_conflicted, apr_array_header_t **props_conflicted, svn_boolean_t *tree_conflicted, svn_client_conflict_t *conflict, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { if (text_conflicted) *text_conflicted = (conflict->legacy_text_conflict != NULL); if (props_conflicted) { if (conflict->prop_conflicts) SVN_ERR(svn_hash_keys(props_conflicted, conflict->prop_conflicts, result_pool)); else *props_conflicted = apr_array_make(result_pool, 0, sizeof(const char*)); } if (tree_conflicted) *tree_conflicted = (conflict->legacy_tree_conflict != NULL); return SVN_NO_ERROR; } const char * svn_client_conflict_get_local_abspath(svn_client_conflict_t *conflict) { return conflict->local_abspath; } svn_wc_operation_t svn_client_conflict_get_operation(svn_client_conflict_t *conflict) { return get_conflict_desc2_t(conflict)->operation; } svn_wc_conflict_action_t svn_client_conflict_get_incoming_change(svn_client_conflict_t *conflict) { return get_conflict_desc2_t(conflict)->action; } svn_wc_conflict_reason_t svn_client_conflict_get_local_change(svn_client_conflict_t *conflict) { return get_conflict_desc2_t(conflict)->reason; } svn_error_t * svn_client_conflict_get_repos_info(const char **repos_root_url, const char **repos_uuid, svn_client_conflict_t *conflict, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { if (repos_root_url) { if (get_conflict_desc2_t(conflict)->src_left_version) *repos_root_url = get_conflict_desc2_t(conflict)->src_left_version->repos_url; else if (get_conflict_desc2_t(conflict)->src_right_version) *repos_root_url = get_conflict_desc2_t(conflict)->src_right_version->repos_url; else *repos_root_url = NULL; } if (repos_uuid) { if (get_conflict_desc2_t(conflict)->src_left_version) *repos_uuid = get_conflict_desc2_t(conflict)->src_left_version->repos_uuid; else if (get_conflict_desc2_t(conflict)->src_right_version) *repos_uuid = get_conflict_desc2_t(conflict)->src_right_version->repos_uuid; else *repos_uuid = NULL; } return SVN_NO_ERROR; } svn_error_t * svn_client_conflict_get_incoming_old_repos_location( const char **incoming_old_repos_relpath, svn_revnum_t *incoming_old_pegrev, svn_node_kind_t *incoming_old_node_kind, svn_client_conflict_t *conflict, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { if (incoming_old_repos_relpath) { if (get_conflict_desc2_t(conflict)->src_left_version) *incoming_old_repos_relpath = get_conflict_desc2_t(conflict)->src_left_version->path_in_repos; else *incoming_old_repos_relpath = NULL; } if (incoming_old_pegrev) { if (get_conflict_desc2_t(conflict)->src_left_version) *incoming_old_pegrev = get_conflict_desc2_t(conflict)->src_left_version->peg_rev; else *incoming_old_pegrev = SVN_INVALID_REVNUM; } if (incoming_old_node_kind) { if (get_conflict_desc2_t(conflict)->src_left_version) *incoming_old_node_kind = get_conflict_desc2_t(conflict)->src_left_version->node_kind; else *incoming_old_node_kind = svn_node_none; } return SVN_NO_ERROR; } svn_error_t * svn_client_conflict_get_incoming_new_repos_location( const char **incoming_new_repos_relpath, svn_revnum_t *incoming_new_pegrev, svn_node_kind_t *incoming_new_node_kind, svn_client_conflict_t *conflict, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { if (incoming_new_repos_relpath) { if (get_conflict_desc2_t(conflict)->src_right_version) *incoming_new_repos_relpath = get_conflict_desc2_t(conflict)->src_right_version->path_in_repos; else *incoming_new_repos_relpath = NULL; } if (incoming_new_pegrev) { if (get_conflict_desc2_t(conflict)->src_right_version) *incoming_new_pegrev = get_conflict_desc2_t(conflict)->src_right_version->peg_rev; else *incoming_new_pegrev = SVN_INVALID_REVNUM; } if (incoming_new_node_kind) { if (get_conflict_desc2_t(conflict)->src_right_version) *incoming_new_node_kind = get_conflict_desc2_t(conflict)->src_right_version->node_kind; else *incoming_new_node_kind = svn_node_none; } return SVN_NO_ERROR; } svn_node_kind_t svn_client_conflict_tree_get_victim_node_kind(svn_client_conflict_t *conflict) { SVN_ERR_ASSERT_NO_RETURN(assert_tree_conflict(conflict, conflict->pool) == SVN_NO_ERROR); return get_conflict_desc2_t(conflict)->node_kind; } svn_error_t * svn_client_conflict_prop_get_propvals(const svn_string_t **base_propval, const svn_string_t **working_propval, const svn_string_t **incoming_old_propval, const svn_string_t **incoming_new_propval, svn_client_conflict_t *conflict, const char *propname, apr_pool_t *result_pool) { const svn_wc_conflict_description2_t *desc; SVN_ERR(assert_prop_conflict(conflict, conflict->pool)); desc = svn_hash_gets(conflict->prop_conflicts, propname); if (desc == NULL) return svn_error_createf(SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, NULL, _("Property '%s' is not in conflict."), propname); if (base_propval) *base_propval = svn_string_dup(desc->prop_value_base, result_pool); if (working_propval) *working_propval = svn_string_dup(desc->prop_value_working, result_pool); if (incoming_old_propval) *incoming_old_propval = svn_string_dup(desc->prop_value_incoming_old, result_pool); if (incoming_new_propval) *incoming_new_propval = svn_string_dup(desc->prop_value_incoming_new, result_pool); return SVN_NO_ERROR; } const char * svn_client_conflict_prop_get_reject_abspath(svn_client_conflict_t *conflict) { SVN_ERR_ASSERT_NO_RETURN(assert_prop_conflict(conflict, conflict->pool) == SVN_NO_ERROR); /* svn_wc_conflict_description2_t stores this path in 'their_abspath' */ return get_conflict_desc2_t(conflict)->their_abspath; } const char * svn_client_conflict_text_get_mime_type(svn_client_conflict_t *conflict) { SVN_ERR_ASSERT_NO_RETURN(assert_text_conflict(conflict, conflict->pool) == SVN_NO_ERROR); return get_conflict_desc2_t(conflict)->mime_type; } svn_error_t * svn_client_conflict_text_get_contents(const char **base_abspath, const char **working_abspath, const char **incoming_old_abspath, const char **incoming_new_abspath, svn_client_conflict_t *conflict, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { SVN_ERR(assert_text_conflict(conflict, scratch_pool)); if (base_abspath) { if (svn_client_conflict_get_operation(conflict) == svn_wc_operation_merge) *base_abspath = NULL; /* ### WC base contents not available yet */ else /* update/switch */ *base_abspath = get_conflict_desc2_t(conflict)->base_abspath; } if (working_abspath) *working_abspath = get_conflict_desc2_t(conflict)->my_abspath; if (incoming_old_abspath) *incoming_old_abspath = get_conflict_desc2_t(conflict)->base_abspath; if (incoming_new_abspath) *incoming_new_abspath = get_conflict_desc2_t(conflict)->their_abspath; return SVN_NO_ERROR; } /* Set up type-specific data for a new conflict object. */ static svn_error_t * conflict_type_specific_setup(svn_client_conflict_t *conflict, apr_pool_t *scratch_pool) { svn_boolean_t tree_conflicted; svn_wc_conflict_action_t incoming_change; svn_wc_conflict_reason_t local_change; /* For now, we only deal with tree conflicts here. */ SVN_ERR(svn_client_conflict_get_conflicted(NULL, NULL, &tree_conflicted, conflict, scratch_pool, scratch_pool)); if (!tree_conflicted) return SVN_NO_ERROR; /* Set a default description function. */ conflict->tree_conflict_get_incoming_description_func = conflict_tree_get_incoming_description_generic; conflict->tree_conflict_get_local_description_func = conflict_tree_get_local_description_generic; incoming_change = svn_client_conflict_get_incoming_change(conflict); local_change = svn_client_conflict_get_local_change(conflict); /* Set type-specific description and details functions. */ if (incoming_change == svn_wc_conflict_action_delete || incoming_change == svn_wc_conflict_action_replace) { conflict->tree_conflict_get_incoming_description_func = conflict_tree_get_description_incoming_delete; conflict->tree_conflict_get_incoming_details_func = conflict_tree_get_details_incoming_delete; } else if (incoming_change == svn_wc_conflict_action_add) { conflict->tree_conflict_get_incoming_description_func = conflict_tree_get_description_incoming_add; conflict->tree_conflict_get_incoming_details_func = conflict_tree_get_details_incoming_add; } else if (incoming_change == svn_wc_conflict_action_edit) { conflict->tree_conflict_get_incoming_description_func = conflict_tree_get_description_incoming_edit; conflict->tree_conflict_get_incoming_details_func = conflict_tree_get_details_incoming_edit; } if (local_change == svn_wc_conflict_reason_missing) { conflict->tree_conflict_get_local_description_func = conflict_tree_get_description_local_missing; conflict->tree_conflict_get_local_details_func = conflict_tree_get_details_local_missing; } return SVN_NO_ERROR; } svn_error_t * svn_client_conflict_get(svn_client_conflict_t **conflict, const char *local_abspath, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { const apr_array_header_t *descs; int i; *conflict = apr_pcalloc(result_pool, sizeof(**conflict)); (*conflict)->local_abspath = apr_pstrdup(result_pool, local_abspath); (*conflict)->resolution_text = svn_client_conflict_option_unspecified; (*conflict)->resolution_tree = svn_client_conflict_option_unspecified; (*conflict)->resolved_props = apr_hash_make(result_pool); (*conflict)->recommended_option_id = svn_client_conflict_option_unspecified; (*conflict)->pool = result_pool; /* Add all legacy conflict descriptors we can find. Eventually, this code * path should stop relying on svn_wc_conflict_description2_t entirely. */ SVN_ERR(svn_wc__read_conflict_descriptions2_t(&descs, ctx->wc_ctx, local_abspath, result_pool, scratch_pool)); for (i = 0; i < descs->nelts; i++) { const svn_wc_conflict_description2_t *desc; desc = APR_ARRAY_IDX(descs, i, const svn_wc_conflict_description2_t *); add_legacy_desc_to_conflict(desc, *conflict, result_pool); } SVN_ERR(conflict_type_specific_setup(*conflict, scratch_pool)); return SVN_NO_ERROR; } /* Baton for conflict_status_walker */ struct conflict_status_walker_baton { svn_client_conflict_walk_func_t conflict_walk_func; void *conflict_walk_func_baton; svn_client_ctx_t *ctx; svn_wc_notify_func2_t notify_func; void *notify_baton; svn_boolean_t resolved_a_tree_conflict; apr_hash_t *unresolved_tree_conflicts; }; /* Implements svn_wc_notify_func2_t to collect new conflicts caused by resolving a tree conflict. */ static void tree_conflict_collector(void *baton, const svn_wc_notify_t *notify, apr_pool_t *pool) { struct conflict_status_walker_baton *cswb = baton; if (cswb->notify_func) cswb->notify_func(cswb->notify_baton, notify, pool); if (cswb->unresolved_tree_conflicts && (notify->action == svn_wc_notify_tree_conflict || notify->prop_state == svn_wc_notify_state_conflicted || notify->content_state == svn_wc_notify_state_conflicted)) { if (!svn_hash_gets(cswb->unresolved_tree_conflicts, notify->path)) { const char *tc_abspath; apr_pool_t *hash_pool; hash_pool = apr_hash_pool_get(cswb->unresolved_tree_conflicts); tc_abspath = apr_pstrdup(hash_pool, notify->path); svn_hash_sets(cswb->unresolved_tree_conflicts, tc_abspath, ""); } } } /* * Record a tree conflict resolution failure due to error condition ERR * in the RESOLVE_LATER hash table. If the hash table is not available * (meaning the caller does not wish to retry resolution later), or if * the error condition does not indicate circumstances where another * existing tree conflict is blocking the resolution attempt, then * return the error ERR itself. */ static svn_error_t * handle_tree_conflict_resolution_failure(const char *local_abspath, svn_error_t *err, apr_hash_t *unresolved_tree_conflicts) { const char *tc_abspath; if (!unresolved_tree_conflicts || (err->apr_err != SVN_ERR_WC_OBSTRUCTED_UPDATE && err->apr_err != SVN_ERR_WC_FOUND_CONFLICT)) return svn_error_trace(err); /* Give up. Do not retry resolution later. */ svn_error_clear(err); tc_abspath = apr_pstrdup(apr_hash_pool_get(unresolved_tree_conflicts), local_abspath); svn_hash_sets(unresolved_tree_conflicts, tc_abspath, ""); return SVN_NO_ERROR; /* Caller may retry after resolving other conflicts. */ } /* Implements svn_wc_status4_t to walk all conflicts to resolve. */ static svn_error_t * conflict_status_walker(void *baton, const char *local_abspath, const svn_wc_status3_t *status, apr_pool_t *scratch_pool) { struct conflict_status_walker_baton *cswb = baton; svn_client_conflict_t *conflict; svn_error_t *err; svn_boolean_t tree_conflicted; if (!status->conflicted) return SVN_NO_ERROR; SVN_ERR(svn_client_conflict_get(&conflict, local_abspath, cswb->ctx, scratch_pool, scratch_pool)); SVN_ERR(svn_client_conflict_get_conflicted(NULL, NULL, &tree_conflicted, conflict, scratch_pool, scratch_pool)); err = cswb->conflict_walk_func(cswb->conflict_walk_func_baton, conflict, scratch_pool); if (err) { if (tree_conflicted) SVN_ERR(handle_tree_conflict_resolution_failure( local_abspath, err, cswb->unresolved_tree_conflicts)); else return svn_error_trace(err); } if (tree_conflicted) { svn_client_conflict_option_id_t resolution; resolution = svn_client_conflict_tree_get_resolution(conflict); if (resolution != svn_client_conflict_option_unspecified && resolution != svn_client_conflict_option_postpone) cswb->resolved_a_tree_conflict = TRUE; } return SVN_NO_ERROR; } svn_error_t * svn_client_conflict_walk(const char *local_abspath, svn_depth_t depth, svn_client_conflict_walk_func_t conflict_walk_func, void *conflict_walk_func_baton, svn_client_ctx_t *ctx, apr_pool_t *scratch_pool) { struct conflict_status_walker_baton cswb; apr_pool_t *iterpool = NULL; svn_error_t *err = SVN_NO_ERROR; if (depth == svn_depth_unknown) depth = svn_depth_infinity; cswb.conflict_walk_func = conflict_walk_func; cswb.conflict_walk_func_baton = conflict_walk_func_baton; cswb.ctx = ctx; cswb.resolved_a_tree_conflict = FALSE; cswb.unresolved_tree_conflicts = apr_hash_make(scratch_pool); if (ctx->notify_func2) ctx->notify_func2(ctx->notify_baton2, svn_wc_create_notify( local_abspath, svn_wc_notify_conflict_resolver_starting, scratch_pool), scratch_pool); /* Swap in our notify_func wrapper. We must revert this before returning! */ cswb.notify_func = ctx->notify_func2; cswb.notify_baton = ctx->notify_baton2; ctx->notify_func2 = tree_conflict_collector; ctx->notify_baton2 = &cswb; err = svn_wc_walk_status(ctx->wc_ctx, local_abspath, depth, FALSE /* get_all */, FALSE /* no_ignore */, TRUE /* ignore_text_mods */, NULL /* ignore_patterns */, conflict_status_walker, &cswb, ctx->cancel_func, ctx->cancel_baton, scratch_pool); /* If we got new tree conflicts (or delayed conflicts) during the initial walk, we now walk them one by one as closure. */ while (!err && cswb.unresolved_tree_conflicts && apr_hash_count(cswb.unresolved_tree_conflicts)) { apr_hash_index_t *hi; svn_wc_status3_t *status = NULL; const char *tc_abspath = NULL; if (iterpool) svn_pool_clear(iterpool); else iterpool = svn_pool_create(scratch_pool); hi = apr_hash_first(scratch_pool, cswb.unresolved_tree_conflicts); cswb.unresolved_tree_conflicts = apr_hash_make(scratch_pool); cswb.resolved_a_tree_conflict = FALSE; for (; hi && !err; hi = apr_hash_next(hi)) { svn_pool_clear(iterpool); tc_abspath = apr_hash_this_key(hi); if (ctx->cancel_func) { err = ctx->cancel_func(ctx->cancel_baton); if (err) break; } err = svn_error_trace(svn_wc_status3(&status, ctx->wc_ctx, tc_abspath, iterpool, iterpool)); if (err) break; err = svn_error_trace(conflict_status_walker(&cswb, tc_abspath, status, scratch_pool)); if (err) break; } if (!err && !cswb.resolved_a_tree_conflict && tc_abspath && apr_hash_count(cswb.unresolved_tree_conflicts)) { /* None of the remaining conflicts got resolved, without any error. * Disable the 'unresolved_tree_conflicts' cache and try again. */ cswb.unresolved_tree_conflicts = NULL; /* Run the most recent resolve operation again. * We still have status and tc_abspath for that one. * This should uncover the error which prevents resolution. */ err = svn_error_trace(conflict_status_walker(&cswb, tc_abspath, status, scratch_pool)); SVN_ERR_ASSERT(err != NULL); err = svn_error_createf( SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE, err, _("Unable to resolve pending conflict on '%s'"), svn_dirent_local_style(tc_abspath, scratch_pool)); break; } } if (iterpool) svn_pool_destroy(iterpool); ctx->notify_func2 = cswb.notify_func; ctx->notify_baton2 = cswb.notify_baton; if (!err && ctx->notify_func2) ctx->notify_func2(ctx->notify_baton2, svn_wc_create_notify(local_abspath, svn_wc_notify_conflict_resolver_done, scratch_pool), scratch_pool); return svn_error_trace(err); } Index: vendor/subversion/dist/subversion/libsvn_client/update.c =================================================================== --- vendor/subversion/dist/subversion/libsvn_client/update.c (revision 339231) +++ vendor/subversion/dist/subversion/libsvn_client/update.c (revision 339232) @@ -1,783 +1,831 @@ /* * update.c: wrappers around wc update functionality * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * ==================================================================== */ /* ==================================================================== */ /*** Includes. ***/ #include "svn_hash.h" #include "svn_wc.h" #include "svn_client.h" #include "svn_error.h" #include "svn_config.h" #include "svn_time.h" #include "svn_dirent_uri.h" #include "svn_path.h" #include "svn_pools.h" #include "svn_io.h" #include "client.h" #include "svn_private_config.h" #include "private/svn_wc_private.h" /* Implements svn_wc_dirents_func_t for update and switch handling. Assumes a struct svn_client__dirent_fetcher_baton_t * baton */ svn_error_t * svn_client__dirent_fetcher(void *baton, apr_hash_t **dirents, const char *repos_root_url, const char *repos_relpath, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { struct svn_client__dirent_fetcher_baton_t *dfb = baton; const char *old_url = NULL; const char *session_relpath; svn_node_kind_t kind; const char *url; url = svn_path_url_add_component2(repos_root_url, repos_relpath, scratch_pool); if (!svn_uri__is_ancestor(dfb->anchor_url, url)) { SVN_ERR(svn_client__ensure_ra_session_url(&old_url, dfb->ra_session, url, scratch_pool)); session_relpath = ""; } else SVN_ERR(svn_ra_get_path_relative_to_session(dfb->ra_session, &session_relpath, url, scratch_pool)); /* Is session_relpath still a directory? */ SVN_ERR(svn_ra_check_path(dfb->ra_session, session_relpath, dfb->target_revision, &kind, scratch_pool)); if (kind == svn_node_dir) SVN_ERR(svn_ra_get_dir2(dfb->ra_session, dirents, NULL, NULL, session_relpath, dfb->target_revision, SVN_DIRENT_KIND, result_pool)); else *dirents = NULL; if (old_url) SVN_ERR(svn_ra_reparent(dfb->ra_session, old_url, scratch_pool)); return SVN_NO_ERROR; } /*** Code. ***/ /* Set *CLEAN_CHECKOUT to FALSE only if LOCAL_ABSPATH is a non-empty folder. ANCHOR_ABSPATH is the w/c root and LOCAL_ABSPATH will still be considered empty, if it is equal to ANCHOR_ABSPATH and only contains the admin sub-folder. If the w/c folder already exists but cannot be openend, we return "unclean" - just in case. Most likely, the caller will have to bail out later due to the same error we got here. */ static svn_error_t * is_empty_wc(svn_boolean_t *clean_checkout, const char *local_abspath, const char *anchor_abspath, apr_pool_t *pool) { apr_dir_t *dir; apr_finfo_t finfo; svn_error_t *err; /* "clean" until found dirty */ *clean_checkout = TRUE; /* open directory. If it does not exist, yet, a clean one will be created by the caller. */ err = svn_io_dir_open(&dir, local_abspath, pool); if (err) { if (! APR_STATUS_IS_ENOENT(err->apr_err)) *clean_checkout = FALSE; svn_error_clear(err); return SVN_NO_ERROR; } for (err = svn_io_dir_read(&finfo, APR_FINFO_NAME, dir, pool); err == SVN_NO_ERROR; err = svn_io_dir_read(&finfo, APR_FINFO_NAME, dir, pool)) { /* Ignore entries for this dir and its parent, robustly. (APR promises that they'll come first, so technically this guard could be moved outside the loop. But Ryan Bloom says he doesn't believe it, and I believe him. */ if (! (finfo.name[0] == '.' && (finfo.name[1] == '\0' || (finfo.name[1] == '.' && finfo.name[2] == '\0')))) { if ( ! svn_wc_is_adm_dir(finfo.name, pool) || strcmp(local_abspath, anchor_abspath) != 0) { *clean_checkout = FALSE; break; } } } if (err) { if (! APR_STATUS_IS_ENOENT(err->apr_err)) { /* There was some issue reading the folder content. * We better disable optimizations in that case. */ *clean_checkout = FALSE; } svn_error_clear(err); } return svn_io_dir_close(dir); } /* A conflict callback that simply records the conflicted path in BATON. Implements svn_wc_conflict_resolver_func2_t. */ static svn_error_t * record_conflict(svn_wc_conflict_result_t **result, const svn_wc_conflict_description2_t *description, void *baton, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { apr_hash_t *conflicted_paths = baton; svn_hash_sets(conflicted_paths, apr_pstrdup(apr_hash_pool_get(conflicted_paths), description->local_abspath), ""); *result = svn_wc_create_conflict_result(svn_wc_conflict_choose_postpone, NULL, result_pool); return SVN_NO_ERROR; } +/* Perform post-update processing of externals defined below LOCAL_ABSPATH. */ +static svn_error_t * +handle_externals(svn_boolean_t *timestamp_sleep, + const char *local_abspath, + svn_depth_t depth, + const char *repos_root_url, + svn_ra_session_t *ra_session, + svn_client_ctx_t *ctx, + apr_pool_t *scratch_pool) +{ + apr_hash_t *new_externals; + apr_hash_t *new_depths; + + SVN_ERR(svn_wc__externals_gather_definitions(&new_externals, + &new_depths, + ctx->wc_ctx, local_abspath, + depth, + scratch_pool, scratch_pool)); + + SVN_ERR(svn_client__handle_externals(new_externals, + new_depths, + repos_root_url, local_abspath, + depth, timestamp_sleep, ra_session, + ctx, scratch_pool)); + return SVN_NO_ERROR; +} + +/* Try to reuse the RA session by reparenting it to the anchor_url. + * This code is probably overly cautious since we only use this + * currently when parents are missing and so all the anchor_urls + * have to be in the same repo. + * Note that ra_session_p is an (optional) input parameter as well + * as an output parameter. */ +static svn_error_t * +reuse_ra_session(svn_ra_session_t **ra_session_p, + const char **corrected_url, + const char *anchor_url, + const char *anchor_abspath, + svn_client_ctx_t *ctx, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool) +{ + svn_ra_session_t *ra_session = *ra_session_p; + + if (ra_session) + { + svn_error_t *err = svn_ra_reparent(ra_session, anchor_url, scratch_pool); + if (err) + { + if (err->apr_err == SVN_ERR_RA_ILLEGAL_URL) + { + /* session changed repos, can't reuse it */ + svn_error_clear(err); + ra_session = NULL; + } + else + { + return svn_error_trace(err); + } + } + else + { + *corrected_url = NULL; + } + } + + /* Open an RA session for the URL if one isn't already available */ + if (!ra_session) + { + SVN_ERR(svn_client__open_ra_session_internal(&ra_session, corrected_url, + anchor_url, + anchor_abspath, NULL, + TRUE /* write_dav_props */, + TRUE /* read_dav_props */, + ctx, + result_pool, scratch_pool)); + *ra_session_p = ra_session; + } + + return SVN_NO_ERROR; +} + /* This is a helper for svn_client__update_internal(), which see for an explanation of most of these parameters. Some stuff that's unique is as follows: ANCHOR_ABSPATH is the local absolute path of the update anchor. This is typically either the same as LOCAL_ABSPATH, or the immediate parent of LOCAL_ABSPATH. If NOTIFY_SUMMARY is set (and there's a notification handler in CTX), transmit the final update summary upon successful completion of the update. Add the paths of any conflict victims to CONFLICTED_PATHS, if that is not null. Use RA_SESSION_P to run the update if it is not NULL. If it is then open a new ra session and place it in RA_SESSION_P. This allows repeated calls to update_internal to reuse the same session. */ static svn_error_t * update_internal(svn_revnum_t *result_rev, svn_boolean_t *timestamp_sleep, apr_hash_t *conflicted_paths, svn_ra_session_t **ra_session_p, const char *local_abspath, const char *anchor_abspath, const svn_opt_revision_t *revision, svn_depth_t depth, svn_boolean_t depth_is_sticky, svn_boolean_t ignore_externals, svn_boolean_t allow_unver_obstructions, svn_boolean_t adds_as_modification, svn_boolean_t notify_summary, svn_client_ctx_t *ctx, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { const svn_delta_editor_t *update_editor; void *update_edit_baton; const svn_ra_reporter3_t *reporter; void *report_baton; const char *corrected_url; const char *target; const char *repos_root_url; const char *repos_relpath; const char *repos_uuid; const char *anchor_url; svn_revnum_t revnum; svn_boolean_t use_commit_times; svn_boolean_t clean_checkout = FALSE; const char *diff3_cmd; apr_hash_t *wcroot_iprops; svn_opt_revision_t opt_rev; svn_ra_session_t *ra_session = *ra_session_p; const char *preserved_exts_str; apr_array_header_t *preserved_exts; struct svn_client__dirent_fetcher_baton_t dfb; svn_boolean_t server_supports_depth; svn_boolean_t cropping_target; svn_boolean_t target_conflicted = FALSE; svn_config_t *cfg = ctx->config ? svn_hash_gets(ctx->config, SVN_CONFIG_CATEGORY_CONFIG) : NULL; if (result_rev) *result_rev = SVN_INVALID_REVNUM; /* An unknown depth can't be sticky. */ if (depth == svn_depth_unknown) depth_is_sticky = FALSE; if (strcmp(local_abspath, anchor_abspath)) target = svn_dirent_basename(local_abspath, scratch_pool); else target = ""; /* Check if our anchor exists in BASE. If it doesn't we can't update. */ SVN_ERR(svn_wc__node_get_base(NULL, NULL, &repos_relpath, &repos_root_url, &repos_uuid, NULL, ctx->wc_ctx, anchor_abspath, TRUE /* ignore_enoent */, scratch_pool, scratch_pool)); /* It does not make sense to update conflict victims. */ if (repos_relpath) { svn_error_t *err; svn_boolean_t text_conflicted, prop_conflicted; anchor_url = svn_path_url_add_component2(repos_root_url, repos_relpath, scratch_pool); err = svn_wc_conflicted_p3(&text_conflicted, &prop_conflicted, NULL, ctx->wc_ctx, local_abspath, scratch_pool); if (err && err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND) return svn_error_trace(err); svn_error_clear(err); /* tree-conflicts are handled by the update editor */ if (!err && (text_conflicted || prop_conflicted)) target_conflicted = TRUE; } else anchor_url = NULL; if (! anchor_url || target_conflicted) { if (ctx->notify_func2) { svn_wc_notify_t *nt; nt = svn_wc_create_notify(local_abspath, target_conflicted ? svn_wc_notify_skip_conflicted : svn_wc_notify_update_skip_working_only, scratch_pool); ctx->notify_func2(ctx->notify_baton2, nt, scratch_pool); } return SVN_NO_ERROR; } /* We may need to crop the tree if the depth is sticky */ cropping_target = (depth_is_sticky && depth < svn_depth_infinity); if (cropping_target) { svn_node_kind_t target_kind; if (depth == svn_depth_exclude) { SVN_ERR(svn_wc_exclude(ctx->wc_ctx, local_abspath, ctx->cancel_func, ctx->cancel_baton, ctx->notify_func2, ctx->notify_baton2, scratch_pool)); + if (!ignore_externals) + { + /* We may now be able to remove externals below LOCAL_ABSPATH. */ + SVN_ERR(reuse_ra_session(ra_session_p, &corrected_url, + anchor_url, anchor_abspath, + ctx, result_pool, scratch_pool)); + ra_session = *ra_session_p; + SVN_ERR(handle_externals(timestamp_sleep, local_abspath, depth, + repos_root_url, ra_session, ctx, + scratch_pool)); + } + /* Target excluded, we are done now */ return SVN_NO_ERROR; } SVN_ERR(svn_wc_read_kind2(&target_kind, ctx->wc_ctx, local_abspath, TRUE, TRUE, scratch_pool)); if (target_kind == svn_node_dir) { SVN_ERR(svn_wc_crop_tree2(ctx->wc_ctx, local_abspath, depth, ctx->cancel_func, ctx->cancel_baton, ctx->notify_func2, ctx->notify_baton2, scratch_pool)); } } /* check whether the "clean c/o" optimization is applicable */ SVN_ERR(is_empty_wc(&clean_checkout, local_abspath, anchor_abspath, scratch_pool)); /* Get the external diff3, if any. */ svn_config_get(cfg, &diff3_cmd, SVN_CONFIG_SECTION_HELPERS, SVN_CONFIG_OPTION_DIFF3_CMD, NULL); if (diff3_cmd != NULL) SVN_ERR(svn_path_cstring_to_utf8(&diff3_cmd, diff3_cmd, scratch_pool)); /* See if the user wants last-commit timestamps instead of current ones. */ SVN_ERR(svn_config_get_bool(cfg, &use_commit_times, SVN_CONFIG_SECTION_MISCELLANY, SVN_CONFIG_OPTION_USE_COMMIT_TIMES, FALSE)); /* See which files the user wants to preserve the extension of when conflict files are made. */ svn_config_get(cfg, &preserved_exts_str, SVN_CONFIG_SECTION_MISCELLANY, SVN_CONFIG_OPTION_PRESERVED_CF_EXTS, ""); preserved_exts = *preserved_exts_str ? svn_cstring_split(preserved_exts_str, "\n\r\t\v ", FALSE, scratch_pool) : NULL; /* Let everyone know we're starting a real update (unless we're asked not to). */ if (ctx->notify_func2 && notify_summary) { svn_wc_notify_t *notify = svn_wc_create_notify(local_abspath, svn_wc_notify_update_started, scratch_pool); notify->kind = svn_node_none; notify->content_state = notify->prop_state = svn_wc_notify_state_inapplicable; notify->lock_state = svn_wc_notify_lock_state_inapplicable; ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool); } - /* Try to reuse the RA session by reparenting it to the anchor_url. - * This code is probably overly cautious since we only use this - * currently when parents are missing and so all the anchor_urls - * have to be in the same repo. */ - if (ra_session) - { - svn_error_t *err = svn_ra_reparent(ra_session, anchor_url, scratch_pool); - if (err) - { - if (err->apr_err == SVN_ERR_RA_ILLEGAL_URL) - { - /* session changed repos, can't reuse it */ - svn_error_clear(err); - ra_session = NULL; - } - else - { - return svn_error_trace(err); - } - } - else - { - corrected_url = NULL; - } - } + SVN_ERR(reuse_ra_session(ra_session_p, &corrected_url, anchor_url, + anchor_abspath, ctx, result_pool, scratch_pool)); + ra_session = *ra_session_p; - /* Open an RA session for the URL if one isn't already available */ - if (!ra_session) - { - SVN_ERR(svn_client__open_ra_session_internal(&ra_session, &corrected_url, - anchor_url, - anchor_abspath, NULL, - TRUE /* write_dav_props */, - TRUE /* read_dav_props */, - ctx, - result_pool, scratch_pool)); - *ra_session_p = ra_session; - } - /* If we got a corrected URL from the RA subsystem, we'll need to relocate our working copy first. */ if (corrected_url) { const char *new_repos_root_url; /* To relocate everything inside our repository we need the old and new repos root. */ SVN_ERR(svn_ra_get_repos_root2(ra_session, &new_repos_root_url, scratch_pool)); /* svn_client_relocate2() will check the uuid */ SVN_ERR(svn_client_relocate2(anchor_abspath, repos_root_url, new_repos_root_url, ignore_externals, ctx, scratch_pool)); /* Store updated repository root for externals */ repos_root_url = new_repos_root_url; /* ### We should update anchor_loc->repos_uuid too, although currently * we don't use it. */ anchor_url = corrected_url; } /* Resolve unspecified REVISION now, because we need to retrieve the correct inherited props prior to the editor drive and we need to use the same value of HEAD for both. */ opt_rev.kind = revision->kind; opt_rev.value = revision->value; if (opt_rev.kind == svn_opt_revision_unspecified) opt_rev.kind = svn_opt_revision_head; /* ### todo: shouldn't svn_client__get_revision_number be able to take a URL as easily as a local path? */ SVN_ERR(svn_client__get_revision_number(&revnum, NULL, ctx->wc_ctx, local_abspath, ra_session, &opt_rev, scratch_pool)); SVN_ERR(svn_ra_has_capability(ra_session, &server_supports_depth, SVN_RA_CAPABILITY_DEPTH, scratch_pool)); dfb.ra_session = ra_session; dfb.target_revision = revnum; dfb.anchor_url = anchor_url; SVN_ERR(svn_client__get_inheritable_props(&wcroot_iprops, local_abspath, revnum, depth, ra_session, ctx, scratch_pool, scratch_pool)); /* Fetch the update editor. If REVISION is invalid, that's okay; the RA driver will call editor->set_target_revision later on. */ SVN_ERR(svn_wc__get_update_editor(&update_editor, &update_edit_baton, &revnum, ctx->wc_ctx, anchor_abspath, target, wcroot_iprops, use_commit_times, depth, depth_is_sticky, allow_unver_obstructions, adds_as_modification, server_supports_depth, clean_checkout, diff3_cmd, preserved_exts, svn_client__dirent_fetcher, &dfb, conflicted_paths ? record_conflict : NULL, conflicted_paths, NULL, NULL, ctx->cancel_func, ctx->cancel_baton, ctx->notify_func2, ctx->notify_baton2, scratch_pool, scratch_pool)); /* Tell RA to do an update of URL+TARGET to REVISION; if we pass an invalid revnum, that means RA will use the latest revision. */ SVN_ERR(svn_ra_do_update3(ra_session, &reporter, &report_baton, revnum, target, (!server_supports_depth || depth_is_sticky ? depth : svn_depth_unknown), FALSE /* send_copyfrom_args */, FALSE /* ignore_ancestry */, update_editor, update_edit_baton, scratch_pool, scratch_pool)); /* Past this point, we assume the WC is going to be modified so we will * need to sleep for timestamps. */ *timestamp_sleep = TRUE; /* Drive the reporter structure, describing the revisions within LOCAL_ABSPATH. When this calls reporter->finish_report, the reporter will drive the update_editor. */ SVN_ERR(svn_wc_crawl_revisions5(ctx->wc_ctx, local_abspath, reporter, report_baton, TRUE, depth, (! depth_is_sticky), (! server_supports_depth), use_commit_times, ctx->cancel_func, ctx->cancel_baton, ctx->notify_func2, ctx->notify_baton2, scratch_pool)); /* We handle externals after the update is complete, so that handling external items (and any errors therefrom) doesn't delay the primary operation. */ if ((SVN_DEPTH_IS_RECURSIVE(depth) || cropping_target) && (! ignore_externals)) { - apr_hash_t *new_externals; - apr_hash_t *new_depths; - SVN_ERR(svn_wc__externals_gather_definitions(&new_externals, - &new_depths, - ctx->wc_ctx, local_abspath, - depth, - scratch_pool, scratch_pool)); - - SVN_ERR(svn_client__handle_externals(new_externals, - new_depths, - repos_root_url, local_abspath, - depth, timestamp_sleep, ra_session, - ctx, scratch_pool)); + SVN_ERR(handle_externals(timestamp_sleep, local_abspath, depth, + repos_root_url, ra_session, ctx, scratch_pool)); } /* Let everyone know we're finished here (unless we're asked not to). */ if (ctx->notify_func2 && notify_summary) { svn_wc_notify_t *notify = svn_wc_create_notify(local_abspath, svn_wc_notify_update_completed, scratch_pool); notify->kind = svn_node_none; notify->content_state = notify->prop_state = svn_wc_notify_state_inapplicable; notify->lock_state = svn_wc_notify_lock_state_inapplicable; notify->revision = revnum; ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool); } /* If the caller wants the result revision, give it to them. */ if (result_rev) *result_rev = revnum; return SVN_NO_ERROR; } svn_error_t * svn_client__update_internal(svn_revnum_t *result_rev, svn_boolean_t *timestamp_sleep, const char *local_abspath, const svn_opt_revision_t *revision, svn_depth_t depth, svn_boolean_t depth_is_sticky, svn_boolean_t ignore_externals, svn_boolean_t allow_unver_obstructions, svn_boolean_t adds_as_modification, svn_boolean_t make_parents, svn_boolean_t innerupdate, svn_ra_session_t *ra_session, svn_client_ctx_t *ctx, apr_pool_t *pool) { const char *anchor_abspath, *lockroot_abspath; svn_error_t *err; svn_opt_revision_t peg_revision = *revision; apr_hash_t *conflicted_paths = ctx->conflict_func2 ? apr_hash_make(pool) : NULL; SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath)); SVN_ERR_ASSERT(! (innerupdate && make_parents)); if (make_parents) { int i; const char *parent_abspath = local_abspath; apr_array_header_t *missing_parents = apr_array_make(pool, 4, sizeof(const char *)); apr_pool_t *iterpool; iterpool = svn_pool_create(pool); while (1) { svn_pool_clear(iterpool); /* Try to lock. If we can't lock because our target (or its parent) isn't a working copy, we'll try to walk up the tree to find a working copy, remembering this path's parent as one we need to flesh out. */ err = svn_wc__acquire_write_lock(&lockroot_abspath, ctx->wc_ctx, parent_abspath, !innerupdate, pool, iterpool); if (!err) break; if ((err->apr_err != SVN_ERR_WC_NOT_WORKING_COPY) || svn_dirent_is_root(parent_abspath, strlen(parent_abspath))) return err; svn_error_clear(err); /* Remember the parent of our update target as a missing parent. */ parent_abspath = svn_dirent_dirname(parent_abspath, pool); APR_ARRAY_PUSH(missing_parents, const char *) = parent_abspath; } /* Run 'svn up --depth=empty' (effectively) on the missing parents, if any. */ anchor_abspath = lockroot_abspath; for (i = missing_parents->nelts - 1; i >= 0; i--) { const char *missing_parent = APR_ARRAY_IDX(missing_parents, i, const char *); svn_pool_clear(iterpool); err = update_internal(result_rev, timestamp_sleep, conflicted_paths, &ra_session, missing_parent, anchor_abspath, &peg_revision, svn_depth_empty, FALSE, ignore_externals, allow_unver_obstructions, adds_as_modification, FALSE, ctx, pool, iterpool); if (err) goto cleanup; anchor_abspath = missing_parent; /* If we successfully updated a missing parent, let's re-use the returned revision number for future updates for the sake of consistency. */ peg_revision.kind = svn_opt_revision_number; peg_revision.value.number = *result_rev; } svn_pool_destroy(iterpool); } else { SVN_ERR(svn_wc__acquire_write_lock(&lockroot_abspath, ctx->wc_ctx, local_abspath, !innerupdate, pool, pool)); anchor_abspath = lockroot_abspath; } err = update_internal(result_rev, timestamp_sleep, conflicted_paths, &ra_session, local_abspath, anchor_abspath, &peg_revision, depth, depth_is_sticky, ignore_externals, allow_unver_obstructions, adds_as_modification, TRUE, ctx, pool, pool); /* Give the conflict resolver callback the opportunity to * resolve any conflicts that were raised. */ if (! err && ctx->conflict_func2 && apr_hash_count(conflicted_paths)) { err = svn_client__resolve_conflicts(NULL, conflicted_paths, ctx, pool); } cleanup: err = svn_error_compose_create( err, svn_wc__release_write_lock(ctx->wc_ctx, lockroot_abspath, pool)); return svn_error_trace(err); } svn_error_t * svn_client_update4(apr_array_header_t **result_revs, const apr_array_header_t *paths, const svn_opt_revision_t *revision, svn_depth_t depth, svn_boolean_t depth_is_sticky, svn_boolean_t ignore_externals, svn_boolean_t allow_unver_obstructions, svn_boolean_t adds_as_modification, svn_boolean_t make_parents, svn_client_ctx_t *ctx, apr_pool_t *pool) { int i; apr_pool_t *iterpool = svn_pool_create(pool); const char *path = NULL; svn_boolean_t sleep = FALSE; svn_error_t *err = SVN_NO_ERROR; svn_boolean_t found_valid_target = FALSE; if (result_revs) *result_revs = apr_array_make(pool, paths->nelts, sizeof(svn_revnum_t)); for (i = 0; i < paths->nelts; ++i) { path = APR_ARRAY_IDX(paths, i, const char *); if (svn_path_is_url(path)) return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL, _("'%s' is not a local path"), path); } for (i = 0; i < paths->nelts; ++i) { svn_revnum_t result_rev; const char *local_abspath; path = APR_ARRAY_IDX(paths, i, const char *); svn_pool_clear(iterpool); if (ctx->cancel_func) { err = ctx->cancel_func(ctx->cancel_baton); if (err) goto cleanup; } err = svn_dirent_get_absolute(&local_abspath, path, iterpool); if (err) goto cleanup; err = svn_client__update_internal(&result_rev, &sleep, local_abspath, revision, depth, depth_is_sticky, ignore_externals, allow_unver_obstructions, adds_as_modification, make_parents, FALSE, NULL, ctx, iterpool); if (err) { if (err->apr_err != SVN_ERR_WC_NOT_WORKING_COPY) goto cleanup; svn_error_clear(err); err = SVN_NO_ERROR; /* SVN_ERR_WC_NOT_WORKING_COPY: it's not versioned */ result_rev = SVN_INVALID_REVNUM; if (ctx->notify_func2) { svn_wc_notify_t *notify; notify = svn_wc_create_notify(path, svn_wc_notify_skip, iterpool); ctx->notify_func2(ctx->notify_baton2, notify, iterpool); } } else found_valid_target = TRUE; if (result_revs) APR_ARRAY_PUSH(*result_revs, svn_revnum_t) = result_rev; } svn_pool_destroy(iterpool); cleanup: if (!err && !found_valid_target) return svn_error_create(SVN_ERR_WC_NOT_WORKING_COPY, NULL, _("None of the targets are working copies")); if (sleep) { const char *wcroot_abspath; if (paths->nelts == 1) { const char *abspath; /* PATH iteslf may have been removed by the update. */ SVN_ERR(svn_dirent_get_absolute(&abspath, path, pool)); SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx, abspath, pool, pool)); } else wcroot_abspath = NULL; svn_io_sleep_for_timestamps(wcroot_abspath, pool); } return svn_error_trace(err); } Index: vendor/subversion/dist/subversion/libsvn_fs_fs/cached_data.c =================================================================== --- vendor/subversion/dist/subversion/libsvn_fs_fs/cached_data.c (revision 339231) +++ vendor/subversion/dist/subversion/libsvn_fs_fs/cached_data.c (revision 339232) @@ -1,3784 +1,3806 @@ /* cached_data.c --- cached (read) access to FSFS data * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * ==================================================================== */ #include "cached_data.h" #include #include "svn_hash.h" #include "svn_ctype.h" #include "svn_sorts.h" #include "private/svn_delta_private.h" #include "private/svn_io_private.h" #include "private/svn_sorts_private.h" #include "private/svn_subr_private.h" #include "private/svn_temp_serializer.h" #include "fs_fs.h" #include "id.h" #include "index.h" #include "low_level.h" #include "pack.h" #include "util.h" #include "temp_serializer.h" #include "../libsvn_fs/fs-loader.h" #include "../libsvn_delta/delta.h" /* for SVN_DELTA_WINDOW_SIZE */ #include "svn_private_config.h" /* forward-declare. See implementation for the docstring */ static svn_error_t * block_read(void **result, svn_fs_t *fs, svn_revnum_t revision, apr_uint64_t item_index, svn_fs_fs__revision_file_t *revision_file, apr_pool_t *result_pool, apr_pool_t *scratch_pool); /* Define this to enable access logging via dbg_log_access #define SVN_FS_FS__LOG_ACCESS */ /* When SVN_FS_FS__LOG_ACCESS has been defined, write a line to console * showing where REVISION, ITEM_INDEX is located in FS and use ITEM to * show details on it's contents if not NULL. To support format 6 and * earlier repos, ITEM_TYPE (SVN_FS_FS__ITEM_TYPE_*) must match ITEM. * Use SCRATCH_POOL for temporary allocations. * * For pre-format7 repos, the display will be restricted. */ static svn_error_t * dbg_log_access(svn_fs_t *fs, svn_revnum_t revision, apr_uint64_t item_index, void *item, apr_uint32_t item_type, apr_pool_t *scratch_pool) { /* no-op if this macro is not defined */ #ifdef SVN_FS_FS__LOG_ACCESS fs_fs_data_t *ffd = fs->fsap_data; apr_off_t end_offset = 0; svn_fs_fs__p2l_entry_t *entry = NULL; static const char *types[] = {"", "frep ", "drep ", "fprop", "dprop", "node ", "chgs ", "rep "}; const char *description = ""; const char *type = types[item_type]; const char *pack = ""; apr_off_t offset; svn_fs_fs__revision_file_t *rev_file; SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&rev_file, fs, revision, scratch_pool, scratch_pool)); /* determine rev / pack file offset */ SVN_ERR(svn_fs_fs__item_offset(&offset, fs, rev_file, revision, NULL, item_index, scratch_pool)); /* constructing the pack file description */ if (revision < ffd->min_unpacked_rev) pack = apr_psprintf(scratch_pool, "%4ld|", revision / ffd->max_files_per_dir); /* construct description if possible */ if (item_type == SVN_FS_FS__ITEM_TYPE_NODEREV && item != NULL) { node_revision_t *node = item; const char *data_rep = node->data_rep ? apr_psprintf(scratch_pool, " d=%ld/%" APR_UINT64_T_FMT, node->data_rep->revision, node->data_rep->item_index) : ""; const char *prop_rep = node->prop_rep ? apr_psprintf(scratch_pool, " p=%ld/%" APR_UINT64_T_FMT, node->prop_rep->revision, node->prop_rep->item_index) : ""; description = apr_psprintf(scratch_pool, "%s (pc=%d%s%s)", node->created_path, node->predecessor_count, data_rep, prop_rep); } else if (item_type == SVN_FS_FS__ITEM_TYPE_ANY_REP) { svn_fs_fs__rep_header_t *header = item; if (header == NULL) description = " (txdelta window)"; else if (header->type == svn_fs_fs__rep_plain) description = " PLAIN"; else if (header->type == svn_fs_fs__rep_self_delta) description = " DELTA"; else description = apr_psprintf(scratch_pool, " DELTA against %ld/%" APR_UINT64_T_FMT, header->base_revision, header->base_item_index); } else if (item_type == SVN_FS_FS__ITEM_TYPE_CHANGES && item != NULL) { apr_array_header_t *changes = item; switch (changes->nelts) { case 0: description = " no change"; break; case 1: description = " 1 change"; break; default: description = apr_psprintf(scratch_pool, " %d changes", changes->nelts); } } /* some info is only available in format7 repos */ if (svn_fs_fs__use_log_addressing(fs)) { /* reverse index lookup: get item description in ENTRY */ SVN_ERR(svn_fs_fs__p2l_entry_lookup(&entry, fs, rev_file, revision, offset, scratch_pool, scratch_pool)); if (entry) { /* more details */ end_offset = offset + entry->size; type = types[entry->type]; } /* line output */ printf("%5s%4lx:%04lx -%4lx:%04lx %s %7ld %5"APR_UINT64_T_FMT" %s\n", pack, (long)(offset / ffd->block_size), (long)(offset % ffd->block_size), (long)(end_offset / ffd->block_size), (long)(end_offset % ffd->block_size), type, revision, item_index, description); } else { /* reduced logging for format 6 and earlier */ printf("%5s%10" APR_UINT64_T_HEX_FMT " %s %7ld %7" APR_UINT64_T_FMT \ " %s\n", pack, (apr_uint64_t)(offset), type, revision, item_index, description); } /* We don't know when SCRATCH_POOL will be cleared, so close the rev file explicitly. */ SVN_ERR(svn_fs_fs__close_revision_file(rev_file)); #endif return SVN_NO_ERROR; } /* Convenience wrapper around svn_io_file_aligned_seek, taking filesystem FS instead of a block size. */ static svn_error_t * aligned_seek(svn_fs_t *fs, apr_file_t *file, apr_off_t *buffer_start, apr_off_t offset, apr_pool_t *pool) { fs_fs_data_t *ffd = fs->fsap_data; return svn_error_trace(svn_io_file_aligned_seek(file, ffd->block_size, buffer_start, offset, pool)); } /* Open the revision file for revision REV in filesystem FS and store the newly opened file in FILE. Seek to location OFFSET before returning. Perform temporary allocations in POOL. */ static svn_error_t * open_and_seek_revision(svn_fs_fs__revision_file_t **file, svn_fs_t *fs, svn_revnum_t rev, apr_uint64_t item, apr_pool_t *pool) { svn_fs_fs__revision_file_t *rev_file; apr_off_t offset = -1; SVN_ERR(svn_fs_fs__ensure_revision_exists(rev, fs, pool)); SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&rev_file, fs, rev, pool, pool)); SVN_ERR(svn_fs_fs__item_offset(&offset, fs, rev_file, rev, NULL, item, pool)); SVN_ERR(aligned_seek(fs, rev_file->file, NULL, offset, pool)); *file = rev_file; return SVN_NO_ERROR; } /* Open the representation REP for a node-revision in filesystem FS, seek to its position and store the newly opened file in FILE. Perform temporary allocations in POOL. */ static svn_error_t * open_and_seek_transaction(svn_fs_fs__revision_file_t **file, svn_fs_t *fs, representation_t *rep, apr_pool_t *pool) { apr_off_t offset; SVN_ERR(svn_fs_fs__open_proto_rev_file(file, fs, &rep->txn_id, pool, pool)); SVN_ERR(svn_fs_fs__item_offset(&offset, fs, NULL, SVN_INVALID_REVNUM, &rep->txn_id, rep->item_index, pool)); SVN_ERR(aligned_seek(fs, (*file)->file, NULL, offset, pool)); return SVN_NO_ERROR; } /* Given a node-id ID, and a representation REP in filesystem FS, open the correct file and seek to the correction location. Store this file in *FILE_P. Perform any allocations in POOL. */ static svn_error_t * open_and_seek_representation(svn_fs_fs__revision_file_t **file_p, svn_fs_t *fs, representation_t *rep, apr_pool_t *pool) { if (! svn_fs_fs__id_txn_used(&rep->txn_id)) return open_and_seek_revision(file_p, fs, rep->revision, rep->item_index, pool); else return open_and_seek_transaction(file_p, fs, rep, pool); } static svn_error_t * err_dangling_id(svn_fs_t *fs, const svn_fs_id_t *id) { svn_string_t *id_str = svn_fs_fs__id_unparse(id, fs->pool); return svn_error_createf (SVN_ERR_FS_ID_NOT_FOUND, 0, _("Reference to non-existent node '%s' in filesystem '%s'"), id_str->data, fs->path); } /* Return TRUE, if FS is of a format that supports block-read and the feature has been enabled. */ static svn_boolean_t use_block_read(svn_fs_t *fs) { fs_fs_data_t *ffd = fs->fsap_data; return svn_fs_fs__use_log_addressing(fs) && ffd->use_block_read; } svn_error_t * svn_fs_fs__fixup_expanded_size(svn_fs_t *fs, representation_t *rep, apr_pool_t *scratch_pool) { svn_checksum_t checksum; svn_checksum_t *empty_md5; svn_fs_fs__revision_file_t *revision_file; svn_fs_fs__rep_header_t *rep_header; /* Anything to do at all? * * Note that a 0 SIZE is only possible for PLAIN reps due to the SVN\1 * magic prefix in any DELTA rep. */ if (!rep || rep->expanded_size != 0 || rep->size == 0) return SVN_NO_ERROR; /* This function may only be called for committed data. */ assert(!svn_fs_fs__id_txn_used(&rep->txn_id)); /* EXPANDED_SIZE is 0. If the MD5 does not match the one for empty * contents, we know that EXPANDED_SIZE == 0 is wrong and needs to * be set to the actual value given by SIZE. * * Using svn_checksum_match() will also accept all-zero values for * the MD5 digest and only report a mismatch if the MD5 has actually * been given. */ empty_md5 = svn_checksum_empty_checksum(svn_checksum_md5, scratch_pool); checksum.digest = rep->md5_digest; checksum.kind = svn_checksum_md5; if (!svn_checksum_match(empty_md5, &checksum)) { rep->expanded_size = rep->size; return SVN_NO_ERROR; } /* Data in the rep-cache.db does not have MD5 checksums (all zero) on it. * Compare SHA1 instead. */ if (rep->has_sha1) { svn_checksum_t *empty_sha1 = svn_checksum_empty_checksum(svn_checksum_sha1, scratch_pool); checksum.digest = rep->sha1_digest; checksum.kind = svn_checksum_sha1; if (!svn_checksum_match(empty_sha1, &checksum)) { rep->expanded_size = rep->size; return SVN_NO_ERROR; } } /* Only two cases are left here. * (1) A non-empty PLAIN rep with a MD5 collision on EMPTY_MD5. * (2) A DELTA rep with zero-length output. */ /* SVN always stores a DELTA rep with zero-length output as an empty * sequence of txdelta windows, i.e. as "SVN\1". In that case, SIZE is * 4 bytes. There is no other possible DELTA rep of that size and any * PLAIN rep of 4 bytes would produce a different MD5. Hence, if SIZE is * actually 4 here, we know that this is an empty DELTA rep. * * Note that it is technically legal to have DELTA reps with a 0 length * output window. Their on-disk size would be longer. We handle that * case later together with the equally unlikely MD5 collision. */ if (rep->size == 4) { /* EXPANDED_SIZE is already 0. */ return SVN_NO_ERROR; } /* We still have the two options, PLAIN or DELTA rep. At this point, we * are in an extremely unlikely case and can spend some time to figure it * out. So, let's just look at the representation header. */ SVN_ERR(open_and_seek_revision(&revision_file, fs, rep->revision, rep->item_index, scratch_pool)); SVN_ERR(svn_fs_fs__read_rep_header(&rep_header, revision_file->stream, scratch_pool, scratch_pool)); SVN_ERR(svn_fs_fs__close_revision_file(revision_file)); /* Only for PLAIN reps do we have to correct EXPANDED_SIZE. */ if (rep_header->type == svn_fs_fs__rep_plain) rep->expanded_size = rep->size; return SVN_NO_ERROR; } /* Correct known issues with committed NODEREV in FS. * Uses SCRATCH_POOL for temporaries. */ static svn_error_t * fixup_node_revision(svn_fs_t *fs, node_revision_t *noderev, apr_pool_t *scratch_pool) { /* Workaround issue #4031: is-fresh-txn-root in revision files. */ noderev->is_fresh_txn_root = FALSE; /* Make sure EXPANDED_SIZE has the correct value for every rep. */ SVN_ERR(svn_fs_fs__fixup_expanded_size(fs, noderev->data_rep, scratch_pool)); SVN_ERR(svn_fs_fs__fixup_expanded_size(fs, noderev->prop_rep, scratch_pool)); return SVN_NO_ERROR; } /* Get the node-revision for the node ID in FS. Set *NODEREV_P to the new node-revision structure, allocated in POOL. See svn_fs_fs__get_node_revision, which wraps this and adds another error. */ static svn_error_t * get_node_revision_body(node_revision_t **noderev_p, svn_fs_t *fs, const svn_fs_id_t *id, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { svn_error_t *err; svn_boolean_t is_cached = FALSE; fs_fs_data_t *ffd = fs->fsap_data; if (svn_fs_fs__id_is_txn(id)) { apr_file_t *file; /* This is a transaction node-rev. Its storage logic is very different from that of rev / pack files. */ err = svn_io_file_open(&file, svn_fs_fs__path_txn_node_rev(fs, id, scratch_pool), APR_READ | APR_BUFFERED, APR_OS_DEFAULT, scratch_pool); if (err && APR_STATUS_IS_ENOENT(err->apr_err)) { svn_error_clear(err); return svn_error_trace(err_dangling_id(fs, id)); } else if (err) { return svn_error_trace(err); } SVN_ERR(svn_fs_fs__read_noderev(noderev_p, svn_stream_from_aprfile2(file, FALSE, scratch_pool), result_pool, scratch_pool)); } else { svn_fs_fs__revision_file_t *revision_file; /* noderevs in rev / pack files can be cached */ const svn_fs_fs__id_part_t *rev_item = svn_fs_fs__id_rev_item(id); pair_cache_key_t key = { 0 }; key.revision = rev_item->revision; key.second = rev_item->number; /* Not found or not applicable. Try a noderev cache lookup. * If that succeeds, we are done here. */ if (ffd->node_revision_cache) { SVN_ERR(svn_cache__get((void **) noderev_p, &is_cached, ffd->node_revision_cache, &key, result_pool)); if (is_cached) return SVN_NO_ERROR; } /* read the data from disk */ SVN_ERR(open_and_seek_revision(&revision_file, fs, rev_item->revision, rev_item->number, scratch_pool)); if (use_block_read(fs)) { /* block-read will parse the whole block and will also return the one noderev that we need right now. */ SVN_ERR(block_read((void **)noderev_p, fs, rev_item->revision, rev_item->number, revision_file, result_pool, scratch_pool)); } else { /* physical addressing mode reading, parsing and caching */ SVN_ERR(svn_fs_fs__read_noderev(noderev_p, revision_file->stream, result_pool, scratch_pool)); SVN_ERR(fixup_node_revision(fs, *noderev_p, scratch_pool)); /* The noderev is not in cache, yet. Add it, if caching has been enabled. */ if (ffd->node_revision_cache) SVN_ERR(svn_cache__set(ffd->node_revision_cache, &key, *noderev_p, scratch_pool)); } SVN_ERR(svn_fs_fs__close_revision_file(revision_file)); } return SVN_NO_ERROR; } svn_error_t * svn_fs_fs__get_node_revision(node_revision_t **noderev_p, svn_fs_t *fs, const svn_fs_id_t *id, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { const svn_fs_fs__id_part_t *rev_item = svn_fs_fs__id_rev_item(id); svn_error_t *err = get_node_revision_body(noderev_p, fs, id, result_pool, scratch_pool); if (err && err->apr_err == SVN_ERR_FS_CORRUPT) { svn_string_t *id_string = svn_fs_fs__id_unparse(id, scratch_pool); return svn_error_createf(SVN_ERR_FS_CORRUPT, err, "Corrupt node-revision '%s'", id_string->data); } SVN_ERR(dbg_log_access(fs, rev_item->revision, rev_item->number, *noderev_p, SVN_FS_FS__ITEM_TYPE_NODEREV, scratch_pool)); return svn_error_trace(err); } /* Given a revision file REV_FILE, opened to REV in FS, find the Node-ID of the header located at OFFSET and store it in *ID_P. Allocate temporary variables from POOL. */ static svn_error_t * get_fs_id_at_offset(svn_fs_id_t **id_p, svn_fs_fs__revision_file_t *rev_file, svn_fs_t *fs, svn_revnum_t rev, apr_off_t offset, apr_pool_t *pool) { node_revision_t *noderev; SVN_ERR(aligned_seek(fs, rev_file->file, NULL, offset, pool)); SVN_ERR(svn_fs_fs__read_noderev(&noderev, rev_file->stream, pool, pool)); /* noderev->id is const, get rid of that */ *id_p = svn_fs_fs__id_copy(noderev->id, pool); /* assert that the txn_id is REV * (asserting on offset would be harder because we the rev_offset is not * known here) */ assert(svn_fs_fs__id_rev(*id_p) == rev); return SVN_NO_ERROR; } /* Given an open revision file REV_FILE in FS for REV, locate the trailer that specifies the offset to the root node-id and to the changed path information. Store the root node offset in *ROOT_OFFSET and the changed path offset in *CHANGES_OFFSET. If either of these pointers is NULL, do nothing with it. Allocate temporary variables from POOL. */ static svn_error_t * get_root_changes_offset(apr_off_t *root_offset, apr_off_t *changes_offset, svn_fs_fs__revision_file_t *rev_file, svn_fs_t *fs, svn_revnum_t rev, apr_pool_t *pool) { fs_fs_data_t *ffd = fs->fsap_data; apr_off_t rev_offset; apr_seek_where_t seek_relative; svn_stringbuf_t *trailer; char buffer[64]; apr_off_t start; apr_off_t end; apr_size_t len; /* Determine where to seek to in the file. If we've got a pack file, we want to seek to the end of the desired revision. But we don't track that, so we seek to the beginning of the next revision. Unless the next revision is in a different file, in which case, we can just seek to the end of the pack file -- just like we do in the non-packed case. */ if (rev_file->is_packed && ((rev + 1) % ffd->max_files_per_dir != 0)) { SVN_ERR(svn_fs_fs__get_packed_offset(&end, fs, rev + 1, pool)); seek_relative = APR_SET; } else { seek_relative = APR_END; end = 0; } /* Offset of the revision from the start of the pack file, if applicable. */ if (rev_file->is_packed) SVN_ERR(svn_fs_fs__get_packed_offset(&rev_offset, fs, rev, pool)); else rev_offset = 0; /* We will assume that the last line containing the two offsets will never be longer than 64 characters. */ SVN_ERR(svn_io_file_seek(rev_file->file, seek_relative, &end, pool)); if (end < sizeof(buffer)) { len = (apr_size_t)end; start = 0; } else { len = sizeof(buffer); start = end - sizeof(buffer); } /* Read in this last block, from which we will identify the last line. */ SVN_ERR(aligned_seek(fs, rev_file->file, NULL, start, pool)); SVN_ERR(svn_io_file_read_full2(rev_file->file, buffer, len, NULL, NULL, pool)); /* Parse the last line. */ trailer = svn_stringbuf_ncreate(buffer, len, pool); SVN_ERR(svn_fs_fs__parse_revision_trailer(root_offset, changes_offset, trailer, rev)); /* return absolute offsets */ if (root_offset) *root_offset += rev_offset; if (changes_offset) *changes_offset += rev_offset; return SVN_NO_ERROR; } svn_error_t * svn_fs_fs__rev_get_root(svn_fs_id_t **root_id_p, svn_fs_t *fs, svn_revnum_t rev, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { fs_fs_data_t *ffd = fs->fsap_data; SVN_ERR(svn_fs_fs__ensure_revision_exists(rev, fs, scratch_pool)); if (svn_fs_fs__use_log_addressing(fs)) { *root_id_p = svn_fs_fs__id_create_root(rev, result_pool); } else { svn_fs_fs__revision_file_t *revision_file; apr_off_t root_offset; svn_fs_id_t *root_id = NULL; svn_boolean_t is_cached; SVN_ERR(svn_cache__get((void **) root_id_p, &is_cached, ffd->rev_root_id_cache, &rev, result_pool)); if (is_cached) return SVN_NO_ERROR; SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&revision_file, fs, rev, scratch_pool, scratch_pool)); SVN_ERR(get_root_changes_offset(&root_offset, NULL, revision_file, fs, rev, scratch_pool)); SVN_ERR(get_fs_id_at_offset(&root_id, revision_file, fs, rev, root_offset, result_pool)); SVN_ERR(svn_fs_fs__close_revision_file(revision_file)); SVN_ERR(svn_cache__set(ffd->rev_root_id_cache, &rev, root_id, scratch_pool)); *root_id_p = root_id; } return SVN_NO_ERROR; } /* Describes a lazily opened rev / pack file. Instances will be shared between multiple instances of rep_state_t. */ typedef struct shared_file_t { /* The opened file. NULL while file is not open, yet. */ svn_fs_fs__revision_file_t *rfile; /* file system to open the file in */ svn_fs_t *fs; /* a revision contained in the FILE. Since this file may be shared, that value may be different from REP_STATE_T->REVISION. */ svn_revnum_t revision; /* pool to use when creating the FILE. This guarantees that the file remains open / valid beyond the respective local context that required the file to be opened eventually. */ apr_pool_t *pool; } shared_file_t; /* Represents where in the current svndiff data block each representation is. */ typedef struct rep_state_t { /* shared lazy-open rev/pack file structure */ shared_file_t *sfile; /* The txdelta window cache to use or NULL. */ svn_cache__t *raw_window_cache; /* Caches raw (unparsed) windows. May be NULL. */ svn_cache__t *window_cache; /* Caches un-deltified windows. May be NULL. */ svn_cache__t *combined_cache; /* revision containing the representation */ svn_revnum_t revision; /* representation's item index in REVISION */ apr_uint64_t item_index; /* length of the header at the start of the rep. 0 iff this is rep is stored in a container (i.e. does not have a header) */ apr_size_t header_size; apr_off_t start; /* The starting offset for the raw svndiff/plaintext data minus header. -1 if the offset is yet unknown. */ apr_off_t current;/* The current offset relative to START. */ apr_off_t size; /* The on-disk size of the representation. */ int ver; /* If a delta, what svndiff version? -1 for unknown delta version. */ int chunk_index; /* number of the window to read */ } rep_state_t; /* Simple wrapper around svn_io_file_get_offset to simplify callers. */ static svn_error_t * get_file_offset(apr_off_t *offset, rep_state_t *rs, apr_pool_t *pool) { return svn_error_trace(svn_io_file_get_offset(offset, rs->sfile->rfile->file, pool)); } /* Simple wrapper around svn_io_file_aligned_seek to simplify callers. */ static svn_error_t * rs_aligned_seek(rep_state_t *rs, apr_off_t *buffer_start, apr_off_t offset, apr_pool_t *pool) { fs_fs_data_t *ffd = rs->sfile->fs->fsap_data; return svn_error_trace(svn_io_file_aligned_seek(rs->sfile->rfile->file, ffd->block_size, buffer_start, offset, pool)); } /* Open FILE->FILE and FILE->STREAM if they haven't been opened, yet. */ static svn_error_t* auto_open_shared_file(shared_file_t *file) { if (file->rfile == NULL) SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&file->rfile, file->fs, file->revision, file->pool, file->pool)); return SVN_NO_ERROR; } /* Set RS->START to the begin of the representation raw in RS->FILE->FILE, if that hasn't been done yet. Use POOL for temporary allocations. */ static svn_error_t* auto_set_start_offset(rep_state_t *rs, apr_pool_t *pool) { if (rs->start == -1) { SVN_ERR(svn_fs_fs__item_offset(&rs->start, rs->sfile->fs, rs->sfile->rfile, rs->revision, NULL, rs->item_index, pool)); rs->start += rs->header_size; } return SVN_NO_ERROR; } /* Set RS->VER depending on what is found in the already open RS->FILE->FILE if the diff version is still unknown. Use POOL for temporary allocations. */ static svn_error_t* auto_read_diff_version(rep_state_t *rs, apr_pool_t *pool) { if (rs->ver == -1) { char buf[4]; SVN_ERR(rs_aligned_seek(rs, NULL, rs->start, pool)); SVN_ERR(svn_io_file_read_full2(rs->sfile->rfile->file, buf, sizeof(buf), NULL, NULL, pool)); /* ### Layering violation */ if (! ((buf[0] == 'S') && (buf[1] == 'V') && (buf[2] == 'N'))) return svn_error_create (SVN_ERR_FS_CORRUPT, NULL, _("Malformed svndiff data in representation")); rs->ver = buf[3]; rs->chunk_index = 0; rs->current = 4; } return SVN_NO_ERROR; } /* See create_rep_state, which wraps this and adds another error. */ static svn_error_t * create_rep_state_body(rep_state_t **rep_state, svn_fs_fs__rep_header_t **rep_header, shared_file_t **shared_file, representation_t *rep, svn_fs_t *fs, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { fs_fs_data_t *ffd = fs->fsap_data; rep_state_t *rs = apr_pcalloc(result_pool, sizeof(*rs)); svn_fs_fs__rep_header_t *rh; svn_boolean_t is_cached = FALSE; apr_uint64_t estimated_window_storage; /* If the hint is * - given, * - refers to a valid revision, * - refers to a packed revision, * - as does the rep we want to read, and * - refers to the same pack file as the rep * we can re-use the same, already open file object */ svn_boolean_t reuse_shared_file = shared_file && *shared_file && (*shared_file)->rfile && SVN_IS_VALID_REVNUM((*shared_file)->revision) && (*shared_file)->revision < ffd->min_unpacked_rev && rep->revision < ffd->min_unpacked_rev && ( ((*shared_file)->revision / ffd->max_files_per_dir) == (rep->revision / ffd->max_files_per_dir)); pair_cache_key_t key; key.revision = rep->revision; key.second = rep->item_index; /* continue constructing RS and RA */ rs->size = rep->size; rs->revision = rep->revision; rs->item_index = rep->item_index; rs->raw_window_cache = use_block_read(fs) ? ffd->raw_window_cache : NULL; rs->ver = -1; rs->start = -1; /* Very long files stored as self-delta will produce a huge number of delta windows. Don't cache them lest we don't thrash the cache. Since we don't know the depth of the delta chain, let's assume, the whole contents get rewritten 3 times. */ estimated_window_storage = 4 * (rep->expanded_size + SVN_DELTA_WINDOW_SIZE); estimated_window_storage = MIN(estimated_window_storage, APR_SIZE_MAX); rs->window_cache = ffd->txdelta_window_cache && svn_cache__is_cachable(ffd->txdelta_window_cache, (apr_size_t)estimated_window_storage) ? ffd->txdelta_window_cache : NULL; rs->combined_cache = ffd->combined_window_cache && svn_cache__is_cachable(ffd->combined_window_cache, (apr_size_t)estimated_window_storage) ? ffd->combined_window_cache : NULL; /* cache lookup, i.e. skip reading the rep header if possible */ if (ffd->rep_header_cache && !svn_fs_fs__id_txn_used(&rep->txn_id)) SVN_ERR(svn_cache__get((void **) &rh, &is_cached, ffd->rep_header_cache, &key, result_pool)); /* initialize the (shared) FILE member in RS */ if (reuse_shared_file) { rs->sfile = *shared_file; } else { shared_file_t *file = apr_pcalloc(result_pool, sizeof(*file)); file->revision = rep->revision; file->pool = result_pool; file->fs = fs; rs->sfile = file; /* remember the current file, if suggested by the caller */ if (shared_file) *shared_file = file; } /* read rep header, if necessary */ if (!is_cached) { /* ensure file is open and navigate to the start of rep header */ if (reuse_shared_file) { apr_off_t offset; /* ... we can re-use the same, already open file object. * This implies that we don't read from a txn. */ rs->sfile = *shared_file; SVN_ERR(auto_open_shared_file(rs->sfile)); SVN_ERR(svn_fs_fs__item_offset(&offset, fs, rs->sfile->rfile, rep->revision, NULL, rep->item_index, scratch_pool)); SVN_ERR(rs_aligned_seek(rs, NULL, offset, scratch_pool)); } else { /* otherwise, create a new file object. May or may not be * an in-txn file. */ SVN_ERR(open_and_seek_representation(&rs->sfile->rfile, fs, rep, result_pool)); } SVN_ERR(svn_fs_fs__read_rep_header(&rh, rs->sfile->rfile->stream, result_pool, scratch_pool)); SVN_ERR(get_file_offset(&rs->start, rs, result_pool)); /* populate the cache if appropriate */ if (! svn_fs_fs__id_txn_used(&rep->txn_id)) { if (use_block_read(fs)) SVN_ERR(block_read(NULL, fs, rep->revision, rep->item_index, rs->sfile->rfile, result_pool, scratch_pool)); else if (ffd->rep_header_cache) SVN_ERR(svn_cache__set(ffd->rep_header_cache, &key, rh, scratch_pool)); } } /* finalize */ SVN_ERR(dbg_log_access(fs, rep->revision, rep->item_index, rh, SVN_FS_FS__ITEM_TYPE_ANY_REP, scratch_pool)); rs->header_size = rh->header_size; *rep_state = rs; *rep_header = rh; if (rh->type == svn_fs_fs__rep_plain) /* This is a plaintext, so just return the current rep_state. */ return SVN_NO_ERROR; /* skip "SVNx" diff marker */ rs->current = 4; return SVN_NO_ERROR; } /* Read the rep args for REP in filesystem FS and create a rep_state for reading the representation. Return the rep_state in *REP_STATE and the rep header in *REP_HEADER, both allocated in POOL. When reading multiple reps, i.e. a skip delta chain, you may provide non-NULL SHARED_FILE. (If SHARED_FILE is not NULL, in the first call it should be a pointer to NULL.) The function will use this variable to store the previous call results and tries to re-use it. This may result in significant savings in I/O for packed files and number of open file handles. */ static svn_error_t * create_rep_state(rep_state_t **rep_state, svn_fs_fs__rep_header_t **rep_header, shared_file_t **shared_file, representation_t *rep, svn_fs_t *fs, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { svn_error_t *err = create_rep_state_body(rep_state, rep_header, shared_file, rep, fs, result_pool, scratch_pool); if (err && err->apr_err == SVN_ERR_FS_CORRUPT) { fs_fs_data_t *ffd = fs->fsap_data; const char *rep_str; /* ### This always returns "-1" for transaction reps, because ### this particular bit of code doesn't know if the rep is ### stored in the protorev or in the mutable area (for props ### or dir contents). It is pretty rare for FSFS to *read* ### from the protorev file, though, so this is probably OK. ### And anyone going to debug corruption errors is probably ### going to jump straight to this comment anyway! */ rep_str = rep ? svn_fs_fs__unparse_representation (rep, ffd->format, TRUE, scratch_pool, scratch_pool)->data : "(null)"; return svn_error_createf(SVN_ERR_FS_CORRUPT, err, "Corrupt representation '%s'", rep_str); } /* ### Call representation_string() ? */ return svn_error_trace(err); } svn_error_t * svn_fs_fs__check_rep(representation_t *rep, svn_fs_t *fs, void **hint, apr_pool_t *scratch_pool) { if (svn_fs_fs__use_log_addressing(fs)) { apr_off_t offset; svn_fs_fs__p2l_entry_t *entry; svn_fs_fs__revision_file_t *rev_file = NULL; /* Reuse the revision file provided by *HINT, if it is given and * actually the rev / pack file that we want. */ svn_revnum_t start_rev = svn_fs_fs__packed_base_rev(fs, rep->revision); if (hint) rev_file = *(svn_fs_fs__revision_file_t **)hint; if (rev_file == NULL || rev_file->start_revision != start_rev) SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&rev_file, fs, rep->revision, scratch_pool, scratch_pool)); if (hint) *hint = rev_file; /* This will auto-retry if there was a background pack. */ SVN_ERR(svn_fs_fs__item_offset(&offset, fs, rev_file, rep->revision, NULL, rep->item_index, scratch_pool)); /* This may fail if there is a background pack operation (can't auto- retry because the item offset lookup has to be redone as well). */ SVN_ERR(svn_fs_fs__p2l_entry_lookup(&entry, fs, rev_file, rep->revision, offset, scratch_pool, scratch_pool)); if ( entry == NULL || entry->type < SVN_FS_FS__ITEM_TYPE_FILE_REP || entry->type > SVN_FS_FS__ITEM_TYPE_DIR_PROPS) return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL, _("No representation found at offset %s " "for item %s in revision %ld"), apr_off_t_toa(scratch_pool, offset), apr_psprintf(scratch_pool, "%" APR_UINT64_T_FMT, rep->item_index), rep->revision); } else { rep_state_t *rs; svn_fs_fs__rep_header_t *rep_header; /* ### Should this be using read_rep_line() directly? */ SVN_ERR(create_rep_state(&rs, &rep_header, (shared_file_t**)hint, rep, fs, scratch_pool, scratch_pool)); } return SVN_NO_ERROR; } svn_error_t * svn_fs_fs__rep_chain_length(int *chain_length, int *shard_count, representation_t *rep, svn_fs_t *fs, apr_pool_t *scratch_pool) { fs_fs_data_t *ffd = fs->fsap_data; svn_revnum_t shard_size = ffd->max_files_per_dir ? ffd->max_files_per_dir : 1; apr_pool_t *subpool = svn_pool_create(scratch_pool); apr_pool_t *iterpool = svn_pool_create(scratch_pool); svn_boolean_t is_delta = FALSE; int count = 0; int shards = 1; svn_revnum_t last_shard = rep->revision / shard_size; /* Check whether the length of the deltification chain is acceptable. * Otherwise, shared reps may form a non-skipping delta chain in * extreme cases. */ representation_t base_rep = *rep; /* re-use open files between iterations */ shared_file_t *file_hint = NULL; svn_fs_fs__rep_header_t *header; /* follow the delta chain towards the end but for at most * MAX_CHAIN_LENGTH steps. */ do { rep_state_t *rep_state; svn_pool_clear(iterpool); if (base_rep.revision / shard_size != last_shard) { last_shard = base_rep.revision / shard_size; ++shards; } SVN_ERR(create_rep_state_body(&rep_state, &header, &file_hint, &base_rep, fs, subpool, iterpool)); base_rep.revision = header->base_revision; base_rep.item_index = header->base_item_index; base_rep.size = header->base_length; svn_fs_fs__id_txn_reset(&base_rep.txn_id); is_delta = header->type == svn_fs_fs__rep_delta; /* Clear it the SUBPOOL once in a while. Doing it too frequently * renders the FILE_HINT ineffective. Doing too infrequently, may * leave us with too many open file handles. * * Note that this is mostly about efficiency, with larger values * being more efficient, and any non-zero value is legal here. When * reading deltified contents, we may keep 10s of rev files open at * the same time and the system has to cope with that. Thus, the * limit of 16 chosen below is in the same ballpark. */ ++count; if (count % 16 == 0) { file_hint = NULL; svn_pool_clear(subpool); } } while (is_delta && base_rep.revision); *chain_length = count; *shard_count = shards; svn_pool_destroy(subpool); svn_pool_destroy(iterpool); return SVN_NO_ERROR; } struct rep_read_baton { /* The FS from which we're reading. */ svn_fs_t *fs; /* Representation to read. */ representation_t rep; /* If not NULL, this is the base for the first delta window in rs_list */ svn_stringbuf_t *base_window; /* The state of all prior delta representations. */ apr_array_header_t *rs_list; /* The plaintext state, if there is a plaintext. */ rep_state_t *src_state; /* The index of the current delta chunk, if we are reading a delta. */ int chunk_index; /* The buffer where we store undeltified data. */ char *buf; apr_size_t buf_pos; apr_size_t buf_len; /* A checksum context for summing the data read in order to verify it. Note: we don't need to use the sha1 checksum because we're only doing data verification, for which md5 is perfectly safe. */ svn_checksum_ctx_t *md5_checksum_ctx; svn_boolean_t checksum_finalized; /* The stored checksum of the representation we are reading, its length, and the amount we've read so far. Some of this information is redundant with rs_list and src_state, but it's convenient for the checksumming code to have it here. */ unsigned char md5_digest[APR_MD5_DIGESTSIZE]; svn_filesize_t len; svn_filesize_t off; /* The key for the fulltext cache for this rep, if there is a fulltext cache. */ pair_cache_key_t fulltext_cache_key; /* The text we've been reading, if we're going to cache it. */ svn_stringbuf_t *current_fulltext; /* If not NULL, attempt to read the data from this cache. Once that lookup fails, reset it to NULL. */ svn_cache__t *fulltext_cache; /* Bytes delivered from the FULLTEXT_CACHE so far. If the next lookup fails, we need to skip that much data from the reconstructed window stream before we continue normal operation. */ svn_filesize_t fulltext_delivered; /* Used for temporary allocations during the read. */ apr_pool_t *pool; /* Pool used to store file handles and other data that is persistant for the entire stream read. */ apr_pool_t *filehandle_pool; }; /* Set window key in *KEY to address the window described by RS. For convenience, return the KEY. */ static window_cache_key_t * get_window_key(window_cache_key_t *key, rep_state_t *rs) { assert(rs->revision <= APR_UINT32_MAX); key->revision = (apr_uint32_t)rs->revision; key->item_index = rs->item_index; key->chunk_index = rs->chunk_index; return key; } /* Implement svn_cache__partial_getter_func_t for raw txdelta windows. * Parse the raw data and return a svn_fs_fs__txdelta_cached_window_t. */ static svn_error_t * parse_raw_window(void **out, const void *data, apr_size_t data_len, void *baton, apr_pool_t *result_pool) { svn_string_t raw_window; svn_stream_t *stream; /* unparsed and parsed window */ const svn_fs_fs__raw_cached_window_t *window = (const svn_fs_fs__raw_cached_window_t *)data; svn_fs_fs__txdelta_cached_window_t *result = apr_pcalloc(result_pool, sizeof(*result)); /* create a read stream taking the raw window as input */ raw_window.data = svn_temp_deserializer__ptr(window, (const void * const *)&window->window.data); raw_window.len = window->window.len; stream = svn_stream_from_string(&raw_window, result_pool); /* parse it */ SVN_ERR(svn_txdelta_read_svndiff_window(&result->window, stream, window->ver, result_pool)); /* complete the window and return it */ result->end_offset = window->end_offset; *out = result; return SVN_NO_ERROR; } /* Read the WINDOW_P number CHUNK_INDEX for the representation given in * rep state RS from the current FSFS session's cache. This will be a * no-op and IS_CACHED will be set to FALSE if no cache has been given. * If a cache is available IS_CACHED will inform the caller about the * success of the lookup. Allocations of the window in will be made * from RESULT_POOL. Use SCRATCH_POOL for temporary allocations. * * If the information could be found, put RS to CHUNK_INDEX. */ static svn_error_t * get_cached_window(svn_txdelta_window_t **window_p, rep_state_t *rs, int chunk_index, svn_boolean_t *is_cached, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { if (! rs->window_cache) { /* txdelta window has not been enabled */ *is_cached = FALSE; } else { /* ask the cache for the desired txdelta window */ svn_fs_fs__txdelta_cached_window_t *cached_window; window_cache_key_t key = { 0 }; get_window_key(&key, rs); key.chunk_index = chunk_index; SVN_ERR(svn_cache__get((void **) &cached_window, is_cached, rs->window_cache, &key, result_pool)); /* If we did not find a parsed txdelta window, we might have a raw version of it in our cache. If so, read, parse and re-cache it. */ if (!*is_cached && rs->raw_window_cache) { SVN_ERR(svn_cache__get_partial((void **) &cached_window, is_cached, rs->raw_window_cache, &key, parse_raw_window, NULL, result_pool)); if (*is_cached) SVN_ERR(svn_cache__set(rs->window_cache, &key, cached_window, scratch_pool)); } /* Return cached information. */ if (*is_cached) { /* found it. Pass it back to the caller. */ *window_p = cached_window->window; /* manipulate the RS as if we just read the data */ rs->current = cached_window->end_offset; rs->chunk_index = chunk_index; } } return SVN_NO_ERROR; } /* Store the WINDOW read for the rep state RS in the current FSFS * session's cache. This will be a no-op if no cache has been given. * Temporary allocations will be made from SCRATCH_POOL. */ static svn_error_t * set_cached_window(svn_txdelta_window_t *window, rep_state_t *rs, apr_pool_t *scratch_pool) { if (rs->window_cache) { /* store the window and the first offset _past_ it */ svn_fs_fs__txdelta_cached_window_t cached_window; window_cache_key_t key = {0}; cached_window.window = window; cached_window.end_offset = rs->current; /* but key it with the start offset because that is the known state * when we will look it up */ SVN_ERR(svn_cache__set(rs->window_cache, get_window_key(&key, rs), &cached_window, scratch_pool)); } return SVN_NO_ERROR; } /* Read the WINDOW_P for the rep state RS from the current FSFS session's * cache. This will be a no-op and IS_CACHED will be set to FALSE if no * cache has been given. If a cache is available IS_CACHED will inform * the caller about the success of the lookup. Allocations (of the window * in particular) will be made from POOL. */ static svn_error_t * get_cached_combined_window(svn_stringbuf_t **window_p, rep_state_t *rs, svn_boolean_t *is_cached, apr_pool_t *pool) { if (! rs->combined_cache) { /* txdelta window has not been enabled */ *is_cached = FALSE; } else { /* ask the cache for the desired txdelta window */ window_cache_key_t key = { 0 }; return svn_cache__get((void **)window_p, is_cached, rs->combined_cache, get_window_key(&key, rs), pool); } return SVN_NO_ERROR; } /* Store the WINDOW read for the rep state RS in the current FSFS session's * cache. This will be a no-op if no cache has been given. * Temporary allocations will be made from SCRATCH_POOL. */ static svn_error_t * set_cached_combined_window(svn_stringbuf_t *window, rep_state_t *rs, apr_pool_t *scratch_pool) { if (rs->combined_cache) { /* but key it with the start offset because that is the known state * when we will look it up */ window_cache_key_t key = { 0 }; return svn_cache__set(rs->combined_cache, get_window_key(&key, rs), window, scratch_pool); } return SVN_NO_ERROR; } /* Build an array of rep_state structures in *LIST giving the delta reps from first_rep to a plain-text or self-compressed rep. Set *SRC_STATE to the plain-text rep we find at the end of the chain, or to NULL if the final delta representation is self-compressed. The representation to start from is designated by filesystem FS, id ID, and representation REP. Also, set *WINDOW_P to the base window content for *LIST, if it could be found in cache. Otherwise, *LIST will contain the base representation for the whole delta chain. */ static svn_error_t * build_rep_list(apr_array_header_t **list, svn_stringbuf_t **window_p, rep_state_t **src_state, svn_fs_t *fs, representation_t *first_rep, apr_pool_t *pool) { representation_t rep; rep_state_t *rs = NULL; svn_fs_fs__rep_header_t *rep_header; svn_boolean_t is_cached = FALSE; shared_file_t *shared_file = NULL; apr_pool_t *iterpool = svn_pool_create(pool); *list = apr_array_make(pool, 1, sizeof(rep_state_t *)); rep = *first_rep; /* for the top-level rep, we need the rep_args */ SVN_ERR(create_rep_state(&rs, &rep_header, &shared_file, &rep, fs, pool, iterpool)); while (1) { svn_pool_clear(iterpool); /* fetch state, if that has not been done already */ if (!rs) SVN_ERR(create_rep_state(&rs, &rep_header, &shared_file, &rep, fs, pool, iterpool)); /* for txn reps, there won't be a cached combined window */ if ( !svn_fs_fs__id_txn_used(&rep.txn_id) && rep.expanded_size < SVN_DELTA_WINDOW_SIZE) SVN_ERR(get_cached_combined_window(window_p, rs, &is_cached, pool)); if (is_cached) { /* We already have a reconstructed window in our cache. Write a pseudo rep_state with the full length. */ rs->start = 0; rs->current = 0; rs->size = (*window_p)->len; *src_state = rs; break; } if (rep_header->type == svn_fs_fs__rep_plain) { /* This is a plaintext, so just return the current rep_state. */ *src_state = rs; break; } /* Push this rep onto the list. If it's self-compressed, we're done. */ APR_ARRAY_PUSH(*list, rep_state_t *) = rs; if (rep_header->type == svn_fs_fs__rep_self_delta) { *src_state = NULL; break; } rep.revision = rep_header->base_revision; rep.item_index = rep_header->base_item_index; rep.size = rep_header->base_length; svn_fs_fs__id_txn_reset(&rep.txn_id); rs = NULL; } svn_pool_destroy(iterpool); return SVN_NO_ERROR; } /* Create a rep_read_baton structure for node revision NODEREV in filesystem FS and store it in *RB_P. Perform all allocations in POOL. If rep is mutable, it must be for file contents. */ static svn_error_t * rep_read_get_baton(struct rep_read_baton **rb_p, svn_fs_t *fs, representation_t *rep, pair_cache_key_t fulltext_cache_key, apr_pool_t *pool) { struct rep_read_baton *b; b = apr_pcalloc(pool, sizeof(*b)); b->fs = fs; b->rep = *rep; b->base_window = NULL; b->chunk_index = 0; b->buf = NULL; b->md5_checksum_ctx = svn_checksum_ctx_create(svn_checksum_md5, pool); b->checksum_finalized = FALSE; memcpy(b->md5_digest, rep->md5_digest, sizeof(rep->md5_digest)); b->len = rep->expanded_size; b->off = 0; b->fulltext_cache_key = fulltext_cache_key; b->pool = svn_pool_create(pool); b->filehandle_pool = svn_pool_create(pool); b->fulltext_cache = NULL; b->fulltext_delivered = 0; b->current_fulltext = NULL; /* Save our output baton. */ *rb_p = b; return SVN_NO_ERROR; } /* Skip forwards to THIS_CHUNK in REP_STATE and then read the next delta window into *NWIN. Note that RS->CHUNK_INDEX will be THIS_CHUNK rather than THIS_CHUNK + 1 when this function returns. */ static svn_error_t * read_delta_window(svn_txdelta_window_t **nwin, int this_chunk, rep_state_t *rs, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { svn_boolean_t is_cached; apr_off_t start_offset; apr_off_t end_offset; apr_pool_t *iterpool; SVN_ERR_ASSERT(rs->chunk_index <= this_chunk); SVN_ERR(dbg_log_access(rs->sfile->fs, rs->revision, rs->item_index, NULL, SVN_FS_FS__ITEM_TYPE_ANY_REP, scratch_pool)); /* Read the next window. But first, try to find it in the cache. */ SVN_ERR(get_cached_window(nwin, rs, this_chunk, &is_cached, result_pool, scratch_pool)); if (is_cached) return SVN_NO_ERROR; /* someone has to actually read the data from file. Open it */ SVN_ERR(auto_open_shared_file(rs->sfile)); /* invoke the 'block-read' feature for non-txn data. However, don't do that if we are in the middle of some representation, because the block is unlikely to contain other data. */ if ( rs->chunk_index == 0 && SVN_IS_VALID_REVNUM(rs->revision) && use_block_read(rs->sfile->fs) && rs->raw_window_cache) { SVN_ERR(block_read(NULL, rs->sfile->fs, rs->revision, rs->item_index, rs->sfile->rfile, result_pool, scratch_pool)); /* reading the whole block probably also provided us with the desired txdelta window */ SVN_ERR(get_cached_window(nwin, rs, this_chunk, &is_cached, result_pool, scratch_pool)); if (is_cached) return SVN_NO_ERROR; } /* data is still not cached -> we need to read it. Make sure we have all the necessary info. */ SVN_ERR(auto_set_start_offset(rs, scratch_pool)); SVN_ERR(auto_read_diff_version(rs, scratch_pool)); /* RS->FILE may be shared between RS instances -> make sure we point * to the right data. */ start_offset = rs->start + rs->current; SVN_ERR(rs_aligned_seek(rs, NULL, start_offset, scratch_pool)); /* Skip windows to reach the current chunk if we aren't there yet. */ iterpool = svn_pool_create(scratch_pool); while (rs->chunk_index < this_chunk) { svn_pool_clear(iterpool); SVN_ERR(svn_txdelta_skip_svndiff_window(rs->sfile->rfile->file, rs->ver, iterpool)); rs->chunk_index++; SVN_ERR(get_file_offset(&start_offset, rs, iterpool)); rs->current = start_offset - rs->start; if (rs->current >= rs->size) return svn_error_create(SVN_ERR_FS_CORRUPT, NULL, _("Reading one svndiff window read " "beyond the end of the " "representation")); } svn_pool_destroy(iterpool); /* Actually read the next window. */ SVN_ERR(svn_txdelta_read_svndiff_window(nwin, rs->sfile->rfile->stream, rs->ver, result_pool)); SVN_ERR(get_file_offset(&end_offset, rs, scratch_pool)); rs->current = end_offset - rs->start; if (rs->current > rs->size) return svn_error_create(SVN_ERR_FS_CORRUPT, NULL, _("Reading one svndiff window read beyond " "the end of the representation")); /* the window has not been cached before, thus cache it now * (if caching is used for them at all) */ if (SVN_IS_VALID_REVNUM(rs->revision)) SVN_ERR(set_cached_window(*nwin, rs, scratch_pool)); return SVN_NO_ERROR; } /* Read SIZE bytes from the representation RS and return it in *NWIN. */ static svn_error_t * read_plain_window(svn_stringbuf_t **nwin, rep_state_t *rs, apr_size_t size, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { apr_off_t offset; /* RS->FILE may be shared between RS instances -> make sure we point * to the right data. */ SVN_ERR(auto_open_shared_file(rs->sfile)); SVN_ERR(auto_set_start_offset(rs, scratch_pool)); offset = rs->start + rs->current; SVN_ERR(rs_aligned_seek(rs, NULL, offset, scratch_pool)); /* Read the plain data. */ *nwin = svn_stringbuf_create_ensure(size, result_pool); SVN_ERR(svn_io_file_read_full2(rs->sfile->rfile->file, (*nwin)->data, size, NULL, NULL, result_pool)); (*nwin)->data[size] = 0; /* Update RS. */ rs->current += (apr_off_t)size; return SVN_NO_ERROR; } /* Skip SIZE bytes from the PLAIN representation RS. */ static svn_error_t * skip_plain_window(rep_state_t *rs, apr_size_t size) { /* Update RS. */ rs->current += (apr_off_t)size; return SVN_NO_ERROR; } /* Get the undeltified window that is a result of combining all deltas from the current desired representation identified in *RB with its base representation. Store the window in *RESULT. */ static svn_error_t * get_combined_window(svn_stringbuf_t **result, struct rep_read_baton *rb) { apr_pool_t *pool, *new_pool, *window_pool; int i; apr_array_header_t *windows; svn_stringbuf_t *source, *buf = rb->base_window; rep_state_t *rs; apr_pool_t *iterpool; /* Read all windows that we need to combine. This is fine because the size of each window is relatively small (100kB) and skip- delta limits the number of deltas in a chain to well under 100. Stop early if one of them does not depend on its predecessors. */ window_pool = svn_pool_create(rb->pool); windows = apr_array_make(window_pool, 0, sizeof(svn_txdelta_window_t *)); iterpool = svn_pool_create(rb->pool); for (i = 0; i < rb->rs_list->nelts; ++i) { svn_txdelta_window_t *window; svn_pool_clear(iterpool); rs = APR_ARRAY_IDX(rb->rs_list, i, rep_state_t *); SVN_ERR(read_delta_window(&window, rb->chunk_index, rs, window_pool, iterpool)); APR_ARRAY_PUSH(windows, svn_txdelta_window_t *) = window; if (window->src_ops == 0) { ++i; break; } } /* Combine in the windows from the other delta reps. */ pool = svn_pool_create(rb->pool); for (--i; i >= 0; --i) { svn_txdelta_window_t *window; svn_pool_clear(iterpool); rs = APR_ARRAY_IDX(rb->rs_list, i, rep_state_t *); window = APR_ARRAY_IDX(windows, i, svn_txdelta_window_t *); /* Maybe, we've got a PLAIN start representation. If we do, read as much data from it as the needed for the txdelta window's source view. Note that BUF / SOURCE may only be NULL in the first iteration. Also note that we may have short-cut reading the delta chain -- in which case SRC_OPS is 0 and it might not be a PLAIN rep. */ source = buf; if (source == NULL && rb->src_state != NULL) { /* Even if we don't need the source rep now, we still must keep * its read offset in sync with what we might need for the next * window. */ if (window->src_ops) SVN_ERR(read_plain_window(&source, rb->src_state, window->sview_len, pool, iterpool)); else SVN_ERR(skip_plain_window(rb->src_state, window->sview_len)); } /* Combine this window with the current one. */ new_pool = svn_pool_create(rb->pool); buf = svn_stringbuf_create_ensure(window->tview_len, new_pool); buf->len = window->tview_len; svn_txdelta_apply_instructions(window, source ? source->data : NULL, buf->data, &buf->len); if (buf->len != window->tview_len) return svn_error_create(SVN_ERR_FS_CORRUPT, NULL, _("svndiff window length is " "corrupt")); /* Cache windows only if the whole rep content could be read as a single chunk. Only then will no other chunk need a deeper RS list than the cached chunk. */ if ( (rb->chunk_index == 0) && (rs->current == rs->size) && SVN_IS_VALID_REVNUM(rs->revision)) SVN_ERR(set_cached_combined_window(buf, rs, new_pool)); rs->chunk_index++; /* Cycle pools so that we only need to hold three windows at a time. */ svn_pool_destroy(pool); pool = new_pool; } svn_pool_destroy(iterpool); svn_pool_destroy(window_pool); *result = buf; return SVN_NO_ERROR; } /* Returns whether or not the expanded fulltext of the file is cachable * based on its size SIZE. The decision depends on the cache used by FFD. */ static svn_boolean_t fulltext_size_is_cachable(fs_fs_data_t *ffd, svn_filesize_t size) { return (size < APR_SIZE_MAX) && svn_cache__is_cachable(ffd->fulltext_cache, (apr_size_t)size); } /* Close method used on streams returned by read_representation(). */ static svn_error_t * rep_read_contents_close(void *baton) { struct rep_read_baton *rb = baton; svn_pool_destroy(rb->pool); svn_pool_destroy(rb->filehandle_pool); return SVN_NO_ERROR; } /* Return the next *LEN bytes of the rep from our plain / delta windows and store them in *BUF. */ static svn_error_t * get_contents_from_windows(struct rep_read_baton *rb, char *buf, apr_size_t *len) { apr_size_t copy_len, remaining = *len; char *cur = buf; rep_state_t *rs; /* Special case for when there are no delta reps, only a plain text. */ if (rb->rs_list->nelts == 0) { copy_len = remaining; rs = rb->src_state; if (rb->base_window != NULL) { /* We got the desired rep directly from the cache. This is where we need the pseudo rep_state created by build_rep_list(). */ apr_size_t offset = (apr_size_t)rs->current; if (offset >= rb->base_window->len) copy_len = 0ul; else if (copy_len > rb->base_window->len - offset) copy_len = rb->base_window->len - offset; memcpy (cur, rb->base_window->data + offset, copy_len); } else { apr_off_t offset; if (((apr_off_t) copy_len) > rs->size - rs->current) copy_len = (apr_size_t) (rs->size - rs->current); SVN_ERR(auto_open_shared_file(rs->sfile)); SVN_ERR(auto_set_start_offset(rs, rb->pool)); offset = rs->start + rs->current; SVN_ERR(rs_aligned_seek(rs, NULL, offset, rb->pool)); SVN_ERR(svn_io_file_read_full2(rs->sfile->rfile->file, cur, copy_len, NULL, NULL, rb->pool)); } rs->current += copy_len; *len = copy_len; return SVN_NO_ERROR; } while (remaining > 0) { /* If we have buffered data from a previous chunk, use that. */ if (rb->buf) { /* Determine how much to copy from the buffer. */ copy_len = rb->buf_len - rb->buf_pos; if (copy_len > remaining) copy_len = remaining; /* Actually copy the data. */ memcpy(cur, rb->buf + rb->buf_pos, copy_len); rb->buf_pos += copy_len; cur += copy_len; remaining -= copy_len; /* If the buffer is all used up, clear it and empty the local pool. */ if (rb->buf_pos == rb->buf_len) { svn_pool_clear(rb->pool); rb->buf = NULL; } } else { svn_stringbuf_t *sbuf = NULL; rs = APR_ARRAY_IDX(rb->rs_list, 0, rep_state_t *); if (rs->current == rs->size) break; /* Get more buffered data by evaluating a chunk. */ SVN_ERR(get_combined_window(&sbuf, rb)); rb->chunk_index++; rb->buf_len = sbuf->len; rb->buf = sbuf->data; rb->buf_pos = 0; } } *len = cur - buf; return SVN_NO_ERROR; } /* Baton type for get_fulltext_partial. */ typedef struct fulltext_baton_t { /* Target buffer to write to; of at least LEN bytes. */ char *buffer; /* Offset within the respective fulltext at which we shall start to copy data into BUFFER. */ apr_size_t start; /* Number of bytes to copy. The actual amount may be less in case the fulltext is short(er). */ apr_size_t len; /* Number of bytes actually copied into BUFFER. */ apr_size_t read; } fulltext_baton_t; /* Implement svn_cache__partial_getter_func_t for fulltext caches. * From the fulltext in DATA, we copy the range specified by the * fulltext_baton_t* BATON into the buffer provided by that baton. * OUT and RESULT_POOL are not used. */ static svn_error_t * get_fulltext_partial(void **out, const void *data, apr_size_t data_len, void *baton, apr_pool_t *result_pool) { fulltext_baton_t *fulltext_baton = baton; /* We cached the fulltext with an NUL appended to it. */ apr_size_t fulltext_len = data_len - 1; /* Clip the copy range to what the fulltext size allows. */ apr_size_t start = MIN(fulltext_baton->start, fulltext_len); fulltext_baton->read = MIN(fulltext_len - start, fulltext_baton->len); /* Copy the data to the output buffer and be done. */ memcpy(fulltext_baton->buffer, (const char *)data + start, fulltext_baton->read); return SVN_NO_ERROR; } /* Find the fulltext specified in BATON in the fulltext cache given * as well by BATON. If that succeeds, set *CACHED to TRUE and copy * up to the next *LEN bytes into BUFFER. Set *LEN to the actual * number of bytes copied. */ static svn_error_t * get_contents_from_fulltext(svn_boolean_t *cached, struct rep_read_baton *baton, char *buffer, apr_size_t *len) { void *dummy; fulltext_baton_t fulltext_baton; SVN_ERR_ASSERT((apr_size_t)baton->fulltext_delivered == baton->fulltext_delivered); fulltext_baton.buffer = buffer; fulltext_baton.start = (apr_size_t)baton->fulltext_delivered; fulltext_baton.len = *len; fulltext_baton.read = 0; SVN_ERR(svn_cache__get_partial(&dummy, cached, baton->fulltext_cache, &baton->fulltext_cache_key, get_fulltext_partial, &fulltext_baton, baton->pool)); if (*cached) { baton->fulltext_delivered += fulltext_baton.read; *len = fulltext_baton.read; } return SVN_NO_ERROR; } /* Determine the optimal size of a string buf that shall receive a * (full-) text of NEEDED bytes. * * The critical point is that those buffers may be very large and * can cause memory fragmentation. We apply simple heuristics to * make fragmentation less likely. */ static apr_size_t optimimal_allocation_size(apr_size_t needed) { /* For all allocations, assume some overhead that is shared between * OS memory managemnt, APR memory management and svn_stringbuf_t. */ const apr_size_t overhead = 0x400; apr_size_t optimal; /* If an allocation size if safe for other ephemeral buffers, it should * be safe for ours. */ if (needed <= SVN__STREAM_CHUNK_SIZE) return needed; /* Paranoia edge case: * Skip our heuristics if they created arithmetical overflow. * Beware to make this test work for NEEDED = APR_SIZE_MAX as well! */ if (needed >= APR_SIZE_MAX / 2 - overhead) return needed; /* As per definition SVN__STREAM_CHUNK_SIZE is a power of two. * Since we know NEEDED to be larger than that, use it as the * starting point. * * Heuristics: Allocate a power-of-two number of bytes that fit * NEEDED plus some OVERHEAD. The APR allocator * will round it up to the next full page size. */ optimal = SVN__STREAM_CHUNK_SIZE; while (optimal - overhead < needed) optimal *= 2; /* This is above or equal to NEEDED. */ return optimal - overhead; } /* After a fulltext cache lookup failure, we will continue to read from * combined delta or plain windows. However, we must first make that data * stream in BATON catch up tho the position LEN already delivered from the * fulltext cache. Also, we need to store the reconstructed fulltext if we * want to cache it at the end. */ static svn_error_t * skip_contents(struct rep_read_baton *baton, svn_filesize_t len) { svn_error_t *err = SVN_NO_ERROR; /* Do we want to cache the reconstructed fulltext? */ if (SVN_IS_VALID_REVNUM(baton->fulltext_cache_key.revision)) { char *buffer; svn_filesize_t to_alloc = MAX(len, baton->len); /* This should only be happening if BATON->LEN and LEN are * cacheable, implying they fit into memory. */ SVN_ERR_ASSERT((apr_size_t)to_alloc == to_alloc); /* Allocate the fulltext buffer. */ baton->current_fulltext = svn_stringbuf_create_ensure( optimimal_allocation_size((apr_size_t)to_alloc), baton->filehandle_pool); /* Read LEN bytes from the window stream and store the data * in the fulltext buffer (will be filled by further reads later). */ baton->current_fulltext->len = (apr_size_t)len; baton->current_fulltext->data[(apr_size_t)len] = 0; buffer = baton->current_fulltext->data; while (len > 0 && !err) { apr_size_t to_read = (apr_size_t)len; err = get_contents_from_windows(baton, buffer, &to_read); len -= to_read; buffer += to_read; } /* Make the MD5 calculation catch up with the data delivered * (we did not run MD5 on the data that we took from the cache). */ if (!err) { SVN_ERR(svn_checksum_update(baton->md5_checksum_ctx, baton->current_fulltext->data, baton->current_fulltext->len)); baton->off += baton->current_fulltext->len; } } else if (len > 0) { /* Simply drain LEN bytes from the window stream. */ apr_pool_t *subpool = svn_pool_create(baton->pool); char *buffer = apr_palloc(subpool, SVN__STREAM_CHUNK_SIZE); while (len > 0 && !err) { apr_size_t to_read = len > SVN__STREAM_CHUNK_SIZE ? SVN__STREAM_CHUNK_SIZE : (apr_size_t)len; err = get_contents_from_windows(baton, buffer, &to_read); len -= to_read; /* Make the MD5 calculation catch up with the data delivered * (we did not run MD5 on the data that we took from the cache). */ if (!err) { SVN_ERR(svn_checksum_update(baton->md5_checksum_ctx, buffer, to_read)); baton->off += to_read; } } svn_pool_destroy(subpool); } return svn_error_trace(err); } /* BATON is of type `rep_read_baton'; read the next *LEN bytes of the representation and store them in *BUF. Sum as we read and verify - the MD5 sum at the end. */ + the MD5 sum at the end. This is a READ_FULL_FN for svn_stream_t. */ static svn_error_t * rep_read_contents(void *baton, char *buf, apr_size_t *len) { struct rep_read_baton *rb = baton; + apr_size_t len_requested = *len; /* Get data from the fulltext cache for as long as we can. */ if (rb->fulltext_cache) { svn_boolean_t cached; SVN_ERR(get_contents_from_fulltext(&cached, rb, buf, len)); if (cached) return SVN_NO_ERROR; /* Cache miss. From now on, we will never read from the fulltext * cache for this representation anymore. */ rb->fulltext_cache = NULL; } /* No fulltext cache to help us. We must read from the window stream. */ if (!rb->rs_list) { /* Window stream not initialized, yet. Do it now. */ rb->len = rb->rep.expanded_size; SVN_ERR(build_rep_list(&rb->rs_list, &rb->base_window, &rb->src_state, rb->fs, &rb->rep, rb->filehandle_pool)); /* In case we did read from the fulltext cache before, make the * window stream catch up. Also, initialize the fulltext buffer * if we want to cache the fulltext at the end. */ SVN_ERR(skip_contents(rb, rb->fulltext_delivered)); } /* Get the next block of data. * Keep in mind that the representation might be empty and leave us * already positioned at the end of the rep. */ if (rb->off == rb->len) *len = 0; else SVN_ERR(get_contents_from_windows(rb, buf, len)); if (rb->current_fulltext) svn_stringbuf_appendbytes(rb->current_fulltext, buf, *len); + /* This is a FULL_READ_FN so a short read implies EOF and we can + verify the length. */ + rb->off += *len; + if (*len < len_requested && rb->off != rb->len) + { + /* A warning rather than an error to allow the data to be + retrieved when the length is wrong but the data is + present, i.e. if repository corruption has stored the wrong + expanded length. */ + svn_error_t *err = svn_error_createf(SVN_ERR_FS_CORRUPT, NULL, + _("Length mismatch while reading representation:" + " expected %s," + " got %s"), + apr_psprintf(rb->pool, "%" SVN_FILESIZE_T_FMT, + rb->len), + apr_psprintf(rb->pool, "%" SVN_FILESIZE_T_FMT, + rb->off)); + + rb->fs->warning(rb->fs->warning_baton, err); + svn_error_clear(err); + } + /* Perform checksumming. We want to check the checksum as soon as the last byte of data is read, in case the caller never performs a short read, but we don't want to finalize the MD5 context twice. */ if (!rb->checksum_finalized) { SVN_ERR(svn_checksum_update(rb->md5_checksum_ctx, buf, *len)); - rb->off += *len; if (rb->off == rb->len) { svn_checksum_t *md5_checksum; svn_checksum_t expected; expected.kind = svn_checksum_md5; expected.digest = rb->md5_digest; rb->checksum_finalized = TRUE; SVN_ERR(svn_checksum_final(&md5_checksum, rb->md5_checksum_ctx, rb->pool)); if (!svn_checksum_match(md5_checksum, &expected)) return svn_error_create(SVN_ERR_FS_CORRUPT, svn_checksum_mismatch_err(&expected, md5_checksum, rb->pool, _("Checksum mismatch while reading representation")), NULL); } } if (rb->off == rb->len && rb->current_fulltext) { fs_fs_data_t *ffd = rb->fs->fsap_data; SVN_ERR(svn_cache__set(ffd->fulltext_cache, &rb->fulltext_cache_key, rb->current_fulltext, rb->pool)); rb->current_fulltext = NULL; } return SVN_NO_ERROR; } svn_error_t * svn_fs_fs__get_contents(svn_stream_t **contents_p, svn_fs_t *fs, representation_t *rep, svn_boolean_t cache_fulltext, apr_pool_t *pool) { if (! rep) { *contents_p = svn_stream_empty(pool); } else { fs_fs_data_t *ffd = fs->fsap_data; struct rep_read_baton *rb; pair_cache_key_t fulltext_cache_key = { 0 }; fulltext_cache_key.revision = rep->revision; fulltext_cache_key.second = rep->item_index; /* Initialize the reader baton. Some members may added lazily * while reading from the stream */ SVN_ERR(rep_read_get_baton(&rb, fs, rep, fulltext_cache_key, pool)); /* Make the stream attempt fulltext cache lookups if the fulltext * is cacheable. If it is not, then also don't try to buffer and * cache it. */ if (ffd->fulltext_cache && cache_fulltext && SVN_IS_VALID_REVNUM(rep->revision) && fulltext_size_is_cachable(ffd, rep->expanded_size)) { rb->fulltext_cache = ffd->fulltext_cache; } else { /* This will also prevent the reconstructed fulltext from being put into the cache. */ rb->fulltext_cache_key.revision = SVN_INVALID_REVNUM; } *contents_p = svn_stream_create(rb, pool); svn_stream_set_read2(*contents_p, NULL /* only full read support */, rep_read_contents); svn_stream_set_close(*contents_p, rep_read_contents_close); } return SVN_NO_ERROR; } svn_error_t * svn_fs_fs__get_contents_from_file(svn_stream_t **contents_p, svn_fs_t *fs, representation_t *rep, apr_file_t *file, apr_off_t offset, apr_pool_t *pool) { struct rep_read_baton *rb; pair_cache_key_t fulltext_cache_key = { SVN_INVALID_REVNUM, 0 }; rep_state_t *rs = apr_pcalloc(pool, sizeof(*rs)); svn_fs_fs__rep_header_t *rh; /* Initialize the reader baton. Some members may added lazily * while reading from the stream. */ SVN_ERR(rep_read_get_baton(&rb, fs, rep, fulltext_cache_key, pool)); /* Continue constructing RS. Leave caches as NULL. */ rs->size = rep->size; rs->revision = SVN_INVALID_REVNUM; rs->item_index = 0; rs->ver = -1; rs->start = -1; /* Provide just enough file access info to allow for a basic read from * FILE but leave all index / footer info with empty values b/c FILE * probably is not a complete revision file. */ rs->sfile = apr_pcalloc(pool, sizeof(*rs->sfile)); rs->sfile->revision = rep->revision; rs->sfile->pool = pool; rs->sfile->fs = fs; rs->sfile->rfile = apr_pcalloc(pool, sizeof(*rs->sfile->rfile)); rs->sfile->rfile->start_revision = SVN_INVALID_REVNUM; rs->sfile->rfile->file = file; rs->sfile->rfile->stream = svn_stream_from_aprfile2(file, TRUE, pool); /* Read the rep header. */ SVN_ERR(aligned_seek(fs, file, NULL, offset, pool)); SVN_ERR(svn_fs_fs__read_rep_header(&rh, rs->sfile->rfile->stream, pool, pool)); SVN_ERR(get_file_offset(&rs->start, rs, pool)); rs->header_size = rh->header_size; /* Log the access. */ SVN_ERR(dbg_log_access(fs, SVN_INVALID_REVNUM, 0, rh, SVN_FS_FS__ITEM_TYPE_ANY_REP, pool)); /* Build the representation list (delta chain). */ if (rh->type == svn_fs_fs__rep_plain) { rb->rs_list = apr_array_make(pool, 0, sizeof(rep_state_t *)); rb->src_state = rs; } else if (rh->type == svn_fs_fs__rep_self_delta) { rb->rs_list = apr_array_make(pool, 1, sizeof(rep_state_t *)); APR_ARRAY_PUSH(rb->rs_list, rep_state_t *) = rs; rb->src_state = NULL; } else { representation_t next_rep = { 0 }; /* skip "SVNx" diff marker */ rs->current = 4; /* REP's base rep is inside a proper revision. * It can be reconstructed in the usual way. */ next_rep.revision = rh->base_revision; next_rep.item_index = rh->base_item_index; next_rep.size = rh->base_length; svn_fs_fs__id_txn_reset(&next_rep.txn_id); SVN_ERR(build_rep_list(&rb->rs_list, &rb->base_window, &rb->src_state, rb->fs, &next_rep, rb->filehandle_pool)); /* Insert the access to REP as the first element of the delta chain. */ svn_sort__array_insert(rb->rs_list, &rs, 0); } /* Now, the baton is complete and we can assemble the stream around it. */ *contents_p = svn_stream_create(rb, pool); svn_stream_set_read2(*contents_p, NULL /* only full read support */, rep_read_contents); svn_stream_set_close(*contents_p, rep_read_contents_close); return SVN_NO_ERROR; } /* Baton for cache_access_wrapper. Wraps the original parameters of * svn_fs_fs__try_process_file_content(). */ typedef struct cache_access_wrapper_baton_t { svn_fs_process_contents_func_t func; void* baton; } cache_access_wrapper_baton_t; /* Wrapper to translate between svn_fs_process_contents_func_t and * svn_cache__partial_getter_func_t. */ static svn_error_t * cache_access_wrapper(void **out, const void *data, apr_size_t data_len, void *baton, apr_pool_t *pool) { cache_access_wrapper_baton_t *wrapper_baton = baton; SVN_ERR(wrapper_baton->func((const unsigned char *)data, data_len - 1, /* cache adds terminating 0 */ wrapper_baton->baton, pool)); /* non-NULL value to signal the calling cache that all went well */ *out = baton; return SVN_NO_ERROR; } svn_error_t * svn_fs_fs__try_process_file_contents(svn_boolean_t *success, svn_fs_t *fs, node_revision_t *noderev, svn_fs_process_contents_func_t processor, void* baton, apr_pool_t *pool) { representation_t *rep = noderev->data_rep; if (rep) { fs_fs_data_t *ffd = fs->fsap_data; pair_cache_key_t fulltext_cache_key = { 0 }; fulltext_cache_key.revision = rep->revision; fulltext_cache_key.second = rep->item_index; if (ffd->fulltext_cache && SVN_IS_VALID_REVNUM(rep->revision) && fulltext_size_is_cachable(ffd, rep->expanded_size)) { cache_access_wrapper_baton_t wrapper_baton; void *dummy = NULL; wrapper_baton.func = processor; wrapper_baton.baton = baton; return svn_cache__get_partial(&dummy, success, ffd->fulltext_cache, &fulltext_cache_key, cache_access_wrapper, &wrapper_baton, pool); } } *success = FALSE; return SVN_NO_ERROR; } /* Baton used when reading delta windows. */ struct delta_read_baton { rep_state_t *rs; unsigned char md5_digest[APR_MD5_DIGESTSIZE]; }; /* This implements the svn_txdelta_next_window_fn_t interface. */ static svn_error_t * delta_read_next_window(svn_txdelta_window_t **window, void *baton, apr_pool_t *pool) { struct delta_read_baton *drb = baton; apr_pool_t *scratch_pool = svn_pool_create(pool); *window = NULL; if (drb->rs->current < drb->rs->size) { SVN_ERR(read_delta_window(window, drb->rs->chunk_index, drb->rs, pool, scratch_pool)); drb->rs->chunk_index++; } svn_pool_destroy(scratch_pool); return SVN_NO_ERROR; } /* This implements the svn_txdelta_md5_digest_fn_t interface. */ static const unsigned char * delta_read_md5_digest(void *baton) { struct delta_read_baton *drb = baton; return drb->md5_digest; } /* Return a txdelta stream for on-disk representation REP_STATE * of TARGET. Allocate the result in POOL. */ static svn_txdelta_stream_t * get_storaged_delta_stream(rep_state_t *rep_state, node_revision_t *target, apr_pool_t *pool) { /* Create the delta read baton. */ struct delta_read_baton *drb = apr_pcalloc(pool, sizeof(*drb)); drb->rs = rep_state; memcpy(drb->md5_digest, target->data_rep->md5_digest, sizeof(drb->md5_digest)); return svn_txdelta_stream_create(drb, delta_read_next_window, delta_read_md5_digest, pool); } svn_error_t * svn_fs_fs__get_file_delta_stream(svn_txdelta_stream_t **stream_p, svn_fs_t *fs, node_revision_t *source, node_revision_t *target, apr_pool_t *pool) { svn_stream_t *source_stream, *target_stream; rep_state_t *rep_state; svn_fs_fs__rep_header_t *rep_header; fs_fs_data_t *ffd = fs->fsap_data; /* Try a shortcut: if the target is stored as a delta against the source, then just use that delta. However, prefer using the fulltext cache whenever that is available. */ if (target->data_rep && (source || ! ffd->fulltext_cache)) { /* Read target's base rep if any. */ SVN_ERR(create_rep_state(&rep_state, &rep_header, NULL, target->data_rep, fs, pool, pool)); if (source && source->data_rep && target->data_rep) { /* If that matches source, then use this delta as is. Note that we want an actual delta here. E.g. a self-delta would not be good enough. */ if (rep_header->type == svn_fs_fs__rep_delta && rep_header->base_revision == source->data_rep->revision && rep_header->base_item_index == source->data_rep->item_index) { *stream_p = get_storaged_delta_stream(rep_state, target, pool); return SVN_NO_ERROR; } } else if (!source) { /* We want a self-delta. There is a fair chance that TARGET got added in this revision and is already stored in the requested format. */ if (rep_header->type == svn_fs_fs__rep_self_delta) { *stream_p = get_storaged_delta_stream(rep_state, target, pool); return SVN_NO_ERROR; } } /* Don't keep file handles open for longer than necessary. */ if (rep_state->sfile->rfile) { SVN_ERR(svn_fs_fs__close_revision_file(rep_state->sfile->rfile)); rep_state->sfile->rfile = NULL; } } /* Read both fulltexts and construct a delta. */ if (source) SVN_ERR(svn_fs_fs__get_contents(&source_stream, fs, source->data_rep, TRUE, pool)); else source_stream = svn_stream_empty(pool); SVN_ERR(svn_fs_fs__get_contents(&target_stream, fs, target->data_rep, TRUE, pool)); /* Because source and target stream will already verify their content, * there is no need to do this once more. In particular if the stream * content is being fetched from cache. */ svn_txdelta2(stream_p, source_stream, target_stream, FALSE, pool); return SVN_NO_ERROR; } /* Return TRUE when all svn_fs_dirent_t* in ENTRIES are already sorted by their respective name. */ static svn_boolean_t sorted(apr_array_header_t *entries) { int i; const svn_fs_dirent_t * const *dirents = (const void *)entries->elts; for (i = 0; i < entries->nelts-1; ++i) if (strcmp(dirents[i]->name, dirents[i+1]->name) > 0) return FALSE; return TRUE; } /* Compare the names of the two dirents given in **A and **B. */ static int compare_dirents(const void *a, const void *b) { const svn_fs_dirent_t *lhs = *((const svn_fs_dirent_t * const *) a); const svn_fs_dirent_t *rhs = *((const svn_fs_dirent_t * const *) b); return strcmp(lhs->name, rhs->name); } /* Compare the name of the dirents given in **A with the C string in *B. */ static int compare_dirent_name(const void *a, const void *b) { const svn_fs_dirent_t *lhs = *((const svn_fs_dirent_t * const *) a); const char *rhs = b; return strcmp(lhs->name, rhs); } /* Into *ENTRIES_P, read all directories entries from the key-value text in * STREAM. If INCREMENTAL is TRUE, read until the end of the STREAM and * update the data. ID is provided for nicer error messages. */ static svn_error_t * read_dir_entries(apr_array_header_t **entries_p, svn_stream_t *stream, svn_boolean_t incremental, const svn_fs_id_t *id, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { apr_pool_t *iterpool = svn_pool_create(scratch_pool); apr_hash_t *hash = NULL; const char *terminator = SVN_HASH_TERMINATOR; apr_array_header_t *entries = NULL; if (incremental) hash = svn_hash__make(scratch_pool); else entries = apr_array_make(result_pool, 16, sizeof(svn_fs_dirent_t *)); /* Read until the terminator (non-incremental) or the end of STREAM (incremental mode). In the latter mode, we use a temporary HASH to make updating and removing entries cheaper. */ while (1) { svn_hash__entry_t entry; svn_fs_dirent_t *dirent; char *str; svn_pool_clear(iterpool); SVN_ERR_W(svn_hash__read_entry(&entry, stream, terminator, incremental, iterpool), apr_psprintf(iterpool, _("Directory representation corrupt in '%s'"), svn_fs_fs__id_unparse(id, scratch_pool)->data)); /* End of directory? */ if (entry.key == NULL) { /* In incremental mode, we skip the terminator and read the increments following it until the end of the stream. */ if (incremental && terminator) terminator = NULL; else break; } /* Deleted entry? */ if (entry.val == NULL) { /* We must be in incremental mode */ assert(hash); apr_hash_set(hash, entry.key, entry.keylen, NULL); continue; } /* Add a new directory entry. */ dirent = apr_pcalloc(result_pool, sizeof(*dirent)); dirent->name = apr_pstrmemdup(result_pool, entry.key, entry.keylen); str = svn_cstring_tokenize(" ", &entry.val); if (str == NULL) return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL, _("Directory entry corrupt in '%s'"), svn_fs_fs__id_unparse(id, scratch_pool)->data); if (strcmp(str, SVN_FS_FS__KIND_FILE) == 0) { dirent->kind = svn_node_file; } else if (strcmp(str, SVN_FS_FS__KIND_DIR) == 0) { dirent->kind = svn_node_dir; } else { return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL, _("Directory entry corrupt in '%s'"), svn_fs_fs__id_unparse(id, scratch_pool)->data); } str = svn_cstring_tokenize(" ", &entry.val); if (str == NULL) return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL, _("Directory entry corrupt in '%s'"), svn_fs_fs__id_unparse(id, scratch_pool)->data); SVN_ERR(svn_fs_fs__id_parse(&dirent->id, str, result_pool)); /* In incremental mode, update the hash; otherwise, write to the * final array. Be sure to use hash keys that survive this iteration. */ if (incremental) apr_hash_set(hash, dirent->name, entry.keylen, dirent); else APR_ARRAY_PUSH(entries, svn_fs_dirent_t *) = dirent; } /* Convert container to a sorted array. */ if (incremental) { apr_hash_index_t *hi; entries = apr_array_make(result_pool, apr_hash_count(hash), sizeof(svn_fs_dirent_t *)); for (hi = apr_hash_first(iterpool, hash); hi; hi = apr_hash_next(hi)) APR_ARRAY_PUSH(entries, svn_fs_dirent_t *) = apr_hash_this_val(hi); } if (!sorted(entries)) svn_sort__array(entries, compare_dirents); svn_pool_destroy(iterpool); *entries_p = entries; return SVN_NO_ERROR; } /* For directory NODEREV in FS, return the *FILESIZE of its in-txn * representation. If the directory representation is comitted data, * set *FILESIZE to SVN_INVALID_FILESIZE. Use SCRATCH_POOL for temporaries. */ static svn_error_t * get_txn_dir_info(svn_filesize_t *filesize, svn_fs_t *fs, node_revision_t *noderev, apr_pool_t *scratch_pool) { if (noderev->data_rep && svn_fs_fs__id_txn_used(&noderev->data_rep->txn_id)) { const svn_io_dirent2_t *dirent; const char *filename; filename = svn_fs_fs__path_txn_node_children(fs, noderev->id, scratch_pool); SVN_ERR(svn_io_stat_dirent2(&dirent, filename, FALSE, FALSE, scratch_pool, scratch_pool)); *filesize = dirent->filesize; } else { *filesize = SVN_INVALID_FILESIZE; } return SVN_NO_ERROR; } /* Fetch the contents of a directory into DIR. Values are stored as filename to string mappings; further conversion is necessary to convert them into svn_fs_dirent_t values. */ static svn_error_t * get_dir_contents(svn_fs_fs__dir_data_t *dir, svn_fs_t *fs, node_revision_t *noderev, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { svn_stream_t *contents; /* Initialize the result. */ dir->txn_filesize = SVN_INVALID_FILESIZE; /* Read dir contents - unless there is none in which case we are done. */ if (noderev->data_rep && svn_fs_fs__id_txn_used(&noderev->data_rep->txn_id)) { /* Get location & current size of the directory representation. */ const char *filename; apr_file_t *file; filename = svn_fs_fs__path_txn_node_children(fs, noderev->id, scratch_pool); /* The representation is mutable. Read the old directory contents from the mutable children file, followed by the changes we've made in this transaction. */ SVN_ERR(svn_io_file_open(&file, filename, APR_READ | APR_BUFFERED, APR_OS_DEFAULT, scratch_pool)); /* Obtain txn children file size. */ SVN_ERR(svn_io_file_size_get(&dir->txn_filesize, file, scratch_pool)); contents = svn_stream_from_aprfile2(file, FALSE, scratch_pool); SVN_ERR(read_dir_entries(&dir->entries, contents, TRUE, noderev->id, result_pool, scratch_pool)); SVN_ERR(svn_stream_close(contents)); } else if (noderev->data_rep) { /* Undeltify content before parsing it. Otherwise, we could only * parse it byte-by-byte. */ apr_size_t len = noderev->data_rep->expanded_size; svn_stringbuf_t *text; /* The representation is immutable. Read it normally. */ SVN_ERR(svn_fs_fs__get_contents(&contents, fs, noderev->data_rep, FALSE, scratch_pool)); SVN_ERR(svn_stringbuf_from_stream(&text, contents, len, scratch_pool)); SVN_ERR(svn_stream_close(contents)); /* de-serialize hash */ contents = svn_stream_from_stringbuf(text, scratch_pool); SVN_ERR(read_dir_entries(&dir->entries, contents, FALSE, noderev->id, result_pool, scratch_pool)); } else { dir->entries = apr_array_make(result_pool, 0, sizeof(svn_fs_dirent_t *)); } return SVN_NO_ERROR; } /* Return the cache object in FS responsible to storing the directory the * NODEREV plus the corresponding *KEY. If no cache exists, return NULL. * PAIR_KEY must point to some key struct, which does not need to be * initialized. We use it to avoid dynamic allocation. */ static svn_cache__t * locate_dir_cache(svn_fs_t *fs, const void **key, pair_cache_key_t *pair_key, node_revision_t *noderev, apr_pool_t *pool) { fs_fs_data_t *ffd = fs->fsap_data; if (!noderev->data_rep) { /* no data rep -> empty directory. A NULL key causes a cache miss. */ *key = NULL; return ffd->dir_cache; } if (svn_fs_fs__id_txn_used(&noderev->data_rep->txn_id)) { /* data in txns requires the expensive fs_id-based addressing mode */ *key = svn_fs_fs__id_unparse(noderev->id, pool)->data; return ffd->txn_dir_cache; } else { /* committed data can use simple rev,item pairs */ pair_key->revision = noderev->data_rep->revision; pair_key->second = noderev->data_rep->item_index; *key = pair_key; return ffd->dir_cache; } } svn_error_t * svn_fs_fs__rep_contents_dir(apr_array_header_t **entries_p, svn_fs_t *fs, node_revision_t *noderev, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { pair_cache_key_t pair_key = { 0 }; const void *key; svn_fs_fs__dir_data_t *dir; /* find the cache we may use */ svn_cache__t *cache = locate_dir_cache(fs, &key, &pair_key, noderev, scratch_pool); if (cache) { svn_boolean_t found; SVN_ERR(svn_cache__get((void **)&dir, &found, cache, key, result_pool)); if (found) { /* Verify that the cached dir info is not stale * (no-op for committed data). */ svn_filesize_t filesize; SVN_ERR(get_txn_dir_info(&filesize, fs, noderev, scratch_pool)); if (filesize == dir->txn_filesize) { /* Still valid. Done. */ *entries_p = dir->entries; return SVN_NO_ERROR; } } } /* Read in the directory contents. */ dir = apr_pcalloc(scratch_pool, sizeof(*dir)); SVN_ERR(get_dir_contents(dir, fs, noderev, result_pool, scratch_pool)); *entries_p = dir->entries; /* Update the cache, if we are to use one. * * Don't even attempt to serialize very large directories; it would cause * an unnecessary memory allocation peak. 150 bytes/entry is about right. */ if (cache && svn_cache__is_cachable(cache, 150 * dir->entries->nelts)) SVN_ERR(svn_cache__set(cache, key, dir, scratch_pool)); return SVN_NO_ERROR; } svn_fs_dirent_t * svn_fs_fs__find_dir_entry(apr_array_header_t *entries, const char *name, int *hint) { svn_fs_dirent_t **result = svn_sort__array_lookup(entries, name, hint, compare_dirent_name); return result ? *result : NULL; } svn_error_t * svn_fs_fs__rep_contents_dir_entry(svn_fs_dirent_t **dirent, svn_fs_t *fs, node_revision_t *noderev, const char *name, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { extract_dir_entry_baton_t baton; svn_boolean_t found = FALSE; /* find the cache we may use */ pair_cache_key_t pair_key = { 0 }; const void *key; svn_cache__t *cache = locate_dir_cache(fs, &key, &pair_key, noderev, scratch_pool); if (cache) { svn_filesize_t filesize; SVN_ERR(get_txn_dir_info(&filesize, fs, noderev, scratch_pool)); /* Cache lookup. */ baton.txn_filesize = filesize; baton.name = name; SVN_ERR(svn_cache__get_partial((void **)dirent, &found, cache, key, svn_fs_fs__extract_dir_entry, &baton, result_pool)); } /* fetch data from disk if we did not find it in the cache */ if (! found || baton.out_of_date) { svn_fs_dirent_t *entry; svn_fs_dirent_t *entry_copy = NULL; svn_fs_fs__dir_data_t dir; /* Read in the directory contents. */ SVN_ERR(get_dir_contents(&dir, fs, noderev, scratch_pool, scratch_pool)); /* Update the cache, if we are to use one. * * Don't even attempt to serialize very large directories; it would * cause an unnecessary memory allocation peak. 150 bytes / entry is * about right. */ if (cache && svn_cache__is_cachable(cache, 150 * dir.entries->nelts)) SVN_ERR(svn_cache__set(cache, key, &dir, scratch_pool)); /* find desired entry and return a copy in POOL, if found */ entry = svn_fs_fs__find_dir_entry(dir.entries, name, NULL); if (entry) { entry_copy = apr_palloc(result_pool, sizeof(*entry_copy)); entry_copy->name = apr_pstrdup(result_pool, entry->name); entry_copy->id = svn_fs_fs__id_copy(entry->id, result_pool); entry_copy->kind = entry->kind; } *dirent = entry_copy; } return SVN_NO_ERROR; } svn_error_t * svn_fs_fs__get_proplist(apr_hash_t **proplist_p, svn_fs_t *fs, node_revision_t *noderev, apr_pool_t *pool) { apr_hash_t *proplist; svn_stream_t *stream; if (noderev->prop_rep && svn_fs_fs__id_txn_used(&noderev->prop_rep->txn_id)) { svn_error_t *err; const char *filename = svn_fs_fs__path_txn_node_props(fs, noderev->id, pool); proplist = apr_hash_make(pool); SVN_ERR(svn_stream_open_readonly(&stream, filename, pool, pool)); err = svn_hash_read2(proplist, stream, SVN_HASH_TERMINATOR, pool); if (err) { svn_string_t *id_str = svn_fs_fs__id_unparse(noderev->id, pool); err = svn_error_compose_create(err, svn_stream_close(stream)); return svn_error_quick_wrapf(err, _("malformed property list for node-revision '%s' in '%s'"), id_str->data, filename); } SVN_ERR(svn_stream_close(stream)); } else if (noderev->prop_rep) { svn_error_t *err; fs_fs_data_t *ffd = fs->fsap_data; representation_t *rep = noderev->prop_rep; pair_cache_key_t key = { 0 }; key.revision = rep->revision; key.second = rep->item_index; if (ffd->properties_cache && SVN_IS_VALID_REVNUM(rep->revision)) { svn_boolean_t is_cached; SVN_ERR(svn_cache__get((void **) proplist_p, &is_cached, ffd->properties_cache, &key, pool)); if (is_cached) return SVN_NO_ERROR; } proplist = apr_hash_make(pool); SVN_ERR(svn_fs_fs__get_contents(&stream, fs, noderev->prop_rep, FALSE, pool)); err = svn_hash_read2(proplist, stream, SVN_HASH_TERMINATOR, pool); if (err) { svn_string_t *id_str = svn_fs_fs__id_unparse(noderev->id, pool); err = svn_error_compose_create(err, svn_stream_close(stream)); return svn_error_quick_wrapf(err, _("malformed property list for node-revision '%s'"), id_str->data); } SVN_ERR(svn_stream_close(stream)); if (ffd->properties_cache && SVN_IS_VALID_REVNUM(rep->revision)) SVN_ERR(svn_cache__set(ffd->properties_cache, &key, proplist, pool)); } else { /* return an empty prop list if the node doesn't have any props */ proplist = apr_hash_make(pool); } *proplist_p = proplist; return SVN_NO_ERROR; } svn_error_t * svn_fs_fs__create_changes_context(svn_fs_fs__changes_context_t **context, svn_fs_t *fs, svn_revnum_t rev, apr_pool_t *result_pool) { svn_fs_fs__changes_context_t *result = apr_pcalloc(result_pool, sizeof(*result)); result->fs = fs; result->revision = rev; result->rev_file_pool = result_pool; *context = result; return SVN_NO_ERROR; } svn_error_t * svn_fs_fs__get_changes(apr_array_header_t **changes, svn_fs_fs__changes_context_t *context, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { apr_off_t item_index = SVN_FS_FS__ITEM_INDEX_CHANGES; svn_boolean_t found; fs_fs_data_t *ffd = context->fs->fsap_data; svn_fs_fs__changes_list_t *changes_list; pair_cache_key_t key; key.revision = context->revision; key.second = context->next; /* try cache lookup first */ if (ffd->changes_cache) { SVN_ERR(svn_cache__get((void **)&changes_list, &found, ffd->changes_cache, &key, result_pool)); } else { found = FALSE; } if (!found) { /* read changes from revision file */ if (!context->revision_file) { SVN_ERR(svn_fs_fs__ensure_revision_exists(context->revision, context->fs, scratch_pool)); SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&context->revision_file, context->fs, context->revision, context->rev_file_pool, scratch_pool)); } if (use_block_read(context->fs)) { /* 'block-read' will probably populate the cache with the data * that we want. However, we won't want to force it to process * very large change lists as part of this prefetching mechanism. * Those would be better handled by the iterative code below. */ SVN_ERR(block_read(NULL, context->fs, context->revision, SVN_FS_FS__ITEM_INDEX_CHANGES, context->revision_file, scratch_pool, scratch_pool)); /* This may succeed now ... */ SVN_ERR(svn_cache__get((void **)&changes_list, &found, ffd->changes_cache, &key, result_pool)); } /* If we still have no data, read it here. */ if (!found) { apr_off_t changes_offset; /* Addressing is very different for old formats * (needs to read the revision trailer). */ if (svn_fs_fs__use_log_addressing(context->fs)) { SVN_ERR(svn_fs_fs__item_offset(&changes_offset, context->fs, context->revision_file, context->revision, NULL, SVN_FS_FS__ITEM_INDEX_CHANGES, scratch_pool)); } else { SVN_ERR(get_root_changes_offset(NULL, &changes_offset, context->revision_file, context->fs, context->revision, scratch_pool)); /* This variable will be used for debug logging only. */ item_index = changes_offset; } /* Actual reading and parsing are the same, though. */ SVN_ERR(aligned_seek(context->fs, context->revision_file->file, NULL, changes_offset + context->next_offset, scratch_pool)); SVN_ERR(svn_fs_fs__read_changes(changes, context->revision_file->stream, SVN_FS_FS__CHANGES_BLOCK_SIZE, result_pool, scratch_pool)); /* Construct the info object for the entries block we just read. */ changes_list = apr_pcalloc(scratch_pool, sizeof(*changes_list)); SVN_ERR(svn_io_file_get_offset(&changes_list->end_offset, context->revision_file->file, scratch_pool)); changes_list->end_offset -= changes_offset; changes_list->start_offset = context->next_offset; changes_list->count = (*changes)->nelts; changes_list->changes = (change_t **)(*changes)->elts; changes_list->eol = changes_list->count < SVN_FS_FS__CHANGES_BLOCK_SIZE; /* cache for future reference */ if (ffd->changes_cache) SVN_ERR(svn_cache__set(ffd->changes_cache, &key, changes_list, scratch_pool)); } } if (found) { /* Return the block as a "proper" APR array. */ (*changes) = apr_array_make(result_pool, 0, sizeof(void *)); (*changes)->elts = (char *)changes_list->changes; (*changes)->nelts = changes_list->count; (*changes)->nalloc = changes_list->count; } /* Where to look next - if there is more data. */ context->next += (*changes)->nelts; context->next_offset = changes_list->end_offset; context->eol = changes_list->eol; /* Close the revision file after we read all data. */ if (context->eol && context->revision_file) { SVN_ERR(svn_fs_fs__close_revision_file(context->revision_file)); context->revision_file = NULL; } SVN_ERR(dbg_log_access(context->fs, context->revision, item_index, *changes, SVN_FS_FS__ITEM_TYPE_CHANGES, scratch_pool)); return SVN_NO_ERROR; } /* Inialize the representation read state RS for the given REP_HEADER and * p2l index ENTRY. If not NULL, assign FILE and STREAM to RS. * Use RESULT_POOL for allocations. */ static svn_error_t * init_rep_state(rep_state_t *rs, svn_fs_fs__rep_header_t *rep_header, svn_fs_t *fs, svn_fs_fs__revision_file_t *file, svn_fs_fs__p2l_entry_t* entry, apr_pool_t *result_pool) { fs_fs_data_t *ffd = fs->fsap_data; shared_file_t *shared_file = apr_pcalloc(result_pool, sizeof(*shared_file)); /* this function does not apply to representation containers */ SVN_ERR_ASSERT(entry->type >= SVN_FS_FS__ITEM_TYPE_FILE_REP && entry->type <= SVN_FS_FS__ITEM_TYPE_DIR_PROPS); shared_file->rfile = file; shared_file->fs = fs; shared_file->revision = entry->item.revision; shared_file->pool = result_pool; rs->sfile = shared_file; rs->revision = entry->item.revision; rs->item_index = entry->item.number; rs->header_size = rep_header->header_size; rs->start = entry->offset + rs->header_size; rs->current = rep_header->type == svn_fs_fs__rep_plain ? 0 : 4; rs->size = entry->size - rep_header->header_size - 7; rs->ver = -1; rs->chunk_index = 0; rs->raw_window_cache = ffd->raw_window_cache; rs->window_cache = ffd->txdelta_window_cache; rs->combined_cache = ffd->combined_window_cache; return SVN_NO_ERROR; } /* Implement svn_cache__partial_getter_func_t for txdelta windows. * Instead of the whole window data, return only END_OFFSET member. */ static svn_error_t * get_txdelta_window_end(void **out, const void *data, apr_size_t data_len, void *baton, apr_pool_t *result_pool) { const svn_fs_fs__txdelta_cached_window_t *window = (const svn_fs_fs__txdelta_cached_window_t *)data; *(apr_off_t*)out = window->end_offset; return SVN_NO_ERROR; } /* Implement svn_cache__partial_getter_func_t for raw windows. * Instead of the whole window data, return only END_OFFSET member. */ static svn_error_t * get_raw_window_end(void **out, const void *data, apr_size_t data_len, void *baton, apr_pool_t *result_pool) { const svn_fs_fs__raw_cached_window_t *window = (const svn_fs_fs__raw_cached_window_t *)data; *(apr_off_t*)out = window->end_offset; return SVN_NO_ERROR; } /* Walk through all windows in the representation addressed by RS in FS * (excluding the delta bases) and put those not already cached into the * window caches. If MAX_OFFSET is not -1, don't read windows that start * at or beyond that offset. Use POOL for temporary allocations. * * This function requires RS->RAW_WINDOW_CACHE and RS->WINDOW_CACHE to * be non-NULL. */ static svn_error_t * cache_windows(svn_fs_t *fs, rep_state_t *rs, apr_off_t max_offset, apr_pool_t *pool) { apr_pool_t *iterpool = svn_pool_create(pool); SVN_ERR(auto_read_diff_version(rs, iterpool)); while (rs->current < rs->size) { apr_off_t end_offset; svn_boolean_t found = FALSE; window_cache_key_t key = { 0 }; svn_pool_clear(iterpool); if (max_offset != -1 && rs->start + rs->current >= max_offset) { svn_pool_destroy(iterpool); return SVN_NO_ERROR; } /* We don't need to read the data again if it is already in cache. * It might be cached as either raw or parsed window. */ SVN_ERR(svn_cache__get_partial((void **) &end_offset, &found, rs->raw_window_cache, get_window_key(&key, rs), get_raw_window_end, NULL, iterpool)); if (! found) SVN_ERR(svn_cache__get_partial((void **) &end_offset, &found, rs->window_cache, &key, get_txdelta_window_end, NULL, iterpool)); if (found) { rs->current = end_offset; } else { /* Read, decode and cache the window. */ svn_fs_fs__raw_cached_window_t window; apr_off_t start_offset = rs->start + rs->current; apr_size_t window_len; char *buf; /* navigate to the current window */ SVN_ERR(rs_aligned_seek(rs, NULL, start_offset, iterpool)); SVN_ERR(svn_txdelta__read_raw_window_len(&window_len, rs->sfile->rfile->stream, iterpool)); /* Read the raw window. */ buf = apr_palloc(iterpool, window_len + 1); SVN_ERR(rs_aligned_seek(rs, NULL, start_offset, iterpool)); SVN_ERR(svn_io_file_read_full2(rs->sfile->rfile->file, buf, window_len, NULL, NULL, iterpool)); buf[window_len] = 0; /* update relative offset in representation */ rs->current += window_len; /* Construct the cachable raw window object. */ window.end_offset = rs->current; window.window.len = window_len; window.window.data = buf; window.ver = rs->ver; /* cache the window now */ SVN_ERR(svn_cache__set(rs->raw_window_cache, &key, &window, iterpool)); } if (rs->current > rs->size) return svn_error_create(SVN_ERR_FS_CORRUPT, NULL, _("Reading one svndiff window read beyond " "the end of the representation")); rs->chunk_index++; } svn_pool_destroy(iterpool); return SVN_NO_ERROR; } /* Read all txdelta / plain windows following REP_HEADER in FS as described * by ENTRY. Read the data from the already open FILE and the wrapping * STREAM object. If MAX_OFFSET is not -1, don't read windows that start * at or beyond that offset. Use SCRATCH_POOL for temporary allocations. * If caching is not enabled, this is a no-op. */ static svn_error_t * block_read_windows(svn_fs_fs__rep_header_t *rep_header, svn_fs_t *fs, svn_fs_fs__revision_file_t *rev_file, svn_fs_fs__p2l_entry_t* entry, apr_off_t max_offset, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { fs_fs_data_t *ffd = fs->fsap_data; rep_state_t rs = { 0 }; apr_off_t offset; window_cache_key_t key = { 0 }; if ( (rep_header->type != svn_fs_fs__rep_plain && (!ffd->txdelta_window_cache || !ffd->raw_window_cache)) || (rep_header->type == svn_fs_fs__rep_plain && !ffd->combined_window_cache)) return SVN_NO_ERROR; SVN_ERR(init_rep_state(&rs, rep_header, fs, rev_file, entry, result_pool)); /* RS->FILE may be shared between RS instances -> make sure we point * to the right data. */ offset = rs.start + rs.current; if (rep_header->type == svn_fs_fs__rep_plain) { svn_stringbuf_t *plaintext; svn_boolean_t is_cached; /* already in cache? */ SVN_ERR(svn_cache__has_key(&is_cached, rs.combined_cache, get_window_key(&key, &rs), scratch_pool)); if (is_cached) return SVN_NO_ERROR; /* for larger reps, the header may have crossed a block boundary. * make sure we still read blocks properly aligned, i.e. don't use * plain seek here. */ SVN_ERR(aligned_seek(fs, rev_file->file, NULL, offset, scratch_pool)); plaintext = svn_stringbuf_create_ensure(rs.size, result_pool); SVN_ERR(svn_io_file_read_full2(rev_file->file, plaintext->data, rs.size, &plaintext->len, NULL, result_pool)); plaintext->data[plaintext->len] = 0; rs.current += rs.size; SVN_ERR(set_cached_combined_window(plaintext, &rs, scratch_pool)); } else { SVN_ERR(cache_windows(fs, &rs, max_offset, scratch_pool)); } return SVN_NO_ERROR; } /* Try to get the representation header identified by KEY from FS's cache. * If it has not been cached, read it from the current position in STREAM * and put it into the cache (if caching has been enabled for rep headers). * Return the result in *REP_HEADER. Use POOL for allocations. */ static svn_error_t * read_rep_header(svn_fs_fs__rep_header_t **rep_header, svn_fs_t *fs, svn_stream_t *stream, pair_cache_key_t *key, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { fs_fs_data_t *ffd = fs->fsap_data; svn_boolean_t is_cached = FALSE; if (ffd->rep_header_cache) { SVN_ERR(svn_cache__get((void**)rep_header, &is_cached, ffd->rep_header_cache, key, result_pool)); if (is_cached) return SVN_NO_ERROR; } SVN_ERR(svn_fs_fs__read_rep_header(rep_header, stream, result_pool, scratch_pool)); if (ffd->rep_header_cache) SVN_ERR(svn_cache__set(ffd->rep_header_cache, key, *rep_header, scratch_pool)); return SVN_NO_ERROR; } /* Fetch the representation data (header, txdelta / plain windows) * addressed by ENTRY->ITEM in FS and cache it if caches are enabled. * Read the data from REV_FILE. If MAX_OFFSET is not -1, don't read * windows that start at or beyond that offset. * Use SCRATCH_POOL for temporary allocations. */ static svn_error_t * block_read_contents(svn_fs_t *fs, svn_fs_fs__revision_file_t *rev_file, svn_fs_fs__p2l_entry_t* entry, apr_off_t max_offset, apr_pool_t *scratch_pool) { pair_cache_key_t header_key = { 0 }; svn_fs_fs__rep_header_t *rep_header; header_key.revision = (apr_int32_t)entry->item.revision; header_key.second = entry->item.number; SVN_ERR(read_rep_header(&rep_header, fs, rev_file->stream, &header_key, scratch_pool, scratch_pool)); SVN_ERR(block_read_windows(rep_header, fs, rev_file, entry, max_offset, scratch_pool, scratch_pool)); return SVN_NO_ERROR; } /* For the given REV_FILE in FS, in *STREAM return a stream covering the * item specified by ENTRY. Also, verify the item's content by low-level * checksum. Allocate the result in POOL. */ static svn_error_t * read_item(svn_stream_t **stream, svn_fs_t *fs, svn_fs_fs__revision_file_t *rev_file, svn_fs_fs__p2l_entry_t* entry, apr_pool_t *pool) { apr_uint32_t digest; svn_checksum_t *expected, *actual; apr_uint32_t plain_digest; /* Read item into string buffer. */ svn_stringbuf_t *text = svn_stringbuf_create_ensure(entry->size, pool); text->len = entry->size; text->data[text->len] = 0; SVN_ERR(svn_io_file_read_full2(rev_file->file, text->data, text->len, NULL, NULL, pool)); /* Return (construct, calculate) stream and checksum. */ *stream = svn_stream_from_stringbuf(text, pool); digest = svn__fnv1a_32x4(text->data, text->len); /* Checksums will match most of the time. */ if (entry->fnv1_checksum == digest) return SVN_NO_ERROR; /* Construct proper checksum objects from their digests to allow for * nice error messages. */ plain_digest = htonl(entry->fnv1_checksum); expected = svn_checksum__from_digest_fnv1a_32x4( (const unsigned char *)&plain_digest, pool); plain_digest = htonl(digest); actual = svn_checksum__from_digest_fnv1a_32x4( (const unsigned char *)&plain_digest, pool); /* Construct the full error message with all the info we have. */ return svn_checksum_mismatch_err(expected, actual, pool, _("Low-level checksum mismatch while reading\n" "%s bytes of meta data at offset %s " "for item %s in revision %ld"), apr_off_t_toa(pool, entry->size), apr_off_t_toa(pool, entry->offset), apr_psprintf(pool, "%" APR_UINT64_T_FMT, entry->item.number), entry->item.revision); } /* If not already cached, read the changed paths list addressed by ENTRY in * FS and cache it if it has no more than SVN_FS_FS__CHANGES_BLOCK_SIZE * entries and caching is enabled. Read the data from REV_FILE. * Allocate temporaries in SCRATCH_POOL. */ static svn_error_t * block_read_changes(svn_fs_t *fs, svn_fs_fs__revision_file_t *rev_file, svn_fs_fs__p2l_entry_t *entry, apr_pool_t *scratch_pool) { fs_fs_data_t *ffd = fs->fsap_data; svn_stream_t *stream; apr_array_header_t *changes; pair_cache_key_t key; key.revision = entry->item.revision; key.second = 0; if (!ffd->changes_cache) return SVN_NO_ERROR; /* already in cache? */ if (ffd->changes_cache) { svn_boolean_t is_cached; SVN_ERR(svn_cache__has_key(&is_cached, ffd->changes_cache, &key, scratch_pool)); if (is_cached) return SVN_NO_ERROR; } SVN_ERR(read_item(&stream, fs, rev_file, entry, scratch_pool)); /* Read changes from revision file. But read just past the first block to enable us to determine whether the first block already hit the EOL. Note: A 100 entries block is already > 10kB on disk. With a 4kB default disk block size, this function won't even be called for larger changed paths lists. */ SVN_ERR(svn_fs_fs__read_changes(&changes, stream, SVN_FS_FS__CHANGES_BLOCK_SIZE + 1, scratch_pool, scratch_pool)); /* We can only cache small lists that don't need to be split up. For longer lists, we miss the file offset info for the respective */ if (changes->nelts <= SVN_FS_FS__CHANGES_BLOCK_SIZE) { svn_fs_fs__changes_list_t changes_list; /* Construct the info object for the entries block we just read. */ changes_list.end_offset = entry->size; changes_list.start_offset = 0; changes_list.count = changes->nelts; changes_list.changes = (change_t **)changes->elts; changes_list.eol = TRUE; SVN_ERR(svn_cache__set(ffd->changes_cache, &key, &changes_list, scratch_pool)); } return SVN_NO_ERROR; } /* If not already cached or if MUST_READ is set, read the node revision * addressed by ENTRY in FS and retúrn it in *NODEREV_P. Cache the * result if caching is enabled. Read the data from REV_FILE. Allocate * *NODEREV_P in RESUSLT_POOL and allocate temporaries in SCRATCH_POOL. */ static svn_error_t * block_read_noderev(node_revision_t **noderev_p, svn_fs_t *fs, svn_fs_fs__revision_file_t *rev_file, svn_fs_fs__p2l_entry_t *entry, svn_boolean_t must_read, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { fs_fs_data_t *ffd = fs->fsap_data; svn_stream_t *stream; pair_cache_key_t key = { 0 }; key.revision = entry->item.revision; key.second = entry->item.number; if (!must_read && !ffd->node_revision_cache) return SVN_NO_ERROR; /* already in cache? */ if (!must_read && ffd->node_revision_cache) { svn_boolean_t is_cached; SVN_ERR(svn_cache__has_key(&is_cached, ffd->node_revision_cache, &key, scratch_pool)); if (is_cached) return SVN_NO_ERROR; } SVN_ERR(read_item(&stream, fs, rev_file, entry, scratch_pool)); /* read node rev from revision file */ SVN_ERR(svn_fs_fs__read_noderev(noderev_p, stream, result_pool, scratch_pool)); SVN_ERR(fixup_node_revision(fs, *noderev_p, scratch_pool)); if (ffd->node_revision_cache) SVN_ERR(svn_cache__set(ffd->node_revision_cache, &key, *noderev_p, scratch_pool)); return SVN_NO_ERROR; } /* Read the whole (e.g. 64kB) block containing ITEM_INDEX of REVISION in FS * and put all data into cache. If necessary and depending on heuristics, * neighboring blocks may also get read. The data is being read from * already open REVISION_FILE, which must be the correct rev / pack file * w.r.t. REVISION. * * For noderevs and changed path lists, the item fetched can be allocated * RESULT_POOL and returned in *RESULT. Otherwise, RESULT must be NULL. */ static svn_error_t * block_read(void **result, svn_fs_t *fs, svn_revnum_t revision, apr_uint64_t item_index, svn_fs_fs__revision_file_t *revision_file, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { fs_fs_data_t *ffd = fs->fsap_data; apr_off_t offset, wanted_offset = 0; apr_off_t block_start = 0; apr_array_header_t *entries; int run_count = 0; int i; apr_pool_t *iterpool; /* Block read is an optional feature. If the caller does not want anything * specific we may not have to read anything. */ if (!result) return SVN_NO_ERROR; iterpool = svn_pool_create(scratch_pool); /* don't try this on transaction protorev files */ SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(revision)); /* index lookup: find the OFFSET of the item we *must* read plus (in the * "do-while" block) the list of items in the same block. */ SVN_ERR(svn_fs_fs__item_offset(&wanted_offset, fs, revision_file, revision, NULL, item_index, iterpool)); offset = wanted_offset; /* Heuristics: * * Read this block. If the last item crosses the block boundary, read * the next block but stop there. Because cross-boundary items cause * blocks to be read twice, this heuristics will limit this effect to * approx. 50% of blocks, probably less, while providing a sensible * amount of read-ahead. */ do { /* fetch list of items in the block surrounding OFFSET */ block_start = offset - (offset % ffd->block_size); SVN_ERR(svn_fs_fs__p2l_index_lookup(&entries, fs, revision_file, revision, block_start, ffd->block_size, scratch_pool, scratch_pool)); SVN_ERR(aligned_seek(fs, revision_file->file, &block_start, offset, iterpool)); /* read all items from the block */ for (i = 0; i < entries->nelts; ++i) { svn_boolean_t is_result, is_wanted; apr_pool_t *pool; svn_fs_fs__p2l_entry_t* entry; svn_pool_clear(iterpool); /* skip empty sections */ entry = &APR_ARRAY_IDX(entries, i, svn_fs_fs__p2l_entry_t); if (entry->type == SVN_FS_FS__ITEM_TYPE_UNUSED) continue; /* the item / container we were looking for? */ is_wanted = entry->offset == wanted_offset && entry->item.revision == revision && entry->item.number == item_index; is_result = result && is_wanted; /* select the pool that we want the item to be allocated in */ pool = is_result ? result_pool : iterpool; /* handle all items that start within this block and are relatively * small (i.e. < block size). Always read the item we need to return. */ if (is_result || ( entry->offset >= block_start && entry->size < ffd->block_size)) { void *item = NULL; SVN_ERR(svn_io_file_seek(revision_file->file, APR_SET, &entry->offset, iterpool)); switch (entry->type) { case SVN_FS_FS__ITEM_TYPE_FILE_REP: case SVN_FS_FS__ITEM_TYPE_DIR_REP: case SVN_FS_FS__ITEM_TYPE_FILE_PROPS: case SVN_FS_FS__ITEM_TYPE_DIR_PROPS: SVN_ERR(block_read_contents(fs, revision_file, entry, is_wanted ? -1 : block_start + ffd->block_size, iterpool)); break; case SVN_FS_FS__ITEM_TYPE_NODEREV: if (ffd->node_revision_cache || is_result) SVN_ERR(block_read_noderev((node_revision_t **)&item, fs, revision_file, entry, is_result, pool, iterpool)); break; case SVN_FS_FS__ITEM_TYPE_CHANGES: SVN_ERR(block_read_changes(fs, revision_file, entry, iterpool)); break; default: break; } if (is_result) *result = item; /* if we crossed a block boundary, read the remainder of * the last block as well */ offset = entry->offset + entry->size; if (offset - block_start > ffd->block_size) ++run_count; } } } while(run_count++ == 1); /* can only be true once and only if a block * boundary got crossed */ /* if the caller requested a result, we must have provided one by now */ assert(!result || *result); svn_pool_destroy(iterpool); return SVN_NO_ERROR; } Index: vendor/subversion/dist/subversion/libsvn_repos/authz_parse.c =================================================================== --- vendor/subversion/dist/subversion/libsvn_repos/authz_parse.c (revision 339231) +++ vendor/subversion/dist/subversion/libsvn_repos/authz_parse.c (revision 339232) @@ -1,1442 +1,1443 @@ /* authz_parse.c : Parser for path-based access control * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * ==================================================================== */ #include #include #include "svn_ctype.h" #include "svn_error.h" #include "svn_hash.h" #include "svn_iter.h" #include "svn_pools.h" #include "svn_repos.h" #include "private/svn_fspath.h" #include "private/svn_config_private.h" #include "private/svn_sorts_private.h" #include "private/svn_string_private.h" #include "private/svn_subr_private.h" #include "svn_private_config.h" #include "authz.h" /* Temporary ACL constructed by the parser. */ typedef struct parsed_acl_t { /* The global ACL. The strings in ACL.rule are allocated from the result pool. ACL.user_access is null during the parsing stage. */ authz_acl_t acl; /* The set of access control entries. In the second pass, aliases in these entries will be expanded and equivalent entries will be merged. The entries are allocated from the parser pool. */ apr_hash_t *aces; /* The set of access control entries that use aliases. In the second pass, aliases in these entries will be expanded and merged into ACES. The entries are allocated from the parser pool. */ apr_hash_t *alias_aces; } parsed_acl_t; /* Temporary group definition constructed by the authz/group parser. Once all groups and aliases are defined, a second pass over these data will recursively expand group memberships. */ typedef struct parsed_group_t { svn_boolean_t local_group; apr_array_header_t *members; } parsed_group_t; /* Baton for the parser constructor. */ typedef struct ctor_baton_t { /* The final output of the parser. */ authz_full_t *authz; /* Interned-string set, allocated in AUTHZ->pool. Stores singleton instances of user, group and repository names, which are used by members of the AUTHZ structure. By reusing the same immutable string multiple times, we reduce the size of the authz representation in the result pool. N.B.: Whilst the strings are allocated from teh result pool, the hash table itself is not. */ apr_hash_t *strings; /* A set of all the sections that were seen in the authz or global groups file. Rules, aliases and groups may each only be defined once in the authz file. The global groups file may only contain a [groups] section. */ apr_hash_t *sections; /* The name of the section we're currently parsing. */ const char *section; /* TRUE iff we're parsing the global groups file. */ svn_boolean_t parsing_groups; /* TRUE iff we're parsing a [groups] section. */ svn_boolean_t in_groups; /* TRUE iff we're parsing an [aliases] section. */ svn_boolean_t in_aliases; /* A set of all the unique rules we parsed from the section names. */ apr_hash_t *parsed_rules; /* Temporary parsed-groups definitions. */ apr_hash_t *parsed_groups; /* Temporary alias mappings. */ apr_hash_t *parsed_aliases; /* Temporary parsed-acl definitions. */ apr_array_header_t *parsed_acls; /* Temporary expanded groups definitions. */ apr_hash_t *expanded_groups; /* The temporary ACL we're currently constructing. */ parsed_acl_t *current_acl; /* Temporary buffers used to parse a rule into segments. */ svn_membuf_t rule_path_buffer; svn_stringbuf_t *rule_string_buffer; /* The parser's scratch pool. This may not be the same pool as passed to the constructor callbacks, that is supposed to be an iteration pool maintained by the generic parser. N.B.: The result pool is AUTHZ->pool. */ apr_pool_t *parser_pool; } ctor_baton_t; /* An empty string with a known address. */ static const char interned_empty_string[] = ""; /* The name of the aliases section. */ static const char aliases_section[] = "aliases"; /* The name of the groups section. */ static const char groups_section[] = "groups"; /* The token indicating that an authz rule contains wildcards. */ static const char glob_rule_token[] = "glob"; /* The anonymous access token. */ static const char anon_access_token[] = "$anonymous"; /* The authenticated access token. */ static const char authn_access_token[] = "$authenticated"; /* Initialize a rights structure. The minimum rights start with all available access and are later bitwise-and'ed with actual access rights. The maximum rights begin empty and are later bitwise-and'ed with actual rights. */ static void init_rights(authz_rights_t *rights) { rights->min_access = authz_access_write; rights->max_access = authz_access_none; } /* Initialize a global rights structure. The USER string must be interned or statically initialized. */ static void init_global_rights(authz_global_rights_t *gr, const char *user, apr_pool_t *result_pool) { gr->user = user; init_rights(&gr->all_repos_rights); init_rights(&gr->any_repos_rights); gr->per_repos_rights = apr_hash_make(result_pool); } /* Insert the default global ACL into the parsed ACLs. */ static void insert_default_acl(ctor_baton_t *cb) { parsed_acl_t *acl = &APR_ARRAY_PUSH(cb->parsed_acls, parsed_acl_t); acl->acl.sequence_number = 0; acl->acl.rule.repos = interned_empty_string; acl->acl.rule.len = 0; acl->acl.rule.path = NULL; acl->acl.anon_access = authz_access_none; acl->acl.has_anon_access = TRUE; acl->acl.authn_access = authz_access_none; acl->acl.has_authn_access = TRUE; acl->acl.user_access = NULL; acl->aces = svn_hash__make(cb->parser_pool); acl->alias_aces = svn_hash__make(cb->parser_pool); } /* Initialize a constuctor baton. */ static ctor_baton_t * create_ctor_baton(apr_pool_t *result_pool, apr_pool_t *scratch_pool) { apr_pool_t *const parser_pool = svn_pool_create(scratch_pool); ctor_baton_t *const cb = apr_pcalloc(parser_pool, sizeof(*cb)); authz_full_t *const authz = apr_pcalloc(result_pool, sizeof(*authz)); init_global_rights(&authz->anon_rights, anon_access_token, result_pool); init_global_rights(&authz->authn_rights, authn_access_token, result_pool); authz->user_rights = svn_hash__make(result_pool); authz->pool = result_pool; cb->authz = authz; cb->strings = svn_hash__make(parser_pool); cb->sections = svn_hash__make(parser_pool); cb->section = NULL; cb->parsing_groups = FALSE; cb->in_groups = FALSE; cb->in_aliases = FALSE; cb->parsed_rules = svn_hash__make(parser_pool); cb->parsed_groups = svn_hash__make(parser_pool); cb->parsed_aliases = svn_hash__make(parser_pool); cb->parsed_acls = apr_array_make(parser_pool, 64, sizeof(parsed_acl_t)); cb->current_acl = NULL; svn_membuf__create(&cb->rule_path_buffer, 0, parser_pool); cb->rule_string_buffer = svn_stringbuf_create_empty(parser_pool); cb->parser_pool = parser_pool; insert_default_acl(cb); return cb; } /* Create and store per-user global rights. The USER string must be interned or statically initialized. */ static void prepare_global_rights(ctor_baton_t *cb, const char *user) { authz_global_rights_t *gr = svn_hash_gets(cb->authz->user_rights, user); if (!gr) { gr = apr_palloc(cb->authz->pool, sizeof(*gr)); init_global_rights(gr, user, cb->authz->pool); svn_hash_sets(cb->authz->user_rights, gr->user, gr); } } /* Internalize a string that will be referenced by the parsed svn_authz_t. If LEN is (apr_size_t)-1, assume the string is NUL-terminated. */ static const char * intern_string(ctor_baton_t *cb, const char *str, apr_size_t len) { const char *interned; if (len == (apr_size_t)-1) len = strlen(str); interned = apr_hash_get(cb->strings, str, len); if (!interned) { interned = apr_pstrmemdup(cb->authz->pool, str, len); apr_hash_set(cb->strings, interned, len, interned); } return interned; } /* Helper for rules_open_section and groups_open_section. */ static svn_error_t * check_open_section(ctor_baton_t *cb, svn_stringbuf_t *section) { SVN_ERR_ASSERT(!cb->current_acl && !cb->section); if (apr_hash_get(cb->sections, section->data, section->len)) { if (cb->parsing_groups) return svn_error_createf( SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, _("Section appears more than once" " in the global groups file: [%s]"), section->data); else return svn_error_createf( SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, _("Section appears more than once" " in the authz file: [%s]"), section->data); } cb->section = apr_pstrmemdup(cb->parser_pool, section->data, section->len); svn_hash_sets(cb->sections, cb->section, interned_empty_string); return SVN_NO_ERROR; } /* Constructor callback: Begins the [groups] section. */ static svn_error_t * groups_open_section(void *baton, svn_stringbuf_t *section) { ctor_baton_t *const cb = baton; if (cb->parsing_groups) SVN_ERR(check_open_section(cb, section)); if (0 == strcmp(section->data, groups_section)) { cb->in_groups = TRUE; return SVN_NO_ERROR; } return svn_error_createf( SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, (cb->parsing_groups ? _("Section is not valid in the global group file: [%s]") : _("Section is not valid in the authz file: [%s]")), section->data); } /* Constructor callback: Parses a group declaration. */ static svn_error_t * groups_add_value(void *baton, svn_stringbuf_t *section, svn_stringbuf_t *option, svn_stringbuf_t *value) { ctor_baton_t *const cb = baton; const char *group; apr_size_t group_len; SVN_ERR_ASSERT(cb->in_groups); if (strchr("@$&*~", *option->data)) { if (cb->parsing_groups) return svn_error_createf( SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, _("Global group name '%s' may not begin with '%c'"), option->data, *option->data); else return svn_error_createf( SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, _("Group name '%s' may not begin with '%c'"), option->data, *option->data); } /* Decorate the name to make lookups consistent. */ group = apr_pstrcat(cb->parser_pool, "@", option->data, SVN_VA_NULL); group_len = option->len + 1; if (apr_hash_get(cb->parsed_groups, group, group_len)) { if (cb->parsing_groups) return svn_error_createf(SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, _("Can't override definition" " of global group '%s'"), group); else return svn_error_createf(SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, _("Can't override definition" " of group '%s'"), group); } /* We store the whole group definition, so that we can use the temporary groups in the baton hash later to fully expand group memberships. At this point, we can finally internalize the group name. */ apr_hash_set(cb->parsed_groups, intern_string(cb, group, group_len), group_len, svn_cstring_split(value->data, ",", TRUE, cb->parser_pool)); return SVN_NO_ERROR; } /* Remove escape sequences in-place. */ static void unescape_in_place(svn_stringbuf_t *buf) { char *p = buf->data; apr_size_t i; /* Skip the string up to the first escape sequence. */ for (i = 0; i < buf->len; ++i) { if (*p == '\\') break; ++p; } if (i < buf->len) { /* Unescape the remainder of the string. */ svn_boolean_t escape = TRUE; const char *q; for (q = p + 1, ++i; i < buf->len; ++i) { if (escape) { *p++ = *q++; escape = FALSE; } else if (*q == '\\') { ++q; escape = TRUE; } else *p++ = *q++; } /* A trailing backslash is literal, so make it part of the pattern. */ if (escape) *p++ = '\\'; *p = '\0'; buf->len = p - buf->data; } } /* Internalize a pattern. */ static void intern_pattern(ctor_baton_t *cb, svn_string_t *pattern, const char *string, apr_size_t len) { pattern->data = intern_string(cb, string, len); pattern->len = len; } /* Parse a rule path PATH up to PATH_LEN into *RULE. If GLOB is TRUE, treat PATH as possibly containing wildcards. SECTION is the whole rule in the authz file. Use pools and buffers from CB to do the obvious thing. */ static svn_error_t * parse_rule_path(authz_rule_t *rule, ctor_baton_t *cb, svn_boolean_t glob, const char *path, apr_size_t path_len, const char *section) { svn_stringbuf_t *const pattern = cb->rule_string_buffer; const char *const path_end = path + path_len; authz_rule_segment_t *segment; const char *start; const char *end; int nseg; SVN_ERR_ASSERT(*path == '/'); nseg = 0; for (start = path; start != path_end; start = end) { apr_size_t pattern_len; /* Skip the leading slash and find the end of the segment. */ end = memchr(++start, '/', path_len - 1); if (!end) end = path_end; pattern_len = end - start; path_len -= pattern_len + 1; if (pattern_len == 0) { if (nseg == 0) { /* This is an empty (root) path. */ rule->len = 0; rule->path = NULL; return SVN_NO_ERROR; } /* A path with two consecutive slashes is not canonical. */ return svn_error_createf( SVN_ERR_AUTHZ_INVALID_CONFIG, svn_error_create(SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, _("Found empty name in authz rule path")), _("Non-canonical path '%s' in authz rule [%s]"), path, section); } /* A path with . or .. segments is not canonical. */ if (*start == '.' && (pattern_len == 1 || (pattern_len == 2 && start[1] == '.'))) return svn_error_createf( SVN_ERR_AUTHZ_INVALID_CONFIG, (end == start + 1 ? svn_error_create(SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, _("Found '.' in authz rule path")) : svn_error_create(SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, _("Found '..' in authz rule path"))), _("Non-canonical path '%s' in authz rule [%s]"), path, section); /* Make space for the current segment. */ ++nseg; svn_membuf__resize(&cb->rule_path_buffer, nseg * sizeof(*segment)); segment = cb->rule_path_buffer.data; segment += (nseg - 1); if (!glob) { /* Trivial case: this is not a glob rule, so every segment is a literal match. */ segment->kind = authz_rule_literal; intern_pattern(cb, &segment->pattern, start, pattern_len); continue; } /* Copy the segment into the temporary buffer. */ svn_stringbuf_setempty(pattern); svn_stringbuf_appendbytes(pattern, start, pattern_len); if (0 == apr_fnmatch_test(pattern->data)) { /* It's a literal match after all. */ segment->kind = authz_rule_literal; unescape_in_place(pattern); intern_pattern(cb, &segment->pattern, pattern->data, pattern->len); continue; } if (*pattern->data == '*') { if (pattern->len == 1 || (pattern->len == 2 && pattern->data[1] == '*')) { /* Process * and **, applying normalization as per https://wiki.apache.org/subversion/AuthzImprovements. */ authz_rule_segment_t *const prev = (nseg > 1 ? segment - 1 : NULL); if (pattern_len == 1) { /* This is a *. Replace **|* with *|**. */ if (prev && prev->kind == authz_rule_any_recursive) { prev->kind = authz_rule_any_segment; segment->kind = authz_rule_any_recursive; } else segment->kind = authz_rule_any_segment; } else { /* This is a **. Replace **|** with a single **. */ if (prev && prev->kind == authz_rule_any_recursive) { /* Simply drop the redundant new segment. */ --nseg; continue; } else segment->kind = authz_rule_any_recursive; } segment->pattern.data = interned_empty_string; segment->pattern.len = 0; continue; } /* Maybe it's a suffix match? */ if (0 == apr_fnmatch_test(pattern->data + 1)) { svn_stringbuf_leftchop(pattern, 1); segment->kind = authz_rule_suffix; unescape_in_place(pattern); svn_authz__reverse_string(pattern->data, pattern->len); intern_pattern(cb, &segment->pattern, pattern->data, pattern->len); continue; } } if (pattern->data[pattern->len - 1] == '*') { /* Might be a prefix match. Note that because of the previous test, we already know that the pattern is longer than one character. */ if (pattern->data[pattern->len - 2] != '\\') { /* OK, the * wasn't escaped. Chop off the wildcard. */ svn_stringbuf_chop(pattern, 1); if (0 == apr_fnmatch_test(pattern->data)) { segment->kind = authz_rule_prefix; unescape_in_place(pattern); intern_pattern(cb, &segment->pattern, pattern->data, pattern->len); continue; } /* Restore the wildcard since it was not a prefix match. */ svn_stringbuf_appendbyte(pattern, '*'); } } /* It's a generic fnmatch pattern. */ segment->kind = authz_rule_fnmatch; intern_pattern(cb, &segment->pattern, pattern->data, pattern->len); } SVN_ERR_ASSERT(nseg > 0); /* Copy the temporary segments array into the result pool. */ { const apr_size_t path_size = nseg * sizeof(*segment); SVN_ERR_ASSERT(path_size <= cb->rule_path_buffer.size); rule->len = nseg; rule->path = apr_palloc(cb->authz->pool, path_size); memcpy(rule->path, cb->rule_path_buffer.data, path_size); } return SVN_NO_ERROR; } /* Check that the parsed RULE is unique within the authz file. With the introduction of wildcards, just looking at the SECTION names is not sufficient to determine uniqueness. Use pools and buffers from CB to do the obvious thing. */ static svn_error_t * check_unique_rule(ctor_baton_t *cb, const authz_rule_t *rule, const char *section) { svn_stringbuf_t *const buf = cb->rule_string_buffer; const char *exists; int i; /* Construct the key for this rule */ svn_stringbuf_setempty(buf); svn_stringbuf_appendcstr(buf, rule->repos); svn_stringbuf_appendbyte(buf, '\n'); for (i = 0; i < rule->len; ++i) { authz_rule_segment_t *const seg = &rule->path[i]; svn_stringbuf_appendbyte(buf, '@' + seg->kind); svn_stringbuf_appendbytes(buf, seg->pattern.data, seg->pattern.len); svn_stringbuf_appendbyte(buf, '\n'); } /* Check if the section exists. */ exists = apr_hash_get(cb->parsed_rules, buf->data, buf->len); if (exists) return svn_error_createf( SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, _("Section [%s] describes the same rule as section [%s]"), section, exists); /* Insert the rule into the known rules set. */ apr_hash_set(cb->parsed_rules, apr_pstrmemdup(cb->parser_pool, buf->data, buf->len), buf->len, apr_pstrdup(cb->parser_pool, section)); return SVN_NO_ERROR; } /* Constructor callback: Starts a rule or [aliases] section. */ static svn_error_t * rules_open_section(void *baton, svn_stringbuf_t *section) { ctor_baton_t *const cb = baton; const char *rule = section->data; apr_size_t rule_len = section->len; svn_boolean_t glob; const char *endp; parsed_acl_t acl; SVN_ERR(check_open_section(cb, section)); /* Parse rule property tokens. */ if (*rule != ':') glob = FALSE; else { /* This must be a wildcard rule. */ apr_size_t token_len; ++rule; --rule_len; endp = memchr(rule, ':', rule_len); if (!endp) return svn_error_createf( SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, _("Empty repository name in authz rule [%s]"), section->data); /* Note: the size of glob_rule_token includes the NUL terminator. */ token_len = endp - rule; if (token_len != sizeof(glob_rule_token) - 1 || memcmp(rule, glob_rule_token, token_len)) return svn_error_createf( SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, _("Invalid type token '%s' in authz rule [%s]"), apr_pstrmemdup(cb->parser_pool, rule, token_len), section->data); glob = TRUE; rule = endp + 1; rule_len -= token_len + 1; } /* Parse the repository name. */ endp = (*rule == '/' ? NULL : memchr(rule, ':', rule_len)); if (!endp) acl.acl.rule.repos = interned_empty_string; else { const apr_size_t repos_len = endp - rule; /* The rule contains a repository name. */ if (0 == repos_len) return svn_error_createf( SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, _("Empty repository name in authz rule [%s]"), section->data); acl.acl.rule.repos = intern_string(cb, rule, repos_len); rule = endp + 1; rule_len -= repos_len + 1; } /* Parse the actual rule. */ if (*rule == '/') { SVN_ERR(parse_rule_path(&acl.acl.rule, cb, glob, rule, rule_len, section->data)); SVN_ERR(check_unique_rule(cb, &acl.acl.rule, section->data)); } else if (0 == strcmp(section->data, aliases_section)) { cb->in_aliases = TRUE; return SVN_NO_ERROR; } else { /* This must be the [groups] section. */ return groups_open_section(cb, section); } acl.acl.sequence_number = cb->parsed_acls->nelts; acl.acl.anon_access = authz_access_none; acl.acl.has_anon_access = FALSE; acl.acl.authn_access = authz_access_none; acl.acl.has_authn_access = FALSE; acl.acl.user_access = NULL; acl.aces = svn_hash__make(cb->parser_pool); acl.alias_aces = svn_hash__make(cb->parser_pool); cb->current_acl = &APR_ARRAY_PUSH(cb->parsed_acls, parsed_acl_t); *cb->current_acl = acl; return SVN_NO_ERROR; } /* Parses an alias declaration. The definition (username) of the alias will always be interned. */ static svn_error_t * add_alias_definition(ctor_baton_t *cb, svn_stringbuf_t *option, svn_stringbuf_t *value) { const char *alias; apr_size_t alias_len; const char *user; if (strchr("@$&*~", *option->data)) return svn_error_createf( SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, _("Alias name '%s' may not begin with '%c'"), option->data, *option->data); /* Decorate the name to make lookups consistent. */ alias = apr_pstrcat(cb->parser_pool, "&", option->data, SVN_VA_NULL); alias_len = option->len + 1; if (apr_hash_get(cb->parsed_aliases, alias, alias_len)) return svn_error_createf( SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, _("Can't override definition of alias '%s'"), alias); user = intern_string(cb, value->data, value->len); apr_hash_set(cb->parsed_aliases, alias, alias_len, user); /* Prepare the global rights struct for this user. */ prepare_global_rights(cb, user); return SVN_NO_ERROR; } /* Parses an access entry. Groups and users in access entry names will always be interned, aliases will never be. */ static svn_error_t * add_access_entry(ctor_baton_t *cb, svn_stringbuf_t *section, svn_stringbuf_t *option, svn_stringbuf_t *value) { parsed_acl_t *const acl = cb->current_acl; const char *name = option->data; apr_size_t name_len = option->len; const svn_boolean_t inverted = (*name == '~'); svn_boolean_t anonymous = FALSE; svn_boolean_t authenticated = FALSE; authz_access_t access = authz_access_none; authz_ace_t *ace; int i; SVN_ERR_ASSERT(acl != NULL); if (inverted) { ++name; --name_len; } /* Determine the access entry type. */ switch (*name) { case '~': return svn_error_createf( SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, _("Access entry '%s' has more than one inversion;" " double negatives are not permitted"), option->data); break; case '*': if (name_len != 1) return svn_error_createf( SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, _("Access entry '%s' is not valid;" " it must be a single '*'"), option->data); if (inverted) return svn_error_createf( SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, _("Access entry '~*' will never match")); anonymous = TRUE; authenticated = TRUE; break; case '$': if (0 == strcmp(name, anon_access_token)) { if (inverted) authenticated = TRUE; else anonymous = TRUE; } else if (0 == strcmp(name, authn_access_token)) { if (inverted) anonymous = TRUE; else authenticated = TRUE; } else return svn_error_createf( SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, _("Access entry token '%s' is not valid;" " should be '%s' or '%s'"), option->data, anon_access_token, authn_access_token); break; default: /* A username, group name or alias. */; } /* Parse the access rights. */ for (i = 0; i < value->len; ++i) { const char access_code = value->data[i]; switch (access_code) { case 'r': access |= authz_access_read_flag; break; case 'w': access |= authz_access_write_flag; break; default: if (!svn_ctype_isspace(access_code)) return svn_error_createf( SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, _("The access mode '%c' in access entry '%s'" " of rule [%s] is not valid"), access_code, option->data, section->data); } } /* We do not support write-only access. */ if ((access & authz_access_write_flag) && !(access & authz_access_read_flag)) return svn_error_createf( SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, _("Write-only access entry '%s' of rule [%s] is not valid"), option->data, section->data); /* Update the parsed ACL with this access entry. */ if (anonymous || authenticated) { if (anonymous) { acl->acl.has_anon_access = TRUE; acl->acl.anon_access |= access; } if (authenticated) { acl->acl.has_authn_access = TRUE; acl->acl.authn_access |= access; } } else { /* The inversion tag must be part of the key in the hash table, otherwise we can't tell regular and inverted entries appart. */ const char *key = (inverted ? name - 1 : name); const apr_size_t key_len = (inverted ? name_len + 1 : name_len); const svn_boolean_t aliased = (*name == '&'); apr_hash_t *aces = (aliased ? acl->alias_aces : acl->aces); ace = apr_hash_get(aces, key, key_len); if (ace) ace->access |= access; else { ace = apr_palloc(cb->parser_pool, sizeof(*ace)); ace->name = (aliased ? apr_pstrmemdup(cb->parser_pool, name, name_len) : intern_string(cb, name, name_len)); ace->members = NULL; ace->inverted = inverted; ace->access = access; key = (inverted ? apr_pstrmemdup(cb->parser_pool, key, key_len) : ace->name); apr_hash_set(aces, key, key_len, ace); /* Prepare the global rights struct for this user. */ if (!aliased && *ace->name != '@') prepare_global_rights(cb, ace->name); } } return SVN_NO_ERROR; } /* Constructor callback: Parse a rule, alias or group delcaration. */ static svn_error_t * rules_add_value(void *baton, svn_stringbuf_t *section, svn_stringbuf_t *option, svn_stringbuf_t *value) { ctor_baton_t *const cb = baton; if (cb->in_groups) return groups_add_value(baton, section, option, value); if (cb->in_aliases) return add_alias_definition(cb, option, value); return add_access_entry(cb, section, option, value); } /* Constructor callback: Close a section. */ static svn_error_t * close_section(void *baton, svn_stringbuf_t *section) { ctor_baton_t *const cb = baton; SVN_ERR_ASSERT(0 == strcmp(cb->section, section->data)); cb->section = NULL; cb->current_acl = NULL; cb->in_groups = FALSE; cb->in_aliases = FALSE; return SVN_NO_ERROR; } /* Add a user to GROUP. GROUP is never internalized, but USER always is. */ static void add_to_group(ctor_baton_t *cb, const char *group, const char *user) { apr_hash_t *members = svn_hash_gets(cb->expanded_groups, group); if (!members) { group = intern_string(cb, group, -1); members = svn_hash__make(cb->authz->pool); svn_hash_sets(cb->expanded_groups, group, members); } svn_hash_sets(members, user, interned_empty_string); } /* Hash iterator for expanding group definitions. WARNING: This function is recursive! */ static svn_error_t * expand_group_callback(void *baton, const void *key, apr_ssize_t klen, void *value, apr_pool_t *scratch_pool) { ctor_baton_t *const cb = baton; const char *const group = key; apr_array_header_t *members = value; int i; for (i = 0; i < members->nelts; ++i) { const char *member = APR_ARRAY_IDX(members, i, const char*); if (0 == strcmp(member, group)) return svn_error_createf(SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, _("Recursive definition of group '%s'"), group); if (*member == '&') { /* Add expanded alias to the group. N.B.: the user name is already internalized. */ const char *user = svn_hash_gets(cb->parsed_aliases, member); if (!user) return svn_error_createf( SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, _("Alias '%s' was never defined"), member); add_to_group(cb, group, user); } else if (*member != '@') { /* Add the member to the group. */ const char *user = intern_string(cb, member, -1); add_to_group(cb, group, user); /* Prepare the global rights struct for this user. */ prepare_global_rights(cb, user); } else { /* Recursively expand the group membership */ - members = svn_hash_gets(cb->parsed_groups, member); - if (!members) + apr_array_header_t *member_members + = svn_hash_gets(cb->parsed_groups, member); + if (!member_members) return svn_error_createf( SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, _("Undefined group '%s'"), member); SVN_ERR(expand_group_callback(cb, key, klen, - members, scratch_pool)); + member_members, scratch_pool)); } } return SVN_NO_ERROR; } /* Hash iteration baton for merge_alias_ace. */ typedef struct merge_alias_baton_t { apr_hash_t *aces; ctor_baton_t *cb; } merge_alias_baton_t; /* Hash iterator for expanding and mergina alias-based ACEs into the user/group-based ACEs. */ static svn_error_t * merge_alias_ace(void *baton, const void *key, apr_ssize_t klen, void *value, apr_pool_t *scratch_pool) { merge_alias_baton_t *const mab = baton; authz_ace_t *aliased_ace = value; const char *alias = aliased_ace->name; const char *unaliased_key; const char *user; authz_ace_t *ace; user = svn_hash_gets(mab->cb->parsed_aliases, alias); if (!user) return svn_error_createf( SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, _("Alias '%s' was never defined"), alias); /* N.B.: The user name is always internalized, but the inverted key may not be. */ if (!aliased_ace->inverted) unaliased_key = user; else { unaliased_key = apr_pstrcat(mab->cb->parser_pool, "~", user, SVN_VA_NULL); unaliased_key = intern_string(mab->cb, unaliased_key, -1); } ace = svn_hash_gets(mab->aces, unaliased_key); if (!ace) { aliased_ace->name = user; svn_hash_sets(mab->aces, unaliased_key, aliased_ace); } else { SVN_ERR_ASSERT(!ace->inverted == !aliased_ace->inverted); ace->access |= aliased_ace->access; } return SVN_NO_ERROR; } /* Hash iteration baton for array_insert_ace. */ typedef struct insert_ace_baton_t { apr_array_header_t *ace_array; ctor_baton_t *cb; } insert_ace_baton_t; /* Hash iterator, inserts an ACE into the ACLs array. */ static svn_error_t * array_insert_ace(void *baton, const void *key, apr_ssize_t klen, void *value, apr_pool_t *scratch_pool) { insert_ace_baton_t *iab = baton; authz_ace_t *ace = value; /* Add group membership info to the ACE. */ if (*ace->name == '@') { SVN_ERR_ASSERT(ace->members == NULL); ace->members = svn_hash_gets(iab->cb->expanded_groups, ace->name); if (!ace->members) return svn_error_createf( SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, _("Access entry refers to undefined group '%s'"), ace->name); } APR_ARRAY_PUSH(iab->ace_array, authz_ace_t) = *ace; return SVN_NO_ERROR; } /* Update accumulated RIGHTS from ACCESS. */ static void update_rights(authz_rights_t *rights, authz_access_t access) { rights->min_access &= access; rights->max_access |= access; } /* Update a global RIGHTS based on REPOS and ACCESS. */ static void update_global_rights(authz_global_rights_t *gr, const char *repos, authz_access_t access) { update_rights(&gr->all_repos_rights, access); if (0 == strcmp(repos, AUTHZ_ANY_REPOSITORY)) update_rights(&gr->any_repos_rights, access); else { authz_rights_t *rights = svn_hash_gets(gr->per_repos_rights, repos); if (rights) update_rights(rights, access); else { rights = apr_palloc(apr_hash_pool_get(gr->per_repos_rights), sizeof(*rights)); init_rights(rights); update_rights(rights, access); svn_hash_sets(gr->per_repos_rights, repos, rights); } } } /* Hash iterator to update global per-user rights from an ACL. */ static svn_error_t * update_user_rights(void *baton, const void *key, apr_ssize_t klen, void *value, apr_pool_t *scratch_pool) { const authz_acl_t *const acl = baton; const char *const user = key; authz_global_rights_t *const gr = value; authz_access_t access; svn_boolean_t has_access = svn_authz__get_acl_access(&access, acl, user, acl->rule.repos); if (has_access) update_global_rights(gr, acl->rule.repos, access); return SVN_NO_ERROR; } /* List iterator, expands/merges a parsed ACL into its final form and appends it to the authz info's ACL array. */ static svn_error_t * expand_acl_callback(void *baton, void *item, apr_pool_t *scratch_pool) { ctor_baton_t *const cb = baton; parsed_acl_t *const pacl = item; authz_acl_t *const acl = &pacl->acl; /* Expand and merge the aliased ACEs. */ if (apr_hash_count(pacl->alias_aces)) { merge_alias_baton_t mab; mab.aces = pacl->aces; mab.cb = cb; SVN_ERR(svn_iter_apr_hash(NULL, pacl->alias_aces, merge_alias_ace, &mab, scratch_pool)); } /* Make an array from the merged hashes. */ acl->user_access = apr_array_make(cb->authz->pool, apr_hash_count(pacl->aces), sizeof(authz_ace_t)); { insert_ace_baton_t iab; iab.ace_array = acl->user_access; iab.cb = cb; SVN_ERR(svn_iter_apr_hash(NULL, pacl->aces, array_insert_ace, &iab, scratch_pool)); } /* Store the completed ACL into authz. */ APR_ARRAY_PUSH(cb->authz->acls, authz_acl_t) = *acl; /* Update global access rights for this ACL. */ if (acl->has_anon_access) { cb->authz->has_anon_rights = TRUE; update_global_rights(&cb->authz->anon_rights, acl->rule.repos, acl->anon_access); } if (acl->has_authn_access) { cb->authz->has_authn_rights = TRUE; update_global_rights(&cb->authz->authn_rights, acl->rule.repos, acl->authn_access); } SVN_ERR(svn_iter_apr_hash(NULL, cb->authz->user_rights, update_user_rights, acl, scratch_pool)); return SVN_NO_ERROR; } /* Compare two ACLs in rule lexical order, then repository order, then order of definition. This ensures that our default ACL is always first in the sorted array. */ static int compare_parsed_acls(const void *va, const void *vb) { const parsed_acl_t *const a = va; const parsed_acl_t *const b = vb; int cmp = svn_authz__compare_rules(&a->acl.rule, &b->acl.rule); if (cmp == 0) cmp = a->acl.sequence_number - b->acl.sequence_number; return cmp; } svn_error_t * svn_authz__parse(authz_full_t **authz, svn_stream_t *rules, svn_stream_t *groups, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { ctor_baton_t *const cb = create_ctor_baton(result_pool, scratch_pool); /* * Pass 1: Parse the authz file. */ SVN_ERR(svn_config__parse_stream(rules, svn_config__constructor_create( rules_open_section, close_section, rules_add_value, cb->parser_pool), cb, cb->parser_pool)); /* * Pass 1.6487: Parse the global groups file. */ if (groups) { /* Check that the authz file did not contain any groups. */ if (0 != apr_hash_count(cb->parsed_groups)) return svn_error_create(SVN_ERR_AUTHZ_INVALID_CONFIG, NULL, ("Authz file cannot contain any groups" " when global groups are being used.")); apr_hash_clear(cb->sections); cb->parsing_groups = TRUE; SVN_ERR(svn_config__parse_stream(groups, svn_config__constructor_create( groups_open_section, close_section, groups_add_value, cb->parser_pool), cb, cb->parser_pool)); } /* * Pass 2: Expand groups and construct the final svn_authz_t. */ cb->expanded_groups = svn_hash__make(cb->parser_pool); SVN_ERR(svn_iter_apr_hash(NULL, cb->parsed_groups, expand_group_callback, cb, cb->parser_pool)); /* Sort the parsed ACLs in rule lexical order and pop off the default global ACL iff an equivalent ACL was defined in the authz file. */ if (cb->parsed_acls->nelts > 1) { parsed_acl_t *defacl; parsed_acl_t *nxtacl; svn_sort__array(cb->parsed_acls, compare_parsed_acls); defacl = &APR_ARRAY_IDX(cb->parsed_acls, 0, parsed_acl_t); nxtacl = &APR_ARRAY_IDX(cb->parsed_acls, 1, parsed_acl_t); /* If the first ACL is not our default thingamajig, there's a bug in our comparator. */ SVN_ERR_ASSERT( defacl->acl.sequence_number == 0 && defacl->acl.rule.len == 0 && 0 == strcmp(defacl->acl.rule.repos, AUTHZ_ANY_REPOSITORY)); /* Pop the default ACL off the array if another equivalent exists, after merging the default rights. */ if (0 == svn_authz__compare_rules(&defacl->acl.rule, &nxtacl->acl.rule)) { nxtacl->acl.has_anon_access = TRUE; nxtacl->acl.has_authn_access = TRUE; cb->parsed_acls->elts = (char*)(nxtacl); --cb->parsed_acls->nelts; } } cb->authz->acls = apr_array_make(cb->authz->pool, cb->parsed_acls->nelts, sizeof(authz_acl_t)); SVN_ERR(svn_iter_apr_array(NULL, cb->parsed_acls, expand_acl_callback, cb, cb->parser_pool)); *authz = cb->authz; apr_pool_destroy(cb->parser_pool); return SVN_NO_ERROR; } void svn_authz__reverse_string(char *string, apr_size_t len) { char *left = string; char *right = string + len - 1; for (; left < right; ++left, --right) { char c = *left; *left = *right; *right = c; } } int svn_authz__compare_paths(const authz_rule_t *a, const authz_rule_t *b) { const int min_len = (a->len > b->len ? b->len : a->len); int i; for (i = 0; i < min_len; ++i) { int cmp = a->path[i].kind - b->path[i].kind; if (0 == cmp) { const char *const aseg = a->path[i].pattern.data; const char *const bseg = b->path[i].pattern.data; /* Exploit the fact that segment patterns are interned. */ if (aseg != bseg) cmp = strcmp(aseg, bseg); else cmp = 0; } if (0 != cmp) return cmp; } /* Sort shorter rules first. */ if (a->len != b->len) return a->len - b->len; return 0; } int svn_authz__compare_rules(const authz_rule_t *a, const authz_rule_t *b) { int diff = svn_authz__compare_paths(a, b); if (diff) return diff; /* Repository names are interned, too. */ if (a->repos != b->repos) return strcmp(a->repos, b->repos); return 0; } Index: vendor/subversion/dist/subversion/libsvn_subr/io.c =================================================================== --- vendor/subversion/dist/subversion/libsvn_subr/io.c (revision 339231) +++ vendor/subversion/dist/subversion/libsvn_subr/io.c (revision 339232) @@ -1,5442 +1,5447 @@ /* * io.c: shared file reading, writing, and probing code. * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * ==================================================================== */ #include #ifndef WIN32 #include #endif #ifndef APR_STATUS_IS_EPERM #include #ifdef EPERM #define APR_STATUS_IS_EPERM(s) ((s) == EPERM) #else #define APR_STATUS_IS_EPERM(s) (0) #endif #endif #include #include #include #include #include #include #include #include #if APR_HAVE_FCNTL_H #include #endif #include "svn_hash.h" #include "svn_types.h" #include "svn_dirent_uri.h" #include "svn_path.h" #include "svn_string.h" #include "svn_error.h" #include "svn_io.h" #include "svn_pools.h" #include "svn_utf.h" #include "svn_config.h" #include "svn_private_config.h" #include "svn_ctype.h" #include "private/svn_atomic.h" #include "private/svn_io_private.h" #include "private/svn_utf_private.h" #include "private/svn_dep_compat.h" #define SVN_SLEEP_ENV_VAR "SVN_I_LOVE_CORRUPTED_WORKING_COPIES_SO_DISABLE_SLEEP_FOR_TIMESTAMPS" /* Windows is 'aided' by a number of types of applications that follow other applications around and open up files they have changed for various reasons (the most intrusive are virus scanners). So, if one of these other apps has glommed onto our file we may get an 'access denied' error. This retry loop does not completely solve the problem (who knows how long the other app is going to hold onto it for), but goes a long way towards minimizing it. It is not an infinite loop because there might really be an error. Another reason for retrying delete operations on Windows is that they are asynchronous -- the file or directory is not actually deleted until the last handle to it is closed. The retry loop cannot completely solve this problem either, but can help mitigate it. */ #define RETRY_MAX_ATTEMPTS 100 #define RETRY_INITIAL_SLEEP 1000 #define RETRY_MAX_SLEEP 128000 #define RETRY_LOOP(err, expr, retry_test, sleep_test) \ do \ { \ apr_status_t os_err = APR_TO_OS_ERROR(err); \ int sleep_count = RETRY_INITIAL_SLEEP; \ int retries; \ for (retries = 0; \ retries < RETRY_MAX_ATTEMPTS && (retry_test); \ os_err = APR_TO_OS_ERROR(err)) \ { \ if (sleep_test) \ { \ ++retries; \ apr_sleep(sleep_count); \ if (sleep_count < RETRY_MAX_SLEEP) \ sleep_count *= 2; \ } \ (err) = (expr); \ } \ } \ while (0) #if defined(EDEADLK) && APR_HAS_THREADS #define FILE_LOCK_RETRY_LOOP(err, expr) \ RETRY_LOOP(err, \ expr, \ (APR_STATUS_IS_EINTR(err) || os_err == EDEADLK), \ (!APR_STATUS_IS_EINTR(err))) #else #define FILE_LOCK_RETRY_LOOP(err, expr) \ RETRY_LOOP(err, \ expr, \ (APR_STATUS_IS_EINTR(err)), \ 0) #endif #ifndef WIN32_RETRY_LOOP #if defined(WIN32) && !defined(SVN_NO_WIN32_RETRY_LOOP) #define WIN32_RETRY_LOOP(err, expr) \ RETRY_LOOP(err, expr, (os_err == ERROR_ACCESS_DENIED \ || os_err == ERROR_SHARING_VIOLATION \ || os_err == ERROR_DIR_NOT_EMPTY), \ 1) #else #define WIN32_RETRY_LOOP(err, expr) ((void)0) #endif #endif #ifdef WIN32 #if _WIN32_WINNT < 0x600 /* Does the SDK assume Windows Vista+? */ typedef struct _FILE_RENAME_INFO { BOOL ReplaceIfExists; HANDLE RootDirectory; DWORD FileNameLength; WCHAR FileName[1]; } FILE_RENAME_INFO, *PFILE_RENAME_INFO; typedef struct _FILE_DISPOSITION_INFO { BOOL DeleteFile; } FILE_DISPOSITION_INFO, *PFILE_DISPOSITION_INFO; #define FileRenameInfo 3 #define FileDispositionInfo 4 #endif /* WIN32 < Vista */ /* One-time initialization of the late bound Windows API functions. */ static volatile svn_atomic_t win_dynamic_imports_state = 0; /* Pointer to GetFinalPathNameByHandleW function from kernel32.dll. */ typedef DWORD (WINAPI *GETFINALPATHNAMEBYHANDLE)( HANDLE hFile, WCHAR *lpszFilePath, DWORD cchFilePath, DWORD dwFlags); typedef BOOL (WINAPI *SetFileInformationByHandle_t)(HANDLE hFile, int FileInformationClass, LPVOID lpFileInformation, DWORD dwBufferSize); static GETFINALPATHNAMEBYHANDLE get_final_path_name_by_handle_proc = NULL; static SetFileInformationByHandle_t set_file_information_by_handle_proc = NULL; /* Forward declaration. */ static svn_error_t * io_win_read_link(svn_string_t **dest, const char *path, apr_pool_t *pool); #endif /* Forward declaration */ static apr_status_t dir_is_empty(const char *dir, apr_pool_t *pool); static APR_INLINE svn_error_t * do_io_file_wrapper_cleanup(apr_file_t *file, apr_status_t status, const char *msg, const char *msg_no_name, apr_pool_t *pool); /* Local wrapper of svn_path_cstring_to_utf8() that does no copying on * operating systems where APR always uses utf-8 as native path format */ static svn_error_t * cstring_to_utf8(const char **path_utf8, const char *path_apr, apr_pool_t *pool) { #if defined(WIN32) || defined(DARWIN) *path_utf8 = path_apr; return SVN_NO_ERROR; #else return svn_path_cstring_to_utf8(path_utf8, path_apr, pool); #endif } /* Local wrapper of svn_path_cstring_from_utf8() that does no copying on * operating systems where APR always uses utf-8 as native path format */ static svn_error_t * cstring_from_utf8(const char **path_apr, const char *path_utf8, apr_pool_t *pool) { #if defined(WIN32) || defined(DARWIN) *path_apr = path_utf8; return SVN_NO_ERROR; #else return svn_path_cstring_from_utf8(path_apr, path_utf8, pool); #endif } /* Helper function that allows to convert an APR-level PATH to something * that we can pass the svn_error_wrap_apr. Since we use it in context * of error reporting, having *some* path info may be more useful than * having none. Therefore, we use a best effort approach here. * * This is different from svn_io_file_name_get in that it uses a different * signature style and will never fail. */ static const char * try_utf8_from_internal_style(const char *path, apr_pool_t *pool) { svn_error_t *error; const char *path_utf8; /* Special case. */ if (path == NULL) return "(NULL)"; /* (try to) convert PATH to UTF-8. If that fails, continue with the plain * PATH because it is the best we have. It may actually be UTF-8 already. */ error = cstring_to_utf8(&path_utf8, path, pool); if (error) { /* fallback to best representation we have */ svn_error_clear(error); path_utf8 = path; } /* Toggle (back-)slashes etc. as necessary. */ return svn_dirent_local_style(path_utf8, pool); } /* Set *NAME_P to the UTF-8 representation of directory entry NAME. * NAME is in the internal encoding used by APR; PARENT is in * UTF-8 and in internal (not local) style. * * Use PARENT only for generating an error string if the conversion * fails because NAME could not be represented in UTF-8. In that * case, return a two-level error in which the outer error's message * mentions PARENT, but the inner error's message does not mention * NAME (except possibly in hex) since NAME may not be printable. * Such a compound error at least allows the user to go looking in the * right directory for the problem. * * If there is any other error, just return that error directly. * * If there is any error, the effect on *NAME_P is undefined. * * *NAME_P and NAME may refer to the same storage. */ static svn_error_t * entry_name_to_utf8(const char **name_p, const char *name, const char *parent, apr_pool_t *pool) { #if defined(WIN32) || defined(DARWIN) *name_p = apr_pstrdup(pool, name); return SVN_NO_ERROR; #else svn_error_t *err = svn_path_cstring_to_utf8(name_p, name, pool); if (err && err->apr_err == APR_EINVAL) { return svn_error_createf(err->apr_err, err, _("Error converting entry " "in directory '%s' to UTF-8"), svn_dirent_local_style(parent, pool)); } return err; #endif } static void map_apr_finfo_to_node_kind(svn_node_kind_t *kind, svn_boolean_t *is_special, apr_finfo_t *finfo) { *is_special = FALSE; if (finfo->filetype == APR_REG) *kind = svn_node_file; else if (finfo->filetype == APR_DIR) *kind = svn_node_dir; else if (finfo->filetype == APR_LNK) { *is_special = TRUE; *kind = svn_node_file; } else *kind = svn_node_unknown; } /* Helper for svn_io_check_path() and svn_io_check_resolved_path(); essentially the same semantics as those two, with the obvious interpretation for RESOLVE_SYMLINKS. */ static svn_error_t * io_check_path(const char *path, svn_boolean_t resolve_symlinks, svn_boolean_t *is_special_p, svn_node_kind_t *kind, apr_pool_t *pool) { apr_int32_t flags; apr_finfo_t finfo; apr_status_t apr_err; const char *path_apr; svn_boolean_t is_special = FALSE; if (path[0] == '\0') path = "."; /* Not using svn_io_stat() here because we want to check the apr_err return explicitly. */ SVN_ERR(cstring_from_utf8(&path_apr, path, pool)); - +#ifdef WIN32 + /* on Windows, svn does not handle reparse points or hard links. + So ignore the 'resolve_symlinks' flag. */ + flags = APR_FINFO_MIN; +#else flags = resolve_symlinks ? APR_FINFO_MIN : (APR_FINFO_MIN | APR_FINFO_LINK); +#endif apr_err = apr_stat(&finfo, path_apr, flags, pool); if (APR_STATUS_IS_ENOENT(apr_err)) *kind = svn_node_none; else if (SVN__APR_STATUS_IS_ENOTDIR(apr_err)) *kind = svn_node_none; else if (apr_err) return svn_error_wrap_apr(apr_err, _("Can't check path '%s'"), svn_dirent_local_style(path, pool)); else map_apr_finfo_to_node_kind(kind, &is_special, &finfo); *is_special_p = is_special; return SVN_NO_ERROR; } /* Wrapper for apr_file_open(), taking an APR-encoded filename. */ static apr_status_t file_open(apr_file_t **f, const char *fname_apr, apr_int32_t flag, apr_fileperms_t perm, svn_boolean_t retry_on_failure, apr_pool_t *pool) { apr_status_t status = apr_file_open(f, fname_apr, flag, perm, pool); if (retry_on_failure) { #ifdef WIN32 if (status == APR_FROM_OS_ERROR(ERROR_ACCESS_DENIED)) { if ((flag & (APR_CREATE | APR_EXCL)) == (APR_CREATE | APR_EXCL)) return status; /* Can't create if there is something */ if (flag & (APR_WRITE | APR_CREATE)) { apr_finfo_t finfo; if (!apr_stat(&finfo, fname_apr, SVN__APR_FINFO_READONLY, pool)) { if (finfo.protection & APR_FREADONLY) return status; /* Retrying won't fix this */ } } } #endif WIN32_RETRY_LOOP(status, apr_file_open(f, fname_apr, flag, perm, pool)); } return status; } svn_error_t * svn_io_check_resolved_path(const char *path, svn_node_kind_t *kind, apr_pool_t *pool) { svn_boolean_t ignored; return io_check_path(path, TRUE, &ignored, kind, pool); } svn_error_t * svn_io_check_path(const char *path, svn_node_kind_t *kind, apr_pool_t *pool) { svn_boolean_t ignored; return io_check_path(path, FALSE, &ignored, kind, pool); } svn_error_t * svn_io_check_special_path(const char *path, svn_node_kind_t *kind, svn_boolean_t *is_special, apr_pool_t *pool) { return io_check_path(path, FALSE, is_special, kind, pool); } struct temp_file_cleanup_s { apr_pool_t *pool; /* The (APR-encoded) full path of the file to be removed, or NULL if * nothing to do. */ const char *fname_apr; }; static apr_status_t temp_file_plain_cleanup_handler(void *baton) { struct temp_file_cleanup_s *b = baton; apr_status_t apr_err = APR_SUCCESS; if (b->fname_apr) { apr_err = apr_file_remove(b->fname_apr, b->pool); WIN32_RETRY_LOOP(apr_err, apr_file_remove(b->fname_apr, b->pool)); } return apr_err; } static apr_status_t temp_file_child_cleanup_handler(void *baton) { struct temp_file_cleanup_s *b = baton; apr_pool_cleanup_kill(b->pool, b, temp_file_plain_cleanup_handler); return APR_SUCCESS; } svn_error_t * svn_io_open_uniquely_named(apr_file_t **file, const char **unique_path, const char *dirpath, const char *filename, const char *suffix, svn_io_file_del_t delete_when, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { const char *path; unsigned int i; struct temp_file_cleanup_s *baton = NULL; /* At the beginning, we don't know whether unique_path will need UTF8 conversion */ svn_boolean_t needs_utf8_conversion = TRUE; SVN_ERR_ASSERT(file || unique_path); if (dirpath == NULL) SVN_ERR(svn_io_temp_dir(&dirpath, scratch_pool)); if (filename == NULL) filename = "tempfile"; if (suffix == NULL) suffix = ".tmp"; path = svn_dirent_join(dirpath, filename, scratch_pool); if (delete_when == svn_io_file_del_on_pool_cleanup) { baton = apr_palloc(result_pool, sizeof(*baton)); baton->pool = result_pool; baton->fname_apr = NULL; /* Because cleanups are run LIFO, we need to make sure to register our cleanup before the apr_file_close cleanup: On Windows, you can't remove an open file. */ apr_pool_cleanup_register(result_pool, baton, temp_file_plain_cleanup_handler, temp_file_child_cleanup_handler); } for (i = 1; i <= 99999; i++) { const char *unique_name; const char *unique_name_apr; apr_file_t *try_file; apr_status_t apr_err; apr_int32_t flag = (APR_READ | APR_WRITE | APR_CREATE | APR_EXCL | APR_BUFFERED | APR_BINARY); if (delete_when == svn_io_file_del_on_close) flag |= APR_DELONCLOSE; /* Special case the first attempt -- if we can avoid having a generated numeric portion at all, that's best. So first we try with just the suffix; then future tries add a number before the suffix. (A do-while loop could avoid the repeated conditional, but it's not worth the clarity loss.) If the first attempt fails, the first number will be "2". This is good, since "1" would misleadingly imply that the second attempt was actually the first... and if someone's got conflicts on their conflicts, we probably don't want to add to their confusion :-). */ if (i == 1) unique_name = apr_psprintf(scratch_pool, "%s%s", path, suffix); else unique_name = apr_psprintf(scratch_pool, "%s.%u%s", path, i, suffix); /* Hmmm. Ideally, we would append to a native-encoding buf before starting iteration, then convert back to UTF-8 for return. But I suppose that would make the appending code sensitive to i18n in a way it shouldn't be... Oh well. */ if (needs_utf8_conversion) { SVN_ERR(cstring_from_utf8(&unique_name_apr, unique_name, scratch_pool)); if (i == 1) { /* The variable parts of unique_name will not require UTF8 conversion. Therefore, if UTF8 conversion had no effect on it in the first iteration, it won't require conversion in any future iteration. */ needs_utf8_conversion = strcmp(unique_name_apr, unique_name); } } else unique_name_apr = unique_name; apr_err = file_open(&try_file, unique_name_apr, flag, APR_OS_DEFAULT, FALSE, result_pool); if (APR_STATUS_IS_EEXIST(apr_err)) continue; else if (apr_err) { /* On Win32, CreateFile fails with an "Access Denied" error code, rather than "File Already Exists", if the colliding name belongs to a directory. */ if (APR_STATUS_IS_EACCES(apr_err)) { apr_finfo_t finfo; apr_status_t apr_err_2 = apr_stat(&finfo, unique_name_apr, APR_FINFO_TYPE, scratch_pool); if (!apr_err_2 && finfo.filetype == APR_DIR) continue; #ifdef WIN32 if (apr_err == APR_FROM_OS_ERROR(ERROR_ACCESS_DENIED) || apr_err == APR_FROM_OS_ERROR(ERROR_SHARING_VIOLATION)) { /* The file is in use by another process or is hidden; create a new name, but don't do this 99999 times in case the folder is not writable */ i += 797; continue; } #endif /* Else fall through and return the original error. */ } if (file) *file = NULL; if (unique_path) *unique_path = NULL; return svn_error_wrap_apr(apr_err, _("Can't open '%s'"), svn_dirent_local_style(unique_name, scratch_pool)); } else { if (delete_when == svn_io_file_del_on_pool_cleanup) baton->fname_apr = apr_pstrdup(result_pool, unique_name_apr); if (file) *file = try_file; else apr_file_close(try_file); if (unique_path) *unique_path = apr_pstrdup(result_pool, unique_name); return SVN_NO_ERROR; } } if (file) *file = NULL; if (unique_path) *unique_path = NULL; return svn_error_createf(SVN_ERR_IO_UNIQUE_NAMES_EXHAUSTED, NULL, _("Unable to make name for '%s'"), svn_dirent_local_style(path, scratch_pool)); } svn_error_t * svn_io_create_unique_link(const char **unique_name_p, const char *path, const char *dest, const char *suffix, apr_pool_t *pool) { #ifdef HAVE_SYMLINK unsigned int i; const char *unique_name; const char *unique_name_apr; const char *dest_apr; int rv; SVN_ERR(cstring_from_utf8(&dest_apr, dest, pool)); for (i = 1; i <= 99999; i++) { apr_status_t apr_err; /* Special case the first attempt -- if we can avoid having a generated numeric portion at all, that's best. So first we try with just the suffix; then future tries add a number before the suffix. (A do-while loop could avoid the repeated conditional, but it's not worth the clarity loss.) If the first attempt fails, the first number will be "2". This is good, since "1" would misleadingly imply that the second attempt was actually the first... and if someone's got conflicts on their conflicts, we probably don't want to add to their confusion :-). */ if (i == 1) unique_name = apr_psprintf(pool, "%s%s", path, suffix); else unique_name = apr_psprintf(pool, "%s.%u%s", path, i, suffix); /* Hmmm. Ideally, we would append to a native-encoding buf before starting iteration, then convert back to UTF-8 for return. But I suppose that would make the appending code sensitive to i18n in a way it shouldn't be... Oh well. */ SVN_ERR(cstring_from_utf8(&unique_name_apr, unique_name, pool)); do { rv = symlink(dest_apr, unique_name_apr); } while (rv == -1 && APR_STATUS_IS_EINTR(apr_get_os_error())); apr_err = apr_get_os_error(); if (rv == -1 && APR_STATUS_IS_EEXIST(apr_err)) continue; else if (rv == -1 && apr_err) { /* On Win32, CreateFile fails with an "Access Denied" error code, rather than "File Already Exists", if the colliding name belongs to a directory. */ if (APR_STATUS_IS_EACCES(apr_err)) { apr_finfo_t finfo; apr_status_t apr_err_2 = apr_stat(&finfo, unique_name_apr, APR_FINFO_TYPE, pool); if (!apr_err_2 && (finfo.filetype == APR_DIR)) continue; /* Else ignore apr_err_2; better to fall through and return the original error. */ } *unique_name_p = NULL; return svn_error_wrap_apr(apr_err, _("Can't create symbolic link '%s'"), svn_dirent_local_style(unique_name, pool)); } else { *unique_name_p = unique_name; return SVN_NO_ERROR; } } *unique_name_p = NULL; return svn_error_createf(SVN_ERR_IO_UNIQUE_NAMES_EXHAUSTED, NULL, _("Unable to make name for '%s'"), svn_dirent_local_style(path, pool)); #else return svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL, _("Symbolic links are not supported on this " "platform")); #endif } svn_error_t * svn_io_read_link(svn_string_t **dest, const char *path, apr_pool_t *pool) { #if defined(HAVE_READLINK) svn_string_t dest_apr; const char *path_apr; char buf[1025]; ssize_t rv; SVN_ERR(cstring_from_utf8(&path_apr, path, pool)); do { rv = readlink(path_apr, buf, sizeof(buf) - 1); } while (rv == -1 && APR_STATUS_IS_EINTR(apr_get_os_error())); if (rv == -1) return svn_error_wrap_apr(apr_get_os_error(), _("Can't read contents of link")); buf[rv] = '\0'; dest_apr.data = buf; dest_apr.len = rv; /* ### Cast needed, one of these interfaces is wrong */ return svn_utf_string_to_utf8((const svn_string_t **)dest, &dest_apr, pool); #elif defined(WIN32) return io_win_read_link(dest, path, pool); #else return svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL, _("Symbolic links are not supported on this " "platform")); #endif } svn_error_t * svn_io_copy_link(const char *src, const char *dst, apr_pool_t *pool) { #ifdef HAVE_READLINK svn_string_t *link_dest; const char *dst_tmp; /* Notice what the link is pointing at... */ SVN_ERR(svn_io_read_link(&link_dest, src, pool)); /* Make a tmp-link pointing at the same thing. */ SVN_ERR(svn_io_create_unique_link(&dst_tmp, dst, link_dest->data, ".tmp", pool)); /* Move the tmp-link to link. */ return svn_io_file_rename2(dst_tmp, dst, FALSE, pool); #else return svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL, _("Symbolic links are not supported on this " "platform")); #endif } /* Temporary directory name cache for svn_io_temp_dir() */ static volatile svn_atomic_t temp_dir_init_state = 0; static const char *temp_dir; /* Helper function to initialize temp dir. Passed to svn_atomic__init_once */ static svn_error_t * init_temp_dir(void *baton, apr_pool_t *scratch_pool) { /* Global pool for the temp path */ apr_pool_t *global_pool = svn_pool_create(NULL); const char *dir; apr_status_t apr_err = apr_temp_dir_get(&dir, scratch_pool); if (apr_err) return svn_error_wrap_apr(apr_err, _("Can't find a temporary directory")); SVN_ERR(cstring_to_utf8(&dir, dir, scratch_pool)); dir = svn_dirent_internal_style(dir, scratch_pool); SVN_ERR(svn_dirent_get_absolute(&temp_dir, dir, global_pool)); return SVN_NO_ERROR; } svn_error_t * svn_io_temp_dir(const char **dir, apr_pool_t *pool) { SVN_ERR(svn_atomic__init_once(&temp_dir_init_state, init_temp_dir, NULL, pool)); *dir = apr_pstrdup(pool, temp_dir); return SVN_NO_ERROR; } /*** Creating, copying and appending files. ***/ /* Transfer the contents of FROM_FILE to TO_FILE, using POOL for temporary * allocations. * * NOTE: We don't use apr_copy_file() for this, since it takes filenames * as parameters. Since we want to copy to a temporary file * and rename for atomicity (see below), this would require an extra * close/open pair, which can be expensive, especially on * remote file systems. */ static apr_status_t copy_contents(apr_file_t *from_file, apr_file_t *to_file, apr_pool_t *pool) { /* Copy bytes till the cows come home. */ while (1) { char buf[SVN__STREAM_CHUNK_SIZE]; apr_size_t bytes_this_time = sizeof(buf); apr_status_t read_err; apr_status_t write_err; /* Read 'em. */ read_err = apr_file_read(from_file, buf, &bytes_this_time); if (read_err && !APR_STATUS_IS_EOF(read_err)) { return read_err; } /* Write 'em. */ write_err = apr_file_write_full(to_file, buf, bytes_this_time, NULL); if (write_err) { return write_err; } if (read_err && APR_STATUS_IS_EOF(read_err)) { /* Return the results of this close: an error, or success. */ return APR_SUCCESS; } } /* NOTREACHED */ } svn_error_t * svn_io_copy_file(const char *src, const char *dst, svn_boolean_t copy_perms, apr_pool_t *pool) { apr_file_t *from_file, *to_file; apr_status_t apr_err; const char *dst_tmp; svn_error_t *err; /* ### NOTE: sometimes src == dst. In this case, because we copy to a ### temporary file, and then rename over the top of the destination, ### the net result is resetting the permissions on src/dst. ### ### Note: specifically, this can happen during a switch when the desired ### permissions for a file change from one branch to another. See ### switch_tests 17. ### ### ... yes, we should avoid copying to the same file, and we should ### make the "reset perms" explicit. The switch *happens* to work ### because of this copy-to-temp-then-rename implementation. If it ### weren't for that, the switch would break. */ #ifdef CHECK_FOR_SAME_FILE if (strcmp(src, dst) == 0) return SVN_NO_ERROR; #endif SVN_ERR(svn_io_file_open(&from_file, src, APR_READ, APR_OS_DEFAULT, pool)); /* For atomicity, we copy to a tmp file and then rename the tmp file over the real destination. */ SVN_ERR(svn_io_open_unique_file3(&to_file, &dst_tmp, svn_dirent_dirname(dst, pool), svn_io_file_del_none, pool, pool)); apr_err = copy_contents(from_file, to_file, pool); if (apr_err) { err = svn_error_wrap_apr(apr_err, _("Can't copy '%s' to '%s'"), svn_dirent_local_style(src, pool), svn_dirent_local_style(dst_tmp, pool)); } else err = NULL; err = svn_error_compose_create(err, svn_io_file_close(from_file, pool)); err = svn_error_compose_create(err, svn_io_file_close(to_file, pool)); if (err) { return svn_error_compose_create( err, svn_io_remove_file2(dst_tmp, TRUE, pool)); } /* If copying perms, set the perms on dst_tmp now, so they will be atomically inherited in the upcoming rename. But note that we had to wait until now to set perms, because if they say read-only, then we'd have failed filling dst_tmp's contents. */ if (copy_perms) SVN_ERR(svn_io_copy_perms(src, dst_tmp, pool)); return svn_error_trace(svn_io_file_rename2(dst_tmp, dst, FALSE, pool)); } #if !defined(WIN32) && !defined(__OS2__) /* Wrapper for apr_file_perms_set(), taking a UTF8-encoded filename. */ static svn_error_t * file_perms_set(const char *fname, apr_fileperms_t perms, apr_pool_t *pool) { const char *fname_apr; apr_status_t status; SVN_ERR(cstring_from_utf8(&fname_apr, fname, pool)); status = apr_file_perms_set(fname_apr, perms); if (status) return svn_error_wrap_apr(status, _("Can't set permissions on '%s'"), fname); else return SVN_NO_ERROR; } /* Set permissions PERMS on the FILE. This is a cheaper variant of the * file_perms_set wrapper() function because no locale-dependent string * conversion is required. POOL will be used for allocations. */ static svn_error_t * file_perms_set2(apr_file_t* file, apr_fileperms_t perms, apr_pool_t *pool) { const char *fname_apr; apr_status_t status; status = apr_file_name_get(&fname_apr, file); if (status) return svn_error_wrap_apr(status, _("Can't get file name")); status = apr_file_perms_set(fname_apr, perms); if (status) return svn_error_wrap_apr(status, _("Can't set permissions on '%s'"), try_utf8_from_internal_style(fname_apr, pool)); else return SVN_NO_ERROR; } #endif /* !WIN32 && !__OS2__ */ svn_error_t * svn_io_copy_perms(const char *src, const char *dst, apr_pool_t *pool) { /* ### On Windows or OS/2, apr_file_perms_set always returns APR_ENOTIMPL, and the path passed to apr_file_perms_set must be encoded in the platform-specific path encoding; not necessary UTF-8. We need a platform-specific implementation to get the permissions right. */ #if !defined(WIN32) && !defined(__OS2__) { apr_finfo_t finfo; svn_node_kind_t kind; svn_boolean_t is_special; svn_error_t *err; /* If DST is a symlink, don't bother copying permissions. */ SVN_ERR(svn_io_check_special_path(dst, &kind, &is_special, pool)); if (is_special) return SVN_NO_ERROR; SVN_ERR(svn_io_stat(&finfo, src, APR_FINFO_PROT, pool)); err = file_perms_set(dst, finfo.protection, pool); if (err) { /* We shouldn't be able to get APR_INCOMPLETE or APR_ENOTIMPL here under normal circumstances, because the perms themselves came from a call to apr_file_info_get(), and we already know this is the non-Win32 case. But if it does happen, it's not an error. */ if (APR_STATUS_IS_INCOMPLETE(err->apr_err) || APR_STATUS_IS_ENOTIMPL(err->apr_err)) svn_error_clear(err); else { return svn_error_quick_wrapf( err, _("Can't set permissions on '%s'"), svn_dirent_local_style(dst, pool)); } } } #endif /* !WIN32 && !__OS2__ */ return SVN_NO_ERROR; } svn_error_t * svn_io_append_file(const char *src, const char *dst, apr_pool_t *pool) { apr_status_t apr_err; const char *src_apr, *dst_apr; SVN_ERR(cstring_from_utf8(&src_apr, src, pool)); SVN_ERR(cstring_from_utf8(&dst_apr, dst, pool)); apr_err = apr_file_append(src_apr, dst_apr, APR_OS_DEFAULT, pool); if (apr_err) return svn_error_wrap_apr(apr_err, _("Can't append '%s' to '%s'"), svn_dirent_local_style(src, pool), svn_dirent_local_style(dst, pool)); return SVN_NO_ERROR; } svn_error_t *svn_io_copy_dir_recursively(const char *src, const char *dst_parent, const char *dst_basename, svn_boolean_t copy_perms, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool) { svn_node_kind_t kind; apr_status_t status; const char *dst_path; apr_dir_t *this_dir; apr_finfo_t this_entry; apr_int32_t flags = APR_FINFO_TYPE | APR_FINFO_NAME; /* Make a subpool for recursion */ apr_pool_t *subpool = svn_pool_create(pool); /* The 'dst_path' is simply dst_parent/dst_basename */ dst_path = svn_dirent_join(dst_parent, dst_basename, pool); /* Sanity checks: SRC and DST_PARENT are directories, and DST_BASENAME doesn't already exist in DST_PARENT. */ SVN_ERR(svn_io_check_path(src, &kind, subpool)); if (kind != svn_node_dir) return svn_error_createf(SVN_ERR_NODE_UNEXPECTED_KIND, NULL, _("Source '%s' is not a directory"), svn_dirent_local_style(src, pool)); SVN_ERR(svn_io_check_path(dst_parent, &kind, subpool)); if (kind != svn_node_dir) return svn_error_createf(SVN_ERR_NODE_UNEXPECTED_KIND, NULL, _("Destination '%s' is not a directory"), svn_dirent_local_style(dst_parent, pool)); SVN_ERR(svn_io_check_path(dst_path, &kind, subpool)); if (kind != svn_node_none) return svn_error_createf(SVN_ERR_ENTRY_EXISTS, NULL, _("Destination '%s' already exists"), svn_dirent_local_style(dst_path, pool)); /* Create the new directory. */ /* ### TODO: copy permissions (needs apr_file_attrs_get()) */ SVN_ERR(svn_io_dir_make(dst_path, APR_OS_DEFAULT, pool)); /* Loop over the dirents in SRC. ('.' and '..' are auto-excluded) */ SVN_ERR(svn_io_dir_open(&this_dir, src, subpool)); for (status = apr_dir_read(&this_entry, flags, this_dir); status == APR_SUCCESS; status = apr_dir_read(&this_entry, flags, this_dir)) { if ((this_entry.name[0] == '.') && ((this_entry.name[1] == '\0') || ((this_entry.name[1] == '.') && (this_entry.name[2] == '\0')))) { continue; } else { const char *src_target, *entryname_utf8; if (cancel_func) SVN_ERR(cancel_func(cancel_baton)); SVN_ERR(entry_name_to_utf8(&entryname_utf8, this_entry.name, src, subpool)); src_target = svn_dirent_join(src, entryname_utf8, subpool); if (this_entry.filetype == APR_REG) /* regular file */ { const char *dst_target = svn_dirent_join(dst_path, entryname_utf8, subpool); SVN_ERR(svn_io_copy_file(src_target, dst_target, copy_perms, subpool)); } else if (this_entry.filetype == APR_LNK) /* symlink */ { const char *dst_target = svn_dirent_join(dst_path, entryname_utf8, subpool); SVN_ERR(svn_io_copy_link(src_target, dst_target, subpool)); } else if (this_entry.filetype == APR_DIR) /* recurse */ { /* Prevent infinite recursion by filtering off our newly created destination path. */ if (strcmp(src, dst_parent) == 0 && strcmp(entryname_utf8, dst_basename) == 0) continue; SVN_ERR(svn_io_copy_dir_recursively (src_target, dst_path, entryname_utf8, copy_perms, cancel_func, cancel_baton, subpool)); } /* ### support other APR node types someday?? */ } } if (! (APR_STATUS_IS_ENOENT(status))) return svn_error_wrap_apr(status, _("Can't read directory '%s'"), svn_dirent_local_style(src, pool)); status = apr_dir_close(this_dir); if (status) return svn_error_wrap_apr(status, _("Error closing directory '%s'"), svn_dirent_local_style(src, pool)); /* Free any memory used by recursion */ svn_pool_destroy(subpool); return SVN_NO_ERROR; } svn_error_t * svn_io_make_dir_recursively(const char *path, apr_pool_t *pool) { const char *path_apr; apr_status_t apr_err; if (svn_path_is_empty(path)) /* Empty path (current dir) is assumed to always exist, so we do nothing, per docs. */ return SVN_NO_ERROR; SVN_ERR(cstring_from_utf8(&path_apr, path, pool)); apr_err = apr_dir_make_recursive(path_apr, APR_OS_DEFAULT, pool); #ifdef WIN32 /* Don't retry on ERROR_ACCESS_DENIED, as that typically signals a permanent error */ if (apr_err == APR_FROM_OS_ERROR(ERROR_SHARING_VIOLATION)) WIN32_RETRY_LOOP(apr_err, apr_dir_make_recursive(path_apr, APR_OS_DEFAULT, pool)); #endif if (apr_err) return svn_error_wrap_apr(apr_err, _("Can't make directory '%s'"), svn_dirent_local_style(path, pool)); return SVN_NO_ERROR; } svn_error_t * svn_io_file_create_bytes(const char *file, const void *contents, apr_size_t length, apr_pool_t *scratch_pool) { apr_file_t *f; apr_size_t written; svn_error_t *err = SVN_NO_ERROR; SVN_ERR(svn_io_file_open(&f, file, (APR_WRITE | APR_CREATE | APR_EXCL), APR_OS_DEFAULT, scratch_pool)); if (length) err = svn_io_file_write_full(f, contents, length, &written, scratch_pool); err = svn_error_compose_create( err, svn_io_file_close(f, scratch_pool)); if (err) { /* Our caller doesn't know if we left a file or not if we return an error. Better to cleanup after ourselves if we created the file. */ return svn_error_trace( svn_error_compose_create( err, svn_io_remove_file2(file, TRUE, scratch_pool))); } return SVN_NO_ERROR; } svn_error_t * svn_io_file_create(const char *file, const char *contents, apr_pool_t *pool) { return svn_error_trace(svn_io_file_create_bytes(file, contents, contents ? strlen(contents) : 0, pool)); } svn_error_t * svn_io_file_create_empty(const char *file, apr_pool_t *scratch_pool) { return svn_error_trace(svn_io_file_create_bytes(file, NULL, 0, scratch_pool)); } svn_error_t * svn_io_dir_file_copy(const char *src_path, const char *dest_path, const char *file, apr_pool_t *pool) { const char *file_dest_path = svn_dirent_join(dest_path, file, pool); const char *file_src_path = svn_dirent_join(src_path, file, pool); return svn_error_trace( svn_io_copy_file(file_src_path, file_dest_path, TRUE, pool)); } /*** Modtime checking. ***/ svn_error_t * svn_io_file_affected_time(apr_time_t *apr_time, const char *path, apr_pool_t *pool) { apr_finfo_t finfo; SVN_ERR(svn_io_stat(&finfo, path, APR_FINFO_MIN | APR_FINFO_LINK, pool)); *apr_time = finfo.mtime; return SVN_NO_ERROR; } svn_error_t * svn_io_set_file_affected_time(apr_time_t apr_time, const char *path, apr_pool_t *pool) { apr_status_t status; const char *native_path; SVN_ERR(cstring_from_utf8(&native_path, path, pool)); status = apr_file_mtime_set(native_path, apr_time, pool); if (status) return svn_error_wrap_apr(status, _("Can't set access time of '%s'"), svn_dirent_local_style(path, pool)); return SVN_NO_ERROR; } void svn_io_sleep_for_timestamps(const char *path, apr_pool_t *pool) { apr_time_t now, then; svn_error_t *err; char *sleep_env_var; sleep_env_var = getenv(SVN_SLEEP_ENV_VAR); if (sleep_env_var && apr_strnatcasecmp(sleep_env_var, "yes") == 0) return; /* Allow skipping for testing */ now = apr_time_now(); /* Calculate 0.02 seconds after the next second wallclock tick. */ then = apr_time_make(apr_time_sec(now) + 1, APR_USEC_PER_SEC / 50); /* Worst case is waiting one second, so we can use that time to determine if we can sleep shorter than that */ if (path) { apr_finfo_t finfo; err = svn_io_stat(&finfo, path, APR_FINFO_MTIME | APR_FINFO_LINK, pool); if (err) { svn_error_clear(err); /* Fall back on original behavior */ } else if (finfo.mtime % APR_USEC_PER_SEC) { /* Very simplistic but safe approach: If the filesystem has < sec mtime we can be reasonably sure that the filesystem has some sub-second resolution. On Windows it is likely to be sub-millisecond; on Linux systems it depends on the filesystem, ext4 is typically 1ms, 4ms or 10ms resolution. ## Perhaps find a better algorithm here. This will fail once in every 1000 cases on a millisecond precision filesystem if the mtime happens to be an exact second. But better to fail once in every thousand cases than every time, like we did before. Note for further research on algorithm: FAT32 has < 1 sec precision on ctime, but 2 sec on mtime. Linux/ext4 with CONFIG_HZ=250 has high resolution apr_time_now and although the filesystem timestamps have similar high precision they are only updated with a coarser 4ms resolution. */ /* 10 milliseconds after now. */ #ifndef SVN_HI_RES_SLEEP_MS #define SVN_HI_RES_SLEEP_MS 10 #endif then = now + apr_time_from_msec(SVN_HI_RES_SLEEP_MS); } /* Remove time taken to do stat() from sleep. */ now = apr_time_now(); } if (now >= then) return; /* Passing negative values may suspend indefinitely (Windows) */ /* (t < 1000 will be round to 0 in apr) */ if (then - now < 1000) apr_sleep(1000); else apr_sleep(then - now); } svn_error_t * svn_io_filesizes_different_p(svn_boolean_t *different_p, const char *file1, const char *file2, apr_pool_t *pool) { apr_finfo_t finfo1; apr_finfo_t finfo2; apr_status_t status; const char *file1_apr, *file2_apr; /* Not using svn_io_stat() because don't want to generate svn_error_t objects for non-error conditions. */ SVN_ERR(cstring_from_utf8(&file1_apr, file1, pool)); SVN_ERR(cstring_from_utf8(&file2_apr, file2, pool)); /* Stat both files */ status = apr_stat(&finfo1, file1_apr, APR_FINFO_MIN, pool); if (status) { /* If we got an error stat'ing a file, it could be because the file was removed... or who knows. Whatever the case, we don't know if the filesizes are definitely different, so assume that they're not. */ *different_p = FALSE; return SVN_NO_ERROR; } status = apr_stat(&finfo2, file2_apr, APR_FINFO_MIN, pool); if (status) { /* See previous comment. */ *different_p = FALSE; return SVN_NO_ERROR; } /* Examine file sizes */ if (finfo1.size == finfo2.size) *different_p = FALSE; else *different_p = TRUE; return SVN_NO_ERROR; } svn_error_t * svn_io_filesizes_three_different_p(svn_boolean_t *different_p12, svn_boolean_t *different_p23, svn_boolean_t *different_p13, const char *file1, const char *file2, const char *file3, apr_pool_t *scratch_pool) { apr_finfo_t finfo1, finfo2, finfo3; apr_status_t status1, status2, status3; const char *file1_apr, *file2_apr, *file3_apr; /* Not using svn_io_stat() because don't want to generate svn_error_t objects for non-error conditions. */ SVN_ERR(cstring_from_utf8(&file1_apr, file1, scratch_pool)); SVN_ERR(cstring_from_utf8(&file2_apr, file2, scratch_pool)); SVN_ERR(cstring_from_utf8(&file3_apr, file3, scratch_pool)); /* Stat all three files */ status1 = apr_stat(&finfo1, file1_apr, APR_FINFO_MIN, scratch_pool); status2 = apr_stat(&finfo2, file2_apr, APR_FINFO_MIN, scratch_pool); status3 = apr_stat(&finfo3, file3_apr, APR_FINFO_MIN, scratch_pool); /* If we got an error stat'ing a file, it could be because the file was removed... or who knows. Whatever the case, we don't know if the filesizes are definitely different, so assume that they're not. */ *different_p12 = !status1 && !status2 && finfo1.size != finfo2.size; *different_p23 = !status2 && !status3 && finfo2.size != finfo3.size; *different_p13 = !status1 && !status3 && finfo1.size != finfo3.size; return SVN_NO_ERROR; } svn_error_t * svn_io_file_checksum2(svn_checksum_t **checksum, const char *file, svn_checksum_kind_t kind, apr_pool_t *pool) { svn_stream_t *file_stream; apr_file_t* f; SVN_ERR(svn_io_file_open(&f, file, APR_READ, APR_OS_DEFAULT, pool)); file_stream = svn_stream_from_aprfile2(f, FALSE, pool); SVN_ERR(svn_stream_contents_checksum(checksum, file_stream, kind, pool, pool)); return SVN_NO_ERROR; } svn_error_t * svn_io_file_checksum(unsigned char digest[], const char *file, apr_pool_t *pool) { svn_checksum_t *checksum; SVN_ERR(svn_io_file_checksum2(&checksum, file, svn_checksum_md5, pool)); memcpy(digest, checksum->digest, APR_MD5_DIGESTSIZE); return SVN_NO_ERROR; } /*** Permissions and modes. ***/ #if !defined(WIN32) && !defined(__OS2__) /* Given the file specified by PATH, attempt to create an identical version of it owned by the current user. This is done by moving it to a temporary location, copying the file back to its old path, then deleting the temporarily moved version. All temporary allocations are done in POOL. */ static svn_error_t * reown_file(const char *path, apr_pool_t *pool) { const char *unique_name; SVN_ERR(svn_io_open_unique_file3(NULL, &unique_name, svn_dirent_dirname(path, pool), svn_io_file_del_none, pool, pool)); SVN_ERR(svn_io_file_rename2(path, unique_name, FALSE, pool)); SVN_ERR(svn_io_copy_file(unique_name, path, TRUE, pool)); return svn_error_trace(svn_io_remove_file2(unique_name, FALSE, pool)); } /* Determine what the PERMS for a new file should be by looking at the permissions of a temporary file that we create in DIRECTORY. DIRECTORY can be NULL in which case the system temporary dir is used. Unfortunately, umask() as defined in POSIX provides no thread-safe way to get at the current value of the umask, so what we're doing here is the only way we have to determine which combination of write bits (User/Group/World) should be set by default. Make temporary allocations in SCRATCH_POOL. */ static svn_error_t * get_default_file_perms(apr_fileperms_t *perms, const char *directory, apr_pool_t *scratch_pool) { /* the default permissions as read from the temp folder */ static apr_fileperms_t default_perms = 0; /* Technically, this "racy": Multiple threads may use enter here and try to figure out the default permission concurrently. That's fine since they will end up with the same results. Even more technical, apr_fileperms_t is an atomic type on 32+ bit machines. */ if (default_perms == 0) { apr_finfo_t finfo; apr_file_t *fd; const char *fname_base, *fname; apr_uint32_t randomish; svn_error_t *err; /* Get the perms for a newly created file to find out what bits should be set. Explicitly delete the file because we want this file to be as short-lived as possible since its presence means other processes may have to try multiple names. Using svn_io_open_uniquely_named() here because other tempfile creation functions tweak the permission bits of files they create. Note that APR pool structures are allocated as the first item in their first memory page (with e.g. 4kB granularity), i.e. the lower bits tend to be identical between pool instances. That is particularly true for the MMAPed allocator. */ randomish = ((apr_uint32_t)(apr_uintptr_t)scratch_pool + (apr_uint32_t)((apr_uintptr_t)scratch_pool / 4096) + (apr_uint32_t)apr_time_now()); fname_base = apr_psprintf(scratch_pool, "svn-%08x", randomish); SVN_ERR(svn_io_open_uniquely_named(&fd, &fname, directory, fname_base, NULL, svn_io_file_del_none, scratch_pool, scratch_pool)); err = svn_io_file_info_get(&finfo, APR_FINFO_PROT, fd, scratch_pool); err = svn_error_compose_create(err, svn_io_file_close(fd, scratch_pool)); err = svn_error_compose_create(err, svn_io_remove_file2(fname, TRUE, scratch_pool)); SVN_ERR(err); *perms = finfo.protection; default_perms = finfo.protection; } else *perms = default_perms; return SVN_NO_ERROR; } /* OR together permission bits of the file FD and the default permissions of a file as determined by get_default_file_perms(). DIRECTORY is used to create temporary files, DIRECTORY can be NULL. Do temporary allocations in SCRATCH_POOL. */ static svn_error_t * merge_default_file_perms(apr_file_t *fd, apr_fileperms_t *perms, const char *directory, apr_pool_t *scratch_pool) { apr_finfo_t finfo; apr_fileperms_t default_perms; SVN_ERR(get_default_file_perms(&default_perms, directory, scratch_pool)); SVN_ERR(svn_io_file_info_get(&finfo, APR_FINFO_PROT, fd, scratch_pool)); /* Glom the perms together. */ *perms = default_perms | finfo.protection; return SVN_NO_ERROR; } /* This is a helper function for the svn_io_set_file_read* functions that attempts to honor the users umask when dealing with permission changes. It is a no-op when invoked on a symlink. */ static svn_error_t * io_set_file_perms(const char *path, svn_boolean_t change_readwrite, svn_boolean_t enable_write, svn_boolean_t change_executable, svn_boolean_t executable, svn_boolean_t ignore_enoent, apr_pool_t *pool) { apr_status_t status; const char *path_apr; apr_finfo_t finfo; apr_fileperms_t perms_to_set; SVN_ERR(cstring_from_utf8(&path_apr, path, pool)); /* Try to change only a minimal amount of the perms first by getting the current perms and adding bits only on where read perms are granted. If this fails fall through to just setting file attributes. */ status = apr_stat(&finfo, path_apr, APR_FINFO_PROT | APR_FINFO_LINK, pool); if (status) { if (ignore_enoent && (APR_STATUS_IS_ENOENT(status) || SVN__APR_STATUS_IS_ENOTDIR(status))) return SVN_NO_ERROR; else if (status != APR_ENOTIMPL) return svn_error_wrap_apr(status, _("Can't change perms of file '%s'"), svn_dirent_local_style(path, pool)); return SVN_NO_ERROR; } if (finfo.filetype == APR_LNK) return SVN_NO_ERROR; perms_to_set = finfo.protection; if (change_readwrite) { if (enable_write) /* Make read-write. */ { /* Tweak the owner bits only. The group/other bits aren't safe to * touch because we may end up setting them in undesired ways. */ perms_to_set |= (APR_UREAD|APR_UWRITE); } else { if (finfo.protection & APR_UREAD) perms_to_set &= ~APR_UWRITE; if (finfo.protection & APR_GREAD) perms_to_set &= ~APR_GWRITE; if (finfo.protection & APR_WREAD) perms_to_set &= ~APR_WWRITE; } } if (change_executable) { if (executable) { if (finfo.protection & APR_UREAD) perms_to_set |= APR_UEXECUTE; if (finfo.protection & APR_GREAD) perms_to_set |= APR_GEXECUTE; if (finfo.protection & APR_WREAD) perms_to_set |= APR_WEXECUTE; } else { if (finfo.protection & APR_UREAD) perms_to_set &= ~APR_UEXECUTE; if (finfo.protection & APR_GREAD) perms_to_set &= ~APR_GEXECUTE; if (finfo.protection & APR_WREAD) perms_to_set &= ~APR_WEXECUTE; } } /* If we aren't changing anything then just return, this saves some system calls and helps with shared working copies */ if (perms_to_set == finfo.protection) return SVN_NO_ERROR; status = apr_file_perms_set(path_apr, perms_to_set); if (!status) return SVN_NO_ERROR; if (APR_STATUS_IS_EPERM(status)) { /* We don't have permissions to change the permissions! Try a move, copy, and delete workaround to see if we can get the file owned by us. If these succeed, try the permissions set again. Note that we only attempt this in the stat-available path. This assumes that the move-copy workaround will only be helpful on platforms that implement apr_stat. */ SVN_ERR(reown_file(path, pool)); status = apr_file_perms_set(path_apr, perms_to_set); } if (!status) return SVN_NO_ERROR; if (ignore_enoent && APR_STATUS_IS_ENOENT(status)) return SVN_NO_ERROR; else if (status == APR_ENOTIMPL) { /* At least try to set the attributes. */ apr_fileattrs_t attrs = 0; apr_fileattrs_t attrs_values = 0; if (change_readwrite) { attrs = APR_FILE_ATTR_READONLY; if (!enable_write) attrs_values = APR_FILE_ATTR_READONLY; } if (change_executable) { attrs = APR_FILE_ATTR_EXECUTABLE; if (executable) attrs_values = APR_FILE_ATTR_EXECUTABLE; } status = apr_file_attrs_set(path_apr, attrs, attrs_values, pool); } return svn_error_wrap_apr(status, _("Can't change perms of file '%s'"), svn_dirent_local_style(path, pool)); } #endif /* !WIN32 && !__OS2__ */ #ifdef WIN32 /* This is semantically the same as the APR utf8_to_unicode_path function, but reimplemented here because APR does not export it. */ svn_error_t* svn_io__utf8_to_unicode_longpath(const WCHAR **result, const char *source, apr_pool_t *result_pool) { /* This is correct, we don't twist the filename if it will * definitely be shorter than 248 characters. It merits some * performance testing to see if this has any effect, but there * seem to be applications that get confused by the resulting * Unicode \\?\ style file names, especially if they use argv[0] * or call the Win32 API functions such as GetModuleName, etc. * Not every application is prepared to handle such names. * * Note also this is shorter than MAX_PATH, as directory paths * are actually limited to 248 characters. * * Note that a utf-8 name can never result in more wide chars * than the original number of utf-8 narrow chars. */ const WCHAR *prefix = NULL; const size_t srclen = strlen(source); WCHAR *buffer; if (srclen > 248) { if (svn_ctype_isalpha(source[0]) && source[1] == ':' && (source[2] == '/' || source[2] == '\\')) { /* This is an ordinary absolute path. */ prefix = L"\\\\?\\"; } else if ((source[0] == '/' || source[0] == '\\') && (source[1] == '/' || source[1] == '\\') && source[2] != '?') { /* This is a UNC path */ source += 2; /* Skip the leading slashes */ prefix = L"\\\\?\\UNC\\"; } } SVN_ERR(svn_utf__win32_utf8_to_utf16(&(const WCHAR*)buffer, source, prefix, result_pool)); /* Convert slashes to backslashes because the \\?\ path format does not allow backslashes as path separators. */ *result = buffer; for (; *buffer; ++buffer) { if (*buffer == '/') *buffer = '\\'; } return SVN_NO_ERROR; } /* This is semantically the same as the APR unicode_to_utf8_path function, but reimplemented here because APR does not export it. */ static svn_error_t * io_unicode_to_utf8_path(const char **result, const WCHAR *source, apr_pool_t *result_pool) { const char *utf8_buffer; char *buffer; SVN_ERR(svn_utf__win32_utf16_to_utf8(&utf8_buffer, source, NULL, result_pool)); if (!*utf8_buffer) { *result = utf8_buffer; return SVN_NO_ERROR; } /* We know that the non-empty buffer returned from the UTF-16 to UTF-8 conversion function is in fact writable. */ buffer = (char*)utf8_buffer; /* Skip the leading 4 characters if the path begins \\?\, or substitute * // for the \\?\UNC\ path prefix, allocating the maximum string * length based on the remaining string, plus the trailing null. * then transform \\'s back into /'s since the \\?\ form never * allows '/' path separators, and APR always uses '/'s. */ if (0 == strncmp(buffer, "\\\\?\\", 4)) { buffer += 4; if (0 == strncmp(buffer, "UNC\\", 4)) { buffer += 2; *buffer = '/'; } } *result = buffer; for (; *buffer; ++buffer) { if (*buffer == '\\') *buffer = '/'; } return SVN_NO_ERROR; } static svn_error_t * io_win_file_attrs_set(const char *fname, DWORD attributes, DWORD attr_mask, apr_pool_t *pool) { /* this is an implementation of apr_file_attrs_set() but one that uses the proper Windows attributes instead of the apr attributes. This way, we can apply any Windows file and folder attributes even if apr doesn't implement them */ DWORD flags; const WCHAR *wfname; SVN_ERR(svn_io__utf8_to_unicode_longpath(&wfname, fname, pool)); flags = GetFileAttributesW(wfname); if (flags == 0xFFFFFFFF) return svn_error_wrap_apr(apr_get_os_error(), _("Can't get attributes of file '%s'"), svn_dirent_local_style(fname, pool)); flags &= ~attr_mask; flags |= (attributes & attr_mask); if (!SetFileAttributesW(wfname, flags)) return svn_error_wrap_apr(apr_get_os_error(), _("Can't set attributes of file '%s'"), svn_dirent_local_style(fname, pool)); return SVN_NO_ERROR; } static svn_error_t *win_init_dynamic_imports(void *baton, apr_pool_t *pool) { HMODULE kernel32 = GetModuleHandleW(L"kernel32.dll"); if (kernel32) { get_final_path_name_by_handle_proc = (GETFINALPATHNAMEBYHANDLE) GetProcAddress(kernel32, "GetFinalPathNameByHandleW"); set_file_information_by_handle_proc = (SetFileInformationByHandle_t) GetProcAddress(kernel32, "SetFileInformationByHandle"); } return SVN_NO_ERROR; } static svn_error_t * io_win_read_link(svn_string_t **dest, const char *path, apr_pool_t *pool) { SVN_ERR(svn_atomic__init_once(&win_dynamic_imports_state, win_init_dynamic_imports, NULL, pool)); if (get_final_path_name_by_handle_proc) { DWORD rv; apr_status_t status; apr_file_t *file; apr_os_file_t filehand; WCHAR wdest[APR_PATH_MAX]; const char *data; /* reserve one char for terminating zero. */ DWORD wdest_len = sizeof(wdest)/sizeof(wdest[0]) - 1; status = apr_file_open(&file, path, APR_OPENINFO, APR_OS_DEFAULT, pool); if (status) return svn_error_wrap_apr(status, _("Can't read contents of link")); apr_os_file_get(&filehand, file); rv = get_final_path_name_by_handle_proc( filehand, wdest, wdest_len, FILE_NAME_NORMALIZED | VOLUME_NAME_DOS); /* Save error code. */ status = apr_get_os_error(); /* Close file/directory handle in any case. */ apr_file_close(file); /* GetFinaPathNameByHandleW returns number of characters copied to * output buffer. Returns zero on error. Returns required buffer size * if supplied buffer is not enough. */ if (rv > wdest_len || rv == 0) { return svn_error_wrap_apr(status, _("Can't read contents of link")); } /* GetFinaPathNameByHandleW doesn't add terminating NUL. */ wdest[rv] = 0; SVN_ERR(io_unicode_to_utf8_path(&data, wdest, pool)); /* The result is already in the correct pool, so avoid copying it to create the string. */ *dest = svn_string_create_empty(pool); if (*data) { (*dest)->data = data; (*dest)->len = strlen(data); } return SVN_NO_ERROR; } else { return svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL, _("Symbolic links are not supported on this " "platform")); } } /* Wrapper around Windows API function SetFileInformationByHandle() that * returns APR status instead of boolean flag. */ static apr_status_t win32_set_file_information_by_handle(HANDLE hFile, int FileInformationClass, LPVOID lpFileInformation, DWORD dwBufferSize) { svn_error_clear(svn_atomic__init_once(&win_dynamic_imports_state, win_init_dynamic_imports, NULL, NULL)); if (!set_file_information_by_handle_proc) { return SVN_ERR_UNSUPPORTED_FEATURE; } if (!set_file_information_by_handle_proc(hFile, FileInformationClass, lpFileInformation, dwBufferSize)) { return apr_get_os_error(); } return APR_SUCCESS; } svn_error_t * svn_io__win_delete_file_on_close(apr_file_t *file, const char *path, apr_pool_t *pool) { FILE_DISPOSITION_INFO disposition_info; HANDLE hFile; apr_status_t status; apr_os_file_get(&hFile, file); disposition_info.DeleteFile = TRUE; status = win32_set_file_information_by_handle(hFile, FileDispositionInfo, &disposition_info, sizeof(disposition_info)); if (status) { return svn_error_wrap_apr(status, _("Can't remove file '%s'"), svn_dirent_local_style(path, pool)); } return SVN_NO_ERROR; } svn_error_t * svn_io__win_rename_open_file(apr_file_t *file, const char *from_path, const char *to_path, apr_pool_t *pool) { WCHAR *w_final_abspath; size_t path_len; size_t rename_size; FILE_RENAME_INFO *rename_info; HANDLE hFile; apr_status_t status; apr_os_file_get(&hFile, file); SVN_ERR(svn_io__utf8_to_unicode_longpath( &w_final_abspath, svn_dirent_local_style(to_path,pool), pool)); path_len = wcslen(w_final_abspath); rename_size = sizeof(*rename_info) + sizeof(WCHAR) * path_len; /* The rename info struct doesn't need hacks for long paths, so no ugly escaping calls here */ rename_info = apr_pcalloc(pool, rename_size); rename_info->ReplaceIfExists = TRUE; rename_info->FileNameLength = path_len; memcpy(rename_info->FileName, w_final_abspath, path_len * sizeof(WCHAR)); status = win32_set_file_information_by_handle(hFile, FileRenameInfo, rename_info, rename_size); if (APR_STATUS_IS_EACCES(status) || APR_STATUS_IS_EEXIST(status)) { /* Set the destination file writable because Windows will not allow us to rename when final_abspath is read-only. */ SVN_ERR(svn_io_set_file_read_write(to_path, TRUE, pool)); status = win32_set_file_information_by_handle(hFile, FileRenameInfo, rename_info, rename_size); } /* Windows returns Vista+ client accessing network share stored on Windows Server 2003 returns ERROR_ACCESS_DENIED. The same happens when Vista+ client access Windows Server 2008 with disabled SMBv2 protocol. So return SVN_ERR_UNSUPPORTED_FEATURE in this case like we do when SetFileInformationByHandle() is not available and let caller to handle it. See "Access denied error on checkout-commit after updating to 1.9.X" discussion on dev@s.a.o: http://svn.haxx.se/dev/archive-2015-09/0054.shtml */ if (status == APR_FROM_OS_ERROR(ERROR_ACCESS_DENIED)) { status = SVN_ERR_UNSUPPORTED_FEATURE; } if (status) { return svn_error_wrap_apr(status, _("Can't move '%s' to '%s'"), svn_dirent_local_style(from_path, pool), svn_dirent_local_style(to_path, pool)); } return SVN_NO_ERROR; } #endif /* WIN32 */ svn_error_t * svn_io_set_file_read_write_carefully(const char *path, svn_boolean_t enable_write, svn_boolean_t ignore_enoent, apr_pool_t *pool) { if (enable_write) return svn_io_set_file_read_write(path, ignore_enoent, pool); return svn_io_set_file_read_only(path, ignore_enoent, pool); } svn_error_t * svn_io_set_file_read_only(const char *path, svn_boolean_t ignore_enoent, apr_pool_t *pool) { /* On Windows and OS/2, just set the file attributes -- on unix call our internal function which attempts to honor the umask. */ #if !defined(WIN32) && !defined(__OS2__) return io_set_file_perms(path, TRUE, FALSE, FALSE, FALSE, ignore_enoent, pool); #else apr_status_t status; const char *path_apr; SVN_ERR(cstring_from_utf8(&path_apr, path, pool)); status = apr_file_attrs_set(path_apr, APR_FILE_ATTR_READONLY, APR_FILE_ATTR_READONLY, pool); if (status && status != APR_ENOTIMPL) if (!(ignore_enoent && (APR_STATUS_IS_ENOENT(status) || SVN__APR_STATUS_IS_ENOTDIR(status)))) return svn_error_wrap_apr(status, _("Can't set file '%s' read-only"), svn_dirent_local_style(path, pool)); return SVN_NO_ERROR; #endif } svn_error_t * svn_io_set_file_read_write(const char *path, svn_boolean_t ignore_enoent, apr_pool_t *pool) { /* On Windows and OS/2, just set the file attributes -- on unix call our internal function which attempts to honor the umask. */ #if !defined(WIN32) && !defined(__OS2__) return io_set_file_perms(path, TRUE, TRUE, FALSE, FALSE, ignore_enoent, pool); #else apr_status_t status; const char *path_apr; SVN_ERR(cstring_from_utf8(&path_apr, path, pool)); status = apr_file_attrs_set(path_apr, 0, APR_FILE_ATTR_READONLY, pool); if (status && status != APR_ENOTIMPL) if (!ignore_enoent || !APR_STATUS_IS_ENOENT(status)) return svn_error_wrap_apr(status, _("Can't set file '%s' read-write"), svn_dirent_local_style(path, pool)); return SVN_NO_ERROR; #endif } svn_error_t * svn_io_set_file_executable(const char *path, svn_boolean_t executable, svn_boolean_t ignore_enoent, apr_pool_t *pool) { /* On Windows and OS/2, just exit -- on unix call our internal function which attempts to honor the umask. */ #if (!defined(WIN32) && !defined(__OS2__)) return io_set_file_perms(path, FALSE, FALSE, TRUE, executable, ignore_enoent, pool); #else return SVN_NO_ERROR; #endif } svn_error_t * svn_io__is_finfo_read_only(svn_boolean_t *read_only, apr_finfo_t *file_info, apr_pool_t *pool) { #if defined(APR_HAS_USER) && !defined(WIN32) &&!defined(__OS2__) apr_status_t apr_err; apr_uid_t uid; apr_gid_t gid; *read_only = FALSE; apr_err = apr_uid_current(&uid, &gid, pool); if (apr_err) return svn_error_wrap_apr(apr_err, _("Error getting UID of process")); /* Check write bit for current user. */ if (apr_uid_compare(uid, file_info->user) == APR_SUCCESS) *read_only = !(file_info->protection & APR_UWRITE); else if (apr_gid_compare(gid, file_info->group) == APR_SUCCESS) *read_only = !(file_info->protection & APR_GWRITE); else *read_only = !(file_info->protection & APR_WWRITE); #else /* WIN32 || __OS2__ || !APR_HAS_USER */ *read_only = (file_info->protection & APR_FREADONLY); #endif return SVN_NO_ERROR; } svn_error_t * svn_io__is_finfo_executable(svn_boolean_t *executable, apr_finfo_t *file_info, apr_pool_t *pool) { #if defined(APR_HAS_USER) && !defined(WIN32) &&!defined(__OS2__) apr_status_t apr_err; apr_uid_t uid; apr_gid_t gid; *executable = FALSE; apr_err = apr_uid_current(&uid, &gid, pool); if (apr_err) return svn_error_wrap_apr(apr_err, _("Error getting UID of process")); /* Check executable bit for current user. */ if (apr_uid_compare(uid, file_info->user) == APR_SUCCESS) *executable = (file_info->protection & APR_UEXECUTE); else if (apr_gid_compare(gid, file_info->group) == APR_SUCCESS) *executable = (file_info->protection & APR_GEXECUTE); else *executable = (file_info->protection & APR_WEXECUTE); #else /* WIN32 || __OS2__ || !APR_HAS_USER */ *executable = FALSE; #endif return SVN_NO_ERROR; } svn_error_t * svn_io_is_file_executable(svn_boolean_t *executable, const char *path, apr_pool_t *pool) { #if defined(APR_HAS_USER) && !defined(WIN32) &&!defined(__OS2__) apr_finfo_t file_info; SVN_ERR(svn_io_stat(&file_info, path, APR_FINFO_PROT | APR_FINFO_OWNER, pool)); SVN_ERR(svn_io__is_finfo_executable(executable, &file_info, pool)); #else /* WIN32 || __OS2__ || !APR_HAS_USER */ *executable = FALSE; #endif return SVN_NO_ERROR; } /*** File locking. ***/ /* Clear all outstanding locks on ARG, an open apr_file_t *. */ static apr_status_t file_clear_locks(void *arg) { apr_status_t apr_err; apr_file_t *f = arg; /* Remove locks. */ apr_err = apr_file_unlock(f); if (apr_err) return apr_err; return 0; } svn_error_t * svn_io_lock_open_file(apr_file_t *lockfile_handle, svn_boolean_t exclusive, svn_boolean_t nonblocking, apr_pool_t *pool) { int locktype = APR_FLOCK_SHARED; apr_status_t apr_err; const char *fname; if (exclusive) locktype = APR_FLOCK_EXCLUSIVE; if (nonblocking) locktype |= APR_FLOCK_NONBLOCK; /* We need this only in case of an error but this is cheap to get - * so we do it here for clarity. */ apr_err = apr_file_name_get(&fname, lockfile_handle); if (apr_err) return svn_error_wrap_apr(apr_err, _("Can't get file name")); /* Get lock on the filehandle. */ apr_err = apr_file_lock(lockfile_handle, locktype); /* In deployments with two or more multithreaded servers running on the same system serving two or more fsfs repositories it is possible for a deadlock to occur when getting a write lock on db/txn-current-lock: Process 1 Process 2 --------- --------- thread 1: get lock in repos A thread 1: get lock in repos B thread 2: block getting lock in repos A thread 2: try to get lock in B *** deadlock *** Retry for a while for the deadlock to clear. */ FILE_LOCK_RETRY_LOOP(apr_err, apr_file_lock(lockfile_handle, locktype)); if (apr_err) { switch (locktype & APR_FLOCK_TYPEMASK) { case APR_FLOCK_SHARED: return svn_error_wrap_apr(apr_err, _("Can't get shared lock on file '%s'"), try_utf8_from_internal_style(fname, pool)); case APR_FLOCK_EXCLUSIVE: return svn_error_wrap_apr(apr_err, _("Can't get exclusive lock on file '%s'"), try_utf8_from_internal_style(fname, pool)); default: SVN_ERR_MALFUNCTION(); } } /* On Windows, a process may not release file locks before closing the handle, and in this case the outstanding locks are unlocked by the OS. However, this is not recommended, because the actual unlocking may be postponed depending on available system resources. We explicitly unlock the file as a part of the pool cleanup handler. */ apr_pool_cleanup_register(pool, lockfile_handle, file_clear_locks, apr_pool_cleanup_null); return SVN_NO_ERROR; } svn_error_t * svn_io_unlock_open_file(apr_file_t *lockfile_handle, apr_pool_t *pool) { const char *fname; apr_status_t apr_err; /* We need this only in case of an error but this is cheap to get - * so we do it here for clarity. */ apr_err = apr_file_name_get(&fname, lockfile_handle); if (apr_err) return svn_error_wrap_apr(apr_err, _("Can't get file name")); /* The actual unlock attempt. */ apr_err = apr_file_unlock(lockfile_handle); if (apr_err) return svn_error_wrap_apr(apr_err, _("Can't unlock file '%s'"), try_utf8_from_internal_style(fname, pool)); apr_pool_cleanup_kill(pool, lockfile_handle, file_clear_locks); return SVN_NO_ERROR; } svn_error_t * svn_io_file_lock2(const char *lock_file, svn_boolean_t exclusive, svn_boolean_t nonblocking, apr_pool_t *pool) { int locktype = APR_FLOCK_SHARED; apr_file_t *lockfile_handle; apr_int32_t flags; if (exclusive) locktype = APR_FLOCK_EXCLUSIVE; flags = APR_READ; if (locktype == APR_FLOCK_EXCLUSIVE) flags |= APR_WRITE; /* locktype is never read after this block, so we don't need to bother setting it. If that were to ever change, uncomment the following block. if (nonblocking) locktype |= APR_FLOCK_NONBLOCK; */ SVN_ERR(svn_io_file_open(&lockfile_handle, lock_file, flags, APR_OS_DEFAULT, pool)); /* Get lock on the filehandle. */ return svn_io_lock_open_file(lockfile_handle, exclusive, nonblocking, pool); } svn_error_t * svn_io__file_lock_autocreate(const char *lock_file, apr_pool_t *pool) { svn_error_t *err = svn_io_file_lock2(lock_file, TRUE, FALSE, pool); if (err && APR_STATUS_IS_ENOENT(err->apr_err)) { /* No lock file? No big deal; these are just empty files anyway. Create it and try again. */ svn_error_clear(err); /* This file creation is racy. We don't care as long as file gets created at all. */ err = svn_io_file_create_empty(lock_file, pool); if (err && APR_STATUS_IS_EEXIST(err->apr_err)) { svn_error_clear(err); err = NULL; } /* Finally, lock the file - if it exists */ if (!err) err = svn_io_file_lock2(lock_file, TRUE, FALSE, pool); } return svn_error_trace(err); } /* Data consistency/coherency operations. */ svn_error_t *svn_io_file_flush_to_disk(apr_file_t *file, apr_pool_t *pool) { apr_os_file_t filehand; const char *fname; apr_status_t apr_err; /* We need this only in case of an error but this is cheap to get - * so we do it here for clarity. */ apr_err = apr_file_name_get(&fname, file); if (apr_err) return svn_error_wrap_apr(apr_err, _("Can't get file name")); /* ### In apr 1.4+ we could delegate most of this function to apr_file_sync(). The only major difference is that this doesn't contain the retry loop for EINTR on linux. */ /* First make sure that any user-space buffered data is flushed. */ SVN_ERR(svn_io_file_flush(file, pool)); apr_os_file_get(&filehand, file); /* Call the operating system specific function to actually force the data to disk. */ { #ifdef WIN32 if (! FlushFileBuffers(filehand)) return svn_error_wrap_apr(apr_get_os_error(), _("Can't flush file '%s' to disk"), try_utf8_from_internal_style(fname, pool)); #else int rv; do { #ifdef F_FULLFSYNC rv = fcntl(filehand, F_FULLFSYNC, 0); #else rv = fsync(filehand); #endif } while (rv == -1 && APR_STATUS_IS_EINTR(apr_get_os_error())); /* If the file is in a memory filesystem, fsync() may return EINVAL. Presumably the user knows the risks, and we can just ignore the error. */ if (rv == -1 && APR_STATUS_IS_EINVAL(apr_get_os_error())) return SVN_NO_ERROR; if (rv == -1) return svn_error_wrap_apr(apr_get_os_error(), _("Can't flush file '%s' to disk"), try_utf8_from_internal_style(fname, pool)); #endif } return SVN_NO_ERROR; } /* TODO write test for these two functions, then refactor. */ /* Set RESULT to an svn_stringbuf_t containing the contents of FILE. FILENAME is the FILE's on-disk APR-safe name, or NULL if that name isn't known. If CHECK_SIZE is TRUE, the function will attempt to first stat() the file to determine it's size before sucking its contents into the stringbuf. (Doing so can prevent unnecessary memory usage, an unwanted side effect of the stringbuf growth and reallocation mechanism.) */ static svn_error_t * stringbuf_from_aprfile(svn_stringbuf_t **result, const char *filename, apr_file_t *file, svn_boolean_t check_size, apr_pool_t *pool) { apr_size_t len; svn_error_t *err; svn_stringbuf_t *res = NULL; apr_size_t res_initial_len = SVN__STREAM_CHUNK_SIZE; char *buf; /* If our caller wants us to check the size of the file for efficient memory handling, we'll try to do so. */ if (check_size) { apr_finfo_t finfo = { 0 }; /* In some cases we get size 0 and no error for non files, so we also check for the name. (= cached in apr_file_t) */ if (! apr_file_info_get(&finfo, APR_FINFO_SIZE, file) && finfo.fname) { /* we've got the file length. Now, read it in one go. */ svn_boolean_t eof; res_initial_len = (apr_size_t)finfo.size; res = svn_stringbuf_create_ensure(res_initial_len, pool); SVN_ERR(svn_io_file_read_full2(file, res->data, res_initial_len, &res->len, &eof, pool)); res->data[res->len] = 0; *result = res; return SVN_NO_ERROR; } } /* XXX: We should check the incoming data for being of type binary. */ buf = apr_palloc(pool, SVN__STREAM_CHUNK_SIZE); res = svn_stringbuf_create_ensure(res_initial_len, pool); /* apr_file_read will not return data and eof in the same call. So this loop * is safe from missing read data. */ len = SVN__STREAM_CHUNK_SIZE; err = svn_io_file_read(file, buf, &len, pool); while (! err) { svn_stringbuf_appendbytes(res, buf, len); len = SVN__STREAM_CHUNK_SIZE; err = svn_io_file_read(file, buf, &len, pool); } /* Having read all the data we *expect* EOF */ if (err && !APR_STATUS_IS_EOF(err->apr_err)) return svn_error_trace(err); svn_error_clear(err); *result = res; return SVN_NO_ERROR; } svn_error_t * svn_stringbuf_from_file2(svn_stringbuf_t **result, const char *filename, apr_pool_t *pool) { apr_file_t *f; if (filename[0] == '-' && filename[1] == '\0') { apr_status_t apr_err; if ((apr_err = apr_file_open_stdin(&f, pool))) return svn_error_wrap_apr(apr_err, _("Can't open stdin")); SVN_ERR(stringbuf_from_aprfile(result, NULL, f, FALSE, pool)); } else { SVN_ERR(svn_io_file_open(&f, filename, APR_READ, APR_OS_DEFAULT, pool)); SVN_ERR(stringbuf_from_aprfile(result, filename, f, TRUE, pool)); } return svn_io_file_close(f, pool); } svn_error_t * svn_stringbuf_from_file(svn_stringbuf_t **result, const char *filename, apr_pool_t *pool) { if (filename[0] == '-' && filename[1] == '\0') return svn_error_create (SVN_ERR_UNSUPPORTED_FEATURE, NULL, _("Reading from stdin is disallowed")); return svn_stringbuf_from_file2(result, filename, pool); } svn_error_t * svn_stringbuf_from_aprfile(svn_stringbuf_t **result, apr_file_t *file, apr_pool_t *pool) { return stringbuf_from_aprfile(result, NULL, file, TRUE, pool); } /* Deletion. */ svn_error_t * svn_io_remove_file2(const char *path, svn_boolean_t ignore_enoent, apr_pool_t *scratch_pool) { apr_status_t apr_err; const char *path_apr; SVN_ERR(cstring_from_utf8(&path_apr, path, scratch_pool)); apr_err = apr_file_remove(path_apr, scratch_pool); #ifdef WIN32 /* If the target is read only NTFS reports EACCESS and FAT/FAT32 reports EEXIST */ if (APR_STATUS_IS_EACCES(apr_err) || APR_STATUS_IS_EEXIST(apr_err)) { /* Set the destination file writable because Windows will not allow us to delete when path is read-only */ SVN_ERR(svn_io_set_file_read_write(path, ignore_enoent, scratch_pool)); apr_err = apr_file_remove(path_apr, scratch_pool); } /* Check to make sure we aren't trying to delete a directory */ if (apr_err == APR_FROM_OS_ERROR(ERROR_ACCESS_DENIED) || apr_err == APR_FROM_OS_ERROR(ERROR_SHARING_VIOLATION)) { apr_finfo_t finfo; if (!apr_stat(&finfo, path_apr, APR_FINFO_TYPE, scratch_pool) && finfo.filetype == APR_REG) { WIN32_RETRY_LOOP(apr_err, apr_file_remove(path_apr, scratch_pool)); } } /* Just return the delete error */ #endif if (!apr_err) { return SVN_NO_ERROR; } else if (ignore_enoent && (APR_STATUS_IS_ENOENT(apr_err) || SVN__APR_STATUS_IS_ENOTDIR(apr_err))) { return SVN_NO_ERROR; } else { return svn_error_wrap_apr(apr_err, _("Can't remove file '%s'"), svn_dirent_local_style(path, scratch_pool)); } } svn_error_t * svn_io_remove_dir(const char *path, apr_pool_t *pool) { return svn_io_remove_dir2(path, FALSE, NULL, NULL, pool); } /* Mac OS X has a bug where if you're reading the contents of a directory via readdir in a loop, and you remove one of the entries in the directory and the directory has 338 or more files in it you will skip over some of the entries in the directory. Needless to say, this causes problems if you are using this kind of loop inside a function that is recursively deleting a directory, because when you get around to removing the directory it will still have something in it. A similar problem has been observed in other BSDs. This bug has since been fixed. See http://www.vnode.ch/fixing_seekdir for details. The workaround is to delete the files only _after_ the initial directory scan. A previous workaround involving rewinddir is problematic on Win32 and some NFS clients, notably NetBSD. See http://subversion.tigris.org/issues/show_bug.cgi?id=1896 and http://subversion.tigris.org/issues/show_bug.cgi?id=3501. */ /* Neither windows nor unix allows us to delete a non-empty directory. This is a function to perform the equivalent of 'rm -rf'. */ svn_error_t * svn_io_remove_dir2(const char *path, svn_boolean_t ignore_enoent, svn_cancel_func_t cancel_func, void *cancel_baton, apr_pool_t *pool) { svn_error_t *err; apr_pool_t *subpool; apr_hash_t *dirents; apr_hash_index_t *hi; /* Check for pending cancellation request. If we need to bail out, do so early. */ if (cancel_func) SVN_ERR(cancel_func(cancel_baton)); subpool = svn_pool_create(pool); err = svn_io_get_dirents3(&dirents, path, TRUE, subpool, subpool); if (err) { /* if the directory doesn't exist, our mission is accomplished */ if (ignore_enoent && (APR_STATUS_IS_ENOENT(err->apr_err) || SVN__APR_STATUS_IS_ENOTDIR(err->apr_err))) { svn_error_clear(err); return SVN_NO_ERROR; } return svn_error_trace(err); } for (hi = apr_hash_first(subpool, dirents); hi; hi = apr_hash_next(hi)) { const char *name = apr_hash_this_key(hi); const svn_io_dirent2_t *dirent = apr_hash_this_val(hi); const char *fullpath; fullpath = svn_dirent_join(path, name, subpool); if (dirent->kind == svn_node_dir) { /* Don't check for cancellation, the callee will immediately do so */ SVN_ERR(svn_io_remove_dir2(fullpath, FALSE, cancel_func, cancel_baton, subpool)); } else { if (cancel_func) SVN_ERR(cancel_func(cancel_baton)); err = svn_io_remove_file2(fullpath, FALSE, subpool); if (err) return svn_error_createf (err->apr_err, err, _("Can't remove '%s'"), svn_dirent_local_style(fullpath, subpool)); } } svn_pool_destroy(subpool); return svn_io_dir_remove_nonrecursive(path, pool); } svn_error_t * svn_io_get_dir_filenames(apr_hash_t **dirents, const char *path, apr_pool_t *pool) { return svn_error_trace(svn_io_get_dirents3(dirents, path, TRUE, pool, pool)); } svn_io_dirent2_t * svn_io_dirent2_create(apr_pool_t *result_pool) { svn_io_dirent2_t *dirent = apr_pcalloc(result_pool, sizeof(*dirent)); /*dirent->kind = svn_node_none; dirent->special = FALSE;*/ dirent->filesize = SVN_INVALID_FILESIZE; /*dirent->mtime = 0;*/ return dirent; } svn_io_dirent2_t * svn_io_dirent2_dup(const svn_io_dirent2_t *item, apr_pool_t *result_pool) { return apr_pmemdup(result_pool, item, sizeof(*item)); } svn_error_t * svn_io_get_dirents3(apr_hash_t **dirents, const char *path, svn_boolean_t only_check_type, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { apr_status_t status; apr_dir_t *this_dir; apr_finfo_t this_entry; apr_int32_t flags = APR_FINFO_TYPE | APR_FINFO_NAME; if (!only_check_type) flags |= APR_FINFO_SIZE | APR_FINFO_MTIME; *dirents = apr_hash_make(result_pool); SVN_ERR(svn_io_dir_open(&this_dir, path, scratch_pool)); for (status = apr_dir_read(&this_entry, flags, this_dir); status == APR_SUCCESS; status = apr_dir_read(&this_entry, flags, this_dir)) { if ((this_entry.name[0] == '.') && ((this_entry.name[1] == '\0') || ((this_entry.name[1] == '.') && (this_entry.name[2] == '\0')))) { continue; } else { const char *name; svn_io_dirent2_t *dirent = svn_io_dirent2_create(result_pool); SVN_ERR(entry_name_to_utf8(&name, this_entry.name, path, result_pool)); map_apr_finfo_to_node_kind(&(dirent->kind), &(dirent->special), &this_entry); if (!only_check_type) { dirent->filesize = this_entry.size; dirent->mtime = this_entry.mtime; } svn_hash_sets(*dirents, name, dirent); } } if (! (APR_STATUS_IS_ENOENT(status))) return svn_error_wrap_apr(status, _("Can't read directory '%s'"), svn_dirent_local_style(path, scratch_pool)); status = apr_dir_close(this_dir); if (status) return svn_error_wrap_apr(status, _("Error closing directory '%s'"), svn_dirent_local_style(path, scratch_pool)); return SVN_NO_ERROR; } svn_error_t * svn_io_stat_dirent2(const svn_io_dirent2_t **dirent_p, const char *path, svn_boolean_t verify_truename, svn_boolean_t ignore_enoent, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { apr_finfo_t finfo; svn_io_dirent2_t *dirent; svn_error_t *err; apr_int32_t wanted = APR_FINFO_TYPE | APR_FINFO_LINK | APR_FINFO_SIZE | APR_FINFO_MTIME; #if defined(WIN32) || defined(__OS2__) if (verify_truename) wanted |= APR_FINFO_NAME; #endif err = svn_io_stat(&finfo, path, wanted, scratch_pool); if (err && ignore_enoent && (APR_STATUS_IS_ENOENT(err->apr_err) || SVN__APR_STATUS_IS_ENOTDIR(err->apr_err))) { svn_error_clear(err); dirent = svn_io_dirent2_create(result_pool); SVN_ERR_ASSERT(dirent->kind == svn_node_none); *dirent_p = dirent; return SVN_NO_ERROR; } SVN_ERR(err); #if defined(WIN32) || defined(__OS2__) || defined(DARWIN) if (verify_truename) { const char *requested_name = svn_dirent_basename(path, NULL); if (requested_name[0] == '\0') { /* No parent directory. No need to stat/verify */ } #if defined(WIN32) || defined(__OS2__) else if (finfo.name) { const char *name_on_disk; SVN_ERR(entry_name_to_utf8(&name_on_disk, finfo.name, path, scratch_pool)); if (strcmp(name_on_disk, requested_name) /* != 0 */) { if (ignore_enoent) { *dirent_p = svn_io_dirent2_create(result_pool); return SVN_NO_ERROR; } else return svn_error_createf(APR_ENOENT, NULL, _("Path '%s' not found, case obstructed by '%s'"), svn_dirent_local_style(path, scratch_pool), name_on_disk); } } #elif defined(DARWIN) /* Currently apr doesn't set finfo.name on DARWIN, returning APR_INCOMPLETE. ### Can we optimize this in another way? */ else { apr_hash_t *dirents; err = svn_io_get_dirents3(&dirents, svn_dirent_dirname(path, scratch_pool), TRUE /* only_check_type */, scratch_pool, scratch_pool); if (err && ignore_enoent && (APR_STATUS_IS_ENOENT(err->apr_err) || SVN__APR_STATUS_IS_ENOTDIR(err->apr_err))) { svn_error_clear(err); *dirent_p = svn_io_dirent2_create(result_pool); return SVN_NO_ERROR; } else SVN_ERR(err); if (! svn_hash_gets(dirents, requested_name)) { if (ignore_enoent) { *dirent_p = svn_io_dirent2_create(result_pool); return SVN_NO_ERROR; } else return svn_error_createf(APR_ENOENT, NULL, _("Path '%s' not found"), svn_dirent_local_style(path, scratch_pool)); } } #endif } #endif dirent = svn_io_dirent2_create(result_pool); map_apr_finfo_to_node_kind(&(dirent->kind), &(dirent->special), &finfo); dirent->filesize = finfo.size; dirent->mtime = finfo.mtime; *dirent_p = dirent; return SVN_NO_ERROR; } /* Pool userdata key for the error file passed to svn_io_start_cmd(). */ #define ERRFILE_KEY "svn-io-start-cmd-errfile" /* Handle an error from the child process (before command execution) by printing DESC and the error string corresponding to STATUS to stderr. */ static void handle_child_process_error(apr_pool_t *pool, apr_status_t status, const char *desc) { char errbuf[256]; apr_file_t *errfile; void *p; /* We can't do anything if we get an error here, so just return. */ if (apr_pool_userdata_get(&p, ERRFILE_KEY, pool)) return; errfile = p; if (errfile) /* What we get from APR is in native encoding. */ apr_file_printf(errfile, "%s: %s", desc, apr_strerror(status, errbuf, sizeof(errbuf))); } svn_error_t * svn_io_start_cmd3(apr_proc_t *cmd_proc, const char *path, const char *cmd, const char *const *args, const char *const *env, svn_boolean_t inherit, svn_boolean_t infile_pipe, apr_file_t *infile, svn_boolean_t outfile_pipe, apr_file_t *outfile, svn_boolean_t errfile_pipe, apr_file_t *errfile, apr_pool_t *pool) { apr_status_t apr_err; apr_procattr_t *cmdproc_attr; int num_args; const char **args_native; const char *cmd_apr; SVN_ERR_ASSERT(!((infile != NULL) && infile_pipe)); SVN_ERR_ASSERT(!((outfile != NULL) && outfile_pipe)); SVN_ERR_ASSERT(!((errfile != NULL) && errfile_pipe)); /* Create the process attributes. */ apr_err = apr_procattr_create(&cmdproc_attr, pool); if (apr_err) return svn_error_wrap_apr(apr_err, _("Can't create process '%s' attributes"), cmd); /* Make sure we invoke cmd directly, not through a shell. */ apr_err = apr_procattr_cmdtype_set(cmdproc_attr, inherit ? APR_PROGRAM_PATH : APR_PROGRAM); if (apr_err) return svn_error_wrap_apr(apr_err, _("Can't set process '%s' cmdtype"), cmd); /* Set the process's working directory. */ if (path) { const char *path_apr; /* APR doesn't like our canonical path format for current directory */ if (path[0] == '\0') path = "."; SVN_ERR(cstring_from_utf8(&path_apr, path, pool)); apr_err = apr_procattr_dir_set(cmdproc_attr, path_apr); if (apr_err) return svn_error_wrap_apr(apr_err, _("Can't set process '%s' directory"), cmd); } /* Use requested inputs and outputs. ### Unfortunately each of these apr functions creates a pipe and then overwrites the pipe file descriptor with the descriptor we pass in. The pipes can then never be closed. This is an APR bug. */ if (infile) { apr_err = apr_procattr_child_in_set(cmdproc_attr, infile, NULL); if (apr_err) return svn_error_wrap_apr(apr_err, _("Can't set process '%s' child input"), cmd); } if (outfile) { apr_err = apr_procattr_child_out_set(cmdproc_attr, outfile, NULL); if (apr_err) return svn_error_wrap_apr(apr_err, _("Can't set process '%s' child outfile"), cmd); } if (errfile) { apr_err = apr_procattr_child_err_set(cmdproc_attr, errfile, NULL); if (apr_err) return svn_error_wrap_apr(apr_err, _("Can't set process '%s' child errfile"), cmd); } /* Forward request for pipes to APR. */ if (infile_pipe || outfile_pipe || errfile_pipe) { apr_err = apr_procattr_io_set(cmdproc_attr, infile_pipe ? APR_FULL_BLOCK : APR_NO_PIPE, outfile_pipe ? APR_FULL_BLOCK : APR_NO_PIPE, errfile_pipe ? APR_FULL_BLOCK : APR_NO_PIPE); if (apr_err) return svn_error_wrap_apr(apr_err, _("Can't set process '%s' stdio pipes"), cmd); } /* Have the child print any problems executing its program to errfile. */ apr_err = apr_pool_userdata_set(errfile, ERRFILE_KEY, NULL, pool); if (apr_err) return svn_error_wrap_apr(apr_err, _("Can't set process '%s' child errfile for " "error handler"), cmd); apr_err = apr_procattr_child_errfn_set(cmdproc_attr, handle_child_process_error); if (apr_err) return svn_error_wrap_apr(apr_err, _("Can't set process '%s' error handler"), cmd); /* Convert cmd and args from UTF-8 */ SVN_ERR(cstring_from_utf8(&cmd_apr, cmd, pool)); for (num_args = 0; args[num_args]; num_args++) ; args_native = apr_palloc(pool, (num_args + 1) * sizeof(char *)); args_native[num_args] = NULL; while (num_args--) { /* ### Well, it turns out that on APR on Windows expects all program args to be in UTF-8. Callers of svn_io_run_cmd should be aware of that. */ SVN_ERR(cstring_from_utf8(&args_native[num_args], args[num_args], pool)); } /* Start the cmd command. */ apr_err = apr_proc_create(cmd_proc, cmd_apr, args_native, inherit ? NULL : env, cmdproc_attr, pool); if (apr_err) return svn_error_wrap_apr(apr_err, _("Can't start process '%s'"), cmd); return SVN_NO_ERROR; } #undef ERRFILE_KEY svn_error_t * svn_io_wait_for_cmd(apr_proc_t *cmd_proc, const char *cmd, int *exitcode, apr_exit_why_e *exitwhy, apr_pool_t *pool) { apr_status_t apr_err; apr_exit_why_e exitwhy_val; int exitcode_val; /* The Win32 apr_proc_wait doesn't set this... */ exitwhy_val = APR_PROC_EXIT; /* Wait for the cmd command to finish. */ apr_err = apr_proc_wait(cmd_proc, &exitcode_val, &exitwhy_val, APR_WAIT); if (!APR_STATUS_IS_CHILD_DONE(apr_err)) return svn_error_wrap_apr(apr_err, _("Error waiting for process '%s'"), cmd); if (exitwhy) *exitwhy = exitwhy_val; else if (APR_PROC_CHECK_SIGNALED(exitwhy_val) && APR_PROC_CHECK_CORE_DUMP(exitwhy_val)) return svn_error_createf (SVN_ERR_EXTERNAL_PROGRAM, NULL, _("Process '%s' failed (signal %d, core dumped)"), cmd, exitcode_val); else if (APR_PROC_CHECK_SIGNALED(exitwhy_val)) return svn_error_createf (SVN_ERR_EXTERNAL_PROGRAM, NULL, _("Process '%s' failed (signal %d)"), cmd, exitcode_val); else if (! APR_PROC_CHECK_EXIT(exitwhy_val)) /* Don't really know what happened here. */ return svn_error_createf (SVN_ERR_EXTERNAL_PROGRAM, NULL, _("Process '%s' failed (exitwhy %d, exitcode %d)"), cmd, exitwhy_val, exitcode_val); if (exitcode) *exitcode = exitcode_val; else if (exitcode_val != 0) return svn_error_createf (SVN_ERR_EXTERNAL_PROGRAM, NULL, _("Process '%s' returned error exitcode %d"), cmd, exitcode_val); return SVN_NO_ERROR; } svn_error_t * svn_io_run_cmd(const char *path, const char *cmd, const char *const *args, int *exitcode, apr_exit_why_e *exitwhy, svn_boolean_t inherit, apr_file_t *infile, apr_file_t *outfile, apr_file_t *errfile, apr_pool_t *pool) { apr_proc_t cmd_proc; SVN_ERR(svn_io_start_cmd3(&cmd_proc, path, cmd, args, NULL, inherit, FALSE, infile, FALSE, outfile, FALSE, errfile, pool)); return svn_io_wait_for_cmd(&cmd_proc, cmd, exitcode, exitwhy, pool); } svn_error_t * svn_io_run_diff2(const char *dir, const char *const *user_args, int num_user_args, const char *label1, const char *label2, const char *from, const char *to, int *pexitcode, apr_file_t *outfile, apr_file_t *errfile, const char *diff_cmd, apr_pool_t *pool) { const char **args; int i; int exitcode; int nargs = 4; /* the diff command itself, two paths, plus a trailing NULL */ apr_pool_t *subpool = svn_pool_create(pool); if (pexitcode == NULL) pexitcode = &exitcode; if (user_args != NULL) nargs += num_user_args; else nargs += 1; /* -u */ if (label1 != NULL) nargs += 2; /* the -L and the label itself */ if (label2 != NULL) nargs += 2; /* the -L and the label itself */ args = apr_palloc(subpool, nargs * sizeof(char *)); i = 0; args[i++] = diff_cmd; if (user_args != NULL) { int j; for (j = 0; j < num_user_args; ++j) args[i++] = user_args[j]; } else args[i++] = "-u"; /* assume -u if the user didn't give us any args */ if (label1 != NULL) { args[i++] = "-L"; args[i++] = label1; } if (label2 != NULL) { args[i++] = "-L"; args[i++] = label2; } args[i++] = svn_dirent_local_style(from, subpool); args[i++] = svn_dirent_local_style(to, subpool); args[i++] = NULL; SVN_ERR_ASSERT(i == nargs); SVN_ERR(svn_io_run_cmd(dir, diff_cmd, args, pexitcode, NULL, TRUE, NULL, outfile, errfile, subpool)); /* The man page for (GNU) diff describes the return value as: "An exit status of 0 means no differences were found, 1 means some differences were found, and 2 means trouble." A return value of 2 typically occurs when diff cannot read its input or write to its output, but in any case we probably ought to return an error for anything other than 0 or 1 as the output is likely to be corrupt. */ if (*pexitcode != 0 && *pexitcode != 1) return svn_error_createf(SVN_ERR_EXTERNAL_PROGRAM, NULL, _("'%s' returned %d"), svn_dirent_local_style(diff_cmd, pool), *pexitcode); svn_pool_destroy(subpool); return SVN_NO_ERROR; } svn_error_t * svn_io_run_diff3_3(int *exitcode, const char *dir, const char *mine, const char *older, const char *yours, const char *mine_label, const char *older_label, const char *yours_label, apr_file_t *merged, const char *diff3_cmd, const apr_array_header_t *user_args, apr_pool_t *pool) { const char **args = apr_palloc(pool, sizeof(char*) * (13 + (user_args ? user_args->nelts : 1))); #ifndef NDEBUG int nargs = 12; #endif int i = 0; /* Labels fall back to sensible defaults if not specified. */ if (mine_label == NULL) mine_label = ".working"; if (older_label == NULL) older_label = ".old"; if (yours_label == NULL) yours_label = ".new"; /* Set up diff3 command line. */ args[i++] = diff3_cmd; if (user_args) { int j; for (j = 0; j < user_args->nelts; ++j) args[i++] = APR_ARRAY_IDX(user_args, j, const char *); #ifndef NDEBUG nargs += user_args->nelts; #endif } else { args[i++] = "-E"; /* We tried "-A" here, but that caused overlapping identical changes to conflict. See issue #682. */ #ifndef NDEBUG ++nargs; #endif } args[i++] = "-m"; args[i++] = "-L"; args[i++] = mine_label; args[i++] = "-L"; args[i++] = older_label; /* note: this label is ignored if using 2-part markers, which is the case with "-E". */ args[i++] = "-L"; args[i++] = yours_label; #ifdef SVN_DIFF3_HAS_DIFF_PROGRAM_ARG { svn_boolean_t has_arg; /* ### FIXME: we really shouldn't be reading the config here; instead, the necessary bits should be passed in by the caller. But should we add another parameter to this function, when the whole external diff3 thing might eventually go away? */ apr_hash_t *config; svn_config_t *cfg; SVN_ERR(svn_config_get_config(&config, pool)); cfg = config ? svn_hash_gets(config, SVN_CONFIG_CATEGORY_CONFIG) : NULL; SVN_ERR(svn_config_get_bool(cfg, &has_arg, SVN_CONFIG_SECTION_HELPERS, SVN_CONFIG_OPTION_DIFF3_HAS_PROGRAM_ARG, TRUE)); if (has_arg) { const char *diff_cmd, *diff_utf8; svn_config_get(cfg, &diff_cmd, SVN_CONFIG_SECTION_HELPERS, SVN_CONFIG_OPTION_DIFF_CMD, SVN_CLIENT_DIFF); SVN_ERR(cstring_to_utf8(&diff_utf8, diff_cmd, pool)); args[i++] = apr_pstrcat(pool, "--diff-program=", diff_utf8, SVN_VA_NULL); #ifndef NDEBUG ++nargs; #endif } } #endif args[i++] = svn_dirent_local_style(mine, pool); args[i++] = svn_dirent_local_style(older, pool); args[i++] = svn_dirent_local_style(yours, pool); args[i++] = NULL; #ifndef NDEBUG SVN_ERR_ASSERT(i == nargs); #endif /* Run diff3, output the merged text into the scratch file. */ SVN_ERR(svn_io_run_cmd(dir, diff3_cmd, args, exitcode, NULL, TRUE, /* keep environment */ NULL, merged, NULL, pool)); /* According to the diff3 docs, a '0' means the merge was clean, and '1' means conflict markers were found. Anything else is real error. */ if ((*exitcode != 0) && (*exitcode != 1)) return svn_error_createf(SVN_ERR_EXTERNAL_PROGRAM, NULL, _("Error running '%s': exitcode was %d, " "args were:" "\nin directory '%s', basenames:\n%s\n%s\n%s"), svn_dirent_local_style(diff3_cmd, pool), *exitcode, svn_dirent_local_style(dir, pool), /* Don't call svn_path_local_style() on the basenames. We don't want them to be absolute, and we don't need the separator conversion. */ mine, older, yours); return SVN_NO_ERROR; } /* Canonicalize a string for hashing. Modifies KEY in place. */ static APR_INLINE char * fileext_tolower(char *key) { register char *p; for (p = key; *p != 0; ++p) *p = (char)apr_tolower(*p); return key; } svn_error_t * svn_io_parse_mimetypes_file(apr_hash_t **type_map, const char *mimetypes_file, apr_pool_t *pool) { svn_error_t *err = SVN_NO_ERROR; apr_hash_t *types = apr_hash_make(pool); svn_boolean_t eof = FALSE; svn_stringbuf_t *buf; apr_pool_t *subpool = svn_pool_create(pool); apr_file_t *types_file; svn_stream_t *mimetypes_stream; SVN_ERR(svn_io_file_open(&types_file, mimetypes_file, APR_READ, APR_OS_DEFAULT, pool)); mimetypes_stream = svn_stream_from_aprfile2(types_file, FALSE, pool); while (1) { apr_array_header_t *tokens; const char *type; svn_pool_clear(subpool); /* Read a line. */ if ((err = svn_stream_readline(mimetypes_stream, &buf, APR_EOL_STR, &eof, subpool))) break; /* Only pay attention to non-empty, non-comment lines. */ if (buf->len) { int i; if (buf->data[0] == '#') continue; /* Tokenize (into our return pool). */ tokens = svn_cstring_split(buf->data, " \t", TRUE, pool); if (tokens->nelts < 2) continue; /* The first token in a multi-token line is the media type. Subsequent tokens are filename extensions associated with that media type. */ type = APR_ARRAY_IDX(tokens, 0, const char *); for (i = 1; i < tokens->nelts; i++) { /* We can safely address 'ext' as a non-const string because * we know svn_cstring_split() allocated it in 'pool' for us. */ char *ext = APR_ARRAY_IDX(tokens, i, char *); fileext_tolower(ext); svn_hash_sets(types, ext, type); } } if (eof) break; } svn_pool_destroy(subpool); /* If there was an error above, close the file (ignoring any error from *that*) and return the originally error. */ if (err) { svn_error_clear(svn_stream_close(mimetypes_stream)); return err; } /* Close the stream (which closes the underlying file, too). */ SVN_ERR(svn_stream_close(mimetypes_stream)); *type_map = types; return SVN_NO_ERROR; } svn_error_t * svn_io_detect_mimetype2(const char **mimetype, const char *file, apr_hash_t *mimetype_map, apr_pool_t *pool) { static const char * const generic_binary = "application/octet-stream"; svn_node_kind_t kind; apr_file_t *fh; svn_error_t *err; unsigned char block[1024]; apr_size_t amt_read = sizeof(block); /* Default return value is NULL. */ *mimetype = NULL; /* If there is a mimetype_map provided, we'll first try to look up our file's extension in the map. Failing that, we'll run the heuristic. */ if (mimetype_map) { const char *type_from_map; char *path_ext; /* Can point to physical const memory but only when svn_path_splitext sets it to "". */ svn_path_splitext(NULL, (const char **)&path_ext, file, pool); fileext_tolower(path_ext); if ((type_from_map = svn_hash_gets(mimetype_map, path_ext))) { *mimetype = type_from_map; return SVN_NO_ERROR; } } /* See if this file even exists, and make sure it really is a file. */ SVN_ERR(svn_io_check_path(file, &kind, pool)); if (kind != svn_node_file) return svn_error_createf(SVN_ERR_BAD_FILENAME, NULL, _("Can't detect MIME type of non-file '%s'"), svn_dirent_local_style(file, pool)); SVN_ERR(svn_io_file_open(&fh, file, APR_READ, 0, pool)); /* Read a block of data from FILE. */ err = svn_io_file_read(fh, block, &amt_read, pool); if (err && ! APR_STATUS_IS_EOF(err->apr_err)) return err; svn_error_clear(err); /* Now close the file. No use keeping it open any more. */ SVN_ERR(svn_io_file_close(fh, pool)); if (svn_io_is_binary_data(block, amt_read)) *mimetype = generic_binary; return SVN_NO_ERROR; } svn_boolean_t svn_io_is_binary_data(const void *data, apr_size_t len) { const unsigned char *buf = data; if (len == 3 && buf[0] == 0xEF && buf[1] == 0xBB && buf[2] == 0xBF) { /* This is an empty UTF-8 file which only contains the UTF-8 BOM. * Treat it as plain text. */ return FALSE; } /* Right now, this function is going to be really stupid. It's going to examine the block of data, and make sure that 15% of the bytes are such that their value is in the ranges 0x07-0x0D or 0x20-0x7F, and that none of those bytes is 0x00. If those criteria are not met, we're calling it binary. NOTE: Originally, I intended to target 85% of the bytes being in the specified ranges, but I flubbed the condition. At any rate, folks aren't complaining, so I'm not sure that it's worth adjusting this retroactively now. --cmpilato */ if (len > 0) { apr_size_t i; apr_size_t binary_count = 0; /* Run through the data we've read, counting the 'binary-ish' bytes. HINT: If we see a 0x00 byte, we'll set our count to its max and stop reading the file. */ for (i = 0; i < len; i++) { if (buf[i] == 0) { binary_count = len; break; } if ((buf[i] < 0x07) || ((buf[i] > 0x0D) && (buf[i] < 0x20)) || (buf[i] > 0x7F)) { binary_count++; } } return (((binary_count * 1000) / len) > 850); } return FALSE; } svn_error_t * svn_io_detect_mimetype(const char **mimetype, const char *file, apr_pool_t *pool) { return svn_io_detect_mimetype2(mimetype, file, NULL, pool); } svn_error_t * svn_io_file_open(apr_file_t **new_file, const char *fname, apr_int32_t flag, apr_fileperms_t perm, apr_pool_t *pool) { const char *fname_apr; apr_status_t status; SVN_ERR(cstring_from_utf8(&fname_apr, fname, pool)); status = file_open(new_file, fname_apr, flag | APR_BINARY, perm, TRUE, pool); if (status) return svn_error_wrap_apr(status, _("Can't open file '%s'"), svn_dirent_local_style(fname, pool)); else return SVN_NO_ERROR; } static APR_INLINE svn_error_t * do_io_file_wrapper_cleanup(apr_file_t *file, apr_status_t status, const char *msg, const char *msg_no_name, apr_pool_t *pool) { const char *name; svn_error_t *err; if (! status) return SVN_NO_ERROR; err = svn_io_file_name_get(&name, file, pool); if (err) name = NULL; svn_error_clear(err); /* ### Issue #3014: Return a specific error for broken pipes, * ### with a single element in the error chain. */ if (SVN__APR_STATUS_IS_EPIPE(status)) return svn_error_create(SVN_ERR_IO_PIPE_WRITE_ERROR, NULL, NULL); if (name) return svn_error_wrap_apr(status, _(msg), try_utf8_from_internal_style(name, pool)); else return svn_error_wrap_apr(status, "%s", _(msg_no_name)); } svn_error_t * svn_io_file_close(apr_file_t *file, apr_pool_t *pool) { return do_io_file_wrapper_cleanup(file, apr_file_close(file), N_("Can't close file '%s'"), N_("Can't close stream"), pool); } svn_error_t * svn_io_file_getc(char *ch, apr_file_t *file, apr_pool_t *pool) { return do_io_file_wrapper_cleanup(file, apr_file_getc(ch, file), N_("Can't read file '%s'"), N_("Can't read stream"), pool); } svn_error_t * svn_io_file_putc(char ch, apr_file_t *file, apr_pool_t *pool) { return do_io_file_wrapper_cleanup(file, apr_file_putc(ch, file), N_("Can't write file '%s'"), N_("Can't write stream"), pool); } svn_error_t * svn_io_file_info_get(apr_finfo_t *finfo, apr_int32_t wanted, apr_file_t *file, apr_pool_t *pool) { /* Quoting APR: On NT this request is incredibly expensive, but accurate. */ wanted &= ~SVN__APR_FINFO_MASK_OUT; return do_io_file_wrapper_cleanup( file, apr_file_info_get(finfo, wanted, file), N_("Can't get attribute information from file '%s'"), N_("Can't get attribute information from stream"), pool); } svn_error_t * svn_io_file_size_get(svn_filesize_t *filesize_p, apr_file_t *file, apr_pool_t *pool) { apr_finfo_t finfo; SVN_ERR(svn_io_file_info_get(&finfo, APR_FINFO_SIZE, file, pool)); *filesize_p = finfo.size; return SVN_NO_ERROR; } svn_error_t * svn_io_file_get_offset(apr_off_t *offset_p, apr_file_t *file, apr_pool_t *pool) { apr_off_t offset; /* Note that, for buffered files, one (possibly surprising) side-effect of this call is to flush any unwritten data to disk. */ offset = 0; SVN_ERR(svn_io_file_seek(file, APR_CUR, &offset, pool)); *offset_p = offset; return SVN_NO_ERROR; } svn_error_t * svn_io_file_read(apr_file_t *file, void *buf, apr_size_t *nbytes, apr_pool_t *pool) { return do_io_file_wrapper_cleanup(file, apr_file_read(file, buf, nbytes), N_("Can't read file '%s'"), N_("Can't read stream"), pool); } svn_error_t * svn_io_file_read_full2(apr_file_t *file, void *buf, apr_size_t nbytes, apr_size_t *bytes_read, svn_boolean_t *hit_eof, apr_pool_t *pool) { apr_status_t status = apr_file_read_full(file, buf, nbytes, bytes_read); if (hit_eof) { if (APR_STATUS_IS_EOF(status)) { *hit_eof = TRUE; return SVN_NO_ERROR; } else *hit_eof = FALSE; } return do_io_file_wrapper_cleanup(file, status, N_("Can't read file '%s'"), N_("Can't read stream"), pool); } svn_error_t * svn_io_file_seek(apr_file_t *file, apr_seek_where_t where, apr_off_t *offset, apr_pool_t *pool) { return do_io_file_wrapper_cleanup( file, apr_file_seek(file, where, offset), N_("Can't set position pointer in file '%s'"), N_("Can't set position pointer in stream"), pool); } svn_error_t * svn_io_file_aligned_seek(apr_file_t *file, apr_off_t block_size, apr_off_t *buffer_start, apr_off_t offset, apr_pool_t *scratch_pool) { const apr_size_t apr_default_buffer_size = 4096; apr_size_t file_buffer_size = apr_default_buffer_size; apr_off_t desired_offset = 0; apr_off_t current = 0; apr_off_t aligned_offset = 0; svn_boolean_t fill_buffer = FALSE; /* paranoia check: huge blocks on 32 bit machines may cause overflows */ SVN_ERR_ASSERT(block_size == (apr_size_t)block_size); /* default for invalid block sizes */ if (block_size == 0) block_size = apr_default_buffer_size; file_buffer_size = apr_file_buffer_size_get(file); /* don't try to set a buffer size for non-buffered files! */ if (file_buffer_size == 0) { aligned_offset = offset; } else if (file_buffer_size != (apr_size_t)block_size) { /* FILE has the wrong buffer size. correct it */ char *buffer; file_buffer_size = (apr_size_t)block_size; buffer = apr_palloc(apr_file_pool_get(file), file_buffer_size); apr_file_buffer_set(file, buffer, file_buffer_size); /* seek to the start of the block and cause APR to read 1 block */ aligned_offset = offset - (offset % block_size); fill_buffer = TRUE; } else { aligned_offset = offset - (offset % file_buffer_size); /* We have no way to determine the block start of an APR file. Furthermore, we don't want to throw away the current buffer contents. Thus, we re-align the buffer only if the CURRENT offset definitely lies outside the desired, aligned buffer. This covers the typical case of linear reads getting very close to OFFSET but reading the previous / following block. Note that ALIGNED_OFFSET may still be within the current buffer and no I/O will actually happen in the FILL_BUFFER section below. */ SVN_ERR(svn_io_file_seek(file, APR_CUR, ¤t, scratch_pool)); fill_buffer = aligned_offset + file_buffer_size <= current || current <= aligned_offset; } if (fill_buffer) { char dummy; apr_status_t status; /* seek to the start of the block and cause APR to read 1 block */ SVN_ERR(svn_io_file_seek(file, APR_SET, &aligned_offset, scratch_pool)); status = apr_file_getc(&dummy, file); /* read may fail if we seek to or behind EOF. That's ok then. */ if (status != APR_SUCCESS && !APR_STATUS_IS_EOF(status)) return do_io_file_wrapper_cleanup(file, status, N_("Can't read file '%s'"), N_("Can't read stream"), scratch_pool); } /* finally, seek to the OFFSET the caller wants */ desired_offset = offset; SVN_ERR(svn_io_file_seek(file, APR_SET, &offset, scratch_pool)); if (desired_offset != offset) return do_io_file_wrapper_cleanup(file, APR_EOF, N_("Can't seek in file '%s'"), N_("Can't seek in stream"), scratch_pool); /* return the buffer start that we (probably) enforced */ if (buffer_start) *buffer_start = aligned_offset; return SVN_NO_ERROR; } svn_error_t * svn_io_file_write(apr_file_t *file, const void *buf, apr_size_t *nbytes, apr_pool_t *pool) { return svn_error_trace(do_io_file_wrapper_cleanup( file, apr_file_write(file, buf, nbytes), N_("Can't write to file '%s'"), N_("Can't write to stream"), pool)); } svn_error_t * svn_io_file_flush(apr_file_t *file, apr_pool_t *scratch_pool) { return svn_error_trace(do_io_file_wrapper_cleanup( file, apr_file_flush(file), N_("Can't flush file '%s'"), N_("Can't flush stream"), scratch_pool)); } svn_error_t * svn_io_file_write_full(apr_file_t *file, const void *buf, apr_size_t nbytes, apr_size_t *bytes_written, apr_pool_t *pool) { #ifdef WIN32 #define MAXBUFSIZE 30*1024 apr_size_t bw = nbytes; apr_size_t to_write = nbytes; apr_status_t rv; rv = apr_file_write_full(file, buf, nbytes, &bw); buf = (char *)buf + bw; to_write -= bw; /* Issue #1789: On Windows, writing may fail for large values of NBYTES. If that is the case, keep track of how many bytes have been written by the apr_file_write_full() call, and attempt to write the remaining part in smaller chunks. */ if (rv == APR_FROM_OS_ERROR(ERROR_NOT_ENOUGH_MEMORY) && nbytes > MAXBUFSIZE) { do { bw = to_write > MAXBUFSIZE ? MAXBUFSIZE : to_write; rv = apr_file_write(file, buf, &bw); buf = (char *)buf + bw; to_write -= bw; } while (rv == APR_SUCCESS && to_write > 0); } /* bytes_written may actually be NULL */ if (bytes_written) *bytes_written = nbytes - to_write; #undef MAXBUFSIZE #else apr_status_t rv = apr_file_write_full(file, buf, nbytes, bytes_written); #endif return svn_error_trace(do_io_file_wrapper_cleanup( file, rv, N_("Can't write to file '%s'"), N_("Can't write to stream"), pool)); } svn_error_t * svn_io_write_unique(const char **tmp_path, const char *dirpath, const void *buf, apr_size_t nbytes, svn_io_file_del_t delete_when, apr_pool_t *pool) { apr_file_t *new_file; svn_error_t *err; SVN_ERR(svn_io_open_unique_file3(&new_file, tmp_path, dirpath, delete_when, pool, pool)); err = svn_io_file_write_full(new_file, buf, nbytes, NULL, pool); if (!err) { /* svn_io_file_flush_to_disk() can be very expensive, so use the cheaper standard flush if the file is created as temporary file anyway */ if (delete_when == svn_io_file_del_none) err = svn_io_file_flush_to_disk(new_file, pool); else err = svn_io_file_flush(new_file, pool); } return svn_error_trace( svn_error_compose_create(err, svn_io_file_close(new_file, pool))); } svn_error_t * svn_io_write_atomic2(const char *final_path, const void *buf, apr_size_t nbytes, const char *copy_perms_path, svn_boolean_t flush_to_disk, apr_pool_t *scratch_pool) { apr_file_t *tmp_file; const char *tmp_path; svn_error_t *err; const char *dirname = svn_dirent_dirname(final_path, scratch_pool); SVN_ERR(svn_io_open_unique_file3(&tmp_file, &tmp_path, dirname, svn_io_file_del_none, scratch_pool, scratch_pool)); err = svn_io_file_write_full(tmp_file, buf, nbytes, NULL, scratch_pool); if (!err && flush_to_disk) err = svn_io_file_flush_to_disk(tmp_file, scratch_pool); err = svn_error_compose_create(err, svn_io_file_close(tmp_file, scratch_pool)); if (!err && copy_perms_path) err = svn_io_copy_perms(copy_perms_path, tmp_path, scratch_pool); if (!err) err = svn_io_file_rename2(tmp_path, final_path, flush_to_disk, scratch_pool); if (err) { err = svn_error_compose_create(err, svn_io_remove_file2(tmp_path, TRUE, scratch_pool)); return svn_error_createf(err->apr_err, err, _("Can't write '%s' atomically"), svn_dirent_local_style(final_path, scratch_pool)); } return SVN_NO_ERROR; } svn_error_t * svn_io_file_trunc(apr_file_t *file, apr_off_t offset, apr_pool_t *pool) { /* Workaround for yet another APR issue with trunc. If the APR file internally is in read mode, the current buffer pointer will not be clipped to the valid data range. get_file_offset may then return an invalid position *after* new data was written to it. To prevent this, write 1 dummy byte just after the OFFSET at which we will trunc it. That will force the APR file into write mode internally and the flush() work-around below becomes effective. */ apr_off_t position = 0; /* A frequent usage is OFFSET==0, in which case we don't need to preserve any file content or file pointer. */ if (offset) { SVN_ERR(svn_io_file_seek(file, APR_CUR, &position, pool)); SVN_ERR(svn_io_file_seek(file, APR_SET, &offset, pool)); } SVN_ERR(svn_io_file_putc(0, file, pool)); /* This is a work-around. APR would flush the write buffer _after_ truncating the file causing now invalid buffered data to be written behind OFFSET. */ SVN_ERR(do_io_file_wrapper_cleanup(file, apr_file_flush(file), N_("Can't flush file '%s'"), N_("Can't flush stream"), pool)); SVN_ERR(do_io_file_wrapper_cleanup(file, apr_file_trunc(file, offset), N_("Can't truncate file '%s'"), N_("Can't truncate stream"), pool)); /* Restore original file pointer, if necessary. It's currently at OFFSET. */ if (position < offset) SVN_ERR(svn_io_file_seek(file, APR_SET, &position, pool)); return SVN_NO_ERROR; } svn_error_t * svn_io_read_length_line(apr_file_t *file, char *buf, apr_size_t *limit, apr_pool_t *pool) { /* variables */ apr_size_t total_read = 0; svn_boolean_t eof = FALSE; const char *name; svn_error_t *err; apr_size_t buf_size = *limit; while (buf_size > 0) { /* read a fair chunk of data at once. But don't get too ambitious * as that would result in too much waste. Also make sure we can * put a NUL after the last byte read. */ apr_size_t to_read = buf_size < 129 ? buf_size - 1 : 128; apr_size_t bytes_read = 0; char *eol; if (to_read == 0) break; /* read data block (or just a part of it) */ SVN_ERR(svn_io_file_read_full2(file, buf, to_read, &bytes_read, &eof, pool)); /* look or a newline char */ buf[bytes_read] = 0; eol = strchr(buf, '\n'); if (eol) { apr_off_t offset = (eol + 1 - buf) - (apr_off_t)bytes_read; *eol = 0; *limit = total_read + (eol - buf); /* correct the file pointer: * appear as though we just had read the newline char */ SVN_ERR(svn_io_file_seek(file, APR_CUR, &offset, pool)); return SVN_NO_ERROR; } else if (eof) { /* no EOL found but we hit the end of the file. * Generate a nice EOF error object and return it. */ char dummy; SVN_ERR(svn_io_file_getc(&dummy, file, pool)); } /* next data chunk */ buf_size -= bytes_read; buf += bytes_read; total_read += bytes_read; } /* buffer limit has been exceeded without finding the EOL */ err = svn_io_file_name_get(&name, file, pool); if (err) name = NULL; svn_error_clear(err); if (name) return svn_error_createf(SVN_ERR_MALFORMED_FILE, NULL, _("Can't read length line in file '%s'"), svn_dirent_local_style(name, pool)); else return svn_error_create(SVN_ERR_MALFORMED_FILE, NULL, _("Can't read length line in stream")); } svn_error_t * svn_io_stat(apr_finfo_t *finfo, const char *fname, apr_int32_t wanted, apr_pool_t *pool) { apr_status_t status; const char *fname_apr; /* APR doesn't like "" directories */ if (fname[0] == '\0') fname = "."; SVN_ERR(cstring_from_utf8(&fname_apr, fname, pool)); /* Quoting APR: On NT this request is incredibly expensive, but accurate. */ wanted &= ~SVN__APR_FINFO_MASK_OUT; status = apr_stat(finfo, fname_apr, wanted, pool); if (status) return svn_error_wrap_apr(status, _("Can't stat '%s'"), svn_dirent_local_style(fname, pool)); return SVN_NO_ERROR; } #if defined(WIN32) /* Platform specific implementation of apr_file_rename() to workaround APR problems on Windows. */ static apr_status_t win32_file_rename(const WCHAR *from_path_w, const WCHAR *to_path_w, svn_boolean_t flush_to_disk) { /* APR calls MoveFileExW() with MOVEFILE_COPY_ALLOWED, while we rely * that rename is atomic operation. Call MoveFileEx directly on Windows * without MOVEFILE_COPY_ALLOWED flag to workaround it. */ DWORD flags = MOVEFILE_REPLACE_EXISTING; if (flush_to_disk) { /* Do not return until the file has actually been moved on the disk. */ flags |= MOVEFILE_WRITE_THROUGH; } if (!MoveFileExW(from_path_w, to_path_w, flags)) return apr_get_os_error(); return APR_SUCCESS; } #endif svn_error_t * svn_io_file_rename2(const char *from_path, const char *to_path, svn_boolean_t flush_to_disk, apr_pool_t *pool) { apr_status_t status = APR_SUCCESS; const char *from_path_apr, *to_path_apr; #if defined(WIN32) WCHAR *from_path_w; WCHAR *to_path_w; #endif SVN_ERR(cstring_from_utf8(&from_path_apr, from_path, pool)); SVN_ERR(cstring_from_utf8(&to_path_apr, to_path, pool)); #if defined(WIN32) SVN_ERR(svn_io__utf8_to_unicode_longpath(&from_path_w, from_path_apr, pool)); SVN_ERR(svn_io__utf8_to_unicode_longpath(&to_path_w, to_path_apr, pool)); status = win32_file_rename(from_path_w, to_path_w, flush_to_disk); /* If the target file is read only NTFS reports EACCESS and FAT/FAT32 reports EEXIST */ if (APR_STATUS_IS_EACCES(status) || APR_STATUS_IS_EEXIST(status)) { /* Set the destination file writable because Windows will not allow us to rename when to_path is read-only, but will allow renaming when from_path is read only. */ SVN_ERR(svn_io_set_file_read_write(to_path, TRUE, pool)); status = win32_file_rename(from_path_w, to_path_w, flush_to_disk); } WIN32_RETRY_LOOP(status, win32_file_rename(from_path_w, to_path_w, flush_to_disk)); #elif defined(__OS2__) status = apr_file_rename(from_path_apr, to_path_apr, pool); /* If the target file is read only NTFS reports EACCESS and FAT/FAT32 reports EEXIST */ if (APR_STATUS_IS_EACCES(status) || APR_STATUS_IS_EEXIST(status)) { /* Set the destination file writable because OS/2 will not allow us to rename when to_path is read-only, but will allow renaming when from_path is read only. */ SVN_ERR(svn_io_set_file_read_write(to_path, TRUE, pool)); status = apr_file_rename(from_path_apr, to_path_apr, pool); } #else status = apr_file_rename(from_path_apr, to_path_apr, pool); #endif /* WIN32 || __OS2__ */ if (status) return svn_error_wrap_apr(status, _("Can't move '%s' to '%s'"), svn_dirent_local_style(from_path, pool), svn_dirent_local_style(to_path, pool)); #if defined(SVN_ON_POSIX) if (flush_to_disk) { /* On POSIX, the file name is stored in the file's directory entry. Hence, we need to fsync() that directory as well. On other operating systems, we'd only be asking for trouble by trying to open and fsync a directory. */ const char *dirname; apr_file_t *file; dirname = svn_dirent_dirname(to_path, pool); SVN_ERR(svn_io_file_open(&file, dirname, APR_READ, APR_OS_DEFAULT, pool)); SVN_ERR(svn_io_file_flush_to_disk(file, pool)); SVN_ERR(svn_io_file_close(file, pool)); } #elif !defined(WIN32) /* Flush the target of the rename to disk. */ if (flush_to_disk) { apr_file_t *file; SVN_ERR(svn_io_file_open(&file, to_path, APR_WRITE, APR_OS_DEFAULT, pool)); SVN_ERR(svn_io_file_flush_to_disk(file, pool)); SVN_ERR(svn_io_file_close(file, pool)); } #endif return SVN_NO_ERROR; } svn_error_t * svn_io_file_move(const char *from_path, const char *to_path, apr_pool_t *pool) { svn_error_t *err = svn_error_trace(svn_io_file_rename2(from_path, to_path, FALSE, pool)); if (err && APR_STATUS_IS_EXDEV(err->apr_err)) { svn_error_clear(err); /* svn_io_copy_file() performs atomic copy via temporary file. */ err = svn_error_trace(svn_io_copy_file(from_path, to_path, TRUE, pool)); } return err; } /* Common implementation of svn_io_dir_make and svn_io_dir_make_hidden. HIDDEN determines if the hidden attribute should be set on the newly created directory. */ static svn_error_t * dir_make(const char *path, apr_fileperms_t perm, svn_boolean_t hidden, svn_boolean_t sgid, apr_pool_t *pool) { apr_status_t status; const char *path_apr; SVN_ERR(cstring_from_utf8(&path_apr, path, pool)); /* APR doesn't like "" directories */ if (path_apr[0] == '\0') path_apr = "."; #if (APR_OS_DEFAULT & APR_WSTICKY) /* The APR shipped with httpd 2.0.50 contains a bug where APR_OS_DEFAULT encompasses the setuid, setgid, and sticky bits. There is a special case for file creation, but not directory creation, so directories wind up getting created with the sticky bit set. (There is no such thing as a setuid directory, and the setgid bit is apparently ignored at mkdir() time.) If we detect this problem, work around it by unsetting those bits if we are passed APR_OS_DEFAULT. */ if (perm == APR_OS_DEFAULT) perm &= ~(APR_USETID | APR_GSETID | APR_WSTICKY); #endif status = apr_dir_make(path_apr, perm, pool); #ifdef WIN32 /* Don't retry on ERROR_ACCESS_DENIED, as that typically signals a permanent error */ if (status == APR_FROM_OS_ERROR(ERROR_SHARING_VIOLATION)) WIN32_RETRY_LOOP(status, apr_dir_make(path_apr, perm, pool)); #endif if (status) return svn_error_wrap_apr(status, _("Can't create directory '%s'"), svn_dirent_local_style(path, pool)); #ifdef APR_FILE_ATTR_HIDDEN if (hidden) { #ifndef WIN32 status = apr_file_attrs_set(path_apr, APR_FILE_ATTR_HIDDEN, APR_FILE_ATTR_HIDDEN, pool); if (status) return svn_error_wrap_apr(status, _("Can't hide directory '%s'"), svn_dirent_local_style(path, pool)); #else /* on Windows, use our wrapper so we can also set the FILE_ATTRIBUTE_NOT_CONTENT_INDEXED attribute */ svn_error_t *err = io_win_file_attrs_set(path_apr, FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_NOT_CONTENT_INDEXED, FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_NOT_CONTENT_INDEXED, pool); if (err) return svn_error_createf(err->apr_err, err, _("Can't hide directory '%s'"), svn_dirent_local_style(path, pool)); #endif /* WIN32 */ } #endif /* APR_FILE_ATTR_HIDDEN */ /* Windows does not implement sgid. Skip here because retrieving the file permissions via APR_FINFO_PROT | APR_FINFO_OWNER is documented to be 'incredibly expensive'. */ #ifndef WIN32 if (sgid) { apr_finfo_t finfo; /* Per our contract, don't do error-checking. Some filesystems * don't support the sgid bit, and that's okay. */ status = apr_stat(&finfo, path_apr, APR_FINFO_PROT, pool); if (!status) apr_file_perms_set(path_apr, finfo.protection | APR_GSETID); } #endif return SVN_NO_ERROR; } svn_error_t * svn_io_dir_make(const char *path, apr_fileperms_t perm, apr_pool_t *pool) { return dir_make(path, perm, FALSE, FALSE, pool); } svn_error_t * svn_io_dir_make_hidden(const char *path, apr_fileperms_t perm, apr_pool_t *pool) { return dir_make(path, perm, TRUE, FALSE, pool); } svn_error_t * svn_io_dir_make_sgid(const char *path, apr_fileperms_t perm, apr_pool_t *pool) { return dir_make(path, perm, FALSE, TRUE, pool); } svn_error_t * svn_io_dir_open(apr_dir_t **new_dir, const char *dirname, apr_pool_t *pool) { apr_status_t status; const char *dirname_apr; /* APR doesn't like "" directories */ if (dirname[0] == '\0') dirname = "."; SVN_ERR(cstring_from_utf8(&dirname_apr, dirname, pool)); status = apr_dir_open(new_dir, dirname_apr, pool); if (status) return svn_error_wrap_apr(status, _("Can't open directory '%s'"), svn_dirent_local_style(dirname, pool)); return SVN_NO_ERROR; } svn_error_t * svn_io_dir_remove_nonrecursive(const char *dirname, apr_pool_t *pool) { apr_status_t status; const char *dirname_apr; SVN_ERR(cstring_from_utf8(&dirname_apr, dirname, pool)); status = apr_dir_remove(dirname_apr, pool); #ifdef WIN32 { svn_boolean_t retry = TRUE; if (status == APR_FROM_OS_ERROR(ERROR_DIR_NOT_EMPTY)) { apr_status_t empty_status = dir_is_empty(dirname_apr, pool); if (APR_STATUS_IS_ENOTEMPTY(empty_status)) retry = FALSE; } if (retry) { WIN32_RETRY_LOOP(status, apr_dir_remove(dirname_apr, pool)); } } #endif if (status) return svn_error_wrap_apr(status, _("Can't remove directory '%s'"), svn_dirent_local_style(dirname, pool)); return SVN_NO_ERROR; } svn_error_t * svn_io_dir_read(apr_finfo_t *finfo, apr_int32_t wanted, apr_dir_t *thedir, apr_pool_t *pool) { apr_status_t status; status = apr_dir_read(finfo, wanted, thedir); if (status) return svn_error_wrap_apr(status, _("Can't read directory")); /* It would be nice to use entry_name_to_utf8() below, but can we get the dir's path out of an apr_dir_t? I don't see a reliable way to do it. */ if (finfo->fname) SVN_ERR(svn_path_cstring_to_utf8(&finfo->fname, finfo->fname, pool)); if (finfo->name) SVN_ERR(svn_path_cstring_to_utf8(&finfo->name, finfo->name, pool)); return SVN_NO_ERROR; } svn_error_t * svn_io_dir_close(apr_dir_t *thedir) { apr_status_t apr_err = apr_dir_close(thedir); if (apr_err) return svn_error_wrap_apr(apr_err, _("Error closing directory")); return SVN_NO_ERROR; } svn_error_t * svn_io_dir_walk2(const char *dirname, apr_int32_t wanted, svn_io_walk_func_t walk_func, void *walk_baton, apr_pool_t *pool) { apr_status_t apr_err; apr_dir_t *handle; apr_pool_t *subpool; const char *dirname_apr; apr_finfo_t finfo; wanted |= APR_FINFO_TYPE | APR_FINFO_NAME; /* Quoting APR: On NT this request is incredibly expensive, but accurate. */ wanted &= ~SVN__APR_FINFO_MASK_OUT; /* The documentation for apr_dir_read used to state that "." and ".." will be returned as the first two files, but it doesn't work that way in practice, in particular ext3 on Linux-2.6 doesn't follow the rules. For details see http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=56666 If APR ever does implement "dot-first" then it would be possible to remove the svn_io_stat and walk_func calls and use the walk_func inside the loop. Note: apr_stat doesn't handle FINFO_NAME but svn_io_dir_walk is documented to provide it, so we have to do a bit extra. */ SVN_ERR(svn_io_stat(&finfo, dirname, wanted & ~APR_FINFO_NAME, pool)); SVN_ERR(cstring_from_utf8(&finfo.name, svn_dirent_basename(dirname, pool), pool)); finfo.valid |= APR_FINFO_NAME; SVN_ERR((*walk_func)(walk_baton, dirname, &finfo, pool)); SVN_ERR(cstring_from_utf8(&dirname_apr, dirname, pool)); /* APR doesn't like "" directories */ if (dirname_apr[0] == '\0') dirname_apr = "."; apr_err = apr_dir_open(&handle, dirname_apr, pool); if (apr_err) return svn_error_wrap_apr(apr_err, _("Can't open directory '%s'"), svn_dirent_local_style(dirname, pool)); /* iteration subpool */ subpool = svn_pool_create(pool); while (1) { const char *name_utf8; const char *full_path; svn_pool_clear(subpool); apr_err = apr_dir_read(&finfo, wanted, handle); if (APR_STATUS_IS_ENOENT(apr_err)) break; else if (apr_err) { return svn_error_wrap_apr(apr_err, _("Can't read directory entry in '%s'"), svn_dirent_local_style(dirname, pool)); } if (finfo.filetype == APR_DIR) { if (finfo.name[0] == '.' && (finfo.name[1] == '\0' || (finfo.name[1] == '.' && finfo.name[2] == '\0'))) /* skip "." and ".." */ continue; /* some other directory. recurse. it will be passed to the callback inside the recursion. */ SVN_ERR(entry_name_to_utf8(&name_utf8, finfo.name, dirname, subpool)); full_path = svn_dirent_join(dirname, name_utf8, subpool); SVN_ERR(svn_io_dir_walk2(full_path, wanted, walk_func, walk_baton, subpool)); } else if (finfo.filetype == APR_REG || finfo.filetype == APR_LNK) { /* some other directory. pass it to the callback. */ SVN_ERR(entry_name_to_utf8(&name_utf8, finfo.name, dirname, subpool)); full_path = svn_dirent_join(dirname, name_utf8, subpool); SVN_ERR((*walk_func)(walk_baton, full_path, &finfo, subpool)); } /* else: Some other type of file; skip it for now. We've reserved the right to expand our coverage here in the future, though, without revving this API. */ } svn_pool_destroy(subpool); apr_err = apr_dir_close(handle); if (apr_err) return svn_error_wrap_apr(apr_err, _("Error closing directory '%s'"), svn_dirent_local_style(dirname, pool)); return SVN_NO_ERROR; } /** * Determine if a directory is empty or not. * @param Return APR_SUCCESS if the dir is empty, else APR_ENOTEMPTY if not. * @param path The directory. * @param pool Used for temporary allocation. * @remark If path is not a directory, or some other error occurs, * then return the appropriate apr status code. * * (This function is written in APR style, in anticipation of * perhaps someday being moved to APR as 'apr_dir_is_empty'.) */ static apr_status_t dir_is_empty(const char *dir, apr_pool_t *pool) { apr_status_t apr_err; apr_dir_t *dir_handle; apr_finfo_t finfo; apr_status_t retval = APR_SUCCESS; /* APR doesn't like "" directories */ if (dir[0] == '\0') dir = "."; apr_err = apr_dir_open(&dir_handle, dir, pool); if (apr_err != APR_SUCCESS) return apr_err; for (apr_err = apr_dir_read(&finfo, APR_FINFO_NAME, dir_handle); apr_err == APR_SUCCESS; apr_err = apr_dir_read(&finfo, APR_FINFO_NAME, dir_handle)) { /* Ignore entries for this dir and its parent, robustly. (APR promises that they'll come first, so technically this guard could be moved outside the loop. But Ryan Bloom says he doesn't believe it, and I believe him. */ if (! (finfo.name[0] == '.' && (finfo.name[1] == '\0' || (finfo.name[1] == '.' && finfo.name[2] == '\0')))) { retval = APR_ENOTEMPTY; break; } } /* Make sure we broke out of the loop for the right reason. */ if (apr_err && ! APR_STATUS_IS_ENOENT(apr_err)) return apr_err; apr_err = apr_dir_close(dir_handle); if (apr_err != APR_SUCCESS) return apr_err; return retval; } svn_error_t * svn_io_dir_empty(svn_boolean_t *is_empty_p, const char *path, apr_pool_t *pool) { apr_status_t status; const char *path_apr; SVN_ERR(cstring_from_utf8(&path_apr, path, pool)); status = dir_is_empty(path_apr, pool); if (!status) *is_empty_p = TRUE; else if (APR_STATUS_IS_ENOTEMPTY(status)) *is_empty_p = FALSE; else return svn_error_wrap_apr(status, _("Can't check directory '%s'"), svn_dirent_local_style(path, pool)); return SVN_NO_ERROR; } /*** Version/format files ***/ svn_error_t * svn_io_write_version_file(const char *path, int version, apr_pool_t *pool) { const char *path_tmp; const char *format_contents = apr_psprintf(pool, "%d\n", version); SVN_ERR_ASSERT(version >= 0); SVN_ERR(svn_io_write_unique(&path_tmp, svn_dirent_dirname(path, pool), format_contents, strlen(format_contents), svn_io_file_del_none, pool)); #if defined(WIN32) || defined(__OS2__) /* make the destination writable, but only on Windows, because Windows does not let us replace read-only files. */ SVN_ERR(svn_io_set_file_read_write(path, TRUE, pool)); #endif /* WIN32 || __OS2__ */ /* rename the temp file as the real destination */ SVN_ERR(svn_io_file_rename2(path_tmp, path, FALSE, pool)); /* And finally remove the perms to make it read only */ return svn_io_set_file_read_only(path, FALSE, pool); } svn_error_t * svn_io_read_version_file(int *version, const char *path, apr_pool_t *pool) { apr_file_t *format_file; char buf[80]; apr_size_t len; svn_error_t *err; /* Read a chunk of data from PATH */ SVN_ERR(svn_io_file_open(&format_file, path, APR_READ, APR_OS_DEFAULT, pool)); len = sizeof(buf); err = svn_io_file_read(format_file, buf, &len, pool); /* Close the file. */ SVN_ERR(svn_error_compose_create(err, svn_io_file_close(format_file, pool))); /* If there was no data in PATH, return an error. */ if (len == 0) return svn_error_createf(SVN_ERR_STREAM_UNEXPECTED_EOF, NULL, _("Reading '%s'"), svn_dirent_local_style(path, pool)); /* Check that the first line contains only digits. */ { apr_size_t i; for (i = 0; i < len; ++i) { char c = buf[i]; if (i > 0 && (c == '\r' || c == '\n')) { buf[i] = '\0'; break; } if (! svn_ctype_isdigit(c)) return svn_error_createf (SVN_ERR_BAD_VERSION_FILE_FORMAT, NULL, _("First line of '%s' contains non-digit"), svn_dirent_local_style(path, pool)); } } /* Convert to integer. */ SVN_ERR(svn_cstring_atoi(version, buf)); return SVN_NO_ERROR; } /* Do a byte-for-byte comparison of FILE1 and FILE2. */ static svn_error_t * contents_identical_p(svn_boolean_t *identical_p, const char *file1, const char *file2, apr_pool_t *pool) { svn_error_t *err; apr_size_t bytes_read1, bytes_read2; char *buf1 = apr_palloc(pool, SVN__STREAM_CHUNK_SIZE); char *buf2 = apr_palloc(pool, SVN__STREAM_CHUNK_SIZE); apr_file_t *file1_h; apr_file_t *file2_h; svn_boolean_t eof1 = FALSE; svn_boolean_t eof2 = FALSE; SVN_ERR(svn_io_file_open(&file1_h, file1, APR_READ, APR_OS_DEFAULT, pool)); err = svn_io_file_open(&file2_h, file2, APR_READ, APR_OS_DEFAULT, pool); if (err) return svn_error_trace( svn_error_compose_create(err, svn_io_file_close(file1_h, pool))); *identical_p = TRUE; /* assume TRUE, until disproved below */ while (!err && !eof1 && !eof2) { err = svn_io_file_read_full2(file1_h, buf1, SVN__STREAM_CHUNK_SIZE, &bytes_read1, &eof1, pool); if (err) break; err = svn_io_file_read_full2(file2_h, buf2, SVN__STREAM_CHUNK_SIZE, &bytes_read2, &eof2, pool); if (err) break; if ((bytes_read1 != bytes_read2) || memcmp(buf1, buf2, bytes_read1)) { *identical_p = FALSE; break; } } /* Special case: one file being a prefix of the other and the shorter * file's size is a multiple of SVN__STREAM_CHUNK_SIZE. */ if (!err && (eof1 != eof2)) *identical_p = FALSE; return svn_error_trace( svn_error_compose_create( err, svn_error_compose_create(svn_io_file_close(file1_h, pool), svn_io_file_close(file2_h, pool)))); } /* Do a byte-for-byte comparison of FILE1, FILE2 and FILE3. */ static svn_error_t * contents_three_identical_p(svn_boolean_t *identical_p12, svn_boolean_t *identical_p23, svn_boolean_t *identical_p13, const char *file1, const char *file2, const char *file3, apr_pool_t *scratch_pool) { svn_error_t *err; char *buf1 = apr_palloc(scratch_pool, SVN__STREAM_CHUNK_SIZE); char *buf2 = apr_palloc(scratch_pool, SVN__STREAM_CHUNK_SIZE); char *buf3 = apr_palloc(scratch_pool, SVN__STREAM_CHUNK_SIZE); apr_file_t *file1_h; apr_file_t *file2_h; apr_file_t *file3_h; svn_boolean_t eof1 = FALSE; svn_boolean_t eof2 = FALSE; svn_boolean_t eof3 = FALSE; SVN_ERR(svn_io_file_open(&file1_h, file1, APR_READ, APR_OS_DEFAULT, scratch_pool)); err = svn_io_file_open(&file2_h, file2, APR_READ, APR_OS_DEFAULT, scratch_pool); if (err) return svn_error_trace( svn_error_compose_create(err, svn_io_file_close(file1_h, scratch_pool))); err = svn_io_file_open(&file3_h, file3, APR_READ, APR_OS_DEFAULT, scratch_pool); if (err) return svn_error_trace( svn_error_compose_create( err, svn_error_compose_create(svn_io_file_close(file1_h, scratch_pool), svn_io_file_close(file2_h, scratch_pool)))); /* assume TRUE, until disproved below */ *identical_p12 = *identical_p23 = *identical_p13 = TRUE; /* We need to read as long as no error occurs, and as long as one of the * flags could still change due to a read operation */ while (!err && ((*identical_p12 && !eof1 && !eof2) || (*identical_p23 && !eof2 && !eof3) || (*identical_p13 && !eof1 && !eof3))) { apr_size_t bytes_read1, bytes_read2, bytes_read3; svn_boolean_t read_1, read_2, read_3; read_1 = read_2 = read_3 = FALSE; /* As long as a file is not at the end yet, and it is still * potentially identical to another file, we read the next chunk.*/ if (!eof1 && (*identical_p12 || *identical_p13)) { err = svn_io_file_read_full2(file1_h, buf1, SVN__STREAM_CHUNK_SIZE, &bytes_read1, &eof1, scratch_pool); if (err) break; read_1 = TRUE; } if (!eof2 && (*identical_p12 || *identical_p23)) { err = svn_io_file_read_full2(file2_h, buf2, SVN__STREAM_CHUNK_SIZE, &bytes_read2, &eof2, scratch_pool); if (err) break; read_2 = TRUE; } if (!eof3 && (*identical_p13 || *identical_p23)) { err = svn_io_file_read_full2(file3_h, buf3, SVN__STREAM_CHUNK_SIZE, &bytes_read3, &eof3, scratch_pool); if (err) break; read_3 = TRUE; } /* If the files are still marked identical, and at least one of them * is not at the end of file, we check whether they differ, and set * their flag to false then. */ if (*identical_p12 && (read_1 || read_2) && ((eof1 != eof2) || (bytes_read1 != bytes_read2) || memcmp(buf1, buf2, bytes_read1))) { *identical_p12 = FALSE; } if (*identical_p23 && (read_2 || read_3) && ((eof2 != eof3) || (bytes_read2 != bytes_read3) || memcmp(buf2, buf3, bytes_read2))) { *identical_p23 = FALSE; } if (*identical_p13 && (read_1 || read_3) && ((eof1 != eof3) || (bytes_read1 != bytes_read3) || memcmp(buf1, buf3, bytes_read3))) { *identical_p13 = FALSE; } } return svn_error_trace( svn_error_compose_create( err, svn_error_compose_create( svn_io_file_close(file1_h, scratch_pool), svn_error_compose_create( svn_io_file_close(file2_h, scratch_pool), svn_io_file_close(file3_h, scratch_pool))))); } svn_error_t * svn_io_files_contents_same_p(svn_boolean_t *same, const char *file1, const char *file2, apr_pool_t *pool) { svn_boolean_t q; SVN_ERR(svn_io_filesizes_different_p(&q, file1, file2, pool)); if (q) { *same = FALSE; return SVN_NO_ERROR; } SVN_ERR(contents_identical_p(&q, file1, file2, pool)); if (q) *same = TRUE; else *same = FALSE; return SVN_NO_ERROR; } svn_error_t * svn_io_files_contents_three_same_p(svn_boolean_t *same12, svn_boolean_t *same23, svn_boolean_t *same13, const char *file1, const char *file2, const char *file3, apr_pool_t *scratch_pool) { svn_boolean_t diff_size12, diff_size23, diff_size13; SVN_ERR(svn_io_filesizes_three_different_p(&diff_size12, &diff_size23, &diff_size13, file1, file2, file3, scratch_pool)); if (diff_size12 && diff_size23 && diff_size13) { *same12 = *same23 = *same13 = FALSE; } else if (diff_size12 && diff_size23) { *same12 = *same23 = FALSE; SVN_ERR(contents_identical_p(same13, file1, file3, scratch_pool)); } else if (diff_size23 && diff_size13) { *same23 = *same13 = FALSE; SVN_ERR(contents_identical_p(same12, file1, file2, scratch_pool)); } else if (diff_size12 && diff_size13) { *same12 = *same13 = FALSE; SVN_ERR(contents_identical_p(same23, file2, file3, scratch_pool)); } else { SVN_ERR_ASSERT(!diff_size12 && !diff_size23 && !diff_size13); SVN_ERR(contents_three_identical_p(same12, same23, same13, file1, file2, file3, scratch_pool)); } return SVN_NO_ERROR; } #ifdef WIN32 /* Counter value of file_mktemp request (used in a threadsafe way), to make sure that a single process normally never generates the same tempname twice */ static volatile apr_uint32_t tempname_counter = 0; #endif /* Creates a new temporary file in DIRECTORY with apr flags FLAGS. Set *NEW_FILE to the file handle and *NEW_FILE_NAME to its name. Perform temporary allocations in SCRATCH_POOL and the result in RESULT_POOL. */ static svn_error_t * temp_file_create(apr_file_t **new_file, const char **new_file_name, const char *directory, apr_int32_t flags, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { #ifndef WIN32 const char *templ = svn_dirent_join(directory, "svn-XXXXXX", scratch_pool); const char *templ_apr; apr_status_t status; SVN_ERR(svn_path_cstring_from_utf8(&templ_apr, templ, scratch_pool)); /* ### svn_path_cstring_from_utf8() guarantees to make a copy of the data available in POOL and we need a non-const pointer here, as apr changes the template to return the new filename. */ status = apr_file_mktemp(new_file, (char *)templ_apr, flags, result_pool); if (status) return svn_error_wrap_apr(status, _("Can't create temporary file from " "template '%s'"), templ); /* Translate the returned path back to utf-8 before returning it */ return svn_error_trace(svn_path_cstring_to_utf8(new_file_name, templ_apr, result_pool)); #else /* The Windows implementation of apr_file_mktemp doesn't handle access denied errors correctly. Therefore we implement our own temp file creation function here. */ /* ### Most of this is borrowed from the svn_io_open_uniquely_named(), ### the function we used before. But we try to guess a more unique ### name before trying if it exists. */ /* Offset by some time value and a unique request nr to make the number +- unique for both this process and on the computer */ int baseNr = (GetTickCount() << 11) + 7 * svn_atomic_inc(&tempname_counter) + GetCurrentProcessId(); int i; /* ### Maybe use an iterpool? */ for (i = 0; i <= 99999; i++) { apr_uint32_t unique_nr; const char *unique_name; const char *unique_name_apr; apr_file_t *try_file; apr_status_t apr_err; /* Generate a number that should be unique for this application and usually for the entire computer to reduce the number of cycles through this loop. (A bit of calculation is much cheaper than disk io) */ unique_nr = baseNr + 3 * i; unique_name = svn_dirent_join(directory, apr_psprintf(scratch_pool, "svn-%X", unique_nr), scratch_pool); SVN_ERR(cstring_from_utf8(&unique_name_apr, unique_name, scratch_pool)); apr_err = file_open(&try_file, unique_name_apr, flags, APR_OS_DEFAULT, FALSE, scratch_pool); if (APR_STATUS_IS_EEXIST(apr_err)) continue; else if (apr_err) { /* On Win32, CreateFile fails with an "Access Denied" error code, rather than "File Already Exists", if the colliding name belongs to a directory. */ if (APR_STATUS_IS_EACCES(apr_err)) { apr_finfo_t finfo; apr_status_t apr_err_2 = apr_stat(&finfo, unique_name_apr, APR_FINFO_TYPE, scratch_pool); if (!apr_err_2 && finfo.filetype == APR_DIR) continue; if (apr_err == APR_FROM_OS_ERROR(ERROR_ACCESS_DENIED) || apr_err == APR_FROM_OS_ERROR(ERROR_SHARING_VIOLATION)) { /* The file is in use by another process or is hidden; create a new name, but don't do this 99999 times in case the folder is not writable */ i += 797; continue; } /* Else fall through and return the original error. */ } return svn_error_wrap_apr(apr_err, _("Can't open '%s'"), svn_dirent_local_style(unique_name, scratch_pool)); } else { /* Move file to the right pool */ apr_err = apr_file_setaside(new_file, try_file, result_pool); if (apr_err) return svn_error_wrap_apr(apr_err, _("Can't set aside '%s'"), svn_dirent_local_style(unique_name, scratch_pool)); *new_file_name = apr_pstrdup(result_pool, unique_name); return SVN_NO_ERROR; } } return svn_error_createf(SVN_ERR_IO_UNIQUE_NAMES_EXHAUSTED, NULL, _("Unable to make name in '%s'"), svn_dirent_local_style(directory, scratch_pool)); #endif } /* Wrapper for apr_file_name_get(), passing out a UTF8-encoded filename. */ svn_error_t * svn_io_file_name_get(const char **filename, apr_file_t *file, apr_pool_t *pool) { const char *fname_apr; apr_status_t status; status = apr_file_name_get(&fname_apr, file); if (status) return svn_error_wrap_apr(status, _("Can't get file name")); if (fname_apr) SVN_ERR(svn_path_cstring_to_utf8(filename, fname_apr, pool)); else *filename = NULL; return SVN_NO_ERROR; } svn_error_t * svn_io_open_unique_file3(apr_file_t **file, const char **unique_path, const char *dirpath, svn_io_file_del_t delete_when, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { apr_file_t *tempfile; const char *tempname; struct temp_file_cleanup_s *baton = NULL; apr_int32_t flags = (APR_READ | APR_WRITE | APR_CREATE | APR_EXCL | APR_BUFFERED | APR_BINARY); #if !defined(WIN32) && !defined(__OS2__) apr_fileperms_t perms; svn_boolean_t using_system_temp_dir = FALSE; #endif SVN_ERR_ASSERT(file || unique_path); if (file) *file = NULL; if (unique_path) *unique_path = NULL; if (dirpath == NULL) { #if !defined(WIN32) && !defined(__OS2__) using_system_temp_dir = TRUE; #endif SVN_ERR(svn_io_temp_dir(&dirpath, scratch_pool)); } switch (delete_when) { case svn_io_file_del_on_pool_cleanup: baton = apr_palloc(result_pool, sizeof(*baton)); baton->pool = result_pool; baton->fname_apr = NULL; /* Because cleanups are run LIFO, we need to make sure to register our cleanup before the apr_file_close cleanup: On Windows, you can't remove an open file. */ apr_pool_cleanup_register(result_pool, baton, temp_file_plain_cleanup_handler, temp_file_child_cleanup_handler); break; case svn_io_file_del_on_close: flags |= APR_DELONCLOSE; break; default: break; } SVN_ERR(temp_file_create(&tempfile, &tempname, dirpath, flags, result_pool, scratch_pool)); #if !defined(WIN32) && !defined(__OS2__) /* apr_file_mktemp() creates files with mode 0600. * This is appropriate if we're using a system temp dir since we don't * want to leak sensitive data into temp files other users can read. * If we're not using a system temp dir we're probably using the * .svn/tmp area and it's likely that the tempfile will end up being * copied or renamed into the working copy. * This would cause working files having mode 0600 while users might * expect to see 0644 or 0664. So we tweak perms of the tempfile in this * case, but only if the umask allows it. */ if (!using_system_temp_dir) { svn_error_t *err; SVN_ERR(merge_default_file_perms(tempfile, &perms, dirpath, scratch_pool)); err = file_perms_set2(tempfile, perms, scratch_pool); if (err) { if (APR_STATUS_IS_INCOMPLETE(err->apr_err) || APR_STATUS_IS_ENOTIMPL(err->apr_err)) svn_error_clear(err); else { return svn_error_quick_wrapf( err, _("Can't set permissions on '%s'"), svn_dirent_local_style(tempname, scratch_pool)); } } } #endif if (file) *file = tempfile; else SVN_ERR(svn_io_file_close(tempfile, scratch_pool)); if (unique_path) *unique_path = tempname; /* Was allocated in result_pool */ if (baton) SVN_ERR(cstring_from_utf8(&baton->fname_apr, tempname, result_pool)); return SVN_NO_ERROR; } svn_error_t * svn_io_file_readline(apr_file_t *file, svn_stringbuf_t **stringbuf, const char **eol, svn_boolean_t *eof, apr_size_t max_len, apr_pool_t *result_pool, apr_pool_t *scratch_pool) { svn_stringbuf_t *str; const char *eol_str; apr_size_t numbytes; char c; apr_size_t len; svn_boolean_t found_eof; str = svn_stringbuf_create_ensure(80, result_pool); /* Read bytes into STR up to and including, but not storing, * the next EOL sequence. */ eol_str = NULL; numbytes = 1; len = 0; found_eof = FALSE; while (!found_eof) { if (len < max_len) SVN_ERR(svn_io_file_read_full2(file, &c, sizeof(c), &numbytes, &found_eof, scratch_pool)); len++; if (numbytes != 1 || len > max_len) { found_eof = TRUE; break; } if (c == '\n') { eol_str = "\n"; } else if (c == '\r') { eol_str = "\r"; if (!found_eof && len < max_len) { apr_off_t pos; /* Check for "\r\n" by peeking at the next byte. */ SVN_ERR(svn_io_file_get_offset(&pos, file, scratch_pool)); SVN_ERR(svn_io_file_read_full2(file, &c, sizeof(c), &numbytes, &found_eof, scratch_pool)); if (numbytes == 1 && c == '\n') { eol_str = "\r\n"; len++; } else { /* Pretend we never peeked. */ SVN_ERR(svn_io_file_seek(file, APR_SET, &pos, scratch_pool)); found_eof = FALSE; numbytes = 1; } } } else svn_stringbuf_appendbyte(str, c); if (eol_str) break; } if (eol) *eol = eol_str; if (eof) *eof = found_eof; *stringbuf = str; return SVN_NO_ERROR; } Index: vendor/subversion/dist/subversion/libsvn_wc/wc-checks.h =================================================================== --- vendor/subversion/dist/subversion/libsvn_wc/wc-checks.h (revision 339231) +++ vendor/subversion/dist/subversion/libsvn_wc/wc-checks.h (revision 339232) @@ -1,230 +1,230 @@ -/* This file is automatically generated from wc-checks.sql and /opt/svnrm/tempdir/subversion-1.10.0/subversion/libsvn_wc/token-map.h. +/* This file is automatically generated from wc-checks.sql and /opt/svnrm/tempdir/subversion-1.10.2/subversion/libsvn_wc/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_VERIFICATION_TRIGGERS 0 #define STMT_0_INFO {"STMT_VERIFICATION_TRIGGERS", NULL} #define STMT_0 \ "CREATE TEMPORARY TRIGGER no_repository_updates BEFORE UPDATE ON repository " \ "BEGIN " \ " SELECT RAISE(FAIL, 'Updates to REPOSITORY are not allowed.'); " \ "END; " \ "CREATE TEMPORARY TRIGGER validation_01 BEFORE INSERT ON nodes " \ "WHEN NOT ((new.local_relpath = '' AND new.parent_relpath IS NULL) " \ " OR (relpath_depth(new.local_relpath) " \ " = relpath_depth(new.parent_relpath) + 1)) " \ "BEGIN " \ " SELECT RAISE(FAIL, 'WC DB validity check 01 failed'); " \ "END; " \ "CREATE TEMPORARY TRIGGER validation_02 BEFORE INSERT ON nodes " \ "WHEN NOT new.op_depth <= relpath_depth(new.local_relpath) " \ "BEGIN " \ " SELECT RAISE(FAIL, 'WC DB validity check 02 failed'); " \ "END; " \ "CREATE TEMPORARY TRIGGER validation_03 BEFORE INSERT ON nodes " \ "WHEN NOT ( " \ " (new.op_depth = relpath_depth(new.local_relpath)) " \ " OR " \ " (EXISTS (SELECT 1 FROM nodes " \ " WHERE wc_id = new.wc_id AND op_depth = new.op_depth " \ " AND local_relpath = new.parent_relpath)) " \ " ) " \ " AND NOT (new.file_external IS NOT NULL AND new.op_depth = 0) " \ "BEGIN " \ " SELECT RAISE(FAIL, 'WC DB validity check 03 failed'); " \ "END; " \ "CREATE TEMPORARY TRIGGER validation_04 BEFORE INSERT ON actual_node " \ "WHEN NOT (new.local_relpath = '' " \ " OR EXISTS (SELECT 1 FROM nodes " \ " WHERE wc_id = new.wc_id " \ " AND local_relpath = new.parent_relpath)) " \ "BEGIN " \ " SELECT RAISE(FAIL, 'WC DB validity check 04 failed'); " \ "END; " \ "" #define STMT_STATIC_VERIFY 1 #define STMT_1_INFO {"STMT_STATIC_VERIFY", NULL} #define STMT_1 \ "SELECT local_relpath, op_depth, 1, 'Invalid parent relpath set in NODES' " \ "FROM nodes n WHERE local_relpath != '' " \ " AND (parent_relpath IS NULL " \ " OR NOT (((local_relpath) > (CASE (parent_relpath) WHEN '' THEN '' ELSE (parent_relpath) || '/' END)) AND ((local_relpath) < CASE (parent_relpath) WHEN '' THEN X'FFFF' ELSE (parent_relpath) || '0' END)) " \ " OR relpath_depth(local_relpath) != relpath_depth(parent_relpath)+1) " \ "UNION ALL " \ "SELECT local_relpath, -1, 2, 'Invalid parent relpath set in ACTUAL' " \ "FROM actual_node a WHERE local_relpath != '' " \ " AND (parent_relpath IS NULL " \ " OR NOT (((local_relpath) > (CASE (parent_relpath) WHEN '' THEN '' ELSE (parent_relpath) || '/' END)) AND ((local_relpath) < CASE (parent_relpath) WHEN '' THEN X'FFFF' ELSE (parent_relpath) || '0' END)) " \ " OR relpath_depth(local_relpath) != relpath_depth(parent_relpath)+1) " \ "UNION ALL " \ "SELECT local_relpath, -1, 10, 'No ancestor in ACTUAL' " \ "FROM actual_node a WHERE local_relpath != '' " \ " AND NOT EXISTS(SELECT 1 from nodes i " \ " WHERE i.wc_id=a.wc_id " \ " AND i.local_relpath=a.parent_relpath) " \ " AND NOT EXISTS(SELECT 1 from nodes i " \ " WHERE i.wc_id=a.wc_id " \ " AND i.local_relpath=a.local_relpath) " \ "UNION ALL " \ "SELECT a.local_relpath, -1, 11, 'Bad or Unneeded actual data' " \ "FROM actual_node a " \ "LEFT JOIN nodes n on n.wc_id = a.wc_id AND n.local_relpath = a.local_relpath " \ " AND n.op_depth = (SELECT MAX(op_depth) from nodes i " \ " WHERE i.wc_id=a.wc_id AND i.local_relpath=a.local_relpath) " \ "WHERE (a.properties IS NOT NULL " \ " AND (n.presence IS NULL " \ " OR n.presence NOT IN ('normal', 'incomplete'))) " \ " OR (a.changelist IS NOT NULL AND (n.kind IS NOT NULL AND n.kind != 'file')) " \ " OR (a.conflict_data IS NULL AND a.properties IS NULL AND a.changelist IS NULL) " \ " AND NOT EXISTS(SELECT 1 from nodes i " \ " WHERE i.wc_id=a.wc_id " \ " AND i.local_relpath=a.parent_relpath) " \ "UNION ALL " \ "SELECT local_relpath, op_depth, 20, 'No ancestor in NODES' " \ "FROM nodes n WHERE local_relpath != '' " \ " AND file_external IS NULL " \ " AND NOT EXISTS(SELECT 1 from nodes i " \ " WHERE i.wc_id=n.wc_id " \ " AND i.local_relpath=n.parent_relpath " \ " AND i.op_depth <= n.op_depth) " \ "UNION ALL " \ "SELECT local_relpath, op_depth, 21, 'Unneeded node data' " \ "FROM nodes " \ "WHERE presence NOT IN ('normal', 'incomplete') " \ "AND (properties IS NOT NULL " \ " OR checksum IS NOT NULL " \ " OR depth IS NOT NULL " \ " OR symlink_target IS NOT NULL " \ " OR changed_revision IS NOT NULL " \ " OR (changed_date IS NOT NULL AND changed_date != 0) " \ " OR changed_author IS NOT NULL " \ " OR translated_size IS NOT NULL " \ " OR last_mod_time IS NOT NULL " \ " OR dav_cache IS NOT NULL " \ " OR file_external IS NOT NULL " \ " OR inherited_props IS NOT NULL) " \ "UNION ALL " \ "SELECT local_relpath, op_depth, 22, 'Unneeded base-deleted node data' " \ "FROM nodes " \ "WHERE presence IN ('base-deleted') " \ "AND (repos_id IS NOT NULL " \ " OR repos_path IS NOT NULL " \ " OR revision IS NOT NULL) " \ "UNION ALL " \ "SELECT local_relpath, op_depth, 23, 'Kind specific data invalid on normal' " \ "FROM nodes " \ "WHERE presence IN ('normal', 'incomplete') " \ "AND (kind IS NULL " \ " OR (repos_path IS NULL " \ " AND (properties IS NOT NULL " \ " OR changed_revision IS NOT NULL " \ " OR changed_author IS NOT NULL " \ " OR (changed_date IS NOT NULL AND changed_date != 0))) " \ " OR (CASE WHEN kind = 'file' AND repos_path IS NOT NULL " \ " THEN checksum IS NULL " \ " ELSE checksum IS NOT NULL END) " \ " OR (CASE WHEN kind = 'dir' THEN depth IS NULL " \ " ELSE depth IS NOT NULL END) " \ " OR (CASE WHEN kind = 'symlink' THEN symlink_target IS NULL " \ " ELSE symlink_target IS NOT NULL END)) " \ "UNION ALL " \ "SELECT local_relpath, op_depth, 24, 'Invalid op-depth for local add' " \ "FROM nodes " \ "WHERE presence IN ('normal', 'incomplete') " \ " AND repos_path IS NULL " \ " AND op_depth != relpath_depth(local_relpath) " \ "UNION ALL " \ "SELECT local_relpath, op_depth, 25, 'Node missing op-depth ancestor' " \ "FROM nodes n " \ "WHERE op_depth < relpath_depth(local_relpath) " \ " AND file_external IS NULL " \ " AND NOT EXISTS(SELECT 1 FROM nodes p " \ " WHERE p.wc_id=n.wc_id AND p.local_relpath=n.parent_relpath " \ " AND p.op_depth=n.op_depth " \ " AND (p.presence IN ('normal', 'incomplete') " \ " OR (p.presence IN ('base-deleted', 'not-present') " \ " AND n.presence = 'base-deleted'))) " \ "UNION ALL " \ "SELECT n.local_relpath, n.op_depth, 26, 'Copied descendant mismatch' " \ "FROM nodes n " \ "JOIN nodes p " \ " ON p.wc_id=n.wc_id AND p.local_relpath=n.parent_relpath " \ " AND n.op_depth=p.op_depth " \ "WHERE n.op_depth > 0 AND n.presence IN ('normal', 'incomplete') " \ " AND (n.repos_id != p.repos_id " \ " OR n.repos_path != " \ " (CASE WHEN (n.parent_relpath) = '' THEN (CASE WHEN (p.repos_path) = '' THEN (n.local_relpath) WHEN (n.local_relpath) = '' THEN (p.repos_path) ELSE (p.repos_path) || '/' || (n.local_relpath) END) WHEN (p.repos_path) = '' THEN (CASE WHEN (n.parent_relpath) = '' THEN (n.local_relpath) WHEN SUBSTR((n.local_relpath), 1, LENGTH(n.parent_relpath)) = (n.parent_relpath) THEN CASE WHEN LENGTH(n.parent_relpath) = LENGTH(n.local_relpath) THEN '' WHEN SUBSTR((n.local_relpath), LENGTH(n.parent_relpath)+1, 1) = '/' THEN SUBSTR((n.local_relpath), LENGTH(n.parent_relpath)+2) END END) WHEN SUBSTR((n.local_relpath), 1, LENGTH(n.parent_relpath)) = (n.parent_relpath) THEN CASE WHEN LENGTH(n.parent_relpath) = LENGTH(n.local_relpath) THEN (p.repos_path) WHEN SUBSTR((n.local_relpath), LENGTH(n.parent_relpath)+1, 1) = '/' THEN (p.repos_path) || SUBSTR((n.local_relpath), LENGTH(n.parent_relpath)+1) END END) " \ " OR n.revision != p.revision " \ " OR p.kind != 'dir' " \ " OR n.moved_here IS NOT p.moved_here) " \ "UNION ALL " \ "SELECT n.local_relpath, n.op_depth, 27, 'Invalid op-root presence' " \ "FROM nodes n " \ "WHERE n.op_depth = relpath_depth(local_relpath) " \ " AND presence NOT IN ('normal', 'incomplete', 'base-deleted') " \ "UNION ALL " \ "SELECT n.local_relpath, s.op_depth, 28, 'Incomplete shadowing' " \ "FROM nodes n " \ "JOIN nodes s ON s.wc_id=n.wc_id AND s.local_relpath=n.local_relpath " \ " AND s.op_depth = relpath_depth(s.local_relpath) " \ " AND s.op_depth = (SELECT MIN(op_depth) FROM nodes d " \ " WHERE d.wc_id=s.wc_id AND d.local_relpath=s.local_relpath " \ " AND d.op_depth > n.op_depth) " \ "WHERE n.presence IN ('normal', 'incomplete') " \ " AND EXISTS(SELECT 1 " \ " FROM nodes dn " \ " WHERE dn.wc_id=n.wc_id AND dn.op_depth=n.op_depth " \ " AND dn.presence IN ('normal', 'incomplete') " \ " AND (((dn.local_relpath) > (CASE (n.local_relpath) WHEN '' THEN '' ELSE (n.local_relpath) || '/' END)) AND ((dn.local_relpath) < CASE (n.local_relpath) WHEN '' THEN X'FFFF' ELSE (n.local_relpath) || '0' END)) " \ " AND dn.file_external IS NULL " \ " AND NOT EXISTS(SELECT 1 " \ " FROM nodes ds " \ " WHERE ds.wc_id=n.wc_id AND ds.op_depth=s.op_depth " \ " AND ds.local_relpath=dn.local_relpath)) " \ "UNION ALL " \ "SELECT s.local_relpath, s.op_depth, 29, 'Invalid base-delete' " \ "FROM nodes s " \ "LEFT JOIN nodes n ON n.wc_id=s.wc_id AND n.local_relpath=s.local_relpath " \ " AND n.op_depth = (SELECT MAX(op_depth) FROM nodes d " \ " WHERE d.wc_id=s.wc_id AND d.local_relpath=s.local_relpath " \ " AND d.op_depth < s.op_depth) " \ "WHERE s.presence = 'base-deleted' " \ " AND (n.presence IS NULL " \ " OR n.presence NOT IN ('normal', 'incomplete') " \ " ) " \ "UNION ALL " \ "SELECT n.local_relpath, n.op_depth, 30, 'Invalid data for BASE' " \ "FROM nodes n " \ "WHERE n.op_depth = 0 " \ " AND (n.moved_to IS NOT NULL " \ " OR n.moved_here IS NOT NULL) " \ "UNION ALL " \ "SELECT d.local_relpath, d.op_depth, 60, 'Moved here without origin' " \ "FROM nodes d " \ "WHERE d.op_depth = relpath_depth(d.local_relpath) " \ " AND d.moved_here IS NOT NULL " \ " AND NOT EXISTS(SELECT 1 FROM nodes s " \ " WHERE s.wc_id = d.wc_id AND s.moved_to = d.local_relpath) " \ "UNION ALL " \ "SELECT s.local_relpath, s.op_depth, 61, 'Moved to without target' " \ "FROM nodes s " \ "WHERE s.moved_to IS NOT NULL " \ " AND NOT EXISTS(SELECT 1 FROM nodes d " \ " WHERE d.wc_id = s.wc_id AND d.local_relpath = s.moved_to " \ " AND d.op_depth = relpath_depth(d.local_relpath) " \ " AND d.moved_here =1 AND d.repos_path IS NOT NULL) " \ "" #define WC_CHECKS_SQL_DECLARE_STATEMENTS(varname) \ static const char * const varname[] = { \ STMT_0, \ STMT_1, \ NULL \ } #define WC_CHECKS_SQL_DECLARE_STATEMENT_INFO(varname) \ static const char * const varname[][2] = { \ STMT_0_INFO, \ STMT_1_INFO, \ {NULL, NULL} \ } Index: vendor/subversion/dist/subversion/libsvn_wc/wc-metadata.h =================================================================== --- vendor/subversion/dist/subversion/libsvn_wc/wc-metadata.h (revision 339231) +++ vendor/subversion/dist/subversion/libsvn_wc/wc-metadata.h (revision 339232) @@ -1,298 +1,298 @@ -/* This file is automatically generated from wc-metadata.sql and /opt/svnrm/tempdir/subversion-1.10.0/subversion/libsvn_wc/token-map.h. +/* This file is automatically generated from wc-metadata.sql and /opt/svnrm/tempdir/subversion-1.10.2/subversion/libsvn_wc/token-map.h. * Do not edit this file -- edit the source and rerun gen-make.py */ #define STMT_CREATE_SCHEMA 0 #define STMT_0_INFO {"STMT_CREATE_SCHEMA", NULL} #define STMT_0 \ "CREATE TABLE REPOSITORY ( " \ " id INTEGER PRIMARY KEY AUTOINCREMENT, " \ " root TEXT UNIQUE NOT NULL, " \ " uuid TEXT NOT NULL " \ " ); " \ "CREATE INDEX I_UUID ON REPOSITORY (uuid); " \ "CREATE INDEX I_ROOT ON REPOSITORY (root); " \ "CREATE TABLE WCROOT ( " \ " id INTEGER PRIMARY KEY AUTOINCREMENT, " \ " local_abspath TEXT UNIQUE " \ " ); " \ "CREATE UNIQUE INDEX I_LOCAL_ABSPATH ON WCROOT (local_abspath); " \ "CREATE TABLE PRISTINE ( " \ " checksum TEXT NOT NULL PRIMARY KEY, " \ " compression INTEGER, " \ " size INTEGER NOT NULL, " \ " refcount INTEGER NOT NULL, " \ " md5_checksum TEXT NOT NULL " \ " ); " \ "CREATE INDEX I_PRISTINE_MD5 ON PRISTINE (md5_checksum); " \ "CREATE TABLE ACTUAL_NODE ( " \ " wc_id INTEGER NOT NULL REFERENCES WCROOT (id), " \ " local_relpath TEXT NOT NULL, " \ " parent_relpath TEXT, " \ " properties BLOB, " \ " conflict_old TEXT, " \ " conflict_new TEXT, " \ " conflict_working TEXT, " \ " prop_reject TEXT, " \ " changelist TEXT, " \ " text_mod TEXT, " \ " tree_conflict_data TEXT, " \ " conflict_data BLOB, " \ " older_checksum TEXT REFERENCES PRISTINE (checksum), " \ " left_checksum TEXT REFERENCES PRISTINE (checksum), " \ " right_checksum TEXT REFERENCES PRISTINE (checksum), " \ " PRIMARY KEY (wc_id, local_relpath) " \ " ); " \ "CREATE UNIQUE INDEX I_ACTUAL_PARENT ON ACTUAL_NODE (wc_id, parent_relpath, " \ " local_relpath); " \ "CREATE TABLE LOCK ( " \ " repos_id INTEGER NOT NULL REFERENCES REPOSITORY (id), " \ " repos_relpath TEXT NOT NULL, " \ " lock_token TEXT NOT NULL, " \ " lock_owner TEXT, " \ " lock_comment TEXT, " \ " lock_date INTEGER, " \ " PRIMARY KEY (repos_id, repos_relpath) " \ " ); " \ "CREATE TABLE WORK_QUEUE ( " \ " id INTEGER PRIMARY KEY AUTOINCREMENT, " \ " work BLOB NOT NULL " \ " ); " \ "CREATE TABLE WC_LOCK ( " \ " wc_id INTEGER NOT NULL REFERENCES WCROOT (id), " \ " local_dir_relpath TEXT NOT NULL, " \ " locked_levels INTEGER NOT NULL DEFAULT -1, " \ " PRIMARY KEY (wc_id, local_dir_relpath) " \ " ); " \ "CREATE TABLE NODES ( " \ " wc_id INTEGER NOT NULL REFERENCES WCROOT (id), " \ " local_relpath TEXT NOT NULL, " \ " op_depth INTEGER NOT NULL, " \ " parent_relpath TEXT, " \ " repos_id INTEGER REFERENCES REPOSITORY (id), " \ " repos_path TEXT, " \ " revision INTEGER, " \ " presence TEXT NOT NULL, " \ " moved_here INTEGER, " \ " moved_to TEXT, " \ " kind TEXT NOT NULL, " \ " properties BLOB, " \ " depth TEXT, " \ " checksum TEXT REFERENCES PRISTINE (checksum), " \ " symlink_target TEXT, " \ " changed_revision INTEGER, " \ " changed_date INTEGER, " \ " changed_author TEXT, " \ " translated_size INTEGER, " \ " last_mod_time INTEGER, " \ " dav_cache BLOB, " \ " file_external INTEGER, " \ " inherited_props BLOB, " \ " PRIMARY KEY (wc_id, local_relpath, op_depth) " \ " ); " \ "CREATE UNIQUE INDEX I_NODES_PARENT ON NODES (wc_id, parent_relpath, " \ " local_relpath, op_depth); " \ "CREATE UNIQUE INDEX I_NODES_MOVED ON NODES (wc_id, moved_to, op_depth); " \ "CREATE VIEW NODES_CURRENT AS " \ " SELECT * FROM nodes AS n " \ " WHERE op_depth = (SELECT MAX(op_depth) FROM nodes AS n2 " \ " WHERE n2.wc_id = n.wc_id " \ " AND n2.local_relpath = n.local_relpath); " \ "CREATE VIEW NODES_BASE AS " \ " SELECT * FROM nodes " \ " WHERE op_depth = 0; " \ "CREATE TRIGGER nodes_insert_trigger " \ "AFTER INSERT ON nodes " \ "WHEN NEW.checksum IS NOT NULL " \ "BEGIN " \ " UPDATE pristine SET refcount = refcount + 1 " \ " WHERE checksum = NEW.checksum; " \ "END; " \ "CREATE TRIGGER nodes_delete_trigger " \ "AFTER DELETE ON nodes " \ "WHEN OLD.checksum IS NOT NULL " \ "BEGIN " \ " UPDATE pristine SET refcount = refcount - 1 " \ " WHERE checksum = OLD.checksum; " \ "END; " \ "CREATE TRIGGER nodes_update_checksum_trigger " \ "AFTER UPDATE OF checksum ON nodes " \ "WHEN NEW.checksum IS NOT OLD.checksum " \ "BEGIN " \ " UPDATE pristine SET refcount = refcount + 1 " \ " WHERE checksum = NEW.checksum; " \ " UPDATE pristine SET refcount = refcount - 1 " \ " WHERE checksum = OLD.checksum; " \ "END; " \ "CREATE TABLE EXTERNALS ( " \ " wc_id INTEGER NOT NULL REFERENCES WCROOT (id), " \ " local_relpath TEXT NOT NULL, " \ " parent_relpath TEXT NOT NULL, " \ " repos_id INTEGER NOT NULL REFERENCES REPOSITORY (id), " \ " presence TEXT NOT NULL, " \ " kind TEXT NOT NULL, " \ " def_local_relpath TEXT NOT NULL, " \ " def_repos_relpath TEXT NOT NULL, " \ " def_operational_revision TEXT, " \ " def_revision TEXT, " \ " PRIMARY KEY (wc_id, local_relpath) " \ "); " \ "CREATE UNIQUE INDEX I_EXTERNALS_DEFINED ON EXTERNALS (wc_id, " \ " def_local_relpath, " \ " local_relpath); " \ "PRAGMA user_version = " \ APR_STRINGIFY(SVN_WC__VERSION) \ "; " \ "" #define STMT_INSTALL_SCHEMA_STATISTICS 1 #define STMT_1_INFO {"STMT_INSTALL_SCHEMA_STATISTICS", NULL} #define STMT_1 \ "ANALYZE sqlite_master; " \ "DELETE FROM sqlite_stat1 " \ "WHERE tbl in ('NODES', 'ACTUAL_NODE', 'LOCK', 'WC_LOCK', 'EXTERNALS'); " \ "INSERT INTO sqlite_stat1(tbl, idx, stat) VALUES " \ " ('NODES', 'sqlite_autoindex_NODES_1', '8000 8000 2 1'); " \ "INSERT INTO sqlite_stat1(tbl, idx, stat) VALUES " \ " ('NODES', 'I_NODES_PARENT', '8000 8000 10 2 1'); " \ "INSERT INTO sqlite_stat1(tbl, idx, stat) VALUES " \ " ('NODES', 'I_NODES_MOVED', '8000 8000 1 1'); " \ "INSERT INTO sqlite_stat1(tbl, idx, stat) VALUES " \ " ('ACTUAL_NODE', 'sqlite_autoindex_ACTUAL_NODE_1', '8000 8000 1'); " \ "INSERT INTO sqlite_stat1(tbl, idx, stat) VALUES " \ " ('ACTUAL_NODE', 'I_ACTUAL_PARENT', '8000 8000 10 1'); " \ "INSERT INTO sqlite_stat1(tbl, idx, stat) VALUES " \ " ('LOCK', 'sqlite_autoindex_LOCK_1', '100 100 1'); " \ "INSERT INTO sqlite_stat1(tbl, idx, stat) VALUES " \ " ('WC_LOCK', 'sqlite_autoindex_WC_LOCK_1', '100 100 1'); " \ "INSERT INTO sqlite_stat1(tbl, idx, stat) VALUES " \ " ('EXTERNALS','sqlite_autoindex_EXTERNALS_1', '100 100 1'); " \ "INSERT INTO sqlite_stat1(tbl, idx, stat) VALUES " \ " ('EXTERNALS','I_EXTERNALS_DEFINED', '100 100 3 1'); " \ "ANALYZE sqlite_master; " \ "" #define STMT_UPGRADE_TO_30 2 #define STMT_2_INFO {"STMT_UPGRADE_TO_30", NULL} #define STMT_2 \ "CREATE UNIQUE INDEX IF NOT EXISTS I_NODES_MOVED " \ "ON NODES (wc_id, moved_to, op_depth); " \ "CREATE INDEX IF NOT EXISTS I_PRISTINE_MD5 ON PRISTINE (md5_checksum); " \ "UPDATE nodes SET presence = \"server-excluded\" WHERE presence = \"absent\"; " \ "UPDATE nodes SET file_external=1 WHERE file_external IS NOT NULL; " \ "" #define STMT_UPGRADE_30_SELECT_CONFLICT_SEPARATE 3 #define STMT_3_INFO {"STMT_UPGRADE_30_SELECT_CONFLICT_SEPARATE", NULL} #define STMT_3 \ "SELECT wc_id, local_relpath, " \ " conflict_old, conflict_working, conflict_new, prop_reject, tree_conflict_data " \ "FROM actual_node " \ "WHERE conflict_old IS NOT NULL " \ " OR conflict_working IS NOT NULL " \ " OR conflict_new IS NOT NULL " \ " OR prop_reject IS NOT NULL " \ " OR tree_conflict_data IS NOT NULL " \ "ORDER by wc_id, local_relpath " \ "" #define STMT_UPGRADE_30_SET_CONFLICT 4 #define STMT_4_INFO {"STMT_UPGRADE_30_SET_CONFLICT", NULL} #define STMT_4 \ "UPDATE actual_node SET conflict_data = ?3, conflict_old = NULL, " \ " conflict_working = NULL, conflict_new = NULL, prop_reject = NULL, " \ " tree_conflict_data = NULL " \ "WHERE wc_id = ?1 and local_relpath = ?2 " \ "" #define STMT_UPGRADE_TO_31 5 #define STMT_5_INFO {"STMT_UPGRADE_TO_31", NULL} #define STMT_5 \ "ALTER TABLE NODES ADD COLUMN inherited_props BLOB; " \ "DROP INDEX IF EXISTS I_ACTUAL_CHANGELIST; " \ "DROP INDEX IF EXISTS I_EXTERNALS_PARENT; " \ "DROP INDEX I_NODES_PARENT; " \ "CREATE UNIQUE INDEX I_NODES_PARENT ON NODES (wc_id, parent_relpath, " \ " local_relpath, op_depth); " \ "DROP INDEX I_ACTUAL_PARENT; " \ "CREATE UNIQUE INDEX I_ACTUAL_PARENT ON ACTUAL_NODE (wc_id, parent_relpath, " \ " local_relpath); " \ "PRAGMA user_version = 31; " \ "" #define STMT_UPGRADE_31_SELECT_WCROOT_NODES 6 #define STMT_6_INFO {"STMT_UPGRADE_31_SELECT_WCROOT_NODES", NULL} #define STMT_6 \ "SELECT l.wc_id, l.local_relpath FROM nodes as l " \ "LEFT OUTER JOIN nodes as r " \ "ON l.wc_id = r.wc_id " \ " AND r.local_relpath = l.parent_relpath " \ " AND r.op_depth = 0 " \ "WHERE l.op_depth = 0 " \ " AND l.repos_path != '' " \ " AND ((l.repos_id IS NOT r.repos_id) " \ " OR (l.repos_path IS NOT (CASE WHEN (r.local_relpath) = '' THEN (CASE WHEN (r.repos_path) = '' THEN (l.local_relpath) WHEN (l.local_relpath) = '' THEN (r.repos_path) ELSE (r.repos_path) || '/' || (l.local_relpath) END) WHEN (r.repos_path) = '' THEN (CASE WHEN (r.local_relpath) = '' THEN (l.local_relpath) WHEN SUBSTR((l.local_relpath), 1, LENGTH(r.local_relpath)) = (r.local_relpath) THEN CASE WHEN LENGTH(r.local_relpath) = LENGTH(l.local_relpath) THEN '' WHEN SUBSTR((l.local_relpath), LENGTH(r.local_relpath)+1, 1) = '/' THEN SUBSTR((l.local_relpath), LENGTH(r.local_relpath)+2) END END) WHEN SUBSTR((l.local_relpath), 1, LENGTH(r.local_relpath)) = (r.local_relpath) THEN CASE WHEN LENGTH(r.local_relpath) = LENGTH(l.local_relpath) THEN (r.repos_path) WHEN SUBSTR((l.local_relpath), LENGTH(r.local_relpath)+1, 1) = '/' THEN (r.repos_path) || SUBSTR((l.local_relpath), LENGTH(r.local_relpath)+1) END END))) " \ "" #define WC_METADATA_SQL_99 \ "CREATE TABLE ACTUAL_NODE_BACKUP ( " \ " wc_id INTEGER NOT NULL, " \ " local_relpath TEXT NOT NULL, " \ " parent_relpath TEXT, " \ " properties BLOB, " \ " conflict_old TEXT, " \ " conflict_new TEXT, " \ " conflict_working TEXT, " \ " prop_reject TEXT, " \ " changelist TEXT, " \ " text_mod TEXT " \ " ); " \ "INSERT INTO ACTUAL_NODE_BACKUP SELECT " \ " wc_id, local_relpath, parent_relpath, properties, conflict_old, " \ " conflict_new, conflict_working, prop_reject, changelist, text_mod " \ "FROM ACTUAL_NODE; " \ "DROP TABLE ACTUAL_NODE; " \ "CREATE TABLE ACTUAL_NODE ( " \ " wc_id INTEGER NOT NULL REFERENCES WCROOT (id), " \ " local_relpath TEXT NOT NULL, " \ " parent_relpath TEXT, " \ " properties BLOB, " \ " conflict_old TEXT, " \ " conflict_new TEXT, " \ " conflict_working TEXT, " \ " prop_reject TEXT, " \ " changelist TEXT, " \ " text_mod TEXT, " \ " PRIMARY KEY (wc_id, local_relpath) " \ " ); " \ "CREATE UNIQUE INDEX I_ACTUAL_PARENT ON ACTUAL_NODE (wc_id, parent_relpath, " \ " local_relpath); " \ "INSERT INTO ACTUAL_NODE SELECT " \ " wc_id, local_relpath, parent_relpath, properties, conflict_old, " \ " conflict_new, conflict_working, prop_reject, changelist, text_mod " \ "FROM ACTUAL_NODE_BACKUP; " \ "DROP TABLE ACTUAL_NODE_BACKUP; " \ "" #define WC_METADATA_SQL_DECLARE_STATEMENTS(varname) \ static const char * const varname[] = { \ STMT_0, \ STMT_1, \ STMT_2, \ STMT_3, \ STMT_4, \ STMT_5, \ STMT_6, \ NULL \ } #define WC_METADATA_SQL_DECLARE_STATEMENT_INFO(varname) \ static const char * const varname[][2] = { \ STMT_0_INFO, \ STMT_1_INFO, \ STMT_2_INFO, \ STMT_3_INFO, \ STMT_4_INFO, \ STMT_5_INFO, \ STMT_6_INFO, \ {NULL, NULL} \ } Index: vendor/subversion/dist/subversion/svn/help-cmd.c =================================================================== --- vendor/subversion/dist/subversion/svn/help-cmd.c (revision 339231) +++ vendor/subversion/dist/subversion/svn/help-cmd.c (revision 339232) @@ -1,194 +1,194 @@ /* * help-cmd.c -- Provide help * * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * ==================================================================== */ /* ==================================================================== */ /*** Includes. ***/ #include "svn_hash.h" #include "svn_string.h" #include "svn_config.h" #include "svn_dirent_uri.h" #include "svn_error.h" #include "cl.h" #include "svn_private_config.h" /*** Code. ***/ /* This implements the `svn_opt_subcommand_t' interface. */ svn_error_t * svn_cl__help(apr_getopt_t *os, void *baton, apr_pool_t *pool) { svn_cl__opt_state_t *opt_state = NULL; svn_stringbuf_t *version_footer = NULL; const char *config_path; char help_header[] = N_("usage: svn [options] [args]\n" "Subversion command-line client.\n" "Type 'svn help ' for help on a specific subcommand.\n" "Type 'svn --version' to see the program version and RA modules,\n" " 'svn --version --verbose' to see dependency versions as well,\n" " 'svn --version --quiet' to see just the version number.\n" "\n" "Most subcommands take file and/or directory arguments, recursing\n" "on the directories. If no arguments are supplied to such a\n" "command, it recurses on the current directory (inclusive) by default.\n" "\n" "Available subcommands:\n"); char help_footer[] = N_("Subversion is a tool for version control.\n" "For additional information, see http://subversion.apache.org/\n"); const char *ra_desc_start = _("The following repository access (RA) modules are available:\n\n"); if (baton) { svn_cl__cmd_baton_t *const cmd_baton = baton; #ifndef SVN_DISABLE_PLAINTEXT_PASSWORD_STORAGE /* Windows never actually stores plaintext passwords, it encrypts the contents using CryptoAPI. ... ... If CryptoAPI is available ... but it should be on all versions of Windows that are even remotely interesting two days before the scheduled end of the world, when this comment is being written. */ # ifndef WIN32 svn_boolean_t store_auth_creds = SVN_CONFIG_DEFAULT_OPTION_STORE_AUTH_CREDS; svn_boolean_t store_passwords = SVN_CONFIG_DEFAULT_OPTION_STORE_PASSWORDS; svn_boolean_t store_plaintext_passwords = FALSE; svn_config_t *cfg; if (cmd_baton->ctx->config) { cfg = svn_hash_gets(cmd_baton->ctx->config, SVN_CONFIG_CATEGORY_CONFIG); if (cfg) { SVN_ERR(svn_config_get_bool(cfg, &store_auth_creds, SVN_CONFIG_SECTION_AUTH, SVN_CONFIG_OPTION_STORE_AUTH_CREDS, store_auth_creds)); SVN_ERR(svn_config_get_bool(cfg, &store_passwords, SVN_CONFIG_SECTION_AUTH, SVN_CONFIG_OPTION_STORE_PASSWORDS, store_passwords)); } cfg = svn_hash_gets(cmd_baton->ctx->config, SVN_CONFIG_CATEGORY_SERVERS); if (cfg) { const char *value; SVN_ERR(svn_config_get_yes_no_ask (cfg, &value, SVN_CONFIG_SECTION_GLOBAL, SVN_CONFIG_OPTION_STORE_PLAINTEXT_PASSWORDS, SVN_CONFIG_DEFAULT_OPTION_STORE_PLAINTEXT_PASSWORDS)); if (0 == svn_cstring_casecmp(value, SVN_CONFIG_TRUE)) store_plaintext_passwords = TRUE; } } if (store_plaintext_passwords && store_auth_creds && store_passwords) { version_footer = svn_stringbuf_create( _("WARNING: Plaintext password storage is enabled!\n\n"), pool); svn_stringbuf_appendcstr(version_footer, ra_desc_start); } # endif /* !WIN32 */ #endif /* !SVN_DISABLE_PLAINTEXT_PASSWORD_STORAGE */ opt_state = cmd_baton->opt_state; } if (!version_footer) version_footer = svn_stringbuf_create(ra_desc_start, pool); SVN_ERR(svn_ra_print_modules(version_footer, pool)); /* * Show auth creds storage providers. */ SVN_ERR(svn_config_get_user_config_path(&config_path, opt_state ? opt_state->config_dir : NULL, NULL, pool)); svn_stringbuf_appendcstr(version_footer, _("\nThe following authentication credential caches are available:\n\n")); /*### There is no API to query available providers at run time. */ if (config_path) { #if (defined(WIN32) && !defined(__MINGW32__)) version_footer = svn_stringbuf_create(apr_psprintf(pool, _("%s* Wincrypt cache in %s\n"), version_footer->data, svn_dirent_local_style(config_path, pool)), pool); #elif !defined(SVN_DISABLE_PLAINTEXT_PASSWORD_STORAGE) version_footer = svn_stringbuf_create(apr_psprintf(pool, _("%s* Plaintext cache in %s\n"), version_footer->data, svn_dirent_local_style(config_path, pool)), pool); #endif } -#ifdef SVN_HAVE_GNOME_KEYRING +#if (defined(SVN_HAVE_GNOME_KEYRING) || defined(SVN_HAVE_LIBSECRET)) svn_stringbuf_appendcstr(version_footer, "* Gnome Keyring\n"); #endif #ifdef SVN_HAVE_GPG_AGENT svn_stringbuf_appendcstr(version_footer, "* GPG-Agent\n"); #endif #ifdef SVN_HAVE_KEYCHAIN_SERVICES svn_stringbuf_appendcstr(version_footer, "* Mac OS X Keychain\n"); #endif #ifdef SVN_HAVE_KWALLET svn_stringbuf_appendcstr(version_footer, "* KWallet (KDE)\n"); #endif return svn_opt_print_help4(os, "svn", /* ### erm, derive somehow? */ opt_state ? opt_state->version : FALSE, opt_state ? opt_state->quiet : FALSE, opt_state ? opt_state->verbose : FALSE, version_footer->data, _(help_header), svn_cl__cmd_table, svn_cl__options, svn_cl__global_options, _(help_footer), pool); }