From 83fed9d108636a399e5b7cdefb375e47a8b58bb2 Mon Sep 17 00:00:00 2001 From: Packit Date: Sep 14 2020 13:05:30 +0000 Subject: libmemcached-1.0.18 base --- diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..1bdae2f --- /dev/null +++ b/AUTHORS @@ -0,0 +1,11 @@ +Brian Aker, brian@tangent.org -- Client Library, Tools +Mark Atwood, -- Tools, Docs +Patrick Galbraith, -- C++ Interface +Padraig O'Sullivan, -- C++ Interface (current one) +Tim Bunce, -- Docs +Trond Norbye, trond.norbye@gmail.com -- Binary protocol, Misc +Yin Chen, -- Ketama Work +Toru Maesaka, dev@torum.net -- Stats analysis +Eric Lambert, -- UDP work +Monty Taylor, -- Build Releated (Pandora) +Mingqiang Zhuang, Schooner Information Technology, Inc. -- Rewrite of memslap diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..0957f61 --- /dev/null +++ b/COPYING @@ -0,0 +1,32 @@ +Software License Agreement (BSD License) + +Copyright (c) 2012, Data Differential (http://datadifferential.com/) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + + * Neither the name of TangentOrg nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..6704611 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,491 @@ +1.0.18 Sun Feb 9 01:49:56 PST 2014 +* MEMCACHED_BEHAVIOR_RETRY_TIMEOUT can now be set to zero. +* Numerous bug fixes. + +1.0.17 Tue Apr 2 14:02:01 HST 2013 +* Remove c++ namespace that was being exposed (the API should be plug compatible).. +* Fix cases where --servers wasn't behaving the same in all clients. + +1.0.16 Thu Jan 31 19:14:32 EST 2013 +* Added support to do two part shutdown of socket. +* Fixes for Fedora 18. +* Fix for binary memcached_touch() + +1.0.15 Mon Dec 17 07:25:44 EST 2012 +* Added support for Murmur3 (HASHKIT_HASH_MURMUR3) +* Portability fixes. + +1.0.14 Wed Nov 14 04:56:25 EST 2012 +* CLIENT_ERROR fixed to not be treated as a fatal error. +* Compiler fixes for older Ubuntu releases. + +1.0.13 Fri Oct 19 00:09:28 EDT 2012 +* Fix bug that caused version string to not be exported correctly. + +1.0.12 Tue Oct 9 03:30:20 EDT 2012 +* Added memcached_result_take_value(). +* Added ax_libmemcached.m4 + +1.0.11 Sun Sep 16 20:32:13 EDT 2012 +* Removed custom version of memcached. +* Updated hardening rules. +* Fixed a case where the return error from a socket connection differred from that of a TCP/IP socket. + +1.0.10 Sun Jul 29 21:50:15 PDT 2012 +* --disable-assert has been removed from configure, and --enable-assert has been added in its place. +* Compiling fixes for Clang on OSX Mountain Lion. + +1.0.9 Wed Jul 4 22:46:19 EDT 2012 +* Faster close on socket. +* Instance allocation is now seperated from server interface. This should allow for a better preservation of ABI compliance from now on. +* Fix close on exec bug. +* Numerous other bug fixes. + +1.0.8 Tue May 22 15:06:04 EDT 2012 +* Added support for setting options via ENV variable LIBMEMCACHED +* Fix corner case on last used result. + +1.0.7 Sat Apr 28 00:48:29 PDT 2012 +* Add API call for exist calls. +* Update all license files to be BSD. + +1.0.6 Sat Apr 7 18:26:49 PDT 2012 +* Fixes for gcc 4.7, lp:961812 +* Fix for restart issue that happens under testing. +* Fix for lp:962815. +* Support for transparent AES encryption. + +1.0.5 Tue Mar 13 22:56:47 PDT 2012 +* Fixes for OSX. +* Version is now parsed directly in the parser, which makes buffered operations now work with it.. +* memstat has been extended so that it can be used to find the version of the server. +* Update documentation. +* Fixes for compile issues on Debian and Ubuntu + +1.0.4 Thu Jan 26 22:33:54 PST 2012 +* Fix for memcached_dump(). +* Additional testing for memcached_stat_execute(). + +1.0.3 Sun Jan 8 18:11:36 PST 2012 +* Increased size of sort buffer used during Ketama. +* Added support for new behavior to handle dead servers. +* Overall haul of UDP IO. +* Fixed C compile issue with memcached_exist() +* Numerous bug fixes. +* Clang support for OSX. +* All commands now using vector send support. + +1.0.2 Mon Oct 24 08:00:48 PDT 2011 +* Dropped libmemcached/memcached_util.h (undocumented header file) +* Added memcached_touch() and memcached_touch_by_key() +* UDP support restructured to toggle on a complete memcached_st structure. + +0.53 Mon Sep 26 20:50:33 PDT 2011 + * Fix for FreeBSD/OpenBSD and -lm + * Added memcached_exist() + * Fix for memory when using config test. + * CLI gained --quiet + +0.52 Sun Sep 11 22:16:08 PDT 2011 + * Build fixes for Ubuntu/Suse. + * Fixes for OSX Lion. + * Bug fix for looping back through dns lookups under certain failures. + * Fixes related to dead server failures. + +0.51 Thu Jul 21 11:08:58 PDT 2011 + * memcached_callback_set() now takes its data argument as const + * Update to tests. + * Fix in parser for port number. + +0.50 Mon Jun 20 10:36:57 PDT 2011 + * Updates to C++ interface + * Custom free allocators need to now check for value before calling free. + * memcached_fetch_result() now uses the internal result when available (about 25 to 50% faster). + * Fix for stats structure. + * Updates to documentation. + * memcached_fetch_result() now uses the internal result when available (about 25 to 50% faster). + +0.49 Thu Apr 14 08:43:37 PDT 2011 + * Fix calls to auto methods so that if value is not passed in nothing bad happens. + * New parser calls for generating memcached_st objects. + * New error system. + * New flow control for messages means faster get/set calls. + * Added new documentation system. + * A behavior change has been now made that if you specify a weight for any server, we enable the weight flag and do weight balancing. + * Added MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS to simplify the setting of AUTO REJECT for servers. + +0.48 Tue Mar 15 23:05:18 PDT 2011 + * Fix memory leak in server parse. + * Move test framework out to be its own library (easier to work with Gearman). + + +0.47 Wed Feb 23 18:46:48 PST 2011 + * Additional fixes for OpenBSD. + * Bug fix 677609, 456080. + * SIGPIPE fix for Linux send(). + * memcapable can now test ascii or binary based on flags. + * Additional build fixes for SASL. + + +0.46 Mon Feb 14 10:28:01 PST 2011 + * Fixes a number of corner case bugs. + * Fixes related to OpenBSD. + * Better testing for protocol version. + * Removes special case infinite wait on blocking setup. + +0.45 Tue Feb 8 16:02:06 PST 2011 + * Add support for systemtap + +0.44 Wed Sep 22 21:57:57 PDT 2010 + * Windows bug fixes. + * Hudson port support in test harness. + * Improved portability of test hanrness. + * SASL fixes. + +0.43 Wed Jul 28 16:29:47 PDT 2010 + * Added --args to memstat so that a greater range of values can be returned. + * Prelimanary support for Windows. + * memcached_stat_execute() merged. + +0.42 Tue Jul 6 12:29:50 PDT 2010 + * Mistake in libtool caused issue with library version + +0.41 Wed Jun 30 13:15:19 PDT 2010 + * Added --file for memcat. + * Added limemcached_ping() to libmemcached_util + * Bugfix for some cases where connect would have issues with timeout. + * Wrong value for errno given as error on an IO failure inside of poll. + * Bug fix for issue where multiple interfaces with bad DNS were not being caught. + +0.40 Thu Apr 22 19:01:25 PDT 2010 + * Placed retry logic in for busted resolvers + * Add an ignore for SIGPIPE to solve OSX issues. + * A couple of fixed for memcached_light server. + * Updated to debug mode to track io_wait + +0.39 Tue Apr 6 12:35:13 PDT 2010 + * Add support for prefix keys to binary protocol. + * Remove the undocumented call memcached_server_remove(). + * The undocumented call memcached_server_by_key() now returns const. + * memcached_server_error_reset() has been deprecated. + * memcached_server_list() has been deprecated. Use memcached_server_cursor() to walk the servers found in a memcached_st() structure. + * memcached_verbosity() can now be run concurrently with other operations. + * SASL support. + * Fixes memory leak found in EJECT HOSTS. + +0.38 Wed Feb 10 09:40:33 PST 2010 + * C++ interface for libhashkit. + * Modified memcached_set_memory_allocators() so that it requires a context pointer. + * memcached_clone() now runs 5 times faster. + * Functions used for callbacks are now given const memcached_st. + * Added MEMCACHED_BEHAVIOR_CORK. + * memslap now creates a configuration file at ~/.memslap.cnf + * memcached_purge() now calls any callbacks registered during get execution. + * Many fixes to memslap. + * Updates for memcapable. + * Compile fixes for OpenBSD. + * Fix for possible recursive decent on IO failure. + +0.37 Mon Jan 11 16:29:57 PST 2010 + * Fixed build for libhashkit. + * Fixed install path regression. + * Modified RPM to strict check install. + * Added documentation for memcached_server_cursor(); + * Added memcached_servers_reset(). + * Modified memcached_st to remove dead cursor_server member. + +0.36 Wed Jan 6 18:23:50 PST 2010 + * Merged in new memslap utility. + * All of constants.h has been updated to match style (all old identifiers continue to work). + * Added first pass for libhashkit. + * Updated test Framework/extended tests. + * Random read support during replication added. + * Modified use_sort so that the option can be applied to any distribution type. + * We removed the MEMCACHED_BEHAVIOR_KETAMA_COMPAT_MODE added in 0.35. Instead use memcached_behavior_set_distribution(). + +0.35 Mon Nov 9 11:18:33 PST 2009 + * Added support for by_key operations for inc/dec methods. + * Added mget test to memslap. + * Support for compatible ketama for SpyMemcached + * Update C++ interface. + * Fix for memcp + +0.34 Tue Oct 13 08:39:51 PDT 2009 + * Added support for setting behavior flags on a connection pool. + * Don't increment server_failure_counter on normal disconnects. + * Added prototype for a callback based protocol parser (server side) with examples so that you could let your own application speak the memcached protocol + * Updated memcapable to test ASCII protocol. + * Changed behavior so that server can be removed at first sign of failure. + * Added memcached_server_get_last_disconnect() call + +0.33 Wed Sep 23 10:11:58 PDT 2009 + * Added memcapable to test servers for binary compatibility. + * Updated C++ interface. Added basic support for C++ exceptions. Added multiple constructors the memcached client object. The C++ interface now takes parameters which are C++ types (such as std::string). + * Several bug fixes for binary protocol support. + * Fixed crashing issue with dumping from memcachd server (server internals were changed without documenting change). + +0.32 Tue Sep 15 15:49:09 PDT 2009 + * Change of behavior where linger is only modified for no-block and then it is set to zero. + * Added Twitter's memcached_server_error() functions. + * Fix for OSX compiles in development builds. + * Updated C++ interface. + * Updated memcached_mget and memcached_mget_by_key to take a size_t as a parameter instead of an unsigned int for number_of_keys. + +0.31 Fri Jul 10 09:02:50 PDT 2009 + * Added support or HA via replication. + * malloc() removed for server key usage. + * Update build system. + * Added support for memcached_set_memory_allocators(). + * Fixed bug in configure.ac for have_htoll. + +0.30 Sun May 31 17:31:52 PDT 2009 + * Added memcachd_dump command (and framework for memdump tool). + * Realigned all structures to remove padding (and line up important bits for 64bit caches. + * Remove some of sprintf() in storage calls(). + * Removed printf() in stat call for unknown stat member. + * memcached_generate_hash() function added. + * Added tests to make sure all hash functions are stable. + +0.29 Tue May 19 08:26:48 PDT 2009 + * Fixed malloc usage to calloc for spots where we need zero filled memory. + * All code warnings now treated as errors. + * Fixes for debian packaging. + * Added new pooling mechanism. + * MEMCACHED_BEHAVIOR_NO_BLOCK no longer also sets MEMCACHED_BEHAVIOR_BUFFER_REQUESTS. + * Updated generic rpm. + +0.28 Tue Apr 14 18:56:28 PDT 2009 + * Fixed bug in init sructure (reapplied) + * Fixed bug in get/set by key (nikkhils@gmail.com) + +0.27 Sun Mar 29 22:33:01 PDT 2009 + * Added new UDP fire-forget mode. + * Reworked performance for mget() to better make use of async protocol + * Cleaned up execution of fetch (just one set of code now) + * Fixed Jenkin's for big endian hosts. + * Updates for memstat to determine network latency. + * Updates for binary protocol. + * Many updates to documentation. + +0.26 Thu Jan 29 13:05:50 PST 2009 + * Fix for decrement on hash key + * Fixed assert that was catching bad memset() call in host_reset() + * Fix purge issue for blocked IO which has been stacked. + +0.25 Fri Nov 28 09:59:35 PST 2008 + * Jenkins HASH added. + * Update of Murmur hash code + * Support explicit weights (Robey Pointer, Evan Weaver) + * Bugfix for ketama continuum (Robey Pointer) + * New behavior MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY (Robey Pointer) + * Don't ever call stats for weighting servers, because it is unstable. + +0.24 Tue Sep 16 02:59:03 PDT 2008 (never released) + * Cleanup compile warnings. + * Fix issues in partitioning by keys. + * Fixed "fail case" to make sure when calling memcached_clone() no memcached_st is over written. + * New memcached_server_by_key() method for finding a server from a key. + * memcached_server_free() was added for freeing server structures. + + +0.23 Sun Sep 7 08:13:59 PDT 2008 + * Added strings.h header for Solaris 9 + * Solaris 64bit fix. + * Support for weighted Ketama from Yin Chen. + * Fix for Chinese + * Fix for 0 length key to trigger bad key. + * Added behaviors MEMCACHED_BEHAVIOR_SND_TIMEOUT, MEMCACHED_BEHAVIOR_RCV_TIMEOUT + * Support for Binary Protocol added + +0.22 Mon Jul 14 09:24:11 PDT 2008 + * Fix where master key was no being checked for "bad key" + * Fixed bugs in stats output (thread output was wrong) + * Clarified MEMCACHED_BAD_KEY_PROVIDED is return for bad prefix key. + * Found a bug in Flags return (Jacek Ostrowski) + * Fixed issue with compiling on Visual Studio + +0.21 Fri May 23 18:34:09 PDT 2008 + * Change of char * to const char * for all key based functions. + * New MEMCACHED_CALLBACK_PREFIX_KEY added. You can now create domains for values. + * Fixed bug introducd in last version on memcp + * Fix for death of file io to call shutdown() + +0.20 Mon May 5 08:34:26 PDT 2008 + * New consistent distribution tests. + * Found a memory leak when a server constantly fails. + * Fix in watchpoint macro + * Changed default timeout to 1 second for poll timeouts + * Wheel uses less memory/dynamic allocation for size (no longer limited to 512 hosts by default. + * memslap memory leak fix + * Added Ketama distribution + * Fix assert.h compile problem on CentOS + +0.19 Wed Apr 9 09:30:53 PDT 2008 + * Documentation fix in libmemcached. + * Fixed bug where sort was always occuring on hosts + * Logic fix in branch prediction (thanks Jay!) + * Read through cached support. + * Fixed for cas by key operation. + * Fix for memcached_server_st list structures to have correct count. + * Added callback MEMCACHED_CALLBACK_DELETE_TRIGGER + * Removed function call in favor of macro (aka cut out some instructions) + + +0.18 Sun Mar 16 21:57:55 PDT 2008 + * Fix plus tests for non-zero value objects and flags. + * MEMCACHED_HASH_MURMUR added for murmur algorithm provided. + * MEMCACHED_BEHAVIOR_RETRY_TIMEOUT added to keep connecting from looping on timeout. + * gcc branch prediction optimizations + * Refactored entire tree to make include files cleaner + * Fixed leaked socket. + +0.17 Wed Feb 27 03:33:29 PST 2008 + * MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT added for connect timeout in non-block mode. + * Incompatible change in memcached_behavior_set() api. We now use a uint64_t, instead of a pointer. + * Fix for storage of values for zero. + * memcached_server_cursor() function added to API for cycling through servers. + +0.16 Mon Feb 18 00:30:25 PST 2008 + * Work on the UDP protocol + * Added get_by_key, set_by_key tests for C++ API + * Fix for limit_maxbytes to be 64bit in stats + * Added Atom Smasher test (scale baby, scale!) + * Servers are now sorted, meaning that servers are now ordered so that clients with the same lists, will have same distribution. (Idea from Ross McFarland). MEMCACHED_BEHAVIOR_SORT_HOSTS was added to enable this support. + * Added MEMCACHED_BAD_KEY_PROVIDED error for auto, set, and get operations. MEMCACHED_BEHAVIOR_VERIFY_KEY was added to enable this feature. + * More error messages on command line tools. + * Fixed bugs in memcached_cas() operator. + * Fix to loop through interfaces + +0.15 Tue Jan 29 14:55:44 PST 2008 + * More work on the C++ API. + * Bug fixes around block corner cases. + * Slight performance increase in both read() and write(). + +0.14 Tue Jan 22 06:21:49 PST 2008 + * For for bug found by Evan Weaver where increment() was not returning propper error of value was not found. + * Fix for bad null pointer on flag by Toru Maesaka. + * Refactor of all IO to just pass in the active server + * Problem configuring (PKG_CHECK_MODULES) fixed by removal of "rpath" in support/libmemcached.pc.in (Thanks to Ross McFarland). + * Added memcached_callback_get()/set() + * First prototype of C++ interface + * Updated docs for uint16_t changes in previous release + +0.13 Sun Jan 13 06:51:50 PST 2008 + * MEMCACHED_BEHAVIOR_USER_DATA added to store user pointer. + * Fix for failure to connect to invalidate socket. + * Patch from Marc Rossi to add --hash option for memcp, memrm, and memcat. + * Kevin's patch for fixing EOF issues during a read. + * Toru Maesaka patch for stats mismatch + * Fix for when CRC return 0 + * Fixed uint16_t issues around flags. Turns out the documentation on the protocol was wrong. + * Lingering socket fixes for FreeBSD. + * Patches from Kevin Dalley for FreeBSD 4.0 + * Added multi delete functions. + * All get key returns have C style null termination + * If memcached_server_list_append is passed NULLs instead of pointers it returns NULL. + * Added memcached_fetch_execute() method + * Found a bug where memcached_fetch() was not null terminating the result value. + * memcached_behavior() now has the ability to set "buffering" so that data is not automatically flushed. + * Behavior change, buffered commands now return MEMCACHED_BUFFERED + +0.12 Tue Dec 11 15:20:55 PST 2007 + * Updates for consistent hashing + * IPV6 support + * Static allocation for hostname (performance) + * Fixed bug where in non-block mode all data might not have been sent on close(). + * Refactor of memcached_get() to use common code. + * Change in value fetch, MEMCACHED_END is now returned when keys are no longer in the pipe. + * Fixed bug where key could be out of range of characters + * Added _by_key() methods to allow partitioning of values to particular servers. + * MEMCACHED_DEFAILT_TIMEOUT is now set to a non -1 value. + * Performance improvements in get operations. + +0.11 Mon Nov 26 01:05:52 PST 2007 + * Added option to memcache_behavior_set() so that poll() can be timed out. + * Fixed memory leak in case of using memcached_fetch_result() where no value was returned. + * Bug fixed in memcached_connect() which would cause servers that did not need to be enabled to be enabled (performance issue). + * Rewrote bounds checking code for get calls. + * "make test" now starts its own memcached servers. + * Added Hseih hash (MEMCACHED_HASH_HSIEH), which is showing about 7% performance over standard hash. + +0.10 Tue Nov 20 23:22:31 PST 2007 + * Added append binary test. + * Added MEMCACHED_BEHAVIOR_CACHE_LOOKUPS behavior so that you can save on multiple DNS lookups. + * Added CAS support, though this is optional and must be enabled during runtime. + * Added the utility memerror to create human readable error strings from memcached errors (aka convert ints to strings) + * Fixed type in MEMCACHED_HOST_LOOKUP_FAILURE + * Fixed bug where hostname might not be null terminated + * Moved to using gethostbyname_r() on Linux to solve thread safety issue + * Added -rpath support for pkg-config + * Documentation fix for hash setting using memcached_behavior_set() + +0.9 Thu Nov 15 07:44:00 PST 2007 + * fix for when no servers are definied. + * different buffers are now kept for different connections to speed up async efforts + * Modified increment/decrement functions to return uint64_t values + * Fixed bug in cases where zero length keys were provided + * Thread cleanup issue in memslap + * No hostname lookup on reconnect + * Fix for flag settings (was doing hex by accident!) + * Support for 1.2.4 server additions "prepend" and "append" added. + * Added memcached_version()... not sure if I will make this public or not. + +0.8 Mon Nov 5 10:40:41 PST 2007 + * Adding support for CRC hash method + * Adding support for UNIX sockets + * Added additional HASHing methods of FNV1_64,FNV1A_64, FNV1_32, FNV1A_32 + * Added pkgconfig support (PKG_CHECK_MODULES) + * Fixed conflict with defined type in MySQL + * Added memcached_result_st structure and functions to manipulate it. + +0.7 Tue Oct 30 09:24:05 PDT 2007 + * Poved to poll() from select() + * Fixes in internal string class for allocation of large numbers of strings. + * memcached_mget() function now sends keys as it parses them instead of building strings as it goes. + * Propper flush now for making sure we get all IO sent even when in non-block mode. + * Added --enable-debug rule for configure + * All asserts() removed (hey this is going into production!) + + +0.6 Wed Oct 17 08:41:35 PDT 2007 + * get value returns are now null terminated (request by Cal Heldenbrand) + * Fixed connections for more hosts then two. + * Rewrite of the read/write IO systems to handle different sorts of host failures. + * Added man pages for all functions and tools + * Raised buffer size for readinng/writing to 16K + * You can now optionally set the socket size for recv/send via memached_behavior_set/get. + +0.5 Tue Oct 9 00:22:25 PDT 2007 + * Ruby maintainer mentioned TCP_NODELAY patch he had added. Added this to C + library as well. (Eric Hodel drbrain@segment7.net) + * Added support script for set_benchmark + * Updated memslap to allow testing of TCP_NODELAY + * Updated memslap to support --flush (aka dump memcache servers before testing) + * Fixed bug in multiple hosts not being activated + * Added environmental variable MEMCACHED_SERVERS which can be used to set the servers list. + * fixed memcached_stat method (and now memstat works) + * server connect now happens on demand. + * Help for all command line applications + +0.4 Wed Oct 3 10:28:50 PDT 2007 + * Added buffered IO to write calls for keys + * Added buffered IO for reads + * memstat was broken (bad if/else on connect) + * New non-blocking IO (not default yet). Mucho faster + * Refactor of test system. + * memslap crash solved + +0.3 Mon Oct 1 06:37:52 PDT 2007 + * Jeff Fisher provided a spec file + * Added "make rpm" around dist file + * Added support for Solaris + * Added support for DTrace + * Fixed read to be recv and write to be send + * Bug fix where memstat would core if no server was found + * Added memslap tool (load generator) + * Numerous bug fixes in library + * Added calls to library for creating host lists (see text cases to understand how to use this). + +0.2 Thu Sep 27 03:46:57 PDT 2007 + * First public version + diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..895debb --- /dev/null +++ b/Makefile.am @@ -0,0 +1,155 @@ +# vim:ft=automake + +ACLOCAL_AMFLAGS= -I m4 -I libtest/m4 +AM_YFLAGS= -d + +# includes append to these: +SUFFIXES = +.PHONY = +TESTS = +XFAIL_TESTS = +CLEANFILES = +DISTCLEANFILES = +bin_PROGRAMS = +noinst_HEADERS = +lib_LTLIBRARIES = +man_MANS = +noinst_LTLIBRARIES = +noinst_PROGRAMS = +include_HEADERS = +nobase_include_HEADERS = +check_PROGRAMS = +check_LTLIBRARIES= +EXTRA_HEADERS = +BUILT_SOURCES= +EXTRA_DIST= +dist_man_MANS= +MAINTAINERCLEANFILES= + +#includes additional rules from aminclude.am +@INC_AMINCLUDE@ + +DISTCLEANFILES+= aminclude.am + +EXTRA_DIST+= README.FIRST +EXTRA_DIST+= README.win32 + +aclocaldir= $(datadir)/aclocal +dist_aclocal_DATA= + +# Build targets for Windows +if BUILD_WIN32 +include libhashkit-1.0/include.am +include libhashkit/include.am +include libmemcached/include.am +include libmemcached-1.0/include.am +else + +include libtest/include.am + +include libhashkit-1.0/include.am +include libmemcached-1.0/include.am + +if BUILD_LIBMEMCACHED_PROTOCOL +include libmemcachedprotocol-0.0/include.am +endif + +include libmemcachedutil-1.0/include.am + +include clients/include.am +include docs/include.am +include man/include.am + +if BUILD_LIBMEMCACHED_PROTOCOL +include example/include.am +endif + +include libhashkit/include.am +include libmemcached/include.am +include libmemcachedutil/include.am + +if BUILD_LIBMEMCACHED_PROTOCOL +include libmemcachedprotocol/include.am +endif + +include libmemcachedinternal/include.am +include libmemcachedinternal/util/include.am +include rpm/include.mk +include support/include.am +include tests/include.am +include util/include.am +include win32/include.am + +include m4/include.am +endif + +TESTS += ${bin_PROGRAMS} +TESTS += ${check_PROGRAMS} +XFAIL_TESTS += ${bin_PROGRAMS} + +if ! BUILD_WIN32 + +merge-clean: + @find ./ | $(GREP) \.gcda | xargs rm -f + @find ./ | $(GREP) \.gcno | xargs rm -f + @find ./ | $(GREP) \.gz | xargs rm -f + @find ./ | $(GREP) \.moved | xargs rm -r -f + @find ./ | $(GREP) \\.orig | xargs rm -f + @find ./ | $(GREP) \.rej | xargs rm -f + @find ./ | $(GREP) \.THIS | xargs rm -f + @find ./ | $(GREP) \.OTHER | xargs rm -f + @find ./ | $(GREP) \.BASE | xargs rm -f + @find ./ | $(GREP) \~$$ | xargs rm -f + @echo "Files that need to be either removed or checked in:" + @bzr unknowns + +clean-local: clean-libtest-check clean-docs-check clean-rpm + + +lcov: lcov-clean check + @echo + @echo " ------------------------------------------------------" + @echo "Make sure ./configure was run with '--enable-coverage'" + @echo "------------------------------------------------------" + @echo + @cd libmemcached && lcov --capture --directory . --base-directory .. --output-file lcov.out + @genhtml -o lcov --function-coverage -t libmemcached libmemcached/lcov.out + +lcov-clean: clean + @rm -rf lcov */lcov.out + @find . -name '*.gcno' | xargs rm -f + @find . -name '*.gcda' | xargs rm -f +endif + +DISTCLEANFILES+= config/top.h + +maintainer-clean-local: + find . -type f -name '*~' -exec rm -f '{}' \; + -rm -f man/*.1 + -rm -f man/*.3 + -rm -f man/*.8 + -rm -rf man/.doctrees/ + -rm -f Makefile.in + -rm -f aclocal.m4 + -rm -f build-aux/compile + -rm -f build-aux/config.guess + -rm -f build-aux/config.sub + -rm -f build-aux/depcomp + -rm -f build-aux/install-sh + -rm -f build-aux/ltmain.sh + -rm -f build-aux/missing + -rm -f build-aux/test-driver + -rm -f build-aux/ylwrap + -rm -f mem_config.in + -rm -f config.log + -rm -f config.status + -rm -f configure + -rm -f m4/libtool.m4 + -rm -f m4/ltoptions.m4 + -rm -f m4/ltsugar.m4 + -rm -f m4/ltversion.m4 + -rm -f m4/lt~obsolete.m4 + -rm -f m4/test-driver + -rmdir build-aux + -rm -rf ${top_builddir}/html + -rm -f $(DIST_ARCHIVES) diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..c615ef2 --- /dev/null +++ b/Makefile.in @@ -0,0 +1,10643 @@ +# Makefile.in generated by automake 1.13.4 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# vim:ft=automake + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root +# + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root +# +# HashKit +# Copyright (C) 2009 Brian Aker +# All rights reserved. +# +# Use and distribution licensed under the BSD license. See +# the COPYING file in the parent directory for full text. + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake + +# vim:ft=automake +# Copyright (C) 2011 Data Differential +# All rights reserved. +# +# Use and distribution licensed under the BSD license. See +# the COPYING file in the parent directory for full text. +# +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# +# included from Top Level Makefile.am +# All paths should be given relative to the root +# + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root +# + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake + +# vim:ft=automake +# Copyright (C) 2011 Data Differential +# All rights reserved. +# +# Use and distribution licensed under the BSD license. See +# the COPYING file in the parent directory for full text. +# +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# Makefile for Sphinx documentation +# + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root +# +# HashKit +# Copyright (C) 2009 Brian Aker +# All rights reserved. +# +# Use and distribution licensed under the BSD license. See +# the COPYING file in the parent directory for full text. + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# Copyright (C) 2011 Data Differential +# All rights reserved. +# +# Use and distribution licensed under the BSD license. See +# the COPYING file in the parent directory for full text. +# +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# Copyright (C) 2011 Data Differential +# All rights reserved. +# +# Use and distribution licensed under the BSD license. See +# the COPYING file in the parent directory for full text. +# +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# Copyright (C) 2012 Data Differential +# All rights reserved. +# +# Use and distribution licensed under the BSD license. See +# the COPYING file in the parent directory for full text. +# +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# Copyright (C) 2012 Data Differential +# All rights reserved. +# +# Use and distribution licensed under the BSD license. See +# the COPYING file in the parent directory for full text. +# +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# DataDifferential Utility Library +# Copyright (C) 2011 Data Differential +# All rights reserved. +# +# Use and distribution licensed under the BSD license. See +# the COPYING file in the parent directory for full text. +# +# Included from Top Level Makefile.am +# All paths should be given relative to the root + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + + + + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +TESTS = $(bin_PROGRAMS) $(check_PROGRAMS) +XFAIL_TESTS = $(bin_PROGRAMS) +bin_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) +noinst_PROGRAMS = $(am__EXEEXT_3) $(am__EXEEXT_4) $(am__EXEEXT_10) \ + $(am__EXEEXT_6) $(am__EXEEXT_11) $(am__EXEEXT_12) \ + $(am__EXEEXT_13) $(am__EXEEXT_8) $(am__EXEEXT_14) +check_PROGRAMS = $(am__EXEEXT_3) $(am__EXEEXT_4) $(am__EXEEXT_5) \ + $(am__EXEEXT_6) $(am__EXEEXT_7) $(am__EXEEXT_8) \ + $(am__EXEEXT_9) +DIST_COMMON = $(srcdir)/libhashkit-1.0/include.am \ + $(srcdir)/libhashkit/include.am \ + $(srcdir)/libmemcached/include.am \ + $(srcdir)/libmemcached/csl/include.am \ + $(srcdir)/libmemcached-1.0/include.am \ + $(srcdir)/libmemcached-1.0/struct/include.am \ + $(srcdir)/libmemcached-1.0/types/include.am \ + $(srcdir)/libmemcached-1.0/t/include.am \ + $(srcdir)/libtest/include.am \ + $(srcdir)/libmemcachedprotocol-0.0/include.am \ + $(srcdir)/libmemcachedutil-1.0/include.am \ + $(srcdir)/clients/include.am $(srcdir)/docs/include.am \ + $(srcdir)/man/include.am $(srcdir)/example/include.am \ + $(srcdir)/libmemcachedutil/include.am \ + $(srcdir)/libmemcachedprotocol/include.am \ + $(srcdir)/libmemcachedinternal/include.am \ + $(srcdir)/libmemcachedinternal/util/include.am \ + $(srcdir)/rpm/include.mk $(srcdir)/support/include.am \ + $(srcdir)/tests/include.am \ + $(srcdir)/tests/libmemcached-1.0/include.am \ + $(srcdir)/tests/parser.am $(srcdir)/tests/cli.am \ + $(srcdir)/util/include.am $(srcdir)/win32/include.am \ + $(srcdir)/m4/include.am $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(srcdir)/mem_config.in \ + $(top_srcdir)/libhashkit/hashkitcon.h.in \ + $(top_srcdir)/libhashkit-1.0/configure.h.in \ + $(top_srcdir)/libtest/version.h.in \ + $(top_srcdir)/libtest/yatlcon.h.in \ + $(top_srcdir)/docs/conf.py.in \ + $(top_srcdir)/libmemcached-1.0/configure.h.in \ + $(top_srcdir)/support/libmemcached.pc.in \ + $(top_srcdir)/support/libmemcached.spec.in \ + $(top_srcdir)/build-aux/depcomp $(dist_man_MANS) \ + $(am__dist_aclocal_DATA_DIST) $(include_HEADERS) \ + $(am__nobase_include_HEADERS_DIST) $(am__noinst_HEADERS_DIST) \ + $(top_srcdir)/build-aux/test-driver AUTHORS COPYING ChangeLog \ + NEWS README THANKS TODO build-aux/config.guess \ + build-aux/config.sub build-aux/depcomp build-aux/install-sh \ + build-aux/missing build-aux/ltmain.sh \ + $(top_srcdir)/build-aux/config.guess \ + $(top_srcdir)/build-aux/config.sub \ + $(top_srcdir)/build-aux/install-sh \ + $(top_srcdir)/build-aux/ltmain.sh \ + $(top_srcdir)/build-aux/missing +@BUILD_WIN32_TRUE@am__append_1 = libhashkit-1.0/configure.h.in \ +@BUILD_WIN32_TRUE@ libmemcached/csl/parser.yy \ +@BUILD_WIN32_TRUE@ libmemcached/csl/scanner.l \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_probes.d \ +@BUILD_WIN32_TRUE@ libmemcached/memcached/README.txt \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/configure.h.in +@BUILD_WIN32_TRUE@am__append_2 = libhashkit-1.0/configure.h \ +@BUILD_WIN32_TRUE@ libmemcached/csl/parser.cc \ +@BUILD_WIN32_TRUE@ libmemcached/csl/parser.h \ +@BUILD_WIN32_TRUE@ libmemcached/csl/scanner.cc \ +@BUILD_WIN32_TRUE@ libmemcached/csl/scanner.h + +# Tests for this version of the interface +@BUILD_WIN32_TRUE@am__append_3 = libhashkit-1.0/algorithm.h \ +@BUILD_WIN32_TRUE@ libhashkit-1.0/behavior.h \ +@BUILD_WIN32_TRUE@ libhashkit-1.0/configure.h \ +@BUILD_WIN32_TRUE@ libhashkit-1.0/digest.h \ +@BUILD_WIN32_TRUE@ libhashkit-1.0/function.h \ +@BUILD_WIN32_TRUE@ libhashkit-1.0/has.h \ +@BUILD_WIN32_TRUE@ libhashkit-1.0/hashkit.h \ +@BUILD_WIN32_TRUE@ libhashkit-1.0/hashkit.hpp \ +@BUILD_WIN32_TRUE@ libhashkit-1.0/strerror.h \ +@BUILD_WIN32_TRUE@ libhashkit-1.0/string.h \ +@BUILD_WIN32_TRUE@ libhashkit-1.0/str_algorithm.h \ +@BUILD_WIN32_TRUE@ libhashkit-1.0/types.h \ +@BUILD_WIN32_TRUE@ libhashkit-1.0/visibility.h \ +@BUILD_WIN32_TRUE@ libhashkit/hashkit.h \ +@BUILD_WIN32_TRUE@ libmemcached/memcached.h \ +@BUILD_WIN32_TRUE@ libmemcached/memcached.hpp \ +@BUILD_WIN32_TRUE@ libmemcached/util.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/struct/allocator.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/struct/analysis.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/struct/callback.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/struct/memcached.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/struct/result.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/struct/sasl.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/struct/server.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/struct/stat.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/struct/string.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/types/behavior.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/types/callback.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/types/connection.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/types/hash.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/types/return.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/types/server_distribution.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/alloc.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/allocators.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/analyze.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/auto.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/basic_string.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/behavior.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/callback.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/callbacks.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/configure.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/defaults.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/delete.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/deprecated_types.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/dump.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/encoding_key.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/error.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/exception.hpp \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/exist.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/fetch.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/flush.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/flush_buffers.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/get.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/hash.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/limits.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/memcached.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/memcached.hpp \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/options.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/parse.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/platform.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/quit.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/result.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/return.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/sasl.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/server.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/server_list.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/stats.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/storage.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/strerror.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/touch.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/triggers.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/types.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/verbosity.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/version.h \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/visibility.h +@BUILD_WIN32_TRUE@am__append_4 = libhashkit/libhashkit.la \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached.la +@BUILD_WIN32_TRUE@am__append_5 = libhashkit/aes.h \ +@BUILD_WIN32_TRUE@ libhashkit/algorithm.h libhashkit/murmur3.h \ +@BUILD_WIN32_TRUE@ libhashkit/common.h libhashkit/is.h \ +@BUILD_WIN32_TRUE@ libhashkit/rijndael.hpp libhashkit/string.h \ +@BUILD_WIN32_TRUE@ libmemcached/csl/common.h \ +@BUILD_WIN32_TRUE@ libmemcached/csl/context.h \ +@BUILD_WIN32_TRUE@ libmemcached/csl/parser.h \ +@BUILD_WIN32_TRUE@ libmemcached/csl/scanner.h \ +@BUILD_WIN32_TRUE@ libmemcached/csl/server.h \ +@BUILD_WIN32_TRUE@ libmemcached/csl/symbol.h \ +@BUILD_WIN32_TRUE@ libmemcached/array.h libmemcached/assert.hpp \ +@BUILD_WIN32_TRUE@ libmemcached/backtrace.hpp \ +@BUILD_WIN32_TRUE@ libmemcached/behavior.hpp \ +@BUILD_WIN32_TRUE@ libmemcached/byteorder.h \ +@BUILD_WIN32_TRUE@ libmemcached/common.h \ +@BUILD_WIN32_TRUE@ libmemcached/connect.hpp \ +@BUILD_WIN32_TRUE@ libmemcached/continuum.hpp \ +@BUILD_WIN32_TRUE@ libmemcached/do.hpp \ +@BUILD_WIN32_TRUE@ libmemcached/encoding_key.h \ +@BUILD_WIN32_TRUE@ libmemcached/error.hpp libmemcached/flag.hpp \ +@BUILD_WIN32_TRUE@ libmemcached/initialize_query.h \ +@BUILD_WIN32_TRUE@ libmemcached/instance.hpp \ +@BUILD_WIN32_TRUE@ libmemcached/internal.h libmemcached/io.h \ +@BUILD_WIN32_TRUE@ libmemcached/io.hpp libmemcached/is.h \ +@BUILD_WIN32_TRUE@ libmemcached/key.hpp \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_probes.h \ +@BUILD_WIN32_TRUE@ libmemcached/memcached/protocol_binary.h \ +@BUILD_WIN32_TRUE@ libmemcached/memcached/vbucket.h \ +@BUILD_WIN32_TRUE@ libmemcached/memory.h \ +@BUILD_WIN32_TRUE@ libmemcached/namespace.h \ +@BUILD_WIN32_TRUE@ libmemcached/options.hpp libmemcached/poll.h \ +@BUILD_WIN32_TRUE@ libmemcached/response.h \ +@BUILD_WIN32_TRUE@ libmemcached/result.h libmemcached/sasl.hpp \ +@BUILD_WIN32_TRUE@ libmemcached/server.hpp \ +@BUILD_WIN32_TRUE@ libmemcached/server_instance.h \ +@BUILD_WIN32_TRUE@ libmemcached/socket.hpp \ +@BUILD_WIN32_TRUE@ libmemcached/string.hpp libmemcached/udp.hpp \ +@BUILD_WIN32_TRUE@ libmemcached/version.hpp \ +@BUILD_WIN32_TRUE@ libmemcached/virtual_bucket.h \ +@BUILD_WIN32_TRUE@ libmemcached/watchpoint.h \ +@BUILD_WIN32_TRUE@ libmemcached/windows.hpp +@BUILD_WIN32_TRUE@@INCLUDE_HSIEH_SRC_TRUE@am__append_6 = libhashkit/hsieh.cc +@BUILD_WIN32_TRUE@@INCLUDE_HSIEH_SRC_FALSE@am__append_7 = libhashkit/nohsieh.cc + +# library used for testing +@BUILD_WIN32_TRUE@am__append_8 = libhashkit/libhashkitinc.la +@BUILD_WIN32_TRUE@am__append_9 = libmemcached/csl/parser.output +@BUILD_WIN32_TRUE@am__append_10 = libmemcached/csl/parser.h \ +@BUILD_WIN32_TRUE@ libmemcached/csl/parser.cc \ +@BUILD_WIN32_TRUE@ libmemcached/csl/scanner.h \ +@BUILD_WIN32_TRUE@ libmemcached/csl/scanner.cc +@BUILD_WIN32_TRUE@@HAVE_SASL_TRUE@am__append_11 = @PTHREAD_CFLAGS@ +@BUILD_WIN32_TRUE@@HAVE_SASL_TRUE@am__append_12 = @PTHREAD_CFLAGS@ +@BUILD_WIN32_TRUE@@HAVE_SASL_TRUE@am__append_13 = @PTHREAD_LIBS@ \ +@BUILD_WIN32_TRUE@@HAVE_SASL_TRUE@ @SASL_LIB@ $(am__empty) +@BUILD_WIN32_TRUE@@HAVE_DTRACE_TRUE@am__append_14 = libmemcached/dtrace_probes.h +@BUILD_WIN32_TRUE@@HAVE_DTRACE_TRUE@am__append_15 = libmemcached/dtrace_probes.h \ +@BUILD_WIN32_TRUE@@HAVE_DTRACE_TRUE@ libmemcached/libmemcached_probes.o +@BUILD_WIN32_TRUE@@HAVE_DTRACE_TRUE@am__append_16 = libmemcached/libmemcached_probes.o +@BUILD_WIN32_TRUE@@HAVE_DTRACE_TRUE@am__append_17 = libmemcached/libmemcached_probes.o +@BUILD_WIN32_TRUE@@HAVE_DTRACE_TRUE@am__append_18 = libmemcached/libmemcached_probes.d +@BUILD_WIN32_TRUE@am__append_19 = .d +@BUILD_WIN32_TRUE@am__append_20 = libmemcached-1.0/configure.h +@BUILD_WIN32_TRUE@@SHARED_ENABLED_TRUE@am__append_21 = libmemcached-1.0/t/c_test \ +@BUILD_WIN32_TRUE@@SHARED_ENABLED_TRUE@ libmemcached-1.0/t/c_sasl_test +@BUILD_WIN32_TRUE@@SHARED_ENABLED_TRUE@am__append_22 = libmemcached-1.0/t/c_test \ +@BUILD_WIN32_TRUE@@SHARED_ENABLED_TRUE@ libmemcached-1.0/t/c_sasl_test +@BUILD_WIN32_TRUE@am__append_23 = libmemcached-1.0/t/cc_test +@BUILD_WIN32_TRUE@am__append_24 = libmemcached-1.0/t/cc_test +@BUILD_WIN32_FALSE@am__append_25 = libtest/run.gdb libtest/version.h \ +@BUILD_WIN32_FALSE@ libhashkit-1.0/configure.h.in \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/configure.h.in \ +@BUILD_WIN32_FALSE@ libmemcached/csl/parser.yy \ +@BUILD_WIN32_FALSE@ libmemcached/csl/scanner.l \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_probes.d \ +@BUILD_WIN32_FALSE@ libmemcached/memcached/README.txt \ +@BUILD_WIN32_FALSE@ support/libmemcached.spec \ +@BUILD_WIN32_FALSE@ support/set_benchmark.sh \ +@BUILD_WIN32_FALSE@ tests/cpp_example.cc +@BUILD_WIN32_FALSE@am__append_26 = libtest/version.h \ +@BUILD_WIN32_FALSE@ libhashkit-1.0/configure.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/configure.h \ +@BUILD_WIN32_FALSE@ libmemcached/csl/parser.cc \ +@BUILD_WIN32_FALSE@ libmemcached/csl/parser.h \ +@BUILD_WIN32_FALSE@ libmemcached/csl/scanner.cc \ +@BUILD_WIN32_FALSE@ libmemcached/csl/scanner.h +@BUILD_WIN32_FALSE@am__append_27 = libtest/client.hpp \ +@BUILD_WIN32_FALSE@ libtest/formatter.hpp libtest/timer.hpp \ +@BUILD_WIN32_FALSE@ libtest/alarm.h libtest/binaries.h \ +@BUILD_WIN32_FALSE@ libtest/cpu.hpp libtest/blobslap_worker.h \ +@BUILD_WIN32_FALSE@ libtest/callbacks.h libtest/dns.hpp \ +@BUILD_WIN32_FALSE@ libtest/cmdline.h libtest/collection.h \ +@BUILD_WIN32_FALSE@ libtest/common.h libtest/comparison.hpp \ +@BUILD_WIN32_FALSE@ libtest/core.h libtest/dream.h \ +@BUILD_WIN32_FALSE@ libtest/error.h libtest/exception.hpp \ +@BUILD_WIN32_FALSE@ libtest/exception/disconnected.hpp \ +@BUILD_WIN32_FALSE@ libtest/exception/fatal.hpp \ +@BUILD_WIN32_FALSE@ libtest/framework.h libtest/gearmand.h \ +@BUILD_WIN32_FALSE@ libtest/drizzled.h libtest/get.h \ +@BUILD_WIN32_FALSE@ libtest/has.hpp libtest/http.hpp \ +@BUILD_WIN32_FALSE@ libtest/is_pid.hpp libtest/is_local.hpp \ +@BUILD_WIN32_FALSE@ libtest/killpid.h libtest/libtool.hpp \ +@BUILD_WIN32_FALSE@ libtest/memcached.h libtest/memcached.hpp \ +@BUILD_WIN32_FALSE@ libtest/poll_error.hpp libtest/port.h \ +@BUILD_WIN32_FALSE@ libtest/result.hpp libtest/result/base.hpp \ +@BUILD_WIN32_FALSE@ libtest/result/fail.hpp \ +@BUILD_WIN32_FALSE@ libtest/result/skip.hpp \ +@BUILD_WIN32_FALSE@ libtest/result/success.hpp libtest/runner.h \ +@BUILD_WIN32_FALSE@ libtest/server.h libtest/server_container.h \ +@BUILD_WIN32_FALSE@ libtest/signal.h libtest/socket.hpp \ +@BUILD_WIN32_FALSE@ libtest/stream.h libtest/strerror.h \ +@BUILD_WIN32_FALSE@ libtest/string.hpp libtest/test.h \ +@BUILD_WIN32_FALSE@ libtest/test.hpp libtest/thread.hpp \ +@BUILD_WIN32_FALSE@ libtest/tmpfile.hpp libtest/lite.h \ +@BUILD_WIN32_FALSE@ libtest/valgrind.h libtest/vchar.hpp \ +@BUILD_WIN32_FALSE@ libtest/version.h libtest/visibility.h \ +@BUILD_WIN32_FALSE@ libtest/wait.h libtest/yatl.h \ +@BUILD_WIN32_FALSE@ clients/client_options.h clients/execute.h \ +@BUILD_WIN32_FALSE@ clients/generator.h clients/ms_atomic.h \ +@BUILD_WIN32_FALSE@ clients/ms_conn.h clients/ms_memslap.h \ +@BUILD_WIN32_FALSE@ clients/ms_setting.h clients/ms_sigsegv.h \ +@BUILD_WIN32_FALSE@ clients/ms_stats.h clients/ms_task.h \ +@BUILD_WIN32_FALSE@ clients/ms_thread.h clients/utilities.h +@BUILD_WIN32_FALSE@am__append_28 = libtest/libtest.la +@BUILD_WIN32_FALSE@@HAVE_LIBDRIZZLE_TRUE@am__append_29 = @LIBDRIZZLE_LDFLAGS@ +@BUILD_WIN32_FALSE@@HAVE_LIBDRIZZLE_TRUE@am__append_30 = @LIBDRIZZLE_LIB@ +@BUILDING_GEARMAN_TRUE@@BUILD_WIN32_FALSE@am__append_31 = libtest/blobslap_worker.cc +@BUILD_WIN32_FALSE@am__append_32 = libtest/unittest libtest/skiptest +@BUILD_WIN32_FALSE@am__append_33 = libtest/unittest libtest/skiptest \ +@BUILD_WIN32_FALSE@ libtest/wait libtest/core-count \ +@BUILD_WIN32_FALSE@ libtest/abort libtest/backtrace + +# Tests for this version of the interface +@BUILD_WIN32_FALSE@am__append_34 = libhashkit-1.0/algorithm.h \ +@BUILD_WIN32_FALSE@ libhashkit-1.0/behavior.h \ +@BUILD_WIN32_FALSE@ libhashkit-1.0/configure.h \ +@BUILD_WIN32_FALSE@ libhashkit-1.0/digest.h \ +@BUILD_WIN32_FALSE@ libhashkit-1.0/function.h \ +@BUILD_WIN32_FALSE@ libhashkit-1.0/has.h \ +@BUILD_WIN32_FALSE@ libhashkit-1.0/hashkit.h \ +@BUILD_WIN32_FALSE@ libhashkit-1.0/hashkit.hpp \ +@BUILD_WIN32_FALSE@ libhashkit-1.0/strerror.h \ +@BUILD_WIN32_FALSE@ libhashkit-1.0/string.h \ +@BUILD_WIN32_FALSE@ libhashkit-1.0/str_algorithm.h \ +@BUILD_WIN32_FALSE@ libhashkit-1.0/types.h \ +@BUILD_WIN32_FALSE@ libhashkit-1.0/visibility.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/struct/allocator.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/struct/analysis.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/struct/callback.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/struct/memcached.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/struct/result.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/struct/sasl.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/struct/server.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/struct/stat.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/struct/string.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/types/behavior.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/types/callback.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/types/connection.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/types/hash.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/types/return.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/types/server_distribution.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/alloc.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/allocators.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/analyze.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/auto.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/basic_string.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/behavior.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/callback.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/callbacks.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/configure.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/defaults.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/delete.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/deprecated_types.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/dump.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/encoding_key.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/error.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/exception.hpp \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/exist.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/fetch.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/flush.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/flush_buffers.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/get.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/hash.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/limits.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/memcached.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/memcached.hpp \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/options.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/parse.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/platform.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/quit.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/result.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/return.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/sasl.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/server.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/server_list.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/stats.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/storage.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/strerror.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/touch.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/triggers.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/types.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/verbosity.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/version.h \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/visibility.h +@BUILD_WIN32_FALSE@@SHARED_ENABLED_TRUE@am__append_35 = libmemcached-1.0/t/c_test \ +@BUILD_WIN32_FALSE@@SHARED_ENABLED_TRUE@ libmemcached-1.0/t/c_sasl_test +@BUILD_WIN32_FALSE@@SHARED_ENABLED_TRUE@am__append_36 = libmemcached-1.0/t/c_test \ +@BUILD_WIN32_FALSE@@SHARED_ENABLED_TRUE@ libmemcached-1.0/t/c_sasl_test +@BUILD_WIN32_FALSE@am__append_37 = libmemcached-1.0/t/cc_test \ +@BUILD_WIN32_FALSE@ tests/cycle +@BUILD_WIN32_FALSE@am__append_38 = libmemcached-1.0/t/cc_test +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@am__append_39 = \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ libmemcachedprotocol-0.0/binary.h \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ libmemcachedprotocol-0.0/callback.h \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ libmemcachedprotocol-0.0/handler.h \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ libmemcachedprotocol-0.0/vbucket.h + +@BUILD_WIN32_FALSE@am__append_40 = libmemcachedutil-1.0/flush.h \ +@BUILD_WIN32_FALSE@ libmemcachedutil-1.0/ostream.hpp \ +@BUILD_WIN32_FALSE@ libmemcachedutil-1.0/pid.h \ +@BUILD_WIN32_FALSE@ libmemcachedutil-1.0/ping.h \ +@BUILD_WIN32_FALSE@ libmemcachedutil-1.0/pool.h \ +@BUILD_WIN32_FALSE@ libmemcachedutil-1.0/util.h \ +@BUILD_WIN32_FALSE@ libmemcachedutil-1.0/version.h \ +@BUILD_WIN32_FALSE@ libhashkit/hashkit.h \ +@BUILD_WIN32_FALSE@ libmemcached/memcached.h \ +@BUILD_WIN32_FALSE@ libmemcached/memcached.hpp \ +@BUILD_WIN32_FALSE@ libmemcached/util.h +@BUILD_WIN32_FALSE@am__append_41 = clients/memcapable clients/memcat \ +@BUILD_WIN32_FALSE@ clients/memcp clients/memdump \ +@BUILD_WIN32_FALSE@ clients/memerror clients/memexist \ +@BUILD_WIN32_FALSE@ clients/memtouch clients/memflush \ +@BUILD_WIN32_FALSE@ clients/memparse clients/memping \ +@BUILD_WIN32_FALSE@ clients/memrm clients/memslap \ +@BUILD_WIN32_FALSE@ clients/memstat +@BUILD_MEMASLAP_TRUE@@BUILD_WIN32_FALSE@@BUILD_WIN32_WRAPPERS_FALSE@@HAVE_LIBEVENT_TRUE@am__append_42 = clients/memaslap + +# library used for testing + +# This noinst lib contains things we want to be ABI private but still want to +# either use in client programs or be able to test in test cases These symbols +# will not be exposed in the shipped .so + +# This noinst lib contains things we want to be ABI private but still want to +# either use in client programs or be able to test in test cases These symbols +# will not be exposed in the shipped .so +@BUILD_WIN32_FALSE@am__append_43 = clients/libutilities.la \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkitinc.la \ +@BUILD_WIN32_FALSE@ libmemcachedinternal/libmemcachedinternal.la \ +@BUILD_WIN32_FALSE@ libmemcachedinternal/libmemcachedutilinternal.la +@BUILD_WIN32_FALSE@am__append_44 = man/memaslap.1 man/memcapable.1 \ +@BUILD_WIN32_FALSE@ man/memcat.1 man/memcp.1 man/memdump.1 \ +@BUILD_WIN32_FALSE@ man/memerror.1 man/memexist.1 \ +@BUILD_WIN32_FALSE@ man/memflush.1 man/memparse.1 man/memping.1 \ +@BUILD_WIN32_FALSE@ man/memrm.1 man/memslap.1 man/memstat.1 \ +@BUILD_WIN32_FALSE@ man/memtouch.1 man/hashkit_clone.3 \ +@BUILD_WIN32_FALSE@ man/hashkit_crc32.3 man/hashkit_create.3 \ +@BUILD_WIN32_FALSE@ man/hashkit_fnv1_32.3 man/hashkit_fnv1_64.3 \ +@BUILD_WIN32_FALSE@ man/hashkit_fnv1a_32.3 \ +@BUILD_WIN32_FALSE@ man/hashkit_fnv1a_64.3 man/hashkit_free.3 \ +@BUILD_WIN32_FALSE@ man/hashkit_functions.3 man/hashkit_hsieh.3 \ +@BUILD_WIN32_FALSE@ man/hashkit_is_allocated.3 \ +@BUILD_WIN32_FALSE@ man/hashkit_jenkins.3 man/hashkit_md5.3 \ +@BUILD_WIN32_FALSE@ man/hashkit_murmur.3 man/hashkit_value.3 \ +@BUILD_WIN32_FALSE@ man/libhashkit.3 man/libmemcached.3 \ +@BUILD_WIN32_FALSE@ man/libmemcached_check_configuration.3 \ +@BUILD_WIN32_FALSE@ man/libmemcached_configuration.3 \ +@BUILD_WIN32_FALSE@ man/libmemcached_examples.3 \ +@BUILD_WIN32_FALSE@ man/libmemcachedutil.3 man/memcached.3 \ +@BUILD_WIN32_FALSE@ man/memcached_add.3 \ +@BUILD_WIN32_FALSE@ man/memcached_add_by_key.3 \ +@BUILD_WIN32_FALSE@ man/memcached_analyze.3 \ +@BUILD_WIN32_FALSE@ man/memcached_append.3 \ +@BUILD_WIN32_FALSE@ man/memcached_append_by_key.3 \ +@BUILD_WIN32_FALSE@ man/memcached_behavior_get.3 \ +@BUILD_WIN32_FALSE@ man/memcached_behavior_set.3 \ +@BUILD_WIN32_FALSE@ man/memcached_callback_get.3 \ +@BUILD_WIN32_FALSE@ man/memcached_callback_set.3 \ +@BUILD_WIN32_FALSE@ man/memcached_cas.3 \ +@BUILD_WIN32_FALSE@ man/memcached_cas_by_key.3 \ +@BUILD_WIN32_FALSE@ man/memcached_clone.3 \ +@BUILD_WIN32_FALSE@ man/memcached_create.3 \ +@BUILD_WIN32_FALSE@ man/memcached_decrement.3 \ +@BUILD_WIN32_FALSE@ man/memcached_decrement_with_initial.3 \ +@BUILD_WIN32_FALSE@ man/memcached_delete.3 \ +@BUILD_WIN32_FALSE@ man/memcached_delete_by_key.3 \ +@BUILD_WIN32_FALSE@ man/memcached_destroy_sasl_auth_data.3 \ +@BUILD_WIN32_FALSE@ man/memcached_dump.3 man/memcached_exist.3 \ +@BUILD_WIN32_FALSE@ man/memcached_exist_by_key.3 \ +@BUILD_WIN32_FALSE@ man/memcached_fetch.3 \ +@BUILD_WIN32_FALSE@ man/memcached_fetch_execute.3 \ +@BUILD_WIN32_FALSE@ man/memcached_fetch_result.3 \ +@BUILD_WIN32_FALSE@ man/memcached_flush_buffers.3 \ +@BUILD_WIN32_FALSE@ man/memcached_free.3 \ +@BUILD_WIN32_FALSE@ man/memcached_generate_hash.3 \ +@BUILD_WIN32_FALSE@ man/memcached_generate_hash_value.3 \ +@BUILD_WIN32_FALSE@ man/memcached_get.3 \ +@BUILD_WIN32_FALSE@ man/memcached_get_by_key.3 \ +@BUILD_WIN32_FALSE@ man/memcached_get_memory_allocators.3 \ +@BUILD_WIN32_FALSE@ man/memcached_get_sasl_callbacks.3 \ +@BUILD_WIN32_FALSE@ man/memcached_get_user_data.3 \ +@BUILD_WIN32_FALSE@ man/memcached_increment.3 \ +@BUILD_WIN32_FALSE@ man/memcached_increment_with_initial.3 \ +@BUILD_WIN32_FALSE@ man/memcached_last_error_message.3 \ +@BUILD_WIN32_FALSE@ man/memcached_lib_version.3 \ +@BUILD_WIN32_FALSE@ man/memcached_mget.3 \ +@BUILD_WIN32_FALSE@ man/memcached_mget_by_key.3 \ +@BUILD_WIN32_FALSE@ man/memcached_mget_execute.3 \ +@BUILD_WIN32_FALSE@ man/memcached_mget_execute_by_key.3 \ +@BUILD_WIN32_FALSE@ man/memcached_pool.3 \ +@BUILD_WIN32_FALSE@ man/memcached_pool_behavior_get.3 \ +@BUILD_WIN32_FALSE@ man/memcached_pool_behavior_set.3 \ +@BUILD_WIN32_FALSE@ man/memcached_pool_create.3 \ +@BUILD_WIN32_FALSE@ man/memcached_pool_destroy.3 \ +@BUILD_WIN32_FALSE@ man/memcached_pool_fetch.3 \ +@BUILD_WIN32_FALSE@ man/memcached_pool_pop.3 \ +@BUILD_WIN32_FALSE@ man/memcached_pool_push.3 \ +@BUILD_WIN32_FALSE@ man/memcached_pool_release.3 \ +@BUILD_WIN32_FALSE@ man/memcached_pool_st.3 \ +@BUILD_WIN32_FALSE@ man/memcached_prepend.3 \ +@BUILD_WIN32_FALSE@ man/memcached_prepend_by_key.3 \ +@BUILD_WIN32_FALSE@ man/memcached_quit.3 \ +@BUILD_WIN32_FALSE@ man/memcached_replace.3 \ +@BUILD_WIN32_FALSE@ man/memcached_replace_by_key.3 \ +@BUILD_WIN32_FALSE@ man/memcached_sasl_set_auth_data.3 \ +@BUILD_WIN32_FALSE@ man/memcached_server_add.3 \ +@BUILD_WIN32_FALSE@ man/memcached_server_count.3 \ +@BUILD_WIN32_FALSE@ man/memcached_server_cursor.3 \ +@BUILD_WIN32_FALSE@ man/memcached_server_list.3 \ +@BUILD_WIN32_FALSE@ man/memcached_server_list_append.3 \ +@BUILD_WIN32_FALSE@ man/memcached_server_list_count.3 \ +@BUILD_WIN32_FALSE@ man/memcached_server_list_free.3 \ +@BUILD_WIN32_FALSE@ man/memcached_server_push.3 \ +@BUILD_WIN32_FALSE@ man/memcached_servers_parse.3 \ +@BUILD_WIN32_FALSE@ man/memcached_set.3 \ +@BUILD_WIN32_FALSE@ man/memcached_set_by_key.3 \ +@BUILD_WIN32_FALSE@ man/memcached_set_memory_allocators.3 \ +@BUILD_WIN32_FALSE@ man/memcached_set_sasl_callbacks.3 \ +@BUILD_WIN32_FALSE@ man/memcached_set_user_data.3 \ +@BUILD_WIN32_FALSE@ man/memcached_stat.3 \ +@BUILD_WIN32_FALSE@ man/memcached_stat_execute.3 \ +@BUILD_WIN32_FALSE@ man/memcached_stat_get_keys.3 \ +@BUILD_WIN32_FALSE@ man/memcached_stat_get_value.3 \ +@BUILD_WIN32_FALSE@ man/memcached_stat_servername.3 \ +@BUILD_WIN32_FALSE@ man/memcached_strerror.3 \ +@BUILD_WIN32_FALSE@ man/memcached_touch.3 \ +@BUILD_WIN32_FALSE@ man/memcached_touch_by_key.3 \ +@BUILD_WIN32_FALSE@ man/memcached_verbosity.3 \ +@BUILD_WIN32_FALSE@ man/memcached_version.3 +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@@HAVE_LIBEVENT_TRUE@am__append_45 = example/memcached_light +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@am__append_46 = example/byteorder.h \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ example/memcached_light.h \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ example/storage.h +@BUILD_WIN32_FALSE@am__append_47 = libhashkit/libhashkit.la \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached.la \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedutil.la +@BUILD_WIN32_FALSE@am__append_48 = libhashkit/aes.h \ +@BUILD_WIN32_FALSE@ libhashkit/algorithm.h libhashkit/murmur3.h \ +@BUILD_WIN32_FALSE@ libhashkit/common.h libhashkit/is.h \ +@BUILD_WIN32_FALSE@ libhashkit/rijndael.hpp libhashkit/string.h \ +@BUILD_WIN32_FALSE@ libmemcached/csl/common.h \ +@BUILD_WIN32_FALSE@ libmemcached/csl/context.h \ +@BUILD_WIN32_FALSE@ libmemcached/csl/parser.h \ +@BUILD_WIN32_FALSE@ libmemcached/csl/scanner.h \ +@BUILD_WIN32_FALSE@ libmemcached/csl/server.h \ +@BUILD_WIN32_FALSE@ libmemcached/csl/symbol.h \ +@BUILD_WIN32_FALSE@ libmemcached/array.h \ +@BUILD_WIN32_FALSE@ libmemcached/assert.hpp \ +@BUILD_WIN32_FALSE@ libmemcached/backtrace.hpp \ +@BUILD_WIN32_FALSE@ libmemcached/behavior.hpp \ +@BUILD_WIN32_FALSE@ libmemcached/byteorder.h \ +@BUILD_WIN32_FALSE@ libmemcached/common.h \ +@BUILD_WIN32_FALSE@ libmemcached/connect.hpp \ +@BUILD_WIN32_FALSE@ libmemcached/continuum.hpp \ +@BUILD_WIN32_FALSE@ libmemcached/do.hpp \ +@BUILD_WIN32_FALSE@ libmemcached/encoding_key.h \ +@BUILD_WIN32_FALSE@ libmemcached/error.hpp \ +@BUILD_WIN32_FALSE@ libmemcached/flag.hpp \ +@BUILD_WIN32_FALSE@ libmemcached/initialize_query.h \ +@BUILD_WIN32_FALSE@ libmemcached/instance.hpp \ +@BUILD_WIN32_FALSE@ libmemcached/internal.h libmemcached/io.h \ +@BUILD_WIN32_FALSE@ libmemcached/io.hpp libmemcached/is.h \ +@BUILD_WIN32_FALSE@ libmemcached/key.hpp \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_probes.h \ +@BUILD_WIN32_FALSE@ libmemcached/memcached/protocol_binary.h \ +@BUILD_WIN32_FALSE@ libmemcached/memcached/vbucket.h \ +@BUILD_WIN32_FALSE@ libmemcached/memory.h \ +@BUILD_WIN32_FALSE@ libmemcached/namespace.h \ +@BUILD_WIN32_FALSE@ libmemcached/options.hpp \ +@BUILD_WIN32_FALSE@ libmemcached/poll.h libmemcached/response.h \ +@BUILD_WIN32_FALSE@ libmemcached/result.h libmemcached/sasl.hpp \ +@BUILD_WIN32_FALSE@ libmemcached/server.hpp \ +@BUILD_WIN32_FALSE@ libmemcached/server_instance.h \ +@BUILD_WIN32_FALSE@ libmemcached/socket.hpp \ +@BUILD_WIN32_FALSE@ libmemcached/string.hpp \ +@BUILD_WIN32_FALSE@ libmemcached/udp.hpp \ +@BUILD_WIN32_FALSE@ libmemcached/version.hpp \ +@BUILD_WIN32_FALSE@ libmemcached/virtual_bucket.h \ +@BUILD_WIN32_FALSE@ libmemcached/watchpoint.h \ +@BUILD_WIN32_FALSE@ libmemcached/windows.hpp \ +@BUILD_WIN32_FALSE@ libmemcachedutil/common.h +@BUILD_WIN32_FALSE@@INCLUDE_HSIEH_SRC_TRUE@am__append_49 = libhashkit/hsieh.cc +@BUILD_WIN32_FALSE@@INCLUDE_HSIEH_SRC_FALSE@am__append_50 = libhashkit/nohsieh.cc +@BUILD_WIN32_FALSE@am__append_51 = libmemcached/csl/parser.output +@BUILD_WIN32_FALSE@am__append_52 = libmemcached/csl/parser.h \ +@BUILD_WIN32_FALSE@ libmemcached/csl/parser.cc \ +@BUILD_WIN32_FALSE@ libmemcached/csl/scanner.h \ +@BUILD_WIN32_FALSE@ libmemcached/csl/scanner.cc +@BUILD_WIN32_FALSE@@HAVE_SASL_TRUE@am__append_53 = @PTHREAD_CFLAGS@ +@BUILD_WIN32_FALSE@@HAVE_SASL_TRUE@am__append_54 = @PTHREAD_CFLAGS@ +@BUILD_WIN32_FALSE@@HAVE_SASL_TRUE@am__append_55 = @PTHREAD_LIBS@ \ +@BUILD_WIN32_FALSE@@HAVE_SASL_TRUE@ @SASL_LIB@ $(am__empty) +@BUILD_WIN32_FALSE@@HAVE_DTRACE_TRUE@am__append_56 = libmemcached/dtrace_probes.h +@BUILD_WIN32_FALSE@@HAVE_DTRACE_TRUE@am__append_57 = libmemcached/dtrace_probes.h \ +@BUILD_WIN32_FALSE@@HAVE_DTRACE_TRUE@ libmemcached/libmemcached_probes.o +@BUILD_WIN32_FALSE@@HAVE_DTRACE_TRUE@am__append_58 = libmemcached/libmemcached_probes.o +@BUILD_WIN32_FALSE@@HAVE_DTRACE_TRUE@am__append_59 = libmemcached/libmemcached_probes.o +@BUILD_WIN32_FALSE@@HAVE_DTRACE_TRUE@am__append_60 = libmemcached/libmemcached_probes.d +@BUILD_WIN32_FALSE@am__append_61 = .d +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@am__append_62 = libmemcached/libmemcachedprotocol.la +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@am__append_63 = libmemcachedprotocol/ascii_handler.h \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ libmemcachedprotocol/binary_handler.h \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ libmemcachedprotocol/cache.h \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ libmemcachedprotocol/common.h + +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root +@BUILD_WIN32_FALSE@am__append_64 = tests/exist.h tests/hash_results.h \ +@BUILD_WIN32_FALSE@ tests/keys.hpp \ +@BUILD_WIN32_FALSE@ tests/libmemcached_test_container.h \ +@BUILD_WIN32_FALSE@ tests/libmemcached_world.h \ +@BUILD_WIN32_FALSE@ tests/libmemcached_world_socket.h \ +@BUILD_WIN32_FALSE@ tests/memc.hpp tests/runner.h tests/basic.h \ +@BUILD_WIN32_FALSE@ tests/callbacks.h tests/debug.h \ +@BUILD_WIN32_FALSE@ tests/deprecated.h tests/error_conditions.h \ +@BUILD_WIN32_FALSE@ tests/exist.h tests/ketama.h \ +@BUILD_WIN32_FALSE@ tests/ketama_test_cases.h \ +@BUILD_WIN32_FALSE@ tests/ketama_test_cases_spy.h \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/all_tests.h \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/callback_counter.h \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/dump.h \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/encoding_key.h \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/fetch_all_results.h \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/generate.h \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/haldenbrand.h \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/mem_functions.h \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/memcached_get.h \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/parser.h \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/setup_and_teardowns.h \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/stat.h \ +@BUILD_WIN32_FALSE@ tests/namespace.h tests/pool.h \ +@BUILD_WIN32_FALSE@ tests/print.h tests/replication.h \ +@BUILD_WIN32_FALSE@ tests/server_add.h tests/string.h \ +@BUILD_WIN32_FALSE@ tests/touch.h tests/virtual_buckets.h \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/parser.h \ +@BUILD_WIN32_FALSE@ util/daemon.hpp util/instance.hpp \ +@BUILD_WIN32_FALSE@ util/logfile.hpp util/log.hpp \ +@BUILD_WIN32_FALSE@ util/operation.hpp util/signal.hpp \ +@BUILD_WIN32_FALSE@ util/string.hpp util/pidfile.hpp \ +@BUILD_WIN32_FALSE@ win32/wrappers.h +@BUILD_WIN32_FALSE@am__append_65 = tests/cycle +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@am__append_66 = tests/libmemcached-1.0/internals +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@am__append_67 = tests/libmemcached-1.0/internals +@BUILD_WIN32_FALSE@am__append_68 = tests/libmemcached-1.0/testapp \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/testsocket \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/sasl tests/testudp \ +@BUILD_WIN32_FALSE@ tests/testplus tests/parser tests/failure \ +@BUILD_WIN32_FALSE@ tests/testhashkit tests/hash_plus \ +@BUILD_WIN32_FALSE@ tests/memcapable tests/memstat tests/memcp \ +@BUILD_WIN32_FALSE@ tests/memflush tests/memrm tests/memexist \ +@BUILD_WIN32_FALSE@ tests/memtouch tests/memcat tests/memping \ +@BUILD_WIN32_FALSE@ tests/memerror tests/memslap tests/memdump +@BUILD_WIN32_FALSE@am__append_69 = tests/libmemcached-1.0/testapp \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/testsocket \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/sasl \ +@BUILD_WIN32_FALSE@ tests/atomsmasher tests/testudp \ +@BUILD_WIN32_FALSE@ tests/testplus tests/parser tests/failure \ +@BUILD_WIN32_FALSE@ tests/testhashkit tests/hash_plus \ +@BUILD_WIN32_FALSE@ tests/memcapable tests/memstat tests/memcp \ +@BUILD_WIN32_FALSE@ tests/memflush tests/memrm tests/memexist \ +@BUILD_WIN32_FALSE@ tests/memtouch tests/memcat tests/memping \ +@BUILD_WIN32_FALSE@ tests/memerror tests/memslap tests/memdump +@BUILD_WIN32_FALSE@@BUILD_WIN32_WRAPPERS_TRUE@am__append_70 = -no-undefined +@BUILD_WIN32_FALSE@@BUILD_WIN32_WRAPPERS_TRUE@am__append_71 = -no-undefined +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@@BUILD_WIN32_WRAPPERS_TRUE@am__append_72 = -no-undefined +@BUILD_WIN32_FALSE@@BUILD_WIN32_WRAPPERS_TRUE@am__append_73 = -no-undefined +@BUILD_WIN32_FALSE@am__append_74 = m4/ax_libmemcached.m4 +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_add_am_macro.m4 \ + $(top_srcdir)/m4/ax_am_jobserver.m4 \ + $(top_srcdir)/m4/ax_am_macros.m4 \ + $(top_srcdir)/m4/ax_append_compile_flags.m4 \ + $(top_srcdir)/m4/ax_append_flag.m4 \ + $(top_srcdir)/m4/ax_append_link_flags.m4 \ + $(top_srcdir)/m4/ax_append_to_file.m4 \ + $(top_srcdir)/m4/ax_assert.m4 \ + $(top_srcdir)/m4/ax_check_compile_flag.m4 \ + $(top_srcdir)/m4/ax_check_library.m4 \ + $(top_srcdir)/m4/ax_check_link_flag.m4 \ + $(top_srcdir)/m4/ax_compiler_vendor.m4 \ + $(top_srcdir)/m4/ax_compiler_version.m4 \ + $(top_srcdir)/m4/ax_count_cpus.m4 \ + $(top_srcdir)/m4/ax_cxx_gcc_abi_demangle.m4 \ + $(top_srcdir)/m4/ax_debug.m4 $(top_srcdir)/m4/ax_endian.m4 \ + $(top_srcdir)/m4/ax_file_escapes.m4 \ + $(top_srcdir)/m4/ax_gcc_atomic_builtins.m4 \ + $(top_srcdir)/m4/ax_harden_compiler_flags.m4 \ + $(top_srcdir)/m4/ax_hex_version.m4 \ + $(top_srcdir)/m4/ax_libevent.m4 \ + $(top_srcdir)/m4/ax_memcached.m4 \ + $(top_srcdir)/m4/ax_platform.m4 \ + $(top_srcdir)/m4/ax_print_to_file.m4 \ + $(top_srcdir)/m4/ax_prog_sphinx_build.m4 \ + $(top_srcdir)/m4/ax_pthread.m4 \ + $(top_srcdir)/m4/ax_pthread_timedjoin_np.m4 \ + $(top_srcdir)/m4/ax_restore_flags.m4 \ + $(top_srcdir)/m4/ax_sasl.m4 $(top_srcdir)/m4/ax_save_flags.m4 \ + $(top_srcdir)/m4/ax_uuid.m4 \ + $(top_srcdir)/m4/ax_vcs_checkout.m4 \ + $(top_srcdir)/m4/ax_with_prog.m4 $(top_srcdir)/m4/bottom.m4 \ + $(top_srcdir)/m4/byteorder.m4 $(top_srcdir)/m4/deprecated.m4 \ + $(top_srcdir)/m4/fnv.m4 $(top_srcdir)/m4/gearmand.m4 \ + $(top_srcdir)/m4/have_cinttypes.m4 \ + $(top_srcdir)/m4/have_cstdint.m4 $(top_srcdir)/m4/hsieh.m4 \ + $(top_srcdir)/m4/libgearman.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/memaslap.m4 $(top_srcdir)/m4/murmur.m4 \ + $(top_srcdir)/m4/pandora_enable_dtrace.m4 \ + $(top_srcdir)/m4/protocol_binary.m4 \ + $(top_srcdir)/m4/setsockopt.m4 \ + $(top_srcdir)/m4/socket_send_flags.m4 \ + $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/version.m4 \ + $(top_srcdir)/libhashkit/include.m4 \ + $(top_srcdir)/libtest/yatl.m4 \ + $(top_srcdir)/libtest/m4/mysql.m4 \ + $(top_srcdir)/libtest/m4/ax_lib_mysql.m4 \ + $(top_srcdir)/libtest/m4/ax_prog_mysqld.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = mem_config.h +CONFIG_CLEAN_FILES = libhashkit/hashkitcon.h \ + libhashkit-1.0/configure.h libtest/version.h libtest/yatlcon.h \ + docs/conf.py libmemcached-1.0/configure.h \ + support/libmemcached.pc support/libmemcached.spec +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" \ + "$(DESTDIR)$(aclocaldir)" "$(DESTDIR)$(pkgconfigdir)" \ + "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)" +LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) +clients_libutilities_la_LIBADD = +am__clients_libutilities_la_SOURCES_DIST = clients/utilities.cc +am__dirstamp = $(am__leading_dot)dirstamp +@BUILD_WIN32_FALSE@am_clients_libutilities_la_OBJECTS = \ +@BUILD_WIN32_FALSE@ clients/utilities.lo +clients_libutilities_la_OBJECTS = \ + $(am_clients_libutilities_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +@BUILD_WIN32_FALSE@am_clients_libutilities_la_rpath = +libhashkit_libhashkit_la_DEPENDENCIES = +am__libhashkit_libhashkit_la_SOURCES_DIST = libhashkit/aes.cc \ + libhashkit/algorithm.cc libhashkit/behavior.cc \ + libhashkit/crc32.cc libhashkit/digest.cc libhashkit/encrypt.cc \ + libhashkit/fnv_32.cc libhashkit/fnv_64.cc \ + libhashkit/function.cc libhashkit/has.cc libhashkit/hashkit.cc \ + libhashkit/jenkins.cc libhashkit/ketama.cc libhashkit/md5.cc \ + libhashkit/murmur.cc libhashkit/murmur3.cc \ + libhashkit/murmur3_api.cc libhashkit/one_at_a_time.cc \ + libhashkit/rijndael.cc libhashkit/str_algorithm.cc \ + libhashkit/strerror.cc libhashkit/string.cc \ + libhashkit/hsieh.cc libhashkit/nohsieh.cc +@BUILD_WIN32_FALSE@@INCLUDE_HSIEH_SRC_TRUE@am__objects_1 = libhashkit/libhashkit_libhashkit_la-hsieh.lo +@BUILD_WIN32_FALSE@@INCLUDE_HSIEH_SRC_FALSE@am__objects_2 = libhashkit/libhashkit_libhashkit_la-nohsieh.lo +@BUILD_WIN32_TRUE@@INCLUDE_HSIEH_SRC_TRUE@am__objects_3 = libhashkit/libhashkit_libhashkit_la-hsieh.lo +@BUILD_WIN32_TRUE@@INCLUDE_HSIEH_SRC_FALSE@am__objects_4 = libhashkit/libhashkit_libhashkit_la-nohsieh.lo +@BUILD_WIN32_FALSE@am_libhashkit_libhashkit_la_OBJECTS = \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkit_la-aes.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkit_la-algorithm.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkit_la-behavior.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkit_la-crc32.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkit_la-digest.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkit_la-encrypt.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkit_la-fnv_32.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkit_la-fnv_64.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkit_la-function.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkit_la-has.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkit_la-hashkit.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkit_la-jenkins.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkit_la-ketama.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkit_la-md5.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkit_la-murmur.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkit_la-murmur3.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkit_la-murmur3_api.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkit_la-one_at_a_time.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkit_la-rijndael.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkit_la-str_algorithm.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkit_la-strerror.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkit_la-string.lo \ +@BUILD_WIN32_FALSE@ $(am__objects_1) $(am__objects_2) +@BUILD_WIN32_TRUE@am_libhashkit_libhashkit_la_OBJECTS = \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkit_la-aes.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkit_la-algorithm.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkit_la-behavior.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkit_la-crc32.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkit_la-digest.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkit_la-encrypt.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkit_la-fnv_32.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkit_la-fnv_64.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkit_la-function.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkit_la-has.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkit_la-hashkit.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkit_la-jenkins.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkit_la-ketama.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkit_la-md5.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkit_la-murmur.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkit_la-murmur3.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkit_la-murmur3_api.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkit_la-one_at_a_time.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkit_la-rijndael.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkit_la-str_algorithm.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkit_la-strerror.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkit_la-string.lo \ +@BUILD_WIN32_TRUE@ $(am__objects_3) $(am__objects_4) \ +@BUILD_WIN32_TRUE@ $(am__objects_1) $(am__objects_2) +libhashkit_libhashkit_la_OBJECTS = \ + $(am_libhashkit_libhashkit_la_OBJECTS) +libhashkit_libhashkit_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) \ + $(libhashkit_libhashkit_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_WIN32_FALSE@am_libhashkit_libhashkit_la_rpath = -rpath \ +@BUILD_WIN32_FALSE@ $(libdir) +@BUILD_WIN32_TRUE@am_libhashkit_libhashkit_la_rpath = -rpath $(libdir) +libhashkit_libhashkitinc_la_LIBADD = +am__libhashkit_libhashkitinc_la_SOURCES_DIST = libhashkit/aes.cc \ + libhashkit/algorithm.cc libhashkit/behavior.cc \ + libhashkit/crc32.cc libhashkit/digest.cc libhashkit/encrypt.cc \ + libhashkit/fnv_32.cc libhashkit/fnv_64.cc \ + libhashkit/function.cc libhashkit/has.cc libhashkit/hashkit.cc \ + libhashkit/jenkins.cc libhashkit/ketama.cc libhashkit/md5.cc \ + libhashkit/murmur.cc libhashkit/murmur3.cc \ + libhashkit/murmur3_api.cc libhashkit/one_at_a_time.cc \ + libhashkit/rijndael.cc libhashkit/str_algorithm.cc \ + libhashkit/strerror.cc libhashkit/string.cc \ + libhashkit/hsieh.cc libhashkit/nohsieh.cc +@BUILD_WIN32_FALSE@@INCLUDE_HSIEH_SRC_TRUE@am__objects_5 = libhashkit/libhashkit_libhashkitinc_la-hsieh.lo +@BUILD_WIN32_FALSE@@INCLUDE_HSIEH_SRC_FALSE@am__objects_6 = libhashkit/libhashkit_libhashkitinc_la-nohsieh.lo +@BUILD_WIN32_TRUE@@INCLUDE_HSIEH_SRC_TRUE@am__objects_7 = libhashkit/libhashkit_libhashkitinc_la-hsieh.lo +@BUILD_WIN32_TRUE@@INCLUDE_HSIEH_SRC_FALSE@am__objects_8 = libhashkit/libhashkit_libhashkitinc_la-nohsieh.lo +@BUILD_WIN32_FALSE@am__objects_9 = libhashkit/libhashkit_libhashkitinc_la-aes.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkitinc_la-algorithm.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkitinc_la-behavior.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkitinc_la-crc32.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkitinc_la-digest.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkitinc_la-encrypt.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkitinc_la-fnv_32.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkitinc_la-fnv_64.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkitinc_la-function.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkitinc_la-has.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkitinc_la-hashkit.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkitinc_la-jenkins.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkitinc_la-ketama.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkitinc_la-md5.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkitinc_la-murmur.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkitinc_la-murmur3.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkitinc_la-murmur3_api.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkitinc_la-one_at_a_time.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkitinc_la-rijndael.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkitinc_la-str_algorithm.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkitinc_la-strerror.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libhashkit_libhashkitinc_la-string.lo \ +@BUILD_WIN32_FALSE@ $(am__objects_5) $(am__objects_6) +@BUILD_WIN32_TRUE@am__objects_9 = libhashkit/libhashkit_libhashkitinc_la-aes.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkitinc_la-algorithm.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkitinc_la-behavior.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkitinc_la-crc32.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkitinc_la-digest.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkitinc_la-encrypt.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkitinc_la-fnv_32.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkitinc_la-fnv_64.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkitinc_la-function.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkitinc_la-has.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkitinc_la-hashkit.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkitinc_la-jenkins.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkitinc_la-ketama.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkitinc_la-md5.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkitinc_la-murmur.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkitinc_la-murmur3.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkitinc_la-murmur3_api.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkitinc_la-one_at_a_time.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkitinc_la-rijndael.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkitinc_la-str_algorithm.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkitinc_la-strerror.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libhashkit_libhashkitinc_la-string.lo \ +@BUILD_WIN32_TRUE@ $(am__objects_7) $(am__objects_8) \ +@BUILD_WIN32_TRUE@ $(am__objects_5) $(am__objects_6) +@BUILD_WIN32_FALSE@am_libhashkit_libhashkitinc_la_OBJECTS = \ +@BUILD_WIN32_FALSE@ $(am__objects_9) +@BUILD_WIN32_TRUE@am_libhashkit_libhashkitinc_la_OBJECTS = \ +@BUILD_WIN32_TRUE@ $(am__objects_9) +libhashkit_libhashkitinc_la_OBJECTS = \ + $(am_libhashkit_libhashkitinc_la_OBJECTS) +libhashkit_libhashkitinc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_WIN32_FALSE@am_libhashkit_libhashkitinc_la_rpath = +@BUILD_WIN32_TRUE@am_libhashkit_libhashkitinc_la_rpath = +am__DEPENDENCIES_1 = +@BUILD_WIN32_FALSE@libmemcached_libmemcached_la_DEPENDENCIES = \ +@BUILD_WIN32_FALSE@ $(am__DEPENDENCIES_1) $(am__append_59) +@BUILD_WIN32_TRUE@libmemcached_libmemcached_la_DEPENDENCIES = \ +@BUILD_WIN32_TRUE@ $(am__DEPENDENCIES_1) $(am__append_17) \ +@BUILD_WIN32_TRUE@ $(am__DEPENDENCIES_1) $(am__append_59) +am__libmemcached_libmemcached_la_SOURCES_DIST = \ + libmemcached/csl/context.cc libmemcached/csl/parser.cc \ + libmemcached/csl/scanner.cc libmemcached/instance.cc \ + libhashkit/aes.cc libhashkit/algorithm.cc \ + libhashkit/behavior.cc libhashkit/crc32.cc \ + libhashkit/digest.cc libhashkit/encrypt.cc \ + libhashkit/fnv_32.cc libhashkit/fnv_64.cc \ + libhashkit/function.cc libhashkit/has.cc libhashkit/hashkit.cc \ + libhashkit/jenkins.cc libhashkit/ketama.cc libhashkit/md5.cc \ + libhashkit/murmur.cc libhashkit/murmur3.cc \ + libhashkit/murmur3_api.cc libhashkit/one_at_a_time.cc \ + libhashkit/rijndael.cc libhashkit/str_algorithm.cc \ + libhashkit/strerror.cc libhashkit/string.cc \ + libhashkit/hsieh.cc libhashkit/nohsieh.cc \ + libmemcached/allocators.cc libmemcached/allocators.hpp \ + libmemcached/analyze.cc libmemcached/array.c \ + libmemcached/auto.cc libmemcached/backtrace.cc \ + libmemcached/behavior.cc libmemcached/byteorder.cc \ + libmemcached/callback.cc libmemcached/connect.cc \ + libmemcached/delete.cc libmemcached/do.cc libmemcached/dump.cc \ + libmemcached/error.cc libmemcached/exist.cc \ + libmemcached/fetch.cc libmemcached/flag.cc \ + libmemcached/flush.cc libmemcached/flush_buffers.cc \ + libmemcached/get.cc libmemcached/hash.cc libmemcached/hash.hpp \ + libmemcached/hosts.cc libmemcached/initialize_query.cc \ + libmemcached/io.cc libmemcached/key.cc \ + libmemcached/memcached.cc libmemcached/encoding_key.cc \ + libmemcached/namespace.cc libmemcached/options.cc \ + libmemcached/parse.cc libmemcached/poll.cc \ + libmemcached/purge.cc libmemcached/quit.cc \ + libmemcached/quit.hpp libmemcached/response.cc \ + libmemcached/result.cc libmemcached/sasl.cc \ + libmemcached/server.cc libmemcached/server_list.cc \ + libmemcached/server_list.hpp libmemcached/stats.cc \ + libmemcached/storage.cc libmemcached/strerror.cc \ + libmemcached/string.cc libmemcached/touch.cc \ + libmemcached/udp.cc libmemcached/verbosity.cc \ + libmemcached/version.cc libmemcached/virtual_bucket.c \ + libmemcached/libmemcached_probes.d +@BUILD_WIN32_FALSE@@INCLUDE_HSIEH_SRC_TRUE@am__objects_10 = libhashkit/libmemcached_libmemcached_la-hsieh.lo +@BUILD_WIN32_FALSE@@INCLUDE_HSIEH_SRC_FALSE@am__objects_11 = libhashkit/libmemcached_libmemcached_la-nohsieh.lo +@BUILD_WIN32_TRUE@@INCLUDE_HSIEH_SRC_TRUE@am__objects_12 = libhashkit/libmemcached_libmemcached_la-hsieh.lo +@BUILD_WIN32_TRUE@@INCLUDE_HSIEH_SRC_FALSE@am__objects_13 = libhashkit/libmemcached_libmemcached_la-nohsieh.lo +@BUILD_WIN32_FALSE@am__objects_14 = libhashkit/libmemcached_libmemcached_la-aes.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcached_libmemcached_la-algorithm.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcached_libmemcached_la-behavior.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcached_libmemcached_la-crc32.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcached_libmemcached_la-digest.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcached_libmemcached_la-encrypt.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcached_libmemcached_la-fnv_32.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcached_libmemcached_la-fnv_64.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcached_libmemcached_la-function.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcached_libmemcached_la-has.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcached_libmemcached_la-hashkit.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcached_libmemcached_la-jenkins.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcached_libmemcached_la-ketama.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcached_libmemcached_la-md5.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcached_libmemcached_la-murmur.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcached_libmemcached_la-murmur3.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcached_libmemcached_la-murmur3_api.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcached_libmemcached_la-one_at_a_time.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcached_libmemcached_la-rijndael.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcached_libmemcached_la-str_algorithm.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcached_libmemcached_la-strerror.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcached_libmemcached_la-string.lo \ +@BUILD_WIN32_FALSE@ $(am__objects_10) $(am__objects_11) +@BUILD_WIN32_TRUE@am__objects_14 = libhashkit/libmemcached_libmemcached_la-aes.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcached_libmemcached_la-algorithm.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcached_libmemcached_la-behavior.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcached_libmemcached_la-crc32.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcached_libmemcached_la-digest.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcached_libmemcached_la-encrypt.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcached_libmemcached_la-fnv_32.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcached_libmemcached_la-fnv_64.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcached_libmemcached_la-function.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcached_libmemcached_la-has.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcached_libmemcached_la-hashkit.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcached_libmemcached_la-jenkins.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcached_libmemcached_la-ketama.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcached_libmemcached_la-md5.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcached_libmemcached_la-murmur.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcached_libmemcached_la-murmur3.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcached_libmemcached_la-murmur3_api.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcached_libmemcached_la-one_at_a_time.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcached_libmemcached_la-rijndael.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcached_libmemcached_la-str_algorithm.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcached_libmemcached_la-strerror.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcached_libmemcached_la-string.lo \ +@BUILD_WIN32_TRUE@ $(am__objects_12) $(am__objects_13) \ +@BUILD_WIN32_TRUE@ $(am__objects_10) $(am__objects_11) +am__objects_15 = +@BUILD_WIN32_FALSE@am_libmemcached_libmemcached_la_OBJECTS = libmemcached/csl/libmemcached_libmemcached_la-context.lo \ +@BUILD_WIN32_FALSE@ libmemcached/csl/libmemcached_libmemcached_la-parser.lo \ +@BUILD_WIN32_FALSE@ libmemcached/csl/libmemcached_libmemcached_la-scanner.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-instance.lo \ +@BUILD_WIN32_FALSE@ $(am__objects_14) \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-allocators.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-analyze.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-array.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-auto.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-backtrace.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-behavior.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-byteorder.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-callback.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-connect.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-delete.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-do.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-dump.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-error.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-exist.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-fetch.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-flag.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-flush.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-flush_buffers.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-get.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-hash.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-hosts.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-initialize_query.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-io.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-key.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-memcached.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-encoding_key.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-namespace.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-options.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-parse.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-poll.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-purge.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-quit.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-response.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-result.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-sasl.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-server.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-server_list.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-stats.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-storage.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-strerror.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-string.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-touch.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-udp.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-verbosity.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-version.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached_libmemcached_la-virtual_bucket.lo \ +@BUILD_WIN32_FALSE@ $(am__objects_15) +@BUILD_WIN32_TRUE@am_libmemcached_libmemcached_la_OBJECTS = libmemcached/csl/libmemcached_libmemcached_la-context.lo \ +@BUILD_WIN32_TRUE@ libmemcached/csl/libmemcached_libmemcached_la-parser.lo \ +@BUILD_WIN32_TRUE@ libmemcached/csl/libmemcached_libmemcached_la-scanner.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-instance.lo \ +@BUILD_WIN32_TRUE@ $(am__objects_14) \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-allocators.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-analyze.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-array.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-auto.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-backtrace.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-behavior.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-byteorder.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-callback.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-connect.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-delete.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-do.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-dump.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-error.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-exist.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-fetch.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-flag.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-flush.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-flush_buffers.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-get.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-hash.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-hosts.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-initialize_query.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-io.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-key.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-memcached.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-encoding_key.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-namespace.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-options.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-parse.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-poll.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-purge.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-quit.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-response.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-result.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-sasl.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-server.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-server_list.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-stats.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-storage.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-strerror.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-string.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-touch.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-udp.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-verbosity.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-version.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached_libmemcached_la-virtual_bucket.lo \ +@BUILD_WIN32_TRUE@ $(am__objects_15) $(am__objects_15) +libmemcached_libmemcached_la_OBJECTS = \ + $(am_libmemcached_libmemcached_la_OBJECTS) +libmemcached_libmemcached_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) \ + $(libmemcached_libmemcached_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_WIN32_FALSE@am_libmemcached_libmemcached_la_rpath = -rpath \ +@BUILD_WIN32_FALSE@ $(libdir) +@BUILD_WIN32_TRUE@am_libmemcached_libmemcached_la_rpath = -rpath \ +@BUILD_WIN32_TRUE@ $(libdir) +libmemcached_libmemcachedprotocol_la_DEPENDENCIES = +am__libmemcached_libmemcachedprotocol_la_SOURCES_DIST = \ + libmemcached/byteorder.cc libmemcachedprotocol/ascii_handler.c \ + libmemcachedprotocol/binary_handler.c \ + libmemcachedprotocol/cache.c libmemcachedprotocol/handler.c \ + libmemcachedprotocol/pedantic.c +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@am_libmemcached_libmemcachedprotocol_la_OBJECTS = libmemcached/libmemcached_libmemcachedprotocol_la-byteorder.lo \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-ascii_handler.lo \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-binary_handler.lo \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-cache.lo \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-handler.lo \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-pedantic.lo +libmemcached_libmemcachedprotocol_la_OBJECTS = \ + $(am_libmemcached_libmemcachedprotocol_la_OBJECTS) +libmemcached_libmemcachedprotocol_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CXXLD) $(libmemcached_libmemcachedprotocol_la_CXXFLAGS) \ + $(CXXFLAGS) $(libmemcached_libmemcachedprotocol_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@am_libmemcached_libmemcachedprotocol_la_rpath = \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ -rpath \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ $(libdir) +@BUILD_WIN32_FALSE@libmemcached_libmemcachedutil_la_DEPENDENCIES = \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached.la +am__libmemcached_libmemcachedutil_la_SOURCES_DIST = \ + libmemcached/backtrace.cc libmemcachedutil/flush.cc \ + libmemcachedutil/pid.cc libmemcachedutil/ping.cc \ + libmemcachedutil/pool.cc libmemcachedutil/version.cc +@BUILD_WIN32_FALSE@am_libmemcached_libmemcachedutil_la_OBJECTS = libmemcached/libmemcached_libmemcachedutil_la-backtrace.lo \ +@BUILD_WIN32_FALSE@ libmemcachedutil/libmemcached_libmemcachedutil_la-flush.lo \ +@BUILD_WIN32_FALSE@ libmemcachedutil/libmemcached_libmemcachedutil_la-pid.lo \ +@BUILD_WIN32_FALSE@ libmemcachedutil/libmemcached_libmemcachedutil_la-ping.lo \ +@BUILD_WIN32_FALSE@ libmemcachedutil/libmemcached_libmemcachedutil_la-pool.lo \ +@BUILD_WIN32_FALSE@ libmemcachedutil/libmemcached_libmemcachedutil_la-version.lo +libmemcached_libmemcachedutil_la_OBJECTS = \ + $(am_libmemcached_libmemcachedutil_la_OBJECTS) +libmemcached_libmemcachedutil_la_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CXXLD) $(libmemcached_libmemcachedutil_la_CXXFLAGS) \ + $(CXXFLAGS) $(libmemcached_libmemcachedutil_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +@BUILD_WIN32_FALSE@am_libmemcached_libmemcachedutil_la_rpath = -rpath \ +@BUILD_WIN32_FALSE@ $(libdir) +@BUILD_WIN32_FALSE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) \ +@BUILD_WIN32_FALSE@ $(am__append_59) +@BUILD_WIN32_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) \ +@BUILD_WIN32_TRUE@ $(am__append_17) $(am__DEPENDENCIES_1) \ +@BUILD_WIN32_TRUE@ $(am__append_59) +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@libmemcachedinternal_libmemcachedinternal_la_DEPENDENCIES = \ +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@ $(am__DEPENDENCIES_2) +am__libmemcachedinternal_libmemcachedinternal_la_SOURCES_DIST = \ + libmemcached/csl/context.cc libmemcached/csl/parser.cc \ + libmemcached/csl/scanner.cc libmemcached/instance.cc \ + libhashkit/aes.cc libhashkit/algorithm.cc \ + libhashkit/behavior.cc libhashkit/crc32.cc \ + libhashkit/digest.cc libhashkit/encrypt.cc \ + libhashkit/fnv_32.cc libhashkit/fnv_64.cc \ + libhashkit/function.cc libhashkit/has.cc libhashkit/hashkit.cc \ + libhashkit/jenkins.cc libhashkit/ketama.cc libhashkit/md5.cc \ + libhashkit/murmur.cc libhashkit/murmur3.cc \ + libhashkit/murmur3_api.cc libhashkit/one_at_a_time.cc \ + libhashkit/rijndael.cc libhashkit/str_algorithm.cc \ + libhashkit/strerror.cc libhashkit/string.cc \ + libhashkit/hsieh.cc libhashkit/nohsieh.cc \ + libmemcached/allocators.cc libmemcached/allocators.hpp \ + libmemcached/analyze.cc libmemcached/array.c \ + libmemcached/auto.cc libmemcached/backtrace.cc \ + libmemcached/behavior.cc libmemcached/byteorder.cc \ + libmemcached/callback.cc libmemcached/connect.cc \ + libmemcached/delete.cc libmemcached/do.cc libmemcached/dump.cc \ + libmemcached/error.cc libmemcached/exist.cc \ + libmemcached/fetch.cc libmemcached/flag.cc \ + libmemcached/flush.cc libmemcached/flush_buffers.cc \ + libmemcached/get.cc libmemcached/hash.cc libmemcached/hash.hpp \ + libmemcached/hosts.cc libmemcached/initialize_query.cc \ + libmemcached/io.cc libmemcached/key.cc \ + libmemcached/memcached.cc libmemcached/encoding_key.cc \ + libmemcached/namespace.cc libmemcached/options.cc \ + libmemcached/parse.cc libmemcached/poll.cc \ + libmemcached/purge.cc libmemcached/quit.cc \ + libmemcached/quit.hpp libmemcached/response.cc \ + libmemcached/result.cc libmemcached/sasl.cc \ + libmemcached/server.cc libmemcached/server_list.cc \ + libmemcached/server_list.hpp libmemcached/stats.cc \ + libmemcached/storage.cc libmemcached/strerror.cc \ + libmemcached/string.cc libmemcached/touch.cc \ + libmemcached/udp.cc libmemcached/verbosity.cc \ + libmemcached/version.cc libmemcached/virtual_bucket.c \ + libmemcached/libmemcached_probes.d +@BUILD_WIN32_FALSE@@INCLUDE_HSIEH_SRC_TRUE@am__objects_16 = libhashkit/libmemcachedinternal_libmemcachedinternal_la-hsieh.lo +@BUILD_WIN32_FALSE@@INCLUDE_HSIEH_SRC_FALSE@am__objects_17 = libhashkit/libmemcachedinternal_libmemcachedinternal_la-nohsieh.lo +@BUILD_WIN32_TRUE@@INCLUDE_HSIEH_SRC_TRUE@am__objects_18 = libhashkit/libmemcachedinternal_libmemcachedinternal_la-hsieh.lo +@BUILD_WIN32_TRUE@@INCLUDE_HSIEH_SRC_FALSE@am__objects_19 = libhashkit/libmemcachedinternal_libmemcachedinternal_la-nohsieh.lo +@BUILD_WIN32_FALSE@am__objects_20 = libhashkit/libmemcachedinternal_libmemcachedinternal_la-aes.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-algorithm.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-behavior.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-crc32.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-digest.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-encrypt.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-fnv_32.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-fnv_64.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-function.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-has.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-hashkit.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-jenkins.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-ketama.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-md5.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-murmur.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-murmur3.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-murmur3_api.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-one_at_a_time.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-rijndael.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-str_algorithm.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-strerror.lo \ +@BUILD_WIN32_FALSE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-string.lo \ +@BUILD_WIN32_FALSE@ $(am__objects_16) $(am__objects_17) +@BUILD_WIN32_TRUE@am__objects_20 = libhashkit/libmemcachedinternal_libmemcachedinternal_la-aes.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-algorithm.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-behavior.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-crc32.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-digest.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-encrypt.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-fnv_32.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-fnv_64.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-function.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-has.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-hashkit.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-jenkins.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-ketama.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-md5.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-murmur.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-murmur3.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-murmur3_api.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-one_at_a_time.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-rijndael.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-str_algorithm.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-strerror.lo \ +@BUILD_WIN32_TRUE@ libhashkit/libmemcachedinternal_libmemcachedinternal_la-string.lo \ +@BUILD_WIN32_TRUE@ $(am__objects_18) $(am__objects_19) \ +@BUILD_WIN32_TRUE@ $(am__objects_16) $(am__objects_17) +@BUILD_WIN32_FALSE@am__objects_21 = libmemcached/csl/libmemcachedinternal_libmemcachedinternal_la-context.lo \ +@BUILD_WIN32_FALSE@ libmemcached/csl/libmemcachedinternal_libmemcachedinternal_la-parser.lo \ +@BUILD_WIN32_FALSE@ libmemcached/csl/libmemcachedinternal_libmemcachedinternal_la-scanner.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-instance.lo \ +@BUILD_WIN32_FALSE@ $(am__objects_20) \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-allocators.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-analyze.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-array.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-auto.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-backtrace.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-behavior.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-byteorder.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-callback.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-connect.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-delete.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-do.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-dump.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-error.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-exist.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-fetch.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-flag.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-flush.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-flush_buffers.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-get.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-hash.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-hosts.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-initialize_query.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-io.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-key.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-memcached.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-encoding_key.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-namespace.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-options.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-parse.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-poll.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-purge.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-quit.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-response.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-result.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-sasl.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-server.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-server_list.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-stats.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-storage.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-strerror.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-string.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-touch.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-udp.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-verbosity.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-version.lo \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-virtual_bucket.lo \ +@BUILD_WIN32_FALSE@ $(am__objects_15) +@BUILD_WIN32_TRUE@am__objects_21 = libmemcached/csl/libmemcachedinternal_libmemcachedinternal_la-context.lo \ +@BUILD_WIN32_TRUE@ libmemcached/csl/libmemcachedinternal_libmemcachedinternal_la-parser.lo \ +@BUILD_WIN32_TRUE@ libmemcached/csl/libmemcachedinternal_libmemcachedinternal_la-scanner.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-instance.lo \ +@BUILD_WIN32_TRUE@ $(am__objects_20) \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-allocators.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-analyze.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-array.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-auto.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-backtrace.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-behavior.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-byteorder.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-callback.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-connect.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-delete.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-do.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-dump.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-error.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-exist.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-fetch.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-flag.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-flush.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-flush_buffers.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-get.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-hash.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-hosts.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-initialize_query.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-io.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-key.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-memcached.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-encoding_key.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-namespace.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-options.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-parse.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-poll.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-purge.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-quit.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-response.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-result.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-sasl.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-server.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-server_list.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-stats.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-storage.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-strerror.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-string.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-touch.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-udp.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-verbosity.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-version.lo \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcachedinternal_libmemcachedinternal_la-virtual_bucket.lo \ +@BUILD_WIN32_TRUE@ $(am__objects_15) $(am__objects_15) +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@am_libmemcachedinternal_libmemcachedinternal_la_OBJECTS = \ +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@ $(am__objects_21) +libmemcachedinternal_libmemcachedinternal_la_OBJECTS = \ + $(am_libmemcachedinternal_libmemcachedinternal_la_OBJECTS) +libmemcachedinternal_libmemcachedinternal_la_LINK = $(LIBTOOL) \ + $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) \ + $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_WIN32_FALSE@am_libmemcachedinternal_libmemcachedinternal_la_rpath = +@BUILD_WIN32_FALSE@libmemcachedinternal_libmemcachedutilinternal_la_DEPENDENCIES = libmemcachedinternal/libmemcachedinternal.la +am__libmemcachedinternal_libmemcachedutilinternal_la_SOURCES_DIST = \ + libmemcached/backtrace.cc libmemcachedutil/flush.cc \ + libmemcachedutil/pid.cc libmemcachedutil/ping.cc \ + libmemcachedutil/pool.cc libmemcachedutil/version.cc +@BUILD_WIN32_FALSE@am__objects_22 = libmemcached/libmemcachedinternal_libmemcachedutilinternal_la-backtrace.lo \ +@BUILD_WIN32_FALSE@ libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-flush.lo \ +@BUILD_WIN32_FALSE@ libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-pid.lo \ +@BUILD_WIN32_FALSE@ libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-ping.lo \ +@BUILD_WIN32_FALSE@ libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-pool.lo \ +@BUILD_WIN32_FALSE@ libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-version.lo +@BUILD_WIN32_FALSE@am_libmemcachedinternal_libmemcachedutilinternal_la_OBJECTS = \ +@BUILD_WIN32_FALSE@ $(am__objects_22) +libmemcachedinternal_libmemcachedutilinternal_la_OBJECTS = $(am_libmemcachedinternal_libmemcachedutilinternal_la_OBJECTS) +libmemcachedinternal_libmemcachedutilinternal_la_LINK = $(LIBTOOL) \ + $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) \ + $(libmemcachedinternal_libmemcachedutilinternal_la_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_WIN32_FALSE@am_libmemcachedinternal_libmemcachedutilinternal_la_rpath = +@BUILD_WIN32_FALSE@libtest_libtest_la_DEPENDENCIES = \ +@BUILD_WIN32_FALSE@ $(am__DEPENDENCIES_1) +am__libtest_libtest_la_SOURCES_DIST = libtest/alarm.cc \ + libtest/binaries.cc libtest/cmdline.cc libtest/collection.cc \ + libtest/comparison.cc libtest/core.cc libtest/cpu.cc \ + libtest/dns.cc libtest/dream.cc libtest/drizzled.cc \ + libtest/exception.cc libtest/exception/fatal.cc \ + libtest/formatter.cc libtest/client.cc libtest/framework.cc \ + libtest/has.cc libtest/http.cc libtest/is_local.cc \ + libtest/killpid.cc libtest/libtool.cc libtest/main.cc \ + libtest/port.cc libtest/result.cc libtest/runner.cc \ + libtest/server.cc libtest/server_container.cc \ + libtest/signal.cc libtest/socket.cc libtest/strerror.cc \ + libtest/timer.cc libtest/tmpfile.cc libtest/vchar.cc \ + libtest/memcached.cc libtest/gearmand.cc \ + libtest/blobslap_worker.cc +@BUILDING_GEARMAN_TRUE@@BUILD_WIN32_FALSE@am__objects_23 = libtest/libtest_libtest_la-blobslap_worker.lo +@BUILD_WIN32_FALSE@am_libtest_libtest_la_OBJECTS = \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-alarm.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-binaries.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-cmdline.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-collection.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-comparison.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-core.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-cpu.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-dns.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-dream.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-drizzled.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-exception.lo \ +@BUILD_WIN32_FALSE@ libtest/exception/libtest_libtest_la-fatal.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-formatter.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-client.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-framework.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-has.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-http.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-is_local.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-killpid.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-libtool.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-main.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-port.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-result.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-runner.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-server.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-server_container.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-signal.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-socket.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-strerror.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-timer.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-tmpfile.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-vchar.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-memcached.lo \ +@BUILD_WIN32_FALSE@ libtest/libtest_libtest_la-gearmand.lo \ +@BUILD_WIN32_FALSE@ $(am__objects_23) +libtest_libtest_la_OBJECTS = $(am_libtest_libtest_la_OBJECTS) +libtest_libtest_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) \ + $(libtest_libtest_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_WIN32_FALSE@am_libtest_libtest_la_rpath = +@BUILD_WIN32_FALSE@am__EXEEXT_1 = clients/memcapable$(EXEEXT) \ +@BUILD_WIN32_FALSE@ clients/memcat$(EXEEXT) \ +@BUILD_WIN32_FALSE@ clients/memcp$(EXEEXT) \ +@BUILD_WIN32_FALSE@ clients/memdump$(EXEEXT) \ +@BUILD_WIN32_FALSE@ clients/memerror$(EXEEXT) \ +@BUILD_WIN32_FALSE@ clients/memexist$(EXEEXT) \ +@BUILD_WIN32_FALSE@ clients/memtouch$(EXEEXT) \ +@BUILD_WIN32_FALSE@ clients/memflush$(EXEEXT) \ +@BUILD_WIN32_FALSE@ clients/memparse$(EXEEXT) \ +@BUILD_WIN32_FALSE@ clients/memping$(EXEEXT) \ +@BUILD_WIN32_FALSE@ clients/memrm$(EXEEXT) \ +@BUILD_WIN32_FALSE@ clients/memslap$(EXEEXT) \ +@BUILD_WIN32_FALSE@ clients/memstat$(EXEEXT) +@BUILD_MEMASLAP_TRUE@@BUILD_WIN32_FALSE@@BUILD_WIN32_WRAPPERS_FALSE@@HAVE_LIBEVENT_TRUE@am__EXEEXT_2 = clients/memaslap$(EXEEXT) +@BUILD_WIN32_TRUE@@SHARED_ENABLED_TRUE@am__EXEEXT_3 = libmemcached-1.0/t/c_test$(EXEEXT) \ +@BUILD_WIN32_TRUE@@SHARED_ENABLED_TRUE@ libmemcached-1.0/t/c_sasl_test$(EXEEXT) +@BUILD_WIN32_TRUE@am__EXEEXT_4 = libmemcached-1.0/t/cc_test$(EXEEXT) +@BUILD_WIN32_FALSE@am__EXEEXT_5 = libtest/unittest$(EXEEXT) \ +@BUILD_WIN32_FALSE@ libtest/skiptest$(EXEEXT) +@BUILD_WIN32_FALSE@@SHARED_ENABLED_TRUE@am__EXEEXT_6 = libmemcached-1.0/t/c_test$(EXEEXT) \ +@BUILD_WIN32_FALSE@@SHARED_ENABLED_TRUE@ libmemcached-1.0/t/c_sasl_test$(EXEEXT) +@BUILD_WIN32_FALSE@am__EXEEXT_7 = libmemcached-1.0/t/cc_test$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/cycle$(EXEEXT) +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@am__EXEEXT_8 = tests/libmemcached-1.0/internals$(EXEEXT) +@BUILD_WIN32_FALSE@am__EXEEXT_9 = \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/testapp$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/testsocket$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/sasl$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/testudp$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/testplus$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/parser$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/failure$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/testhashkit$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/hash_plus$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/memcapable$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/memstat$(EXEEXT) tests/memcp$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/memflush$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/memrm$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/memexist$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/memtouch$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/memcat$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/memping$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/memerror$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/memslap$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/memdump$(EXEEXT) +@BUILD_WIN32_FALSE@am__EXEEXT_10 = libtest/unittest$(EXEEXT) \ +@BUILD_WIN32_FALSE@ libtest/skiptest$(EXEEXT) \ +@BUILD_WIN32_FALSE@ libtest/wait$(EXEEXT) \ +@BUILD_WIN32_FALSE@ libtest/core-count$(EXEEXT) \ +@BUILD_WIN32_FALSE@ libtest/abort$(EXEEXT) \ +@BUILD_WIN32_FALSE@ libtest/backtrace$(EXEEXT) +@BUILD_WIN32_FALSE@am__EXEEXT_11 = \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/t/cc_test$(EXEEXT) +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@@HAVE_LIBEVENT_TRUE@am__EXEEXT_12 = example/memcached_light$(EXEEXT) +@BUILD_WIN32_FALSE@am__EXEEXT_13 = tests/cycle$(EXEEXT) +@BUILD_WIN32_FALSE@am__EXEEXT_14 = \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/testapp$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/testsocket$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/sasl$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/atomsmasher$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/testudp$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/testplus$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/parser$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/failure$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/testhashkit$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/hash_plus$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/memcapable$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/memstat$(EXEEXT) tests/memcp$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/memflush$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/memrm$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/memexist$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/memtouch$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/memcat$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/memping$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/memerror$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/memslap$(EXEEXT) \ +@BUILD_WIN32_FALSE@ tests/memdump$(EXEEXT) +PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) +am__clients_memaslap_SOURCES_DIST = clients/memaslap.c \ + clients/ms_conn.c clients/ms_setting.c clients/ms_sigsegv.c \ + clients/ms_stats.c clients/ms_task.c clients/ms_thread.c \ + clients/generator.cc clients/execute.cc +@BUILD_WIN32_FALSE@am_clients_memaslap_OBJECTS = \ +@BUILD_WIN32_FALSE@ clients/memaslap.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ clients/ms_conn.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ clients/ms_setting.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ clients/ms_sigsegv.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ clients/ms_stats.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ clients/ms_task.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ clients/ms_thread.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ clients/generator.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ clients/execute.$(OBJEXT) +clients_memaslap_OBJECTS = $(am_clients_memaslap_OBJECTS) +@BUILD_WIN32_FALSE@clients_memaslap_DEPENDENCIES = $(CLIENTS_LDADDS) +am__clients_memcapable_SOURCES_DIST = clients/memcapable.cc \ + libmemcached/byteorder.cc +@BUILD_WIN32_FALSE@am_clients_memcapable_OBJECTS = clients/clients_memcapable-memcapable.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ libmemcached/clients_memcapable-byteorder.$(OBJEXT) +clients_memcapable_OBJECTS = $(am_clients_memcapable_OBJECTS) +@BUILD_WIN32_FALSE@clients_memcapable_DEPENDENCIES = \ +@BUILD_WIN32_FALSE@ $(CLIENTS_LDADDS) +clients_memcapable_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(clients_memcapable_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am__clients_memcat_SOURCES_DIST = clients/memcat.cc +@BUILD_WIN32_FALSE@am_clients_memcat_OBJECTS = \ +@BUILD_WIN32_FALSE@ clients/memcat.$(OBJEXT) +clients_memcat_OBJECTS = $(am_clients_memcat_OBJECTS) +@BUILD_WIN32_FALSE@clients_memcat_DEPENDENCIES = $(CLIENTS_LDADDS) +am__clients_memcp_SOURCES_DIST = clients/memcp.cc +@BUILD_WIN32_FALSE@am_clients_memcp_OBJECTS = clients/memcp.$(OBJEXT) +clients_memcp_OBJECTS = $(am_clients_memcp_OBJECTS) +@BUILD_WIN32_FALSE@clients_memcp_DEPENDENCIES = $(CLIENTS_LDADDS) +am__clients_memdump_SOURCES_DIST = clients/memdump.cc +@BUILD_WIN32_FALSE@am_clients_memdump_OBJECTS = \ +@BUILD_WIN32_FALSE@ clients/memdump.$(OBJEXT) +clients_memdump_OBJECTS = $(am_clients_memdump_OBJECTS) +@BUILD_WIN32_FALSE@clients_memdump_DEPENDENCIES = $(CLIENTS_LDADDS) +am__clients_memerror_SOURCES_DIST = clients/memerror.cc +@BUILD_WIN32_FALSE@am_clients_memerror_OBJECTS = \ +@BUILD_WIN32_FALSE@ clients/memerror.$(OBJEXT) +clients_memerror_OBJECTS = $(am_clients_memerror_OBJECTS) +@BUILD_WIN32_FALSE@clients_memerror_DEPENDENCIES = $(CLIENTS_LDADDS) +am__clients_memexist_SOURCES_DIST = clients/memexist.cc +@BUILD_WIN32_FALSE@am_clients_memexist_OBJECTS = \ +@BUILD_WIN32_FALSE@ clients/memexist.$(OBJEXT) +clients_memexist_OBJECTS = $(am_clients_memexist_OBJECTS) +@BUILD_WIN32_FALSE@clients_memexist_DEPENDENCIES = $(CLIENTS_LDADDS) +am__clients_memflush_SOURCES_DIST = clients/memflush.cc +@BUILD_WIN32_FALSE@am_clients_memflush_OBJECTS = \ +@BUILD_WIN32_FALSE@ clients/memflush.$(OBJEXT) +clients_memflush_OBJECTS = $(am_clients_memflush_OBJECTS) +@BUILD_WIN32_FALSE@clients_memflush_DEPENDENCIES = $(CLIENTS_LDADDS) +am__clients_memparse_SOURCES_DIST = clients/memparse.cc +@BUILD_WIN32_FALSE@am_clients_memparse_OBJECTS = \ +@BUILD_WIN32_FALSE@ clients/memparse.$(OBJEXT) +clients_memparse_OBJECTS = $(am_clients_memparse_OBJECTS) +@BUILD_WIN32_FALSE@clients_memparse_DEPENDENCIES = $(CLIENTS_LDADDS) +am__clients_memping_SOURCES_DIST = clients/memping.cc +@BUILD_WIN32_FALSE@am_clients_memping_OBJECTS = \ +@BUILD_WIN32_FALSE@ clients/memping.$(OBJEXT) +clients_memping_OBJECTS = $(am_clients_memping_OBJECTS) +@BUILD_WIN32_FALSE@clients_memping_DEPENDENCIES = $(CLIENTS_LDADDS) \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedutil.la +am__clients_memrm_SOURCES_DIST = clients/memrm.cc +@BUILD_WIN32_FALSE@am_clients_memrm_OBJECTS = clients/memrm.$(OBJEXT) +clients_memrm_OBJECTS = $(am_clients_memrm_OBJECTS) +@BUILD_WIN32_FALSE@clients_memrm_DEPENDENCIES = $(CLIENTS_LDADDS) +am__clients_memslap_SOURCES_DIST = clients/memslap.cc \ + clients/generator.cc clients/execute.cc +@BUILD_WIN32_FALSE@am_clients_memslap_OBJECTS = \ +@BUILD_WIN32_FALSE@ clients/clients_memslap-memslap.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ clients/clients_memslap-generator.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ clients/clients_memslap-execute.$(OBJEXT) +clients_memslap_OBJECTS = $(am_clients_memslap_OBJECTS) +@BUILD_WIN32_FALSE@clients_memslap_DEPENDENCIES = $(CLIENTS_LDADDS) +clients_memslap_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(clients_memslap_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am__clients_memstat_SOURCES_DIST = clients/memstat.cc +@BUILD_WIN32_FALSE@am_clients_memstat_OBJECTS = \ +@BUILD_WIN32_FALSE@ clients/memstat.$(OBJEXT) +clients_memstat_OBJECTS = $(am_clients_memstat_OBJECTS) +@BUILD_WIN32_FALSE@clients_memstat_DEPENDENCIES = $(CLIENTS_LDADDS) +am__clients_memtouch_SOURCES_DIST = clients/memtouch.cc +@BUILD_WIN32_FALSE@am_clients_memtouch_OBJECTS = \ +@BUILD_WIN32_FALSE@ clients/memtouch.$(OBJEXT) +clients_memtouch_OBJECTS = $(am_clients_memtouch_OBJECTS) +@BUILD_WIN32_FALSE@clients_memtouch_DEPENDENCIES = $(CLIENTS_LDADDS) +am__example_memcached_light_SOURCES_DIST = example/byteorder.cc \ + example/interface_v0.cc example/interface_v1.cc \ + example/memcached_light.cc example/storage.cc util/daemon.cc \ + util/pidfile.cc +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@am_example_memcached_light_OBJECTS = example/byteorder.$(OBJEXT) \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ example/interface_v0.$(OBJEXT) \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ example/interface_v1.$(OBJEXT) \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ example/memcached_light.$(OBJEXT) \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ example/storage.$(OBJEXT) \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ util/daemon.$(OBJEXT) \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ util/pidfile.$(OBJEXT) +example_memcached_light_OBJECTS = \ + $(am_example_memcached_light_OBJECTS) +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@example_memcached_light_DEPENDENCIES = libmemcached/libmemcachedprotocol.la +example_memcached_light_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(AM_CXXFLAGS) $(CXXFLAGS) $(example_memcached_light_LDFLAGS) \ + $(LDFLAGS) -o $@ +am__libmemcached_1_0_t_c_sasl_test_SOURCES_DIST = \ + libmemcached-1.0/t/c_sasl_test.c +@BUILD_WIN32_FALSE@@SHARED_ENABLED_TRUE@am_libmemcached_1_0_t_c_sasl_test_OBJECTS = libmemcached-1.0/t/c_sasl_test.$(OBJEXT) +@BUILD_WIN32_TRUE@@SHARED_ENABLED_TRUE@am_libmemcached_1_0_t_c_sasl_test_OBJECTS = libmemcached-1.0/t/c_sasl_test.$(OBJEXT) +libmemcached_1_0_t_c_sasl_test_OBJECTS = \ + $(am_libmemcached_1_0_t_c_sasl_test_OBJECTS) +@BUILD_WIN32_FALSE@@SHARED_ENABLED_TRUE@libmemcached_1_0_t_c_sasl_test_DEPENDENCIES = libmemcached/libmemcached.la +@BUILD_WIN32_TRUE@@SHARED_ENABLED_TRUE@libmemcached_1_0_t_c_sasl_test_DEPENDENCIES = libmemcached/libmemcached.la +am__libmemcached_1_0_t_c_test_SOURCES_DIST = \ + libmemcached-1.0/t/c_test.c +@BUILD_WIN32_FALSE@@SHARED_ENABLED_TRUE@am_libmemcached_1_0_t_c_test_OBJECTS = libmemcached-1.0/t/c_test.$(OBJEXT) +@BUILD_WIN32_TRUE@@SHARED_ENABLED_TRUE@am_libmemcached_1_0_t_c_test_OBJECTS = libmemcached-1.0/t/c_test.$(OBJEXT) +libmemcached_1_0_t_c_test_OBJECTS = \ + $(am_libmemcached_1_0_t_c_test_OBJECTS) +@BUILD_WIN32_FALSE@@SHARED_ENABLED_TRUE@libmemcached_1_0_t_c_test_DEPENDENCIES = libmemcached/libmemcached.la +@BUILD_WIN32_TRUE@@SHARED_ENABLED_TRUE@libmemcached_1_0_t_c_test_DEPENDENCIES = libmemcached/libmemcached.la +am__libmemcached_1_0_t_cc_test_SOURCES_DIST = \ + libmemcached-1.0/t/cc_test.cc +@BUILD_WIN32_FALSE@am_libmemcached_1_0_t_cc_test_OBJECTS = \ +@BUILD_WIN32_FALSE@ libmemcached-1.0/t/cc_test.$(OBJEXT) +@BUILD_WIN32_TRUE@am_libmemcached_1_0_t_cc_test_OBJECTS = \ +@BUILD_WIN32_TRUE@ libmemcached-1.0/t/cc_test.$(OBJEXT) +libmemcached_1_0_t_cc_test_OBJECTS = \ + $(am_libmemcached_1_0_t_cc_test_OBJECTS) +@BUILD_WIN32_FALSE@libmemcached_1_0_t_cc_test_DEPENDENCIES = \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached.la +@BUILD_WIN32_TRUE@libmemcached_1_0_t_cc_test_DEPENDENCIES = \ +@BUILD_WIN32_TRUE@ libmemcached/libmemcached.la +am__libtest_abort_SOURCES_DIST = libtest/abort.cc +@BUILD_WIN32_FALSE@am_libtest_abort_OBJECTS = libtest/abort.$(OBJEXT) +libtest_abort_OBJECTS = $(am_libtest_abort_OBJECTS) +libtest_abort_LDADD = $(LDADD) +am__libtest_backtrace_SOURCES_DIST = libtest/backtrace_test.cc \ + libmemcached/backtrace.cc +@BUILD_WIN32_FALSE@am_libtest_backtrace_OBJECTS = \ +@BUILD_WIN32_FALSE@ libtest/backtrace_test.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ libmemcached/backtrace.$(OBJEXT) +libtest_backtrace_OBJECTS = $(am_libtest_backtrace_OBJECTS) +libtest_backtrace_DEPENDENCIES = +am__libtest_core_count_SOURCES_DIST = libtest/cpu.cc \ + libtest/core_count.cc +@BUILD_WIN32_FALSE@am_libtest_core_count_OBJECTS = \ +@BUILD_WIN32_FALSE@ libtest/cpu.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ libtest/core_count.$(OBJEXT) +libtest_core_count_OBJECTS = $(am_libtest_core_count_OBJECTS) +libtest_core_count_LDADD = $(LDADD) +am__libtest_skiptest_SOURCES_DIST = libtest/skiptest.cc +@BUILD_WIN32_FALSE@am_libtest_skiptest_OBJECTS = \ +@BUILD_WIN32_FALSE@ libtest/skiptest.$(OBJEXT) +libtest_skiptest_OBJECTS = $(am_libtest_skiptest_OBJECTS) +@BUILD_WIN32_FALSE@libtest_skiptest_DEPENDENCIES = libtest/libtest.la +am__libtest_unittest_SOURCES_DIST = libtest/unittest.cc +@BUILD_WIN32_FALSE@am_libtest_unittest_OBJECTS = libtest/libtest_unittest-unittest.$(OBJEXT) +libtest_unittest_OBJECTS = $(am_libtest_unittest_OBJECTS) +@BUILD_WIN32_FALSE@libtest_unittest_DEPENDENCIES = libtest/libtest.la +libtest_unittest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(libtest_unittest_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am__libtest_wait_SOURCES_DIST = libtest/wait.cc libtest/dream.cc +@BUILD_WIN32_FALSE@am_libtest_wait_OBJECTS = libtest/wait.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ libtest/dream.$(OBJEXT) +libtest_wait_OBJECTS = $(am_libtest_wait_OBJECTS) +libtest_wait_LDADD = $(LDADD) +am__tests_atomsmasher_SOURCES_DIST = clients/execute.cc \ + clients/generator.cc tests/libmemcached-1.0/atomsmasher.cc \ + tests/libmemcached-1.0/callback_counter.cc \ + tests/libmemcached-1.0/debug.cc \ + tests/libmemcached-1.0/fetch_all_results.cc \ + tests/libmemcached-1.0/generate.cc \ + tests/libmemcached-1.0/print.cc +@BUILD_WIN32_FALSE@am_tests_atomsmasher_OBJECTS = \ +@BUILD_WIN32_FALSE@ clients/execute.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ clients/generator.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/atomsmasher.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/callback_counter.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/debug.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/fetch_all_results.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/generate.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/print.$(OBJEXT) +tests_atomsmasher_OBJECTS = $(am_tests_atomsmasher_OBJECTS) +@BUILD_WIN32_FALSE@tests_atomsmasher_DEPENDENCIES = $(TESTS_LDADDS) +am__tests_cycle_SOURCES_DIST = tests/cycle.cc +@BUILD_WIN32_FALSE@am_tests_cycle_OBJECTS = \ +@BUILD_WIN32_FALSE@ tests/tests_cycle-cycle.$(OBJEXT) +tests_cycle_OBJECTS = $(am_tests_cycle_OBJECTS) +@BUILD_WIN32_FALSE@tests_cycle_DEPENDENCIES = $(TESTS_LDADDS) +tests_cycle_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(tests_cycle_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am__tests_failure_SOURCES_DIST = tests/failure.cc clients/execute.cc \ + clients/generator.cc \ + tests/libmemcached-1.0/callback_counter.cc \ + tests/libmemcached-1.0/fetch_all_results.cc \ + tests/libmemcached-1.0/generate.cc \ + tests/libmemcached-1.0/print.cc +@BUILD_WIN32_FALSE@am_tests_failure_OBJECTS = \ +@BUILD_WIN32_FALSE@ tests/tests_failure-failure.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ clients/tests_failure-execute.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ clients/tests_failure-generator.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_failure-callback_counter.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_failure-fetch_all_results.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_failure-generate.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_failure-print.$(OBJEXT) +tests_failure_OBJECTS = $(am_tests_failure_OBJECTS) +@BUILD_WIN32_FALSE@tests_failure_DEPENDENCIES = $(TESTS_LDADDS) +tests_failure_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(tests_failure_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +am__tests_hash_plus_SOURCES_DIST = tests/hash_plus.cc +@BUILD_WIN32_FALSE@am_tests_hash_plus_OBJECTS = \ +@BUILD_WIN32_FALSE@ tests/tests_hash_plus-hash_plus.$(OBJEXT) +tests_hash_plus_OBJECTS = $(am_tests_hash_plus_OBJECTS) +@BUILD_WIN32_FALSE@tests_hash_plus_DEPENDENCIES = \ +@BUILD_WIN32_FALSE@ $(tests_testhashkit_LDADD) +tests_hash_plus_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(tests_hash_plus_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am__tests_libmemcached_1_0_internals_SOURCES_DIST = \ + tests/libmemcached-1.0/internals.cc \ + tests/libmemcached-1.0/string.cc +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@am_tests_libmemcached_1_0_internals_OBJECTS = tests/libmemcached-1.0/tests_libmemcached_1_0_internals-internals.$(OBJEXT) \ +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_internals-string.$(OBJEXT) +tests_libmemcached_1_0_internals_OBJECTS = \ + $(am_tests_libmemcached_1_0_internals_OBJECTS) +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@tests_libmemcached_1_0_internals_DEPENDENCIES = libmemcachedinternal/libmemcachedinternal.la \ +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@ libmemcachedinternal/libmemcachedutilinternal.la \ +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@ libtest/libtest.la +tests_libmemcached_1_0_internals_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CXXLD) $(tests_libmemcached_1_0_internals_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am__tests_libmemcached_1_0_sasl_SOURCES_DIST = \ + tests/libmemcached-1.0/basic.cc \ + tests/libmemcached-1.0/debug.cc \ + tests/libmemcached-1.0/deprecated.cc \ + tests/libmemcached-1.0/error_conditions.cc \ + tests/libmemcached-1.0/ketama.cc \ + tests/libmemcached-1.0/namespace.cc \ + tests/libmemcached-1.0/parser.cc \ + tests/libmemcached-1.0/pool.cc tests/libmemcached-1.0/print.cc \ + tests/libmemcached-1.0/replication.cc \ + tests/libmemcached-1.0/sasl.cc \ + tests/libmemcached-1.0/virtual_buckets.cc clients/execute.cc \ + clients/generator.cc \ + tests/libmemcached-1.0/callback_counter.cc \ + tests/libmemcached-1.0/fetch_all_results.cc \ + tests/libmemcached-1.0/generate.cc +@BUILD_WIN32_FALSE@am_tests_libmemcached_1_0_sasl_OBJECTS = tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-basic.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-debug.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-deprecated.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-error_conditions.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-ketama.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-namespace.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-parser.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-pool.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-print.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-replication.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-sasl.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-virtual_buckets.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ clients/tests_libmemcached_1_0_sasl-execute.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ clients/tests_libmemcached_1_0_sasl-generator.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-callback_counter.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-fetch_all_results.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-generate.$(OBJEXT) +tests_libmemcached_1_0_sasl_OBJECTS = \ + $(am_tests_libmemcached_1_0_sasl_OBJECTS) +@BUILD_WIN32_FALSE@tests_libmemcached_1_0_sasl_DEPENDENCIES = \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached.la \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedutil.la \ +@BUILD_WIN32_FALSE@ libtest/libtest.la libhashkit/libhashkit.la +tests_libmemcached_1_0_sasl_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am__tests_libmemcached_1_0_testapp_SOURCES_DIST = \ + clients/generator.cc clients/execute.cc \ + tests/libmemcached-1.0/all_tests.cc \ + tests/libmemcached-1.0/basic.cc \ + tests/libmemcached-1.0/callback_counter.cc \ + tests/libmemcached-1.0/callbacks.cc \ + tests/libmemcached-1.0/debug.cc \ + tests/libmemcached-1.0/deprecated.cc \ + tests/libmemcached-1.0/dump.cc \ + tests/libmemcached-1.0/encoding_key.cc \ + tests/libmemcached-1.0/error_conditions.cc \ + tests/libmemcached-1.0/exist.cc \ + tests/libmemcached-1.0/fetch_all_results.cc \ + tests/libmemcached-1.0/generate.cc \ + tests/libmemcached-1.0/haldenbrand.cc \ + tests/libmemcached-1.0/ketama.cc \ + tests/libmemcached-1.0/mem_functions.cc \ + tests/libmemcached-1.0/memcached_get.cc \ + tests/libmemcached-1.0/namespace.cc \ + tests/libmemcached-1.0/parser.cc \ + tests/libmemcached-1.0/pool.cc tests/libmemcached-1.0/print.cc \ + tests/libmemcached-1.0/replication.cc \ + tests/libmemcached-1.0/server_add.cc \ + tests/libmemcached-1.0/setup_and_teardowns.cc \ + tests/libmemcached-1.0/stat.cc tests/libmemcached-1.0/touch.cc \ + tests/libmemcached-1.0/virtual_buckets.cc +@BUILD_WIN32_FALSE@am_tests_libmemcached_1_0_testapp_OBJECTS = clients/tests_libmemcached_1_0_testapp-generator.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ clients/tests_libmemcached_1_0_testapp-execute.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-all_tests.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-basic.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-callback_counter.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-callbacks.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-debug.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-deprecated.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-dump.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-encoding_key.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-error_conditions.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-exist.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-fetch_all_results.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-generate.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-haldenbrand.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-ketama.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-mem_functions.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-memcached_get.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-namespace.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-parser.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-pool.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-print.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-replication.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-server_add.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-setup_and_teardowns.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-stat.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-touch.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-virtual_buckets.$(OBJEXT) +tests_libmemcached_1_0_testapp_OBJECTS = \ + $(am_tests_libmemcached_1_0_testapp_OBJECTS) +@BUILD_WIN32_FALSE@tests_libmemcached_1_0_testapp_DEPENDENCIES = \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached.la \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedutil.la \ +@BUILD_WIN32_FALSE@ libtest/libtest.la libhashkit/libhashkit.la +tests_libmemcached_1_0_testapp_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am__tests_libmemcached_1_0_testsocket_SOURCES_DIST = \ + clients/execute.cc clients/generator.cc \ + tests/libmemcached-1.0/all_tests_socket.cc \ + tests/libmemcached-1.0/basic.cc \ + tests/libmemcached-1.0/callback_counter.cc \ + tests/libmemcached-1.0/callbacks.cc \ + tests/libmemcached-1.0/debug.cc \ + tests/libmemcached-1.0/deprecated.cc \ + tests/libmemcached-1.0/dump.cc \ + tests/libmemcached-1.0/encoding_key.cc \ + tests/libmemcached-1.0/error_conditions.cc \ + tests/libmemcached-1.0/exist.cc \ + tests/libmemcached-1.0/fetch_all_results.cc \ + tests/libmemcached-1.0/generate.cc \ + tests/libmemcached-1.0/haldenbrand.cc \ + tests/libmemcached-1.0/ketama.cc \ + tests/libmemcached-1.0/mem_functions.cc \ + tests/libmemcached-1.0/memcached_get.cc \ + tests/libmemcached-1.0/namespace.cc \ + tests/libmemcached-1.0/parser.cc \ + tests/libmemcached-1.0/pool.cc tests/libmemcached-1.0/print.cc \ + tests/libmemcached-1.0/replication.cc \ + tests/libmemcached-1.0/server_add.cc \ + tests/libmemcached-1.0/setup_and_teardowns.cc \ + tests/libmemcached-1.0/stat.cc tests/libmemcached-1.0/touch.cc \ + tests/libmemcached-1.0/virtual_buckets.cc +@BUILD_WIN32_FALSE@am_tests_libmemcached_1_0_testsocket_OBJECTS = clients/tests_libmemcached_1_0_testsocket-execute.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ clients/tests_libmemcached_1_0_testsocket-generator.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-all_tests_socket.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-basic.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-callback_counter.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-callbacks.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-debug.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-deprecated.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-dump.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-encoding_key.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-error_conditions.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-exist.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-fetch_all_results.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-generate.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-haldenbrand.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-ketama.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-mem_functions.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-memcached_get.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-namespace.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-parser.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-pool.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-print.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-replication.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-server_add.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-setup_and_teardowns.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-stat.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-touch.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-virtual_buckets.$(OBJEXT) +tests_libmemcached_1_0_testsocket_OBJECTS = \ + $(am_tests_libmemcached_1_0_testsocket_OBJECTS) +@BUILD_WIN32_FALSE@tests_libmemcached_1_0_testsocket_DEPENDENCIES = \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached.la \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedutil.la \ +@BUILD_WIN32_FALSE@ libtest/libtest.la libhashkit/libhashkit.la +tests_libmemcached_1_0_testsocket_LINK = $(LIBTOOL) $(AM_V_lt) \ + --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ + $(CXXLD) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am__tests_memcapable_SOURCES_DIST = tests/memcapable.cc +@BUILD_WIN32_FALSE@am_tests_memcapable_OBJECTS = tests/tests_memcapable-memcapable.$(OBJEXT) +tests_memcapable_OBJECTS = $(am_tests_memcapable_OBJECTS) +@BUILD_WIN32_FALSE@tests_memcapable_DEPENDENCIES = libtest/libtest.la \ +@BUILD_WIN32_FALSE@ $(TESTS_LDADDS) +tests_memcapable_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(tests_memcapable_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am__tests_memcat_SOURCES_DIST = tests/memcat.cc +@BUILD_WIN32_FALSE@am_tests_memcat_OBJECTS = \ +@BUILD_WIN32_FALSE@ tests/tests_memcat-memcat.$(OBJEXT) +tests_memcat_OBJECTS = $(am_tests_memcat_OBJECTS) +@BUILD_WIN32_FALSE@tests_memcat_DEPENDENCIES = libtest/libtest.la \ +@BUILD_WIN32_FALSE@ $(TESTS_LDADDS) +tests_memcat_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(tests_memcat_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am__tests_memcp_SOURCES_DIST = tests/memcp.cc +@BUILD_WIN32_FALSE@am_tests_memcp_OBJECTS = \ +@BUILD_WIN32_FALSE@ tests/tests_memcp-memcp.$(OBJEXT) +tests_memcp_OBJECTS = $(am_tests_memcp_OBJECTS) +@BUILD_WIN32_FALSE@tests_memcp_DEPENDENCIES = libtest/libtest.la \ +@BUILD_WIN32_FALSE@ $(TESTS_LDADDS) +tests_memcp_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(tests_memcp_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am__tests_memdump_SOURCES_DIST = tests/memdump.cc +@BUILD_WIN32_FALSE@am_tests_memdump_OBJECTS = \ +@BUILD_WIN32_FALSE@ tests/tests_memdump-memdump.$(OBJEXT) +tests_memdump_OBJECTS = $(am_tests_memdump_OBJECTS) +@BUILD_WIN32_FALSE@tests_memdump_DEPENDENCIES = libtest/libtest.la \ +@BUILD_WIN32_FALSE@ $(TESTS_LDADDS) +tests_memdump_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(tests_memdump_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +am__tests_memerror_SOURCES_DIST = tests/memerror.cc +@BUILD_WIN32_FALSE@am_tests_memerror_OBJECTS = \ +@BUILD_WIN32_FALSE@ tests/tests_memerror-memerror.$(OBJEXT) +tests_memerror_OBJECTS = $(am_tests_memerror_OBJECTS) +@BUILD_WIN32_FALSE@tests_memerror_DEPENDENCIES = libtest/libtest.la \ +@BUILD_WIN32_FALSE@ $(TESTS_LDADDS) +tests_memerror_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(tests_memerror_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am__tests_memexist_SOURCES_DIST = tests/memexist.cc +@BUILD_WIN32_FALSE@am_tests_memexist_OBJECTS = \ +@BUILD_WIN32_FALSE@ tests/tests_memexist-memexist.$(OBJEXT) +tests_memexist_OBJECTS = $(am_tests_memexist_OBJECTS) +@BUILD_WIN32_FALSE@tests_memexist_DEPENDENCIES = libtest/libtest.la \ +@BUILD_WIN32_FALSE@ $(TESTS_LDADDS) +tests_memexist_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(tests_memexist_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am__tests_memflush_SOURCES_DIST = tests/memflush.cc +@BUILD_WIN32_FALSE@am_tests_memflush_OBJECTS = \ +@BUILD_WIN32_FALSE@ tests/tests_memflush-memflush.$(OBJEXT) +tests_memflush_OBJECTS = $(am_tests_memflush_OBJECTS) +@BUILD_WIN32_FALSE@tests_memflush_DEPENDENCIES = libtest/libtest.la \ +@BUILD_WIN32_FALSE@ $(TESTS_LDADDS) +tests_memflush_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(tests_memflush_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am__tests_memping_SOURCES_DIST = tests/memping.cc +@BUILD_WIN32_FALSE@am_tests_memping_OBJECTS = \ +@BUILD_WIN32_FALSE@ tests/tests_memping-memping.$(OBJEXT) +tests_memping_OBJECTS = $(am_tests_memping_OBJECTS) +@BUILD_WIN32_FALSE@tests_memping_DEPENDENCIES = libtest/libtest.la \ +@BUILD_WIN32_FALSE@ $(TESTS_LDADDS) +tests_memping_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(tests_memping_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +am__tests_memrm_SOURCES_DIST = tests/memrm.cc +@BUILD_WIN32_FALSE@am_tests_memrm_OBJECTS = \ +@BUILD_WIN32_FALSE@ tests/tests_memrm-memrm.$(OBJEXT) +tests_memrm_OBJECTS = $(am_tests_memrm_OBJECTS) +@BUILD_WIN32_FALSE@tests_memrm_DEPENDENCIES = libtest/libtest.la \ +@BUILD_WIN32_FALSE@ $(TESTS_LDADDS) +tests_memrm_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(tests_memrm_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am__tests_memslap_SOURCES_DIST = tests/memslap.cc +@BUILD_WIN32_FALSE@am_tests_memslap_OBJECTS = \ +@BUILD_WIN32_FALSE@ tests/tests_memslap-memslap.$(OBJEXT) +tests_memslap_OBJECTS = $(am_tests_memslap_OBJECTS) +@BUILD_WIN32_FALSE@tests_memslap_DEPENDENCIES = libtest/libtest.la \ +@BUILD_WIN32_FALSE@ $(TESTS_LDADDS) +tests_memslap_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(tests_memslap_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +am__tests_memstat_SOURCES_DIST = tests/memstat.cc +@BUILD_WIN32_FALSE@am_tests_memstat_OBJECTS = \ +@BUILD_WIN32_FALSE@ tests/tests_memstat-memstat.$(OBJEXT) +tests_memstat_OBJECTS = $(am_tests_memstat_OBJECTS) +@BUILD_WIN32_FALSE@tests_memstat_DEPENDENCIES = libtest/libtest.la \ +@BUILD_WIN32_FALSE@ $(TESTS_LDADDS) +tests_memstat_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(tests_memstat_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +am__tests_memtouch_SOURCES_DIST = tests/memtouch.cc +@BUILD_WIN32_FALSE@am_tests_memtouch_OBJECTS = \ +@BUILD_WIN32_FALSE@ tests/tests_memtouch-memtouch.$(OBJEXT) +tests_memtouch_OBJECTS = $(am_tests_memtouch_OBJECTS) +@BUILD_WIN32_FALSE@tests_memtouch_DEPENDENCIES = libtest/libtest.la \ +@BUILD_WIN32_FALSE@ $(TESTS_LDADDS) +tests_memtouch_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(tests_memtouch_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am__tests_parser_SOURCES_DIST = tests/parser.cc +@BUILD_WIN32_FALSE@am_tests_parser_OBJECTS = \ +@BUILD_WIN32_FALSE@ tests/tests_parser-parser.$(OBJEXT) +tests_parser_OBJECTS = $(am_tests_parser_OBJECTS) +@BUILD_WIN32_FALSE@tests_parser_DEPENDENCIES = $(TESTS_LDADDS) +tests_parser_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(tests_parser_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +am__tests_testhashkit_SOURCES_DIST = tests/hashkit_functions.cc +@BUILD_WIN32_FALSE@am_tests_testhashkit_OBJECTS = \ +@BUILD_WIN32_FALSE@ tests/hashkit_functions.$(OBJEXT) +tests_testhashkit_OBJECTS = $(am_tests_testhashkit_OBJECTS) +@BUILD_WIN32_FALSE@tests_testhashkit_DEPENDENCIES = \ +@BUILD_WIN32_FALSE@ libtest/libtest.la libhashkit/libhashkit.la \ +@BUILD_WIN32_FALSE@ $(TESTS_LDADDS) +am__tests_testplus_SOURCES_DIST = clients/execute.cc \ + clients/generator.cc \ + tests/libmemcached-1.0/callback_counter.cc \ + tests/libmemcached-1.0/fetch_all_results.cc \ + tests/libmemcached-1.0/generate.cc \ + tests/libmemcached-1.0/plus.cpp \ + tests/libmemcached-1.0/print.cc +@BUILD_WIN32_FALSE@am_tests_testplus_OBJECTS = \ +@BUILD_WIN32_FALSE@ clients/tests_testplus-execute.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ clients/tests_testplus-generator.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_testplus-callback_counter.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_testplus-fetch_all_results.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_testplus-generate.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_testplus-plus.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/tests_testplus-print.$(OBJEXT) +tests_testplus_OBJECTS = $(am_tests_testplus_OBJECTS) +@BUILD_WIN32_FALSE@tests_testplus_DEPENDENCIES = $(TESTS_LDADDS) +tests_testplus_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(tests_testplus_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +am__tests_testudp_SOURCES_DIST = clients/execute.cc \ + clients/generator.cc \ + tests/libmemcached-1.0/callback_counter.cc \ + tests/libmemcached-1.0/fetch_all_results.cc \ + tests/libmemcached-1.0/generate.cc \ + tests/libmemcached-1.0/print.cc tests/mem_udp.cc +@BUILD_WIN32_FALSE@am_tests_testudp_OBJECTS = \ +@BUILD_WIN32_FALSE@ clients/execute.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ clients/generator.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/callback_counter.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/fetch_all_results.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/generate.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/print.$(OBJEXT) \ +@BUILD_WIN32_FALSE@ tests/mem_udp.$(OBJEXT) +tests_testudp_OBJECTS = $(am_tests_testudp_OBJECTS) +@BUILD_WIN32_FALSE@tests_testudp_DEPENDENCIES = $(TESTS_LDADDS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = +SOURCES = $(clients_libutilities_la_SOURCES) \ + $(libhashkit_libhashkit_la_SOURCES) \ + $(libhashkit_libhashkitinc_la_SOURCES) \ + $(libmemcached_libmemcached_la_SOURCES) \ + $(libmemcached_libmemcachedprotocol_la_SOURCES) \ + $(libmemcached_libmemcachedutil_la_SOURCES) \ + $(libmemcachedinternal_libmemcachedinternal_la_SOURCES) \ + $(libmemcachedinternal_libmemcachedutilinternal_la_SOURCES) \ + $(libtest_libtest_la_SOURCES) $(clients_memaslap_SOURCES) \ + $(clients_memcapable_SOURCES) $(clients_memcat_SOURCES) \ + $(clients_memcp_SOURCES) $(clients_memdump_SOURCES) \ + $(clients_memerror_SOURCES) $(clients_memexist_SOURCES) \ + $(clients_memflush_SOURCES) $(clients_memparse_SOURCES) \ + $(clients_memping_SOURCES) $(clients_memrm_SOURCES) \ + $(clients_memslap_SOURCES) $(clients_memstat_SOURCES) \ + $(clients_memtouch_SOURCES) $(example_memcached_light_SOURCES) \ + $(libmemcached_1_0_t_c_sasl_test_SOURCES) \ + $(libmemcached_1_0_t_c_test_SOURCES) \ + $(libmemcached_1_0_t_cc_test_SOURCES) $(libtest_abort_SOURCES) \ + $(libtest_backtrace_SOURCES) $(libtest_core_count_SOURCES) \ + $(libtest_skiptest_SOURCES) $(libtest_unittest_SOURCES) \ + $(libtest_wait_SOURCES) $(tests_atomsmasher_SOURCES) \ + $(tests_cycle_SOURCES) $(tests_failure_SOURCES) \ + $(tests_hash_plus_SOURCES) \ + $(tests_libmemcached_1_0_internals_SOURCES) \ + $(tests_libmemcached_1_0_sasl_SOURCES) \ + $(tests_libmemcached_1_0_testapp_SOURCES) \ + $(tests_libmemcached_1_0_testsocket_SOURCES) \ + $(tests_memcapable_SOURCES) $(tests_memcat_SOURCES) \ + $(tests_memcp_SOURCES) $(tests_memdump_SOURCES) \ + $(tests_memerror_SOURCES) $(tests_memexist_SOURCES) \ + $(tests_memflush_SOURCES) $(tests_memping_SOURCES) \ + $(tests_memrm_SOURCES) $(tests_memslap_SOURCES) \ + $(tests_memstat_SOURCES) $(tests_memtouch_SOURCES) \ + $(tests_parser_SOURCES) $(tests_testhashkit_SOURCES) \ + $(tests_testplus_SOURCES) $(tests_testudp_SOURCES) +DIST_SOURCES = $(am__clients_libutilities_la_SOURCES_DIST) \ + $(am__libhashkit_libhashkit_la_SOURCES_DIST) \ + $(am__libhashkit_libhashkitinc_la_SOURCES_DIST) \ + $(am__libmemcached_libmemcached_la_SOURCES_DIST) \ + $(am__libmemcached_libmemcachedprotocol_la_SOURCES_DIST) \ + $(am__libmemcached_libmemcachedutil_la_SOURCES_DIST) \ + $(am__libmemcachedinternal_libmemcachedinternal_la_SOURCES_DIST) \ + $(am__libmemcachedinternal_libmemcachedutilinternal_la_SOURCES_DIST) \ + $(am__libtest_libtest_la_SOURCES_DIST) \ + $(am__clients_memaslap_SOURCES_DIST) \ + $(am__clients_memcapable_SOURCES_DIST) \ + $(am__clients_memcat_SOURCES_DIST) \ + $(am__clients_memcp_SOURCES_DIST) \ + $(am__clients_memdump_SOURCES_DIST) \ + $(am__clients_memerror_SOURCES_DIST) \ + $(am__clients_memexist_SOURCES_DIST) \ + $(am__clients_memflush_SOURCES_DIST) \ + $(am__clients_memparse_SOURCES_DIST) \ + $(am__clients_memping_SOURCES_DIST) \ + $(am__clients_memrm_SOURCES_DIST) \ + $(am__clients_memslap_SOURCES_DIST) \ + $(am__clients_memstat_SOURCES_DIST) \ + $(am__clients_memtouch_SOURCES_DIST) \ + $(am__example_memcached_light_SOURCES_DIST) \ + $(am__libmemcached_1_0_t_c_sasl_test_SOURCES_DIST) \ + $(am__libmemcached_1_0_t_c_test_SOURCES_DIST) \ + $(am__libmemcached_1_0_t_cc_test_SOURCES_DIST) \ + $(am__libtest_abort_SOURCES_DIST) \ + $(am__libtest_backtrace_SOURCES_DIST) \ + $(am__libtest_core_count_SOURCES_DIST) \ + $(am__libtest_skiptest_SOURCES_DIST) \ + $(am__libtest_unittest_SOURCES_DIST) \ + $(am__libtest_wait_SOURCES_DIST) \ + $(am__tests_atomsmasher_SOURCES_DIST) \ + $(am__tests_cycle_SOURCES_DIST) \ + $(am__tests_failure_SOURCES_DIST) \ + $(am__tests_hash_plus_SOURCES_DIST) \ + $(am__tests_libmemcached_1_0_internals_SOURCES_DIST) \ + $(am__tests_libmemcached_1_0_sasl_SOURCES_DIST) \ + $(am__tests_libmemcached_1_0_testapp_SOURCES_DIST) \ + $(am__tests_libmemcached_1_0_testsocket_SOURCES_DIST) \ + $(am__tests_memcapable_SOURCES_DIST) \ + $(am__tests_memcat_SOURCES_DIST) \ + $(am__tests_memcp_SOURCES_DIST) \ + $(am__tests_memdump_SOURCES_DIST) \ + $(am__tests_memerror_SOURCES_DIST) \ + $(am__tests_memexist_SOURCES_DIST) \ + $(am__tests_memflush_SOURCES_DIST) \ + $(am__tests_memping_SOURCES_DIST) \ + $(am__tests_memrm_SOURCES_DIST) \ + $(am__tests_memslap_SOURCES_DIST) \ + $(am__tests_memstat_SOURCES_DIST) \ + $(am__tests_memtouch_SOURCES_DIST) \ + $(am__tests_parser_SOURCES_DIST) \ + $(am__tests_testhashkit_SOURCES_DIST) \ + $(am__tests_testplus_SOURCES_DIST) \ + $(am__tests_testudp_SOURCES_DIST) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +man1dir = $(mandir)/man1 +man3dir = $(mandir)/man3 +NROFF = nroff +MANS = $(dist_man_MANS) $(man_MANS) +am__dist_aclocal_DATA_DIST = m4/ax_libmemcached.m4 +DATA = $(dist_aclocal_DATA) $(pkgconfig_DATA) +am__nobase_include_HEADERS_DIST = libhashkit-1.0/algorithm.h \ + libhashkit-1.0/behavior.h libhashkit-1.0/configure.h \ + libhashkit-1.0/digest.h libhashkit-1.0/function.h \ + libhashkit-1.0/has.h libhashkit-1.0/hashkit.h \ + libhashkit-1.0/hashkit.hpp libhashkit-1.0/strerror.h \ + libhashkit-1.0/string.h libhashkit-1.0/str_algorithm.h \ + libhashkit-1.0/types.h libhashkit-1.0/visibility.h \ + libhashkit/hashkit.h libmemcached/memcached.h \ + libmemcached/memcached.hpp libmemcached/util.h \ + libmemcached-1.0/struct/allocator.h \ + libmemcached-1.0/struct/analysis.h \ + libmemcached-1.0/struct/callback.h \ + libmemcached-1.0/struct/memcached.h \ + libmemcached-1.0/struct/result.h \ + libmemcached-1.0/struct/sasl.h \ + libmemcached-1.0/struct/server.h \ + libmemcached-1.0/struct/stat.h \ + libmemcached-1.0/struct/string.h \ + libmemcached-1.0/types/behavior.h \ + libmemcached-1.0/types/callback.h \ + libmemcached-1.0/types/connection.h \ + libmemcached-1.0/types/hash.h libmemcached-1.0/types/return.h \ + libmemcached-1.0/types/server_distribution.h \ + libmemcached-1.0/alloc.h libmemcached-1.0/allocators.h \ + libmemcached-1.0/analyze.h libmemcached-1.0/auto.h \ + libmemcached-1.0/basic_string.h libmemcached-1.0/behavior.h \ + libmemcached-1.0/callback.h libmemcached-1.0/callbacks.h \ + libmemcached-1.0/configure.h libmemcached-1.0/defaults.h \ + libmemcached-1.0/delete.h libmemcached-1.0/deprecated_types.h \ + libmemcached-1.0/dump.h libmemcached-1.0/encoding_key.h \ + libmemcached-1.0/error.h libmemcached-1.0/exception.hpp \ + libmemcached-1.0/exist.h libmemcached-1.0/fetch.h \ + libmemcached-1.0/flush.h libmemcached-1.0/flush_buffers.h \ + libmemcached-1.0/get.h libmemcached-1.0/hash.h \ + libmemcached-1.0/limits.h libmemcached-1.0/memcached.h \ + libmemcached-1.0/memcached.hpp libmemcached-1.0/options.h \ + libmemcached-1.0/parse.h libmemcached-1.0/platform.h \ + libmemcached-1.0/quit.h libmemcached-1.0/result.h \ + libmemcached-1.0/return.h libmemcached-1.0/sasl.h \ + libmemcached-1.0/server.h libmemcached-1.0/server_list.h \ + libmemcached-1.0/stats.h libmemcached-1.0/storage.h \ + libmemcached-1.0/strerror.h libmemcached-1.0/touch.h \ + libmemcached-1.0/triggers.h libmemcached-1.0/types.h \ + libmemcached-1.0/verbosity.h libmemcached-1.0/version.h \ + libmemcached-1.0/visibility.h \ + libmemcachedprotocol-0.0/binary.h \ + libmemcachedprotocol-0.0/callback.h \ + libmemcachedprotocol-0.0/handler.h \ + libmemcachedprotocol-0.0/vbucket.h \ + libmemcachedutil-1.0/flush.h libmemcachedutil-1.0/ostream.hpp \ + libmemcachedutil-1.0/pid.h libmemcachedutil-1.0/ping.h \ + libmemcachedutil-1.0/pool.h libmemcachedutil-1.0/util.h \ + libmemcachedutil-1.0/version.h +am__noinst_HEADERS_DIST = libhashkit/aes.h libhashkit/algorithm.h \ + libhashkit/murmur3.h libhashkit/common.h libhashkit/is.h \ + libhashkit/rijndael.hpp libhashkit/string.h \ + libmemcached/csl/common.h libmemcached/csl/context.h \ + libmemcached/csl/parser.h libmemcached/csl/scanner.h \ + libmemcached/csl/server.h libmemcached/csl/symbol.h \ + libmemcached/array.h libmemcached/assert.hpp \ + libmemcached/backtrace.hpp libmemcached/behavior.hpp \ + libmemcached/byteorder.h libmemcached/common.h \ + libmemcached/connect.hpp libmemcached/continuum.hpp \ + libmemcached/do.hpp libmemcached/encoding_key.h \ + libmemcached/error.hpp libmemcached/flag.hpp \ + libmemcached/initialize_query.h libmemcached/instance.hpp \ + libmemcached/internal.h libmemcached/io.h libmemcached/io.hpp \ + libmemcached/is.h libmemcached/key.hpp \ + libmemcached/libmemcached_probes.h \ + libmemcached/memcached/protocol_binary.h \ + libmemcached/memcached/vbucket.h libmemcached/memory.h \ + libmemcached/namespace.h libmemcached/options.hpp \ + libmemcached/poll.h libmemcached/response.h \ + libmemcached/result.h libmemcached/sasl.hpp \ + libmemcached/server.hpp libmemcached/server_instance.h \ + libmemcached/socket.hpp libmemcached/string.hpp \ + libmemcached/udp.hpp libmemcached/version.hpp \ + libmemcached/virtual_bucket.h libmemcached/watchpoint.h \ + libmemcached/windows.hpp libtest/client.hpp \ + libtest/formatter.hpp libtest/timer.hpp libtest/alarm.h \ + libtest/binaries.h libtest/cpu.hpp libtest/blobslap_worker.h \ + libtest/callbacks.h libtest/dns.hpp libtest/cmdline.h \ + libtest/collection.h libtest/common.h libtest/comparison.hpp \ + libtest/core.h libtest/dream.h libtest/error.h \ + libtest/exception.hpp libtest/exception/disconnected.hpp \ + libtest/exception/fatal.hpp libtest/framework.h \ + libtest/gearmand.h libtest/drizzled.h libtest/get.h \ + libtest/has.hpp libtest/http.hpp libtest/is_pid.hpp \ + libtest/is_local.hpp libtest/killpid.h libtest/libtool.hpp \ + libtest/memcached.h libtest/memcached.hpp \ + libtest/poll_error.hpp libtest/port.h libtest/result.hpp \ + libtest/result/base.hpp libtest/result/fail.hpp \ + libtest/result/skip.hpp libtest/result/success.hpp \ + libtest/runner.h libtest/server.h libtest/server_container.h \ + libtest/signal.h libtest/socket.hpp libtest/stream.h \ + libtest/strerror.h libtest/string.hpp libtest/test.h \ + libtest/test.hpp libtest/thread.hpp libtest/tmpfile.hpp \ + libtest/lite.h libtest/valgrind.h libtest/vchar.hpp \ + libtest/version.h libtest/visibility.h libtest/wait.h \ + libtest/yatl.h clients/client_options.h clients/execute.h \ + clients/generator.h clients/ms_atomic.h clients/ms_conn.h \ + clients/ms_memslap.h clients/ms_setting.h clients/ms_sigsegv.h \ + clients/ms_stats.h clients/ms_task.h clients/ms_thread.h \ + clients/utilities.h example/byteorder.h \ + example/memcached_light.h example/storage.h \ + libmemcachedutil/common.h libmemcachedprotocol/ascii_handler.h \ + libmemcachedprotocol/binary_handler.h \ + libmemcachedprotocol/cache.h libmemcachedprotocol/common.h \ + tests/exist.h tests/hash_results.h tests/keys.hpp \ + tests/libmemcached_test_container.h tests/libmemcached_world.h \ + tests/libmemcached_world_socket.h tests/memc.hpp \ + tests/runner.h tests/basic.h tests/callbacks.h tests/debug.h \ + tests/deprecated.h tests/error_conditions.h tests/ketama.h \ + tests/ketama_test_cases.h tests/ketama_test_cases_spy.h \ + tests/libmemcached-1.0/all_tests.h \ + tests/libmemcached-1.0/callback_counter.h \ + tests/libmemcached-1.0/dump.h \ + tests/libmemcached-1.0/encoding_key.h \ + tests/libmemcached-1.0/fetch_all_results.h \ + tests/libmemcached-1.0/generate.h \ + tests/libmemcached-1.0/haldenbrand.h \ + tests/libmemcached-1.0/mem_functions.h \ + tests/libmemcached-1.0/memcached_get.h \ + tests/libmemcached-1.0/parser.h \ + tests/libmemcached-1.0/setup_and_teardowns.h \ + tests/libmemcached-1.0/stat.h tests/namespace.h tests/pool.h \ + tests/print.h tests/replication.h tests/server_add.h \ + tests/string.h tests/touch.h tests/virtual_buckets.h \ + util/daemon.hpp util/instance.hpp util/logfile.hpp \ + util/log.hpp util/operation.hpp util/signal.hpp \ + util/string.hpp util/pidfile.hpp win32/wrappers.h +HEADERS = $(include_HEADERS) $(nobase_include_HEADERS) \ + $(noinst_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)mem_config.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +CSCOPE = cscope +AM_RECURSIVE_TARGETS = cscope check recheck +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +DIST_TARGETS = dist-gzip +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +ALLOCA = @ALLOCA@ +AMINCLUDE = @AMINCLUDE@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOHEADER_FILE = @AUTOHEADER_FILE@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CC_VERSION = @CC_VERSION@ +CC_VERSION_VENDOR = @CC_VERSION_VENDOR@ +CFLAGS = @CFLAGS@ +CFLAG_VISIBILITY = @CFLAG_VISIBILITY@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CXX_VERSION = @CXX_VERSION@ +CXX_VERSION_VENDOR = @CXX_VERSION_VENDOR@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DEPRECATED = @DEPRECATED@ +DLLTOOL = @DLLTOOL@ +DPKG_GENSYMBOLS = @DPKG_GENSYMBOLS@ +DSYMUTIL = @DSYMUTIL@ +DTRACE = @DTRACE@ +DTRACEFLAGS = @DTRACEFLAGS@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GEARMAND_BINARY = @GEARMAND_BINARY@ +GREP = @GREP@ +HASHKIT_LIBRARY_VERSION = @HASHKIT_LIBRARY_VERSION@ +HAVE_VISIBILITY = @HAVE_VISIBILITY@ +INC_AMINCLUDE = @INC_AMINCLUDE@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LCOV = @LCOV@ +LCOV_GENHTML = @LCOV_GENHTML@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LIBEVENT_LIB = @LIBEVENT_LIB@ +LIBGEARMAN_CPPFLAGS = @LIBGEARMAN_CPPFLAGS@ +LIBGEARMAN_LDFLAGS = @LIBGEARMAN_LDFLAGS@ +LIBHASHKIT_VERSION_HEX = @LIBHASHKIT_VERSION_HEX@ +LIBHASHKIT_VERSION_STRING = @LIBHASHKIT_VERSION_STRING@ +LIBM = @LIBM@ +LIBMEMCACHED_VERSION_HEX = @LIBMEMCACHED_VERSION_HEX@ +LIBMEMCACHED_VERSION_STRING = @LIBMEMCACHED_VERSION_STRING@ +LIBMEMCACHED_WITH_SASL_SUPPORT = @LIBMEMCACHED_WITH_SASL_SUPPORT@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSASL_CPPFLAGS = @LIBSASL_CPPFLAGS@ +LIBSASL_LDFLAGS = @LIBSASL_LDFLAGS@ +LIBTEST_VERSION = @LIBTEST_VERSION@ +LIBTOOL = @LIBTOOL@ +LIBUUID_LIB = @LIBUUID_LIB@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MCHECK = @MCHECK@ +MCHECK_CPPFLAGS = @MCHECK_CPPFLAGS@ +MCHECK_LDFLAGS = @MCHECK_LDFLAGS@ +MEMCACHED_BINARY = @MEMCACHED_BINARY@ +MEMCACHED_LIBRARY_VERSION = @MEMCACHED_LIBRARY_VERSION@ +MEMCACHED_PROTOCAL_LIBRARY_VERSION = @MEMCACHED_PROTOCAL_LIBRARY_VERSION@ +MEMCACHED_UTIL_LIBRARY_VERSION = @MEMCACHED_UTIL_LIBRARY_VERSION@ +MKDIR_P = @MKDIR_P@ +MYSQLD = @MYSQLD@ +MYSQL_CFLAGS = @MYSQL_CFLAGS@ +MYSQL_CONFIG = @MYSQL_CONFIG@ +MYSQL_INCLUDE = @MYSQL_INCLUDE@ +MYSQL_LDFLAGS = @MYSQL_LDFLAGS@ +MYSQL_VERSION = @MYSQL_VERSION@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +RPM = @RPM@ +RPMBUILD = @RPMBUILD@ +RPMDEV_SETUPTREE = @RPMDEV_SETUPTREE@ +RPM_RELEASE = @RPM_RELEASE@ +RT_LIB = @RT_LIB@ +SASL_LIB = @SASL_LIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SPHINXBUILD = @SPHINXBUILD@ +STRIP = @STRIP@ +VALGRIND = @VALGRIND@ +VERSION = @VERSION@ +WINE = @WINE@ +YACC = @YACC@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +ax_pthread_config = @ax_pthread_config@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_cv_dlopen_libs = @lt_cv_dlopen_libs@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +ACLOCAL_AMFLAGS = -I m4 -I libtest/m4 +AM_YFLAGS = -d + +# includes append to these: +SUFFIXES = $(am__append_19) $(am__append_61) +.PHONY = +CLEANFILES = $(am__append_15) $(am__append_57) +DISTCLEANFILES = aminclude.am $(am__append_9) $(am__append_51) \ + config/top.h +noinst_HEADERS = $(am__append_5) $(am__append_27) $(am__append_46) \ + $(am__append_48) $(am__append_63) $(am__append_64) +lib_LTLIBRARIES = $(am__append_4) $(am__append_47) $(am__append_62) +man_MANS = +noinst_LTLIBRARIES = $(am__append_8) $(am__append_43) +include_HEADERS = +nobase_include_HEADERS = $(am__append_3) $(am__append_34) \ + $(am__append_39) $(am__append_40) +check_LTLIBRARIES = $(am__append_28) +EXTRA_HEADERS = +BUILT_SOURCES = $(am__append_2) $(am__append_14) $(am__append_20) \ + $(am__append_26) $(am__append_56) +EXTRA_DIST = README.FIRST README.win32 $(am__append_1) \ + $(am__append_25) +dist_man_MANS = $(am__append_44) +MAINTAINERCLEANFILES = $(am__append_10) $(am__append_52) +aclocaldir = $(datadir)/aclocal +dist_aclocal_DATA = $(am__append_74) +@BUILD_WIN32_FALSE@libhashkit_libhashkit_la_LIBADD = +@BUILD_WIN32_TRUE@libhashkit_libhashkit_la_LIBADD = +@BUILD_WIN32_FALSE@libhashkit_libhashkit_la_SOURCES = \ +@BUILD_WIN32_FALSE@ libhashkit/aes.cc libhashkit/algorithm.cc \ +@BUILD_WIN32_FALSE@ libhashkit/behavior.cc libhashkit/crc32.cc \ +@BUILD_WIN32_FALSE@ libhashkit/digest.cc libhashkit/encrypt.cc \ +@BUILD_WIN32_FALSE@ libhashkit/fnv_32.cc libhashkit/fnv_64.cc \ +@BUILD_WIN32_FALSE@ libhashkit/function.cc libhashkit/has.cc \ +@BUILD_WIN32_FALSE@ libhashkit/hashkit.cc libhashkit/jenkins.cc \ +@BUILD_WIN32_FALSE@ libhashkit/ketama.cc libhashkit/md5.cc \ +@BUILD_WIN32_FALSE@ libhashkit/murmur.cc libhashkit/murmur3.cc \ +@BUILD_WIN32_FALSE@ libhashkit/murmur3_api.cc \ +@BUILD_WIN32_FALSE@ libhashkit/one_at_a_time.cc \ +@BUILD_WIN32_FALSE@ libhashkit/rijndael.cc \ +@BUILD_WIN32_FALSE@ libhashkit/str_algorithm.cc \ +@BUILD_WIN32_FALSE@ libhashkit/strerror.cc libhashkit/string.cc \ +@BUILD_WIN32_FALSE@ $(am__append_49) $(am__append_50) +@BUILD_WIN32_TRUE@libhashkit_libhashkit_la_SOURCES = \ +@BUILD_WIN32_TRUE@ libhashkit/aes.cc libhashkit/algorithm.cc \ +@BUILD_WIN32_TRUE@ libhashkit/behavior.cc libhashkit/crc32.cc \ +@BUILD_WIN32_TRUE@ libhashkit/digest.cc libhashkit/encrypt.cc \ +@BUILD_WIN32_TRUE@ libhashkit/fnv_32.cc libhashkit/fnv_64.cc \ +@BUILD_WIN32_TRUE@ libhashkit/function.cc libhashkit/has.cc \ +@BUILD_WIN32_TRUE@ libhashkit/hashkit.cc libhashkit/jenkins.cc \ +@BUILD_WIN32_TRUE@ libhashkit/ketama.cc libhashkit/md5.cc \ +@BUILD_WIN32_TRUE@ libhashkit/murmur.cc libhashkit/murmur3.cc \ +@BUILD_WIN32_TRUE@ libhashkit/murmur3_api.cc \ +@BUILD_WIN32_TRUE@ libhashkit/one_at_a_time.cc \ +@BUILD_WIN32_TRUE@ libhashkit/rijndael.cc \ +@BUILD_WIN32_TRUE@ libhashkit/str_algorithm.cc \ +@BUILD_WIN32_TRUE@ libhashkit/strerror.cc libhashkit/string.cc \ +@BUILD_WIN32_TRUE@ $(am__append_6) $(am__append_7) \ +@BUILD_WIN32_TRUE@ $(am__append_49) $(am__append_50) +@BUILD_WIN32_FALSE@libhashkit_libhashkit_la_CXXFLAGS = \ +@BUILD_WIN32_FALSE@ -DBUILDING_HASHKIT +@BUILD_WIN32_TRUE@libhashkit_libhashkit_la_CXXFLAGS = \ +@BUILD_WIN32_TRUE@ -DBUILDING_HASHKIT +@BUILD_WIN32_FALSE@libhashkit_libhashkit_la_CFLAGS = \ +@BUILD_WIN32_FALSE@ -DBUILDING_HASHKIT +@BUILD_WIN32_TRUE@libhashkit_libhashkit_la_CFLAGS = \ +@BUILD_WIN32_TRUE@ -DBUILDING_HASHKIT +@BUILD_WIN32_FALSE@libhashkit_libhashkit_la_LDFLAGS = -version-info \ +@BUILD_WIN32_FALSE@ $(HASHKIT_LIBRARY_VERSION) $(am__append_70) +@BUILD_WIN32_TRUE@libhashkit_libhashkit_la_LDFLAGS = -version-info \ +@BUILD_WIN32_TRUE@ $(HASHKIT_LIBRARY_VERSION) $(am__append_70) +@BUILD_WIN32_FALSE@libhashkit_libhashkitinc_la_SOURCES = ${libhashkit_libhashkit_la_SOURCES} +@BUILD_WIN32_TRUE@libhashkit_libhashkitinc_la_SOURCES = ${libhashkit_libhashkit_la_SOURCES} +@BUILD_WIN32_FALSE@libhashkit_libhashkitinc_la_CFLAGS = ${libhashkit_libhashkit_la_CFLAGS} +@BUILD_WIN32_TRUE@libhashkit_libhashkitinc_la_CFLAGS = ${libhashkit_libhashkit_la_CFLAGS} +@BUILD_WIN32_FALSE@libhashkit_libhashkitinc_la_CXXFLAGS = ${libhashkit_libhashkit_la_CXXFLAGS} +@BUILD_WIN32_TRUE@libhashkit_libhashkitinc_la_CXXFLAGS = ${libhashkit_libhashkit_la_CXXFLAGS} +@BUILD_WIN32_FALSE@libmemcached_libmemcached_la_SOURCES = \ +@BUILD_WIN32_FALSE@ libmemcached/csl/context.cc \ +@BUILD_WIN32_FALSE@ libmemcached/csl/parser.cc \ +@BUILD_WIN32_FALSE@ libmemcached/csl/scanner.cc \ +@BUILD_WIN32_FALSE@ libmemcached/instance.cc \ +@BUILD_WIN32_FALSE@ ${libhashkit_libhashkit_la_SOURCES} \ +@BUILD_WIN32_FALSE@ libmemcached/allocators.cc \ +@BUILD_WIN32_FALSE@ libmemcached/allocators.hpp \ +@BUILD_WIN32_FALSE@ libmemcached/analyze.cc \ +@BUILD_WIN32_FALSE@ libmemcached/array.c libmemcached/auto.cc \ +@BUILD_WIN32_FALSE@ libmemcached/backtrace.cc \ +@BUILD_WIN32_FALSE@ libmemcached/behavior.cc \ +@BUILD_WIN32_FALSE@ libmemcached/byteorder.cc \ +@BUILD_WIN32_FALSE@ libmemcached/callback.cc \ +@BUILD_WIN32_FALSE@ libmemcached/connect.cc \ +@BUILD_WIN32_FALSE@ libmemcached/delete.cc libmemcached/do.cc \ +@BUILD_WIN32_FALSE@ libmemcached/dump.cc libmemcached/error.cc \ +@BUILD_WIN32_FALSE@ libmemcached/exist.cc libmemcached/fetch.cc \ +@BUILD_WIN32_FALSE@ libmemcached/flag.cc libmemcached/flush.cc \ +@BUILD_WIN32_FALSE@ libmemcached/flush_buffers.cc \ +@BUILD_WIN32_FALSE@ libmemcached/get.cc libmemcached/hash.cc \ +@BUILD_WIN32_FALSE@ libmemcached/hash.hpp libmemcached/hosts.cc \ +@BUILD_WIN32_FALSE@ libmemcached/initialize_query.cc \ +@BUILD_WIN32_FALSE@ libmemcached/io.cc libmemcached/key.cc \ +@BUILD_WIN32_FALSE@ libmemcached/memcached.cc \ +@BUILD_WIN32_FALSE@ libmemcached/encoding_key.cc \ +@BUILD_WIN32_FALSE@ libmemcached/namespace.cc \ +@BUILD_WIN32_FALSE@ libmemcached/options.cc \ +@BUILD_WIN32_FALSE@ libmemcached/parse.cc libmemcached/poll.cc \ +@BUILD_WIN32_FALSE@ libmemcached/purge.cc libmemcached/quit.cc \ +@BUILD_WIN32_FALSE@ libmemcached/quit.hpp \ +@BUILD_WIN32_FALSE@ libmemcached/response.cc \ +@BUILD_WIN32_FALSE@ libmemcached/result.cc libmemcached/sasl.cc \ +@BUILD_WIN32_FALSE@ libmemcached/server.cc \ +@BUILD_WIN32_FALSE@ libmemcached/server_list.cc \ +@BUILD_WIN32_FALSE@ libmemcached/server_list.hpp \ +@BUILD_WIN32_FALSE@ libmemcached/stats.cc \ +@BUILD_WIN32_FALSE@ libmemcached/storage.cc \ +@BUILD_WIN32_FALSE@ libmemcached/strerror.cc \ +@BUILD_WIN32_FALSE@ libmemcached/string.cc \ +@BUILD_WIN32_FALSE@ libmemcached/touch.cc libmemcached/udp.cc \ +@BUILD_WIN32_FALSE@ libmemcached/verbosity.cc \ +@BUILD_WIN32_FALSE@ libmemcached/version.cc \ +@BUILD_WIN32_FALSE@ libmemcached/virtual_bucket.c \ +@BUILD_WIN32_FALSE@ $(am__append_60) +@BUILD_WIN32_TRUE@libmemcached_libmemcached_la_SOURCES = \ +@BUILD_WIN32_TRUE@ libmemcached/csl/context.cc \ +@BUILD_WIN32_TRUE@ libmemcached/csl/parser.cc \ +@BUILD_WIN32_TRUE@ libmemcached/csl/scanner.cc \ +@BUILD_WIN32_TRUE@ libmemcached/instance.cc \ +@BUILD_WIN32_TRUE@ ${libhashkit_libhashkit_la_SOURCES} \ +@BUILD_WIN32_TRUE@ libmemcached/allocators.cc \ +@BUILD_WIN32_TRUE@ libmemcached/allocators.hpp \ +@BUILD_WIN32_TRUE@ libmemcached/analyze.cc libmemcached/array.c \ +@BUILD_WIN32_TRUE@ libmemcached/auto.cc \ +@BUILD_WIN32_TRUE@ libmemcached/backtrace.cc \ +@BUILD_WIN32_TRUE@ libmemcached/behavior.cc \ +@BUILD_WIN32_TRUE@ libmemcached/byteorder.cc \ +@BUILD_WIN32_TRUE@ libmemcached/callback.cc \ +@BUILD_WIN32_TRUE@ libmemcached/connect.cc \ +@BUILD_WIN32_TRUE@ libmemcached/delete.cc libmemcached/do.cc \ +@BUILD_WIN32_TRUE@ libmemcached/dump.cc libmemcached/error.cc \ +@BUILD_WIN32_TRUE@ libmemcached/exist.cc libmemcached/fetch.cc \ +@BUILD_WIN32_TRUE@ libmemcached/flag.cc libmemcached/flush.cc \ +@BUILD_WIN32_TRUE@ libmemcached/flush_buffers.cc \ +@BUILD_WIN32_TRUE@ libmemcached/get.cc libmemcached/hash.cc \ +@BUILD_WIN32_TRUE@ libmemcached/hash.hpp libmemcached/hosts.cc \ +@BUILD_WIN32_TRUE@ libmemcached/initialize_query.cc \ +@BUILD_WIN32_TRUE@ libmemcached/io.cc libmemcached/key.cc \ +@BUILD_WIN32_TRUE@ libmemcached/memcached.cc \ +@BUILD_WIN32_TRUE@ libmemcached/encoding_key.cc \ +@BUILD_WIN32_TRUE@ libmemcached/namespace.cc \ +@BUILD_WIN32_TRUE@ libmemcached/options.cc \ +@BUILD_WIN32_TRUE@ libmemcached/parse.cc libmemcached/poll.cc \ +@BUILD_WIN32_TRUE@ libmemcached/purge.cc libmemcached/quit.cc \ +@BUILD_WIN32_TRUE@ libmemcached/quit.hpp \ +@BUILD_WIN32_TRUE@ libmemcached/response.cc \ +@BUILD_WIN32_TRUE@ libmemcached/result.cc libmemcached/sasl.cc \ +@BUILD_WIN32_TRUE@ libmemcached/server.cc \ +@BUILD_WIN32_TRUE@ libmemcached/server_list.cc \ +@BUILD_WIN32_TRUE@ libmemcached/server_list.hpp \ +@BUILD_WIN32_TRUE@ libmemcached/stats.cc \ +@BUILD_WIN32_TRUE@ libmemcached/storage.cc \ +@BUILD_WIN32_TRUE@ libmemcached/strerror.cc \ +@BUILD_WIN32_TRUE@ libmemcached/string.cc libmemcached/touch.cc \ +@BUILD_WIN32_TRUE@ libmemcached/udp.cc \ +@BUILD_WIN32_TRUE@ libmemcached/verbosity.cc \ +@BUILD_WIN32_TRUE@ libmemcached/version.cc \ +@BUILD_WIN32_TRUE@ libmemcached/virtual_bucket.c \ +@BUILD_WIN32_TRUE@ $(am__append_18) $(am__append_60) +@BUILD_WIN32_FALSE@EXTRA_libmemcached_libmemcached_la_DEPENDENCIES = \ +@BUILD_WIN32_FALSE@ $(am__append_58) +@BUILD_WIN32_TRUE@EXTRA_libmemcached_libmemcached_la_DEPENDENCIES = \ +@BUILD_WIN32_TRUE@ $(am__append_16) $(am__append_58) +@BUILD_WIN32_FALSE@libmemcached_libmemcached_la_LIBADD = \ +@BUILD_WIN32_FALSE@ @lt_cv_dlopen_libs@ $(am__append_55) \ +@BUILD_WIN32_FALSE@ $(am__append_59) +@BUILD_WIN32_TRUE@libmemcached_libmemcached_la_LIBADD = -lmingw32 \ +@BUILD_WIN32_TRUE@ -lws2_32 @lt_cv_dlopen_libs@ \ +@BUILD_WIN32_TRUE@ $(am__append_13) $(am__append_17) \ +@BUILD_WIN32_TRUE@ $(am__append_55) $(am__append_59) +@BUILD_WIN32_FALSE@libmemcached_libmemcached_la_LDFLAGS = \ +@BUILD_WIN32_FALSE@ -version-info ${MEMCACHED_LIBRARY_VERSION} \ +@BUILD_WIN32_FALSE@ $(am__append_71) +@BUILD_WIN32_TRUE@libmemcached_libmemcached_la_LDFLAGS = \ +@BUILD_WIN32_TRUE@ -version-info ${MEMCACHED_LIBRARY_VERSION} \ +@BUILD_WIN32_TRUE@ $(am__append_71) +@BUILD_WIN32_FALSE@libmemcached_libmemcached_la_CFLAGS = \ +@BUILD_WIN32_FALSE@ -DBUILDING_LIBMEMCACHED $(am__append_53) +@BUILD_WIN32_TRUE@libmemcached_libmemcached_la_CFLAGS = \ +@BUILD_WIN32_TRUE@ -DBUILDING_LIBMEMCACHED -DBUILDING_HASHKIT \ +@BUILD_WIN32_TRUE@ $(am__append_11) $(am__append_53) +@BUILD_WIN32_FALSE@libmemcached_libmemcached_la_CXXFLAGS = \ +@BUILD_WIN32_FALSE@ -DBUILDING_LIBMEMCACHED $(am__append_54) +@BUILD_WIN32_TRUE@libmemcached_libmemcached_la_CXXFLAGS = \ +@BUILD_WIN32_TRUE@ -DBUILDING_LIBMEMCACHED -DBUILDING_HASHKIT \ +@BUILD_WIN32_TRUE@ $(am__append_12) $(am__append_54) +@BUILD_WIN32_FALSE@LIBMEMCACHED_1_0_TEST_PATH = libmemcached-1.0/t +@BUILD_WIN32_TRUE@LIBMEMCACHED_1_0_TEST_PATH = libmemcached-1.0/t + +# Test linking with C application +@BUILD_WIN32_FALSE@@SHARED_ENABLED_TRUE@libmemcached_1_0_t_c_test_SOURCES = libmemcached-1.0/t/c_test.c + +# Test linking with C application +@BUILD_WIN32_TRUE@@SHARED_ENABLED_TRUE@libmemcached_1_0_t_c_test_SOURCES = libmemcached-1.0/t/c_test.c +@BUILD_WIN32_FALSE@@SHARED_ENABLED_TRUE@libmemcached_1_0_t_c_test_LDADD = libmemcached/libmemcached.la +@BUILD_WIN32_TRUE@@SHARED_ENABLED_TRUE@libmemcached_1_0_t_c_test_LDADD = libmemcached/libmemcached.la + +# Test linking with C application/SASL include +@BUILD_WIN32_FALSE@@SHARED_ENABLED_TRUE@libmemcached_1_0_t_c_sasl_test_SOURCES = libmemcached-1.0/t/c_sasl_test.c + +# Test linking with C application/SASL include +@BUILD_WIN32_TRUE@@SHARED_ENABLED_TRUE@libmemcached_1_0_t_c_sasl_test_SOURCES = libmemcached-1.0/t/c_sasl_test.c +@BUILD_WIN32_FALSE@@SHARED_ENABLED_TRUE@libmemcached_1_0_t_c_sasl_test_LDADD = libmemcached/libmemcached.la +@BUILD_WIN32_TRUE@@SHARED_ENABLED_TRUE@libmemcached_1_0_t_c_sasl_test_LDADD = libmemcached/libmemcached.la + +# Test linking with C++ application +@BUILD_WIN32_FALSE@libmemcached_1_0_t_cc_test_SOURCES = libmemcached-1.0/t/cc_test.cc + +# Test linking with C++ application +@BUILD_WIN32_TRUE@libmemcached_1_0_t_cc_test_SOURCES = libmemcached-1.0/t/cc_test.cc +@BUILD_WIN32_FALSE@libmemcached_1_0_t_cc_test_LDADD = libmemcached/libmemcached.la +@BUILD_WIN32_TRUE@libmemcached_1_0_t_cc_test_LDADD = libmemcached/libmemcached.la +@BUILD_WIN32_FALSE@LIBTOOL_COMMAND = ${abs_top_builddir}/libtool --mode=execute +@BUILD_WIN32_FALSE@VALGRIND_EXEC_COMMAND = $(LIBTOOL_COMMAND) valgrind --tool=memcheck --error-exitcode=1 --leak-check=yes --track-fds=yes --malloc-fill=A5 --free-fill=DE +@BUILD_WIN32_FALSE@SGCHECK_EXEC_COMMAND = $(LIBTOOL_COMMAND) valgrind --tool=exp-sgcheck --error-exitcode=1 +@BUILD_WIN32_FALSE@VALGRIND_COMMAND = LOG_COMPILER="valgrind" $(VALGRIND_EXEC_COMMAND) +@BUILD_WIN32_FALSE@HELGRIND_COMMAND = $(LIBTOOL_COMMAND) valgrind --tool=helgrind --read-var-info=yes --error-exitcode=1 --read-var-info=yes +@BUILD_WIN32_FALSE@DRD_COMMAND = $(LIBTOOL_COMMAND) valgrind --tool=drd --free-is-write=yes --error-exitcode=1 +@BUILD_WIN32_FALSE@SGCHECK_COMMAND = $(LIBTOOL_COMMAND) valgrind --tool=exp-sgcheck --error-exitcode=1 +@BUILD_WIN32_FALSE@MASSIF_COMMAND = $(LIBTOOL_COMMAND) valgrind --tool=massif +@BUILD_WIN32_FALSE@GDB_COMMAND = $(LIBTOOL_COMMAND) gdb -f -x libtest/run.gdb +@BUILD_WIN32_FALSE@PTRCHECK_COMMAND = $(LIBTOOL_COMMAND) valgrind --tool=exp-ptrcheck --error-exitcode=1 +@BUILD_WIN32_FALSE@PAHOLE_COMMAND = $(LIBTOOL_COMMAND) --mode=execute pahole +@BUILD_WIN32_FALSE@VALGRIND_SUPRESSION = $(LIBTOOL_COMMAND) valgrind --leak-check=full --show-reachable=yes --error-limit=no --gen-suppressions=all --log-file=minimalraw.log +@BUILD_WIN32_FALSE@libtest_libtest_la_CXXFLAGS = -DBUILDING_LIBTEST \ +@BUILD_WIN32_FALSE@ @PTHREAD_CFLAGS@ \ +@BUILD_WIN32_FALSE@ -DLIBTEST_TEMP="\"tmp_chroot\"" \ +@BUILD_WIN32_FALSE@ $(CURL_CFLAGS) +@BUILD_WIN32_FALSE@EXTRA_libtest_libtest_la_DEPENDENCIES = \ +@BUILD_WIN32_FALSE@ libtest_tmp_dir libtest/abort libtest/wait +@BUILD_WIN32_FALSE@libtest_libtest_la_LIBADD = @PTHREAD_LIBS@ \ +@BUILD_WIN32_FALSE@ $(CURL_LIBS) @RT_LIB@ $(am__append_30) + +# We are either building in tree, or with +@BUILD_WIN32_FALSE@libtest_libtest_la_SOURCES = libtest/alarm.cc \ +@BUILD_WIN32_FALSE@ libtest/binaries.cc libtest/cmdline.cc \ +@BUILD_WIN32_FALSE@ libtest/collection.cc libtest/comparison.cc \ +@BUILD_WIN32_FALSE@ libtest/core.cc libtest/cpu.cc \ +@BUILD_WIN32_FALSE@ libtest/dns.cc libtest/dream.cc \ +@BUILD_WIN32_FALSE@ libtest/drizzled.cc libtest/exception.cc \ +@BUILD_WIN32_FALSE@ libtest/exception/fatal.cc \ +@BUILD_WIN32_FALSE@ libtest/formatter.cc libtest/client.cc \ +@BUILD_WIN32_FALSE@ libtest/framework.cc libtest/has.cc \ +@BUILD_WIN32_FALSE@ libtest/http.cc libtest/is_local.cc \ +@BUILD_WIN32_FALSE@ libtest/killpid.cc libtest/libtool.cc \ +@BUILD_WIN32_FALSE@ libtest/main.cc libtest/port.cc \ +@BUILD_WIN32_FALSE@ libtest/result.cc libtest/runner.cc \ +@BUILD_WIN32_FALSE@ libtest/server.cc \ +@BUILD_WIN32_FALSE@ libtest/server_container.cc \ +@BUILD_WIN32_FALSE@ libtest/signal.cc libtest/socket.cc \ +@BUILD_WIN32_FALSE@ libtest/strerror.cc libtest/timer.cc \ +@BUILD_WIN32_FALSE@ libtest/tmpfile.cc libtest/vchar.cc \ +@BUILD_WIN32_FALSE@ libtest/memcached.cc libtest/gearmand.cc \ +@BUILD_WIN32_FALSE@ $(am__append_31) + +# Declare unittest so that we can append to it +@BUILD_WIN32_FALSE@libtest_unittest_CXXFLAGS = +@BUILD_WIN32_FALSE@libtest_unittest_LDADD = libtest/libtest.la +@BUILD_WIN32_FALSE@libtest_libtest_la_LDFLAGS = $(am__append_29) +@BUILD_WIN32_FALSE@TMP_DIR := tmp_chroot/etc tmp_chroot/var/log tmp_chroot/var/tmp tmp_chroot/var/run tmp_chroot/var/drizzle +@BUILD_WIN32_FALSE@libtest_unittest_SOURCES = libtest/unittest.cc +@BUILD_WIN32_FALSE@libtest_skiptest_LDADD = libtest/libtest.la +@BUILD_WIN32_FALSE@libtest_skiptest_SOURCES = libtest/skiptest.cc +@BUILD_WIN32_FALSE@libtest_wait_SOURCES = libtest/wait.cc \ +@BUILD_WIN32_FALSE@ libtest/dream.cc +@BUILD_WIN32_FALSE@libtest_core_count_SOURCES = libtest/cpu.cc \ +@BUILD_WIN32_FALSE@ libtest/core_count.cc +@BUILD_WIN32_FALSE@libtest_abort_SOURCES = libtest/abort.cc +@BUILD_WIN32_FALSE@libtest_backtrace_SOURCES = \ +@BUILD_WIN32_FALSE@ libtest/backtrace_test.cc \ +@BUILD_WIN32_FALSE@ libmemcached/backtrace.cc +@BUILD_WIN32_FALSE@libtest_backtrace_LDADD = @lt_cv_dlopen_libs@ +@BUILD_WIN32_FALSE@CLIENTS_LDADDS = clients/libutilities.la \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached.la +@BUILD_WIN32_FALSE@clients_libutilities_la_SOURCES = clients/utilities.cc +@BUILD_WIN32_FALSE@clients_memcat_SOURCES = clients/memcat.cc +@BUILD_WIN32_FALSE@clients_memcat_LDADD = $(CLIENTS_LDADDS) +@BUILD_WIN32_FALSE@clients_memparse_SOURCES = clients/memparse.cc +@BUILD_WIN32_FALSE@clients_memparse_LDADD = $(CLIENTS_LDADDS) +@BUILD_WIN32_FALSE@clients_memcp_SOURCES = clients/memcp.cc +@BUILD_WIN32_FALSE@clients_memcp_LDADD = $(CLIENTS_LDADDS) +@BUILD_WIN32_FALSE@clients_memdump_SOURCES = clients/memdump.cc +@BUILD_WIN32_FALSE@clients_memdump_LDADD = $(CLIENTS_LDADDS) +@BUILD_WIN32_FALSE@clients_memstat_SOURCES = clients/memstat.cc +@BUILD_WIN32_FALSE@clients_memstat_LDADD = $(CLIENTS_LDADDS) +@BUILD_WIN32_FALSE@clients_memrm_SOURCES = clients/memrm.cc +@BUILD_WIN32_FALSE@clients_memrm_LDADD = $(CLIENTS_LDADDS) +@BUILD_WIN32_FALSE@clients_memexist_SOURCES = clients/memexist.cc +@BUILD_WIN32_FALSE@clients_memexist_LDADD = $(CLIENTS_LDADDS) +@BUILD_WIN32_FALSE@clients_memtouch_SOURCES = clients/memtouch.cc +@BUILD_WIN32_FALSE@clients_memtouch_LDADD = $(CLIENTS_LDADDS) +@BUILD_WIN32_FALSE@clients_memflush_SOURCES = clients/memflush.cc +@BUILD_WIN32_FALSE@clients_memflush_LDADD = $(CLIENTS_LDADDS) +@BUILD_WIN32_FALSE@clients_memping_SOURCES = clients/memping.cc +@BUILD_WIN32_FALSE@clients_memping_LDADD = $(CLIENTS_LDADDS) libmemcached/libmemcachedutil.la +@BUILD_WIN32_FALSE@clients_memerror_SOURCES = clients/memerror.cc +@BUILD_WIN32_FALSE@clients_memerror_LDADD = $(CLIENTS_LDADDS) +@BUILD_WIN32_FALSE@clients_memslap_SOURCES = clients/memslap.cc \ +@BUILD_WIN32_FALSE@ clients/generator.cc clients/execute.cc +@BUILD_WIN32_FALSE@clients_memslap_CXXFLAGS = @PTHREAD_CFLAGS@ +@BUILD_WIN32_FALSE@clients_memslap_LDADD = $(CLIENTS_LDADDS) \ +@BUILD_WIN32_FALSE@ @PTHREAD_LIBS@ $(am__empty) +@BUILD_WIN32_FALSE@clients_memaslap_SOURCES = clients/memaslap.c \ +@BUILD_WIN32_FALSE@ clients/ms_conn.c clients/ms_setting.c \ +@BUILD_WIN32_FALSE@ clients/ms_sigsegv.c clients/ms_stats.c \ +@BUILD_WIN32_FALSE@ clients/ms_task.c clients/ms_thread.c \ +@BUILD_WIN32_FALSE@ clients/generator.cc clients/execute.cc +@BUILD_WIN32_FALSE@clients_memaslap_LDADD = @LIBEVENT_LIB@ \ +@BUILD_WIN32_FALSE@ $(CLIENTS_LDADDS) +@BUILD_WIN32_FALSE@clients_memcapable_CXXFLAGS = @PTHREAD_CFLAGS@ +@BUILD_WIN32_FALSE@clients_memcapable_SOURCES = clients/memcapable.cc \ +@BUILD_WIN32_FALSE@ libmemcached/byteorder.cc +@BUILD_WIN32_FALSE@clients_memcapable_LDADD = $(CLIENTS_LDADDS) \ +@BUILD_WIN32_FALSE@ @PTHREAD_LIBS@ $(am__empty) +@BUILD_WIN32_FALSE@SPHINXOPTS = ${SPHINX_WARNINGS} -q +@BUILD_WIN32_FALSE@PAPER = +@BUILD_WIN32_FALSE@SPHINX_BUILDDIR = ${abs_top_builddir}/docs + +# Internal variables. +@BUILD_WIN32_FALSE@PAPEROPT_a4 = -D latex_paper_size=a4 +@BUILD_WIN32_FALSE@PAPEROPT_letter = -D latex_paper_size=letter +@BUILD_WIN32_FALSE@ALLSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SPHINX_BUILDDIR) +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@example_memcached_light_SOURCES = example/byteorder.cc \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ example/interface_v0.cc \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ example/interface_v1.cc \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ example/memcached_light.cc \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ example/storage.cc \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ util/daemon.cc \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ util/pidfile.cc +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@example_memcached_light_LDADD = libmemcached/libmemcachedprotocol.la \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ @LIBEVENT_LIB@ \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ $(am__empty) +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@example_memcached_light_LDFLAGS = +@BUILD_WIN32_FALSE@libmemcached_libmemcachedutil_la_SOURCES = \ +@BUILD_WIN32_FALSE@ libmemcached/backtrace.cc \ +@BUILD_WIN32_FALSE@ libmemcachedutil/flush.cc \ +@BUILD_WIN32_FALSE@ libmemcachedutil/pid.cc \ +@BUILD_WIN32_FALSE@ libmemcachedutil/ping.cc \ +@BUILD_WIN32_FALSE@ libmemcachedutil/pool.cc \ +@BUILD_WIN32_FALSE@ libmemcachedutil/version.cc + +@BUILD_WIN32_FALSE@libmemcached_libmemcachedutil_la_LIBADD = \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached.la @PTHREAD_LIBS@ +@BUILD_WIN32_FALSE@libmemcached_libmemcachedutil_la_LDFLAGS = \ +@BUILD_WIN32_FALSE@ ${AM_LDFLAGS} -version-info \ +@BUILD_WIN32_FALSE@ ${MEMCACHED_UTIL_LIBRARY_VERSION} \ +@BUILD_WIN32_FALSE@ $(am__append_73) +@BUILD_WIN32_FALSE@libmemcached_libmemcachedutil_la_CXXFLAGS = \ +@BUILD_WIN32_FALSE@ ${AM_CXXFLAGS} ${NO_CONVERSION} \ +@BUILD_WIN32_FALSE@ -DBUILDING_LIBMEMCACHED @PTHREAD_CFLAGS@ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@libmemcached_libmemcachedprotocol_la_SOURCES = libmemcached/byteorder.cc \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ libmemcachedprotocol/ascii_handler.c \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ libmemcachedprotocol/binary_handler.c \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ libmemcachedprotocol/cache.c \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ libmemcachedprotocol/handler.c \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ libmemcachedprotocol/pedantic.c +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@libmemcached_libmemcachedprotocol_la_CFLAGS = ${AM_CFLAGS} \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ ${NO_CONVERSION} \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ -DBUILDING_LIBMEMCACHED \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ @PTHREAD_CFLAGS@ \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ $(am__empty) +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@libmemcached_libmemcachedprotocol_la_CXXFLAGS = ${AM_CXXFLAGS} \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ -DBUILDING_LIBMEMCACHED \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ @PTHREAD_CFLAGS@ \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ $(am__empty) +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@libmemcached_libmemcachedprotocol_la_LIBADD = @LIBEVENT_LIB@ \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ @PTHREAD_LIBS@ \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ $(am__empty) +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@libmemcached_libmemcachedprotocol_la_LDFLAGS = ${AM_LDFLAGS} \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ -version-info \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ ${MEMCACHED_PROTOCAL_LIBRARY_VERSION} \ +@BUILD_LIBMEMCACHED_PROTOCOL_TRUE@@BUILD_WIN32_FALSE@ $(am__append_72) +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@libmemcachedinternal_libmemcachedinternal_la_SOURCES = $(libmemcached_libmemcached_la_SOURCES) +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@libmemcachedinternal_libmemcachedinternal_la_CFLAGS = \ +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@ ${AM_CFLAGS} \ +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@ ${NO_CONVERSION} \ +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@ -DBUILDING_LIBMEMCACHEDINTERNAL + +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS = \ +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@ ${AM_CPPFLAGS} \ +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@ ${NO_CONVERSION} \ +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@ -DBUILDING_LIBMEMCACHEDINTERNAL + +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS = \ +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@ ${AM_CXXFLAGS} \ +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@ ${NO_CONVERSION} \ +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@ -DBUILDING_LIBMEMCACHEDINTERNAL + +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@libmemcachedinternal_libmemcachedinternal_la_LIBADD = $(libmemcached_libmemcached_la_LIBADD) +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@EXTRA_libmemcachedinternal_libmemcachedinternal_la_DEPENDENCIES = $(EXTRA_libmemcached_libmemcached_la_DEPENDENCIES) +@BUILD_WIN32_FALSE@libmemcachedinternal_libmemcachedutilinternal_la_SOURCES = $(libmemcached_libmemcachedutil_la_SOURCES) +@BUILD_WIN32_FALSE@libmemcachedinternal_libmemcachedutilinternal_la_CXXFLAGS = \ +@BUILD_WIN32_FALSE@ ${AM_CXXFLAGS} ${NO_CONVERSION} \ +@BUILD_WIN32_FALSE@ -DBUILDING_LIBMEMCACHEDINTERNAL \ +@BUILD_WIN32_FALSE@ @PTHREAD_CFLAGS@ $(am__empty) +@BUILD_WIN32_FALSE@libmemcachedinternal_libmemcachedutilinternal_la_LIBADD = libmemcachedinternal/libmemcachedinternal.la \ +@BUILD_WIN32_FALSE@ @PTHREAD_LIBS@ $(am__empty) +@BUILD_WIN32_FALSE@RPM_BUILDDIR = ~/rpmbuild +@BUILD_WIN32_FALSE@RPM_BUILD_TARGET = @PACKAGE@-@VERSION@-@RPM_RELEASE@.@build_cpu@.rpm +@BUILD_WIN32_FALSE@RPM_SOURCE = $(RPM_BUILDDIR)/SOURCES/$(DIST_ARCHIVES) +@BUILD_WIN32_FALSE@RPMS = $(RPM_BUILD_TARGET) \ +@BUILD_WIN32_FALSE@ @PACKAGE@-devel-@VERSION@-@RPM_RELEASE@.@build_cpu@.rpm \ +@BUILD_WIN32_FALSE@ @PACKAGE@-debuginfo-@VERSION@-@RPM_RELEASE@.@build_cpu@.rpm +@BUILD_WIN32_FALSE@SRPMS = @PACKAGE@-@VERSION@-@RPM_RELEASE@.src.rpm +@BUILD_WIN32_FALSE@RPM_DIST = $(RPMS) $(SRPMS) +@BUILD_WIN32_FALSE@BUILD_RPMS = $(foreach rpm_iterator,$(RPMS),$(addprefix $(RPM_BUILDDIR)/RPMS/@build_cpu@/, $(rpm_iterator))) +@BUILD_WIN32_FALSE@BUILD_SRPMS = $(foreach srpm_iterator,$(SRPMS),$(addprefix $(RPM_BUILDDIR)/SRPMS/, $(srpm_iterator))) +@BUILD_WIN32_FALSE@BUILD_RPM_DIR = $(RPM_BUILDDIR)/BUILD/@PACKAGE@-@VERSION@ +@BUILD_WIN32_FALSE@pkgconfigdir = $(libdir)/pkgconfig +@BUILD_WIN32_FALSE@pkgconfig_DATA = support/libmemcached.pc +@BUILD_WIN32_FALSE@TESTS_LDADDS = libmemcached/libmemcached.la \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedutil.la \ +@BUILD_WIN32_FALSE@ libtest/libtest.la + +# Cycle should always run first +@BUILD_WIN32_FALSE@tests_cycle_CFLAGS = $(AM_CFLAGS) $(NO_CONVERSION) $(NO_STRICT_ALIASING) +@BUILD_WIN32_FALSE@tests_cycle_CXXFLAGS = $(AM_CXXFLAGS) \ +@BUILD_WIN32_FALSE@ @PTHREAD_CFLAGS@ $(am__empty) +@BUILD_WIN32_FALSE@tests_cycle_SOURCES = tests/cycle.cc +@BUILD_WIN32_FALSE@tests_cycle_LDADD = $(TESTS_LDADDS) @PTHREAD_LIBS@ + +# Test internals +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@tests_libmemcached_1_0_internals_CXXFLAGS = \ +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@ $(AM_CXXFLAGS) \ +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@ @PTHREAD_CFLAGS@ \ +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@ $(am__empty) +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@tests_libmemcached_1_0_internals_LDADD = libmemcachedinternal/libmemcachedinternal.la \ +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@ @PTHREAD_LIBS@ \ +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@ libmemcachedinternal/libmemcachedutilinternal.la \ +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@ libtest/libtest.la +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@tests_libmemcached_1_0_internals_SOURCES = tests/libmemcached-1.0/internals.cc \ +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@ tests/libmemcached-1.0/string.cc +@BUILD_WIN32_FALSE@tests_libmemcached_1_0_testapp_CXXFLAGS = \ +@BUILD_WIN32_FALSE@ $(AM_CXXFLAGS) @PTHREAD_CFLAGS@ +@BUILD_WIN32_FALSE@tests_libmemcached_1_0_testapp_CFLAGS = \ +@BUILD_WIN32_FALSE@ $(AM_CFLAGS) $(NO_CONVERSION) \ +@BUILD_WIN32_FALSE@ $(NO_STRICT_ALIASING) +@BUILD_WIN32_FALSE@tests_libmemcached_1_0_testapp_SOURCES = \ +@BUILD_WIN32_FALSE@ clients/generator.cc clients/execute.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/all_tests.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/basic.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/callback_counter.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/callbacks.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/debug.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/deprecated.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/dump.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/encoding_key.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/error_conditions.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/exist.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/fetch_all_results.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/generate.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/haldenbrand.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/ketama.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/mem_functions.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/memcached_get.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/namespace.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/parser.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/pool.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/print.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/replication.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/server_add.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/setup_and_teardowns.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/stat.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/touch.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/virtual_buckets.cc +@BUILD_WIN32_FALSE@tests_libmemcached_1_0_testapp_LDADD = \ +@BUILD_WIN32_FALSE@ @LIBUUID_LIB@ @PTHREAD_LIBS@ \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached.la \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedutil.la \ +@BUILD_WIN32_FALSE@ libtest/libtest.la libhashkit/libhashkit.la +@BUILD_WIN32_FALSE@tests_libmemcached_1_0_testsocket_CXXFLAGS = \ +@BUILD_WIN32_FALSE@ @PTHREAD_CFLAGS@ $(AM_CXXFLAGS) +@BUILD_WIN32_FALSE@tests_libmemcached_1_0_testsocket_CFLAGS = \ +@BUILD_WIN32_FALSE@ $(AM_CFLAGS) $(NO_CONVERSION) \ +@BUILD_WIN32_FALSE@ $(NO_STRICT_ALIASING) +@BUILD_WIN32_FALSE@tests_libmemcached_1_0_testsocket_SOURCES = \ +@BUILD_WIN32_FALSE@ clients/execute.cc clients/generator.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/all_tests_socket.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/basic.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/callback_counter.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/callbacks.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/debug.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/deprecated.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/dump.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/encoding_key.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/error_conditions.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/exist.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/fetch_all_results.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/generate.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/haldenbrand.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/ketama.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/mem_functions.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/memcached_get.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/namespace.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/parser.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/pool.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/print.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/replication.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/server_add.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/setup_and_teardowns.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/stat.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/touch.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/virtual_buckets.cc +@BUILD_WIN32_FALSE@tests_libmemcached_1_0_testsocket_LDADD = \ +@BUILD_WIN32_FALSE@ @LIBUUID_LIB@ @PTHREAD_LIBS@ \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached.la \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedutil.la \ +@BUILD_WIN32_FALSE@ libtest/libtest.la libhashkit/libhashkit.la +@BUILD_WIN32_FALSE@tests_libmemcached_1_0_sasl_SOURCES = \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/basic.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/debug.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/deprecated.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/error_conditions.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/ketama.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/namespace.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/parser.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/pool.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/print.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/replication.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/sasl.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/virtual_buckets.cc \ +@BUILD_WIN32_FALSE@ clients/execute.cc clients/generator.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/callback_counter.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/fetch_all_results.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/generate.cc +@BUILD_WIN32_FALSE@tests_libmemcached_1_0_sasl_LDADD = @PTHREAD_LIBS@ \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcached.la \ +@BUILD_WIN32_FALSE@ libmemcached/libmemcachedutil.la \ +@BUILD_WIN32_FALSE@ libtest/libtest.la libhashkit/libhashkit.la +@BUILD_WIN32_FALSE@tests_libmemcached_1_0_sasl_CXXFLAGS = \ +@BUILD_WIN32_FALSE@ $(AM_CXXFLAGS) @PTHREAD_CFLAGS@ +@BUILD_WIN32_FALSE@tests_libmemcached_1_0_sasl_CFLAGS = $(AM_CFLAGS) \ +@BUILD_WIN32_FALSE@ $(NO_CONVERSION) $(NO_STRICT_ALIASING) +@BUILD_WIN32_FALSE@tests_atomsmasher_SOURCES = clients/execute.cc \ +@BUILD_WIN32_FALSE@ clients/generator.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/atomsmasher.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/callback_counter.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/debug.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/fetch_all_results.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/generate.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/print.cc +@BUILD_WIN32_FALSE@tests_atomsmasher_LDADD = $(TESTS_LDADDS) +@BUILD_WIN32_FALSE@tests_testudp_CFLAGS = $(AM_CFLAGS) \ +@BUILD_WIN32_FALSE@ $(NO_CONVERSION) $(NO_STRICT_ALIASING) +@BUILD_WIN32_FALSE@tests_testudp_SOURCES = clients/execute.cc \ +@BUILD_WIN32_FALSE@ clients/generator.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/callback_counter.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/fetch_all_results.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/generate.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/print.cc \ +@BUILD_WIN32_FALSE@ tests/mem_udp.cc +@BUILD_WIN32_FALSE@tests_testudp_LDADD = $(TESTS_LDADDS) +@BUILD_WIN32_FALSE@tests_testplus_SOURCES = clients/execute.cc \ +@BUILD_WIN32_FALSE@ clients/generator.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/callback_counter.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/fetch_all_results.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/generate.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/plus.cpp \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/print.cc +@BUILD_WIN32_FALSE@tests_testplus_CXXFLAGS = $(AM_CXXFLAGS) \ +@BUILD_WIN32_FALSE@ $(NO_EFF_CXX) +@BUILD_WIN32_FALSE@tests_testplus_LDADD = $(TESTS_LDADDS) +@BUILD_WIN32_FALSE@tests_parser_SOURCES = tests/parser.cc +@BUILD_WIN32_FALSE@tests_parser_CXXFLAGS = $(AM_CXXFLAGS) \ +@BUILD_WIN32_FALSE@ $(NO_EFF_CXX) +@BUILD_WIN32_FALSE@tests_parser_LDADD = $(TESTS_LDADDS) +@BUILD_WIN32_FALSE@tests_failure_SOURCES = tests/failure.cc \ +@BUILD_WIN32_FALSE@ clients/execute.cc clients/generator.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/callback_counter.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/fetch_all_results.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/generate.cc \ +@BUILD_WIN32_FALSE@ tests/libmemcached-1.0/print.cc +@BUILD_WIN32_FALSE@tests_failure_CXXFLAGS = $(AM_CXXFLAGS) +@BUILD_WIN32_FALSE@tests_failure_LDADD = $(TESTS_LDADDS) +@BUILD_WIN32_FALSE@tests_testhashkit_SOURCES = tests/hashkit_functions.cc +@BUILD_WIN32_FALSE@tests_testhashkit_LDADD = libtest/libtest.la libhashkit/libhashkit.la $(TESTS_LDADDS) +@BUILD_WIN32_FALSE@tests_hash_plus_SOURCES = tests/hash_plus.cc +@BUILD_WIN32_FALSE@tests_hash_plus_CXXFLAGS = $(AM_CXXFLAGS) $(NO_EFF_CXX) +@BUILD_WIN32_FALSE@tests_hash_plus_LDADD = $(tests_testhashkit_LDADD) +@BUILD_WIN32_FALSE@tests_memcapable_SOURCES = tests/memcapable.cc +@BUILD_WIN32_FALSE@tests_memcapable_CXXFLAGS = $(AM_CXXFLAGS) $(NO_EFF_CXX) +@BUILD_WIN32_FALSE@EXTRA_tests_memcapable_DEPENDENCIES = clients/memcapable +@BUILD_WIN32_FALSE@tests_memcapable_LDADD = libtest/libtest.la $(TESTS_LDADDS) +@BUILD_WIN32_FALSE@tests_memstat_SOURCES = tests/memstat.cc +@BUILD_WIN32_FALSE@tests_memstat_CXXFLAGS = $(AM_CXXFLAGS) $(NO_EFF_CXX) +@BUILD_WIN32_FALSE@EXTRA_tests_memstat_DEPENDENCIES = clients/memstat +@BUILD_WIN32_FALSE@tests_memstat_LDADD = libtest/libtest.la $(TESTS_LDADDS) +@BUILD_WIN32_FALSE@tests_memcp_SOURCES = tests/memcp.cc +@BUILD_WIN32_FALSE@tests_memcp_CXXFLAGS = $(AM_CXXFLAGS) $(NO_EFF_CXX) +@BUILD_WIN32_FALSE@EXTRA_tests_memcp_DEPENDENCIES = clients/memcp +@BUILD_WIN32_FALSE@tests_memcp_LDADD = libtest/libtest.la $(TESTS_LDADDS) +@BUILD_WIN32_FALSE@tests_memflush_SOURCES = tests/memflush.cc +@BUILD_WIN32_FALSE@tests_memflush_CXXFLAGS = $(AM_CXXFLAGS) $(NO_EFF_CXX) +@BUILD_WIN32_FALSE@EXTRA_tests_memflush_DEPENDENCIES = clients/memflush +@BUILD_WIN32_FALSE@tests_memflush_LDADD = libtest/libtest.la $(TESTS_LDADDS) +@BUILD_WIN32_FALSE@tests_memrm_SOURCES = tests/memrm.cc +@BUILD_WIN32_FALSE@tests_memrm_CXXFLAGS = $(AM_CXXFLAGS) $(NO_EFF_CXX) +@BUILD_WIN32_FALSE@EXTRA_tests_memrm_DEPENDENCIES = clients/memrm +@BUILD_WIN32_FALSE@tests_memrm_LDADD = libtest/libtest.la $(TESTS_LDADDS) +@BUILD_WIN32_FALSE@tests_memexist_SOURCES = tests/memexist.cc +@BUILD_WIN32_FALSE@tests_memexist_CXXFLAGS = $(AM_CXXFLAGS) $(NO_EFF_CXX) +@BUILD_WIN32_FALSE@EXTRA_tests_memexist_DEPENDENCIES = clients/memexist +@BUILD_WIN32_FALSE@tests_memexist_LDADD = libtest/libtest.la $(TESTS_LDADDS) +@BUILD_WIN32_FALSE@tests_memtouch_SOURCES = tests/memtouch.cc +@BUILD_WIN32_FALSE@tests_memtouch_CXXFLAGS = $(AM_CXXFLAGS) $(NO_EFF_CXX) +@BUILD_WIN32_FALSE@EXTRA_tests_memtouch_DEPENDENCIES = clients/memtouch +@BUILD_WIN32_FALSE@tests_memtouch_LDADD = libtest/libtest.la $(TESTS_LDADDS) +@BUILD_WIN32_FALSE@tests_memcat_SOURCES = tests/memcat.cc +@BUILD_WIN32_FALSE@tests_memcat_CXXFLAGS = $(AM_CXXFLAGS) $(NO_EFF_CXX) +@BUILD_WIN32_FALSE@EXTRA_tests_memcat_DEPENDENCIES = clients/memcat +@BUILD_WIN32_FALSE@tests_memcat_LDADD = libtest/libtest.la $(TESTS_LDADDS) +@BUILD_WIN32_FALSE@tests_memping_SOURCES = tests/memping.cc +@BUILD_WIN32_FALSE@tests_memping_CXXFLAGS = $(AM_CXXFLAGS) $(NO_EFF_CXX) +@BUILD_WIN32_FALSE@EXTRA_tests_memping_DEPENDENCIES = clients/memping +@BUILD_WIN32_FALSE@tests_memping_LDADD = libtest/libtest.la $(TESTS_LDADDS) +@BUILD_WIN32_FALSE@tests_memerror_SOURCES = tests/memerror.cc +@BUILD_WIN32_FALSE@tests_memerror_CXXFLAGS = $(AM_CXXFLAGS) $(NO_EFF_CXX) +@BUILD_WIN32_FALSE@EXTRA_tests_memerror_DEPENDENCIES = clients/memerror +@BUILD_WIN32_FALSE@tests_memerror_LDADD = libtest/libtest.la $(TESTS_LDADDS) +@BUILD_WIN32_FALSE@tests_memslap_SOURCES = tests/memslap.cc +@BUILD_WIN32_FALSE@tests_memslap_CXXFLAGS = $(AM_CXXFLAGS) $(NO_EFF_CXX) +@BUILD_WIN32_FALSE@EXTRA_tests_memslap_DEPENDENCIES = clients/memslap +@BUILD_WIN32_FALSE@tests_memslap_LDADD = libtest/libtest.la $(TESTS_LDADDS) +@BUILD_WIN32_FALSE@tests_memdump_SOURCES = tests/memdump.cc +@BUILD_WIN32_FALSE@tests_memdump_CXXFLAGS = $(AM_CXXFLAGS) $(NO_EFF_CXX) +@BUILD_WIN32_FALSE@EXTRA_tests_memdump_DEPENDENCIES = clients/memdump +@BUILD_WIN32_FALSE@tests_memdump_LDADD = libtest/libtest.la $(TESTS_LDADDS) +all: $(BUILT_SOURCES) mem_config.h + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .d .d .c .cc .cpp .lo .log .o .obj .test .test$(EXEEXT) .trs +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/libhashkit-1.0/include.am $(srcdir)/libhashkit/include.am $(srcdir)/libmemcached/include.am $(srcdir)/libmemcached/csl/include.am $(srcdir)/libmemcached-1.0/include.am $(srcdir)/libmemcached-1.0/struct/include.am $(srcdir)/libmemcached-1.0/types/include.am $(srcdir)/libmemcached-1.0/t/include.am $(srcdir)/libtest/include.am $(srcdir)/libhashkit-1.0/include.am $(srcdir)/libmemcached-1.0/include.am $(srcdir)/libmemcached-1.0/struct/include.am $(srcdir)/libmemcached-1.0/types/include.am $(srcdir)/libmemcached-1.0/t/include.am $(srcdir)/libmemcachedprotocol-0.0/include.am $(srcdir)/libmemcachedutil-1.0/include.am $(srcdir)/clients/include.am $(srcdir)/docs/include.am $(srcdir)/man/include.am $(srcdir)/example/include.am $(srcdir)/libhashkit/include.am $(srcdir)/libmemcached/include.am $(srcdir)/libmemcached/csl/include.am $(srcdir)/libmemcachedutil/include.am $(srcdir)/libmemcachedprotocol/include.am $(srcdir)/libmemcachedinternal/include.am $(srcdir)/libmemcachedinternal/util/include.am $(srcdir)/rpm/include.mk $(srcdir)/support/include.am $(srcdir)/tests/include.am $(srcdir)/tests/libmemcached-1.0/include.am $(srcdir)/tests/parser.am $(srcdir)/tests/cli.am $(srcdir)/util/include.am $(srcdir)/win32/include.am $(srcdir)/m4/include.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; +$(srcdir)/libhashkit-1.0/include.am $(srcdir)/libhashkit/include.am $(srcdir)/libmemcached/include.am $(srcdir)/libmemcached/csl/include.am $(srcdir)/libmemcached-1.0/include.am $(srcdir)/libmemcached-1.0/struct/include.am $(srcdir)/libmemcached-1.0/types/include.am $(srcdir)/libmemcached-1.0/t/include.am $(srcdir)/libtest/include.am $(srcdir)/libhashkit-1.0/include.am $(srcdir)/libmemcached-1.0/include.am $(srcdir)/libmemcached-1.0/struct/include.am $(srcdir)/libmemcached-1.0/types/include.am $(srcdir)/libmemcached-1.0/t/include.am $(srcdir)/libmemcachedprotocol-0.0/include.am $(srcdir)/libmemcachedutil-1.0/include.am $(srcdir)/clients/include.am $(srcdir)/docs/include.am $(srcdir)/man/include.am $(srcdir)/example/include.am $(srcdir)/libhashkit/include.am $(srcdir)/libmemcached/include.am $(srcdir)/libmemcached/csl/include.am $(srcdir)/libmemcachedutil/include.am $(srcdir)/libmemcachedprotocol/include.am $(srcdir)/libmemcachedinternal/include.am $(srcdir)/libmemcachedinternal/util/include.am $(srcdir)/rpm/include.mk $(srcdir)/support/include.am $(srcdir)/tests/include.am $(srcdir)/tests/libmemcached-1.0/include.am $(srcdir)/tests/parser.am $(srcdir)/tests/cli.am $(srcdir)/util/include.am $(srcdir)/win32/include.am $(srcdir)/m4/include.am: + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +mem_config.h: stamp-h1 + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi + +stamp-h1: $(srcdir)/mem_config.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status mem_config.h +$(srcdir)/mem_config.in: $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f mem_config.h stamp-h1 +libhashkit/hashkitcon.h: $(top_builddir)/config.status $(top_srcdir)/libhashkit/hashkitcon.h.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +libhashkit-1.0/configure.h: $(top_builddir)/config.status $(top_srcdir)/libhashkit-1.0/configure.h.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +libtest/version.h: $(top_builddir)/config.status $(top_srcdir)/libtest/version.h.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +libtest/yatlcon.h: $(top_builddir)/config.status $(top_srcdir)/libtest/yatlcon.h.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +docs/conf.py: $(top_builddir)/config.status $(top_srcdir)/docs/conf.py.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +libmemcached-1.0/configure.h: $(top_builddir)/config.status $(top_srcdir)/libmemcached-1.0/configure.h.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +support/libmemcached.pc: $(top_builddir)/config.status $(top_srcdir)/support/libmemcached.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +support/libmemcached.spec: $(top_builddir)/config.status $(top_srcdir)/support/libmemcached.spec.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + +clean-checkLTLIBRARIES: + -test -z "$(check_LTLIBRARIES)" || rm -f $(check_LTLIBRARIES) + @list='$(check_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } +clients/$(am__dirstamp): + @$(MKDIR_P) clients + @: > clients/$(am__dirstamp) +clients/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) clients/$(DEPDIR) + @: > clients/$(DEPDIR)/$(am__dirstamp) +clients/utilities.lo: clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) + +clients/libutilities.la: $(clients_libutilities_la_OBJECTS) $(clients_libutilities_la_DEPENDENCIES) $(EXTRA_clients_libutilities_la_DEPENDENCIES) clients/$(am__dirstamp) + $(AM_V_CXXLD)$(CXXLINK) $(am_clients_libutilities_la_rpath) $(clients_libutilities_la_OBJECTS) $(clients_libutilities_la_LIBADD) $(LIBS) +libhashkit/$(am__dirstamp): + @$(MKDIR_P) libhashkit + @: > libhashkit/$(am__dirstamp) +libhashkit/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) libhashkit/$(DEPDIR) + @: > libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkit_la-aes.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkit_la-algorithm.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkit_la-behavior.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkit_la-crc32.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkit_la-digest.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkit_la-encrypt.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkit_la-fnv_32.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkit_la-fnv_64.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkit_la-function.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkit_la-has.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkit_la-hashkit.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkit_la-jenkins.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkit_la-ketama.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkit_la-md5.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkit_la-murmur.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkit_la-murmur3.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkit_la-murmur3_api.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkit_la-one_at_a_time.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkit_la-rijndael.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkit_la-str_algorithm.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkit_la-strerror.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkit_la-string.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkit_la-hsieh.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkit_la-nohsieh.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) + +libhashkit/libhashkit.la: $(libhashkit_libhashkit_la_OBJECTS) $(libhashkit_libhashkit_la_DEPENDENCIES) $(EXTRA_libhashkit_libhashkit_la_DEPENDENCIES) libhashkit/$(am__dirstamp) + $(AM_V_CXXLD)$(libhashkit_libhashkit_la_LINK) $(am_libhashkit_libhashkit_la_rpath) $(libhashkit_libhashkit_la_OBJECTS) $(libhashkit_libhashkit_la_LIBADD) $(LIBS) +libhashkit/libhashkit_libhashkitinc_la-aes.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkitinc_la-algorithm.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkitinc_la-behavior.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkitinc_la-crc32.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkitinc_la-digest.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkitinc_la-encrypt.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkitinc_la-fnv_32.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkitinc_la-fnv_64.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkitinc_la-function.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkitinc_la-has.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkitinc_la-hashkit.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkitinc_la-jenkins.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkitinc_la-ketama.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkitinc_la-md5.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkitinc_la-murmur.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkitinc_la-murmur3.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkitinc_la-murmur3_api.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkitinc_la-one_at_a_time.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkitinc_la-rijndael.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkitinc_la-str_algorithm.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkitinc_la-strerror.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkitinc_la-string.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkitinc_la-hsieh.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libhashkit_libhashkitinc_la-nohsieh.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) + +libhashkit/libhashkitinc.la: $(libhashkit_libhashkitinc_la_OBJECTS) $(libhashkit_libhashkitinc_la_DEPENDENCIES) $(EXTRA_libhashkit_libhashkitinc_la_DEPENDENCIES) libhashkit/$(am__dirstamp) + $(AM_V_CXXLD)$(libhashkit_libhashkitinc_la_LINK) $(am_libhashkit_libhashkitinc_la_rpath) $(libhashkit_libhashkitinc_la_OBJECTS) $(libhashkit_libhashkitinc_la_LIBADD) $(LIBS) +libmemcached/csl/$(am__dirstamp): + @$(MKDIR_P) libmemcached/csl + @: > libmemcached/csl/$(am__dirstamp) +libmemcached/csl/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) libmemcached/csl/$(DEPDIR) + @: > libmemcached/csl/$(DEPDIR)/$(am__dirstamp) +libmemcached/csl/libmemcached_libmemcached_la-context.lo: \ + libmemcached/csl/$(am__dirstamp) \ + libmemcached/csl/$(DEPDIR)/$(am__dirstamp) +libmemcached/csl/libmemcached_libmemcached_la-parser.lo: \ + libmemcached/csl/$(am__dirstamp) \ + libmemcached/csl/$(DEPDIR)/$(am__dirstamp) +libmemcached/csl/libmemcached_libmemcached_la-scanner.lo: \ + libmemcached/csl/$(am__dirstamp) \ + libmemcached/csl/$(DEPDIR)/$(am__dirstamp) +libmemcached/$(am__dirstamp): + @$(MKDIR_P) libmemcached + @: > libmemcached/$(am__dirstamp) +libmemcached/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) libmemcached/$(DEPDIR) + @: > libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-instance.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcached_libmemcached_la-aes.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcached_libmemcached_la-algorithm.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcached_libmemcached_la-behavior.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcached_libmemcached_la-crc32.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcached_libmemcached_la-digest.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcached_libmemcached_la-encrypt.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcached_libmemcached_la-fnv_32.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcached_libmemcached_la-fnv_64.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcached_libmemcached_la-function.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcached_libmemcached_la-has.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcached_libmemcached_la-hashkit.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcached_libmemcached_la-jenkins.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcached_libmemcached_la-ketama.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcached_libmemcached_la-md5.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcached_libmemcached_la-murmur.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcached_libmemcached_la-murmur3.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcached_libmemcached_la-murmur3_api.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcached_libmemcached_la-one_at_a_time.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcached_libmemcached_la-rijndael.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcached_libmemcached_la-str_algorithm.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcached_libmemcached_la-strerror.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcached_libmemcached_la-string.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcached_libmemcached_la-hsieh.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcached_libmemcached_la-nohsieh.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-allocators.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-analyze.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-array.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-auto.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-backtrace.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-behavior.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-byteorder.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-callback.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-connect.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-delete.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-do.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-dump.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-error.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-exist.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-fetch.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-flag.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-flush.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-flush_buffers.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-get.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-hash.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-hosts.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-initialize_query.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-io.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-key.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-memcached.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-encoding_key.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-namespace.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-options.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-parse.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-poll.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-purge.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-quit.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-response.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-result.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-sasl.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-server.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-server_list.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-stats.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-storage.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-strerror.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-string.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-touch.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-udp.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-verbosity.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-version.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcached_libmemcached_la-virtual_bucket.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) + +libmemcached/libmemcached.la: $(libmemcached_libmemcached_la_OBJECTS) $(libmemcached_libmemcached_la_DEPENDENCIES) $(EXTRA_libmemcached_libmemcached_la_DEPENDENCIES) libmemcached/$(am__dirstamp) + $(AM_V_CXXLD)$(libmemcached_libmemcached_la_LINK) $(am_libmemcached_libmemcached_la_rpath) $(libmemcached_libmemcached_la_OBJECTS) $(libmemcached_libmemcached_la_LIBADD) $(LIBS) +libmemcached/libmemcached_libmemcachedprotocol_la-byteorder.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcachedprotocol/$(am__dirstamp): + @$(MKDIR_P) libmemcachedprotocol + @: > libmemcachedprotocol/$(am__dirstamp) +libmemcachedprotocol/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) libmemcachedprotocol/$(DEPDIR) + @: > libmemcachedprotocol/$(DEPDIR)/$(am__dirstamp) +libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-ascii_handler.lo: \ + libmemcachedprotocol/$(am__dirstamp) \ + libmemcachedprotocol/$(DEPDIR)/$(am__dirstamp) +libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-binary_handler.lo: \ + libmemcachedprotocol/$(am__dirstamp) \ + libmemcachedprotocol/$(DEPDIR)/$(am__dirstamp) +libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-cache.lo: \ + libmemcachedprotocol/$(am__dirstamp) \ + libmemcachedprotocol/$(DEPDIR)/$(am__dirstamp) +libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-handler.lo: \ + libmemcachedprotocol/$(am__dirstamp) \ + libmemcachedprotocol/$(DEPDIR)/$(am__dirstamp) +libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-pedantic.lo: \ + libmemcachedprotocol/$(am__dirstamp) \ + libmemcachedprotocol/$(DEPDIR)/$(am__dirstamp) + +libmemcached/libmemcachedprotocol.la: $(libmemcached_libmemcachedprotocol_la_OBJECTS) $(libmemcached_libmemcachedprotocol_la_DEPENDENCIES) $(EXTRA_libmemcached_libmemcachedprotocol_la_DEPENDENCIES) libmemcached/$(am__dirstamp) + $(AM_V_CXXLD)$(libmemcached_libmemcachedprotocol_la_LINK) $(am_libmemcached_libmemcachedprotocol_la_rpath) $(libmemcached_libmemcachedprotocol_la_OBJECTS) $(libmemcached_libmemcachedprotocol_la_LIBADD) $(LIBS) +libmemcached/libmemcached_libmemcachedutil_la-backtrace.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcachedutil/$(am__dirstamp): + @$(MKDIR_P) libmemcachedutil + @: > libmemcachedutil/$(am__dirstamp) +libmemcachedutil/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) libmemcachedutil/$(DEPDIR) + @: > libmemcachedutil/$(DEPDIR)/$(am__dirstamp) +libmemcachedutil/libmemcached_libmemcachedutil_la-flush.lo: \ + libmemcachedutil/$(am__dirstamp) \ + libmemcachedutil/$(DEPDIR)/$(am__dirstamp) +libmemcachedutil/libmemcached_libmemcachedutil_la-pid.lo: \ + libmemcachedutil/$(am__dirstamp) \ + libmemcachedutil/$(DEPDIR)/$(am__dirstamp) +libmemcachedutil/libmemcached_libmemcachedutil_la-ping.lo: \ + libmemcachedutil/$(am__dirstamp) \ + libmemcachedutil/$(DEPDIR)/$(am__dirstamp) +libmemcachedutil/libmemcached_libmemcachedutil_la-pool.lo: \ + libmemcachedutil/$(am__dirstamp) \ + libmemcachedutil/$(DEPDIR)/$(am__dirstamp) +libmemcachedutil/libmemcached_libmemcachedutil_la-version.lo: \ + libmemcachedutil/$(am__dirstamp) \ + libmemcachedutil/$(DEPDIR)/$(am__dirstamp) + +libmemcached/libmemcachedutil.la: $(libmemcached_libmemcachedutil_la_OBJECTS) $(libmemcached_libmemcachedutil_la_DEPENDENCIES) $(EXTRA_libmemcached_libmemcachedutil_la_DEPENDENCIES) libmemcached/$(am__dirstamp) + $(AM_V_CXXLD)$(libmemcached_libmemcachedutil_la_LINK) $(am_libmemcached_libmemcachedutil_la_rpath) $(libmemcached_libmemcachedutil_la_OBJECTS) $(libmemcached_libmemcachedutil_la_LIBADD) $(LIBS) +libmemcached/csl/libmemcachedinternal_libmemcachedinternal_la-context.lo: \ + libmemcached/csl/$(am__dirstamp) \ + libmemcached/csl/$(DEPDIR)/$(am__dirstamp) +libmemcached/csl/libmemcachedinternal_libmemcachedinternal_la-parser.lo: \ + libmemcached/csl/$(am__dirstamp) \ + libmemcached/csl/$(DEPDIR)/$(am__dirstamp) +libmemcached/csl/libmemcachedinternal_libmemcachedinternal_la-scanner.lo: \ + libmemcached/csl/$(am__dirstamp) \ + libmemcached/csl/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-instance.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcachedinternal_libmemcachedinternal_la-aes.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcachedinternal_libmemcachedinternal_la-algorithm.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcachedinternal_libmemcachedinternal_la-behavior.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcachedinternal_libmemcachedinternal_la-crc32.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcachedinternal_libmemcachedinternal_la-digest.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcachedinternal_libmemcachedinternal_la-encrypt.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcachedinternal_libmemcachedinternal_la-fnv_32.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcachedinternal_libmemcachedinternal_la-fnv_64.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcachedinternal_libmemcachedinternal_la-function.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcachedinternal_libmemcachedinternal_la-has.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcachedinternal_libmemcachedinternal_la-hashkit.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcachedinternal_libmemcachedinternal_la-jenkins.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcachedinternal_libmemcachedinternal_la-ketama.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcachedinternal_libmemcachedinternal_la-md5.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcachedinternal_libmemcachedinternal_la-murmur.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcachedinternal_libmemcachedinternal_la-murmur3.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcachedinternal_libmemcachedinternal_la-murmur3_api.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcachedinternal_libmemcachedinternal_la-one_at_a_time.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcachedinternal_libmemcachedinternal_la-rijndael.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcachedinternal_libmemcachedinternal_la-str_algorithm.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcachedinternal_libmemcachedinternal_la-strerror.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcachedinternal_libmemcachedinternal_la-string.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcachedinternal_libmemcachedinternal_la-hsieh.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libhashkit/libmemcachedinternal_libmemcachedinternal_la-nohsieh.lo: \ + libhashkit/$(am__dirstamp) \ + libhashkit/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-allocators.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-analyze.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-array.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-auto.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-backtrace.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-behavior.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-byteorder.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-callback.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-connect.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-delete.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-do.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-dump.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-error.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-exist.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-fetch.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-flag.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-flush.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-flush_buffers.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-get.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-hash.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-hosts.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-initialize_query.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-io.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-key.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-memcached.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-encoding_key.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-namespace.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-options.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-parse.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-poll.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-purge.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-quit.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-response.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-result.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-sasl.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-server.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-server_list.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-stats.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-storage.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-strerror.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-string.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-touch.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-udp.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-verbosity.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-version.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcached/libmemcachedinternal_libmemcachedinternal_la-virtual_bucket.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcachedinternal/$(am__dirstamp): + @$(MKDIR_P) libmemcachedinternal + @: > libmemcachedinternal/$(am__dirstamp) + +libmemcachedinternal/libmemcachedinternal.la: $(libmemcachedinternal_libmemcachedinternal_la_OBJECTS) $(libmemcachedinternal_libmemcachedinternal_la_DEPENDENCIES) $(EXTRA_libmemcachedinternal_libmemcachedinternal_la_DEPENDENCIES) libmemcachedinternal/$(am__dirstamp) + $(AM_V_CXXLD)$(libmemcachedinternal_libmemcachedinternal_la_LINK) $(am_libmemcachedinternal_libmemcachedinternal_la_rpath) $(libmemcachedinternal_libmemcachedinternal_la_OBJECTS) $(libmemcachedinternal_libmemcachedinternal_la_LIBADD) $(LIBS) +libmemcached/libmemcachedinternal_libmemcachedutilinternal_la-backtrace.lo: \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) +libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-flush.lo: \ + libmemcachedutil/$(am__dirstamp) \ + libmemcachedutil/$(DEPDIR)/$(am__dirstamp) +libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-pid.lo: \ + libmemcachedutil/$(am__dirstamp) \ + libmemcachedutil/$(DEPDIR)/$(am__dirstamp) +libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-ping.lo: \ + libmemcachedutil/$(am__dirstamp) \ + libmemcachedutil/$(DEPDIR)/$(am__dirstamp) +libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-pool.lo: \ + libmemcachedutil/$(am__dirstamp) \ + libmemcachedutil/$(DEPDIR)/$(am__dirstamp) +libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-version.lo: \ + libmemcachedutil/$(am__dirstamp) \ + libmemcachedutil/$(DEPDIR)/$(am__dirstamp) + +libmemcachedinternal/libmemcachedutilinternal.la: $(libmemcachedinternal_libmemcachedutilinternal_la_OBJECTS) $(libmemcachedinternal_libmemcachedutilinternal_la_DEPENDENCIES) $(EXTRA_libmemcachedinternal_libmemcachedutilinternal_la_DEPENDENCIES) libmemcachedinternal/$(am__dirstamp) + $(AM_V_CXXLD)$(libmemcachedinternal_libmemcachedutilinternal_la_LINK) $(am_libmemcachedinternal_libmemcachedutilinternal_la_rpath) $(libmemcachedinternal_libmemcachedutilinternal_la_OBJECTS) $(libmemcachedinternal_libmemcachedutilinternal_la_LIBADD) $(LIBS) +libtest/$(am__dirstamp): + @$(MKDIR_P) libtest + @: > libtest/$(am__dirstamp) +libtest/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) libtest/$(DEPDIR) + @: > libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-alarm.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-binaries.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-cmdline.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-collection.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-comparison.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-core.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-cpu.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-dns.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-dream.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-drizzled.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-exception.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/exception/$(am__dirstamp): + @$(MKDIR_P) libtest/exception + @: > libtest/exception/$(am__dirstamp) +libtest/exception/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) libtest/exception/$(DEPDIR) + @: > libtest/exception/$(DEPDIR)/$(am__dirstamp) +libtest/exception/libtest_libtest_la-fatal.lo: \ + libtest/exception/$(am__dirstamp) \ + libtest/exception/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-formatter.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-client.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-framework.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-has.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-http.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-is_local.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-killpid.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-libtool.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-main.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-port.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-result.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-runner.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-server.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-server_container.lo: \ + libtest/$(am__dirstamp) libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-signal.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-socket.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-strerror.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-timer.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-tmpfile.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-vchar.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-memcached.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-gearmand.lo: libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/libtest_libtest_la-blobslap_worker.lo: \ + libtest/$(am__dirstamp) libtest/$(DEPDIR)/$(am__dirstamp) + +libtest/libtest.la: $(libtest_libtest_la_OBJECTS) $(libtest_libtest_la_DEPENDENCIES) $(EXTRA_libtest_libtest_la_DEPENDENCIES) libtest/$(am__dirstamp) + $(AM_V_CXXLD)$(libtest_libtest_la_LINK) $(am_libtest_libtest_la_rpath) $(libtest_libtest_la_OBJECTS) $(libtest_libtest_la_LIBADD) $(LIBS) +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +clean-checkPROGRAMS: + @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list +clients/memaslap.$(OBJEXT): clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) +clients/ms_conn.$(OBJEXT): clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) +clients/ms_setting.$(OBJEXT): clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) +clients/ms_sigsegv.$(OBJEXT): clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) +clients/ms_stats.$(OBJEXT): clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) +clients/ms_task.$(OBJEXT): clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) +clients/ms_thread.$(OBJEXT): clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) +clients/generator.$(OBJEXT): clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) +clients/execute.$(OBJEXT): clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) + +clients/memaslap$(EXEEXT): $(clients_memaslap_OBJECTS) $(clients_memaslap_DEPENDENCIES) $(EXTRA_clients_memaslap_DEPENDENCIES) clients/$(am__dirstamp) + @rm -f clients/memaslap$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(clients_memaslap_OBJECTS) $(clients_memaslap_LDADD) $(LIBS) +clients/clients_memcapable-memcapable.$(OBJEXT): \ + clients/$(am__dirstamp) clients/$(DEPDIR)/$(am__dirstamp) +libmemcached/clients_memcapable-byteorder.$(OBJEXT): \ + libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) + +clients/memcapable$(EXEEXT): $(clients_memcapable_OBJECTS) $(clients_memcapable_DEPENDENCIES) $(EXTRA_clients_memcapable_DEPENDENCIES) clients/$(am__dirstamp) + @rm -f clients/memcapable$(EXEEXT) + $(AM_V_CXXLD)$(clients_memcapable_LINK) $(clients_memcapable_OBJECTS) $(clients_memcapable_LDADD) $(LIBS) +clients/memcat.$(OBJEXT): clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) + +clients/memcat$(EXEEXT): $(clients_memcat_OBJECTS) $(clients_memcat_DEPENDENCIES) $(EXTRA_clients_memcat_DEPENDENCIES) clients/$(am__dirstamp) + @rm -f clients/memcat$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(clients_memcat_OBJECTS) $(clients_memcat_LDADD) $(LIBS) +clients/memcp.$(OBJEXT): clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) + +clients/memcp$(EXEEXT): $(clients_memcp_OBJECTS) $(clients_memcp_DEPENDENCIES) $(EXTRA_clients_memcp_DEPENDENCIES) clients/$(am__dirstamp) + @rm -f clients/memcp$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(clients_memcp_OBJECTS) $(clients_memcp_LDADD) $(LIBS) +clients/memdump.$(OBJEXT): clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) + +clients/memdump$(EXEEXT): $(clients_memdump_OBJECTS) $(clients_memdump_DEPENDENCIES) $(EXTRA_clients_memdump_DEPENDENCIES) clients/$(am__dirstamp) + @rm -f clients/memdump$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(clients_memdump_OBJECTS) $(clients_memdump_LDADD) $(LIBS) +clients/memerror.$(OBJEXT): clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) + +clients/memerror$(EXEEXT): $(clients_memerror_OBJECTS) $(clients_memerror_DEPENDENCIES) $(EXTRA_clients_memerror_DEPENDENCIES) clients/$(am__dirstamp) + @rm -f clients/memerror$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(clients_memerror_OBJECTS) $(clients_memerror_LDADD) $(LIBS) +clients/memexist.$(OBJEXT): clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) + +clients/memexist$(EXEEXT): $(clients_memexist_OBJECTS) $(clients_memexist_DEPENDENCIES) $(EXTRA_clients_memexist_DEPENDENCIES) clients/$(am__dirstamp) + @rm -f clients/memexist$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(clients_memexist_OBJECTS) $(clients_memexist_LDADD) $(LIBS) +clients/memflush.$(OBJEXT): clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) + +clients/memflush$(EXEEXT): $(clients_memflush_OBJECTS) $(clients_memflush_DEPENDENCIES) $(EXTRA_clients_memflush_DEPENDENCIES) clients/$(am__dirstamp) + @rm -f clients/memflush$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(clients_memflush_OBJECTS) $(clients_memflush_LDADD) $(LIBS) +clients/memparse.$(OBJEXT): clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) + +clients/memparse$(EXEEXT): $(clients_memparse_OBJECTS) $(clients_memparse_DEPENDENCIES) $(EXTRA_clients_memparse_DEPENDENCIES) clients/$(am__dirstamp) + @rm -f clients/memparse$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(clients_memparse_OBJECTS) $(clients_memparse_LDADD) $(LIBS) +clients/memping.$(OBJEXT): clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) + +clients/memping$(EXEEXT): $(clients_memping_OBJECTS) $(clients_memping_DEPENDENCIES) $(EXTRA_clients_memping_DEPENDENCIES) clients/$(am__dirstamp) + @rm -f clients/memping$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(clients_memping_OBJECTS) $(clients_memping_LDADD) $(LIBS) +clients/memrm.$(OBJEXT): clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) + +clients/memrm$(EXEEXT): $(clients_memrm_OBJECTS) $(clients_memrm_DEPENDENCIES) $(EXTRA_clients_memrm_DEPENDENCIES) clients/$(am__dirstamp) + @rm -f clients/memrm$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(clients_memrm_OBJECTS) $(clients_memrm_LDADD) $(LIBS) +clients/clients_memslap-memslap.$(OBJEXT): clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) +clients/clients_memslap-generator.$(OBJEXT): clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) +clients/clients_memslap-execute.$(OBJEXT): clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) + +clients/memslap$(EXEEXT): $(clients_memslap_OBJECTS) $(clients_memslap_DEPENDENCIES) $(EXTRA_clients_memslap_DEPENDENCIES) clients/$(am__dirstamp) + @rm -f clients/memslap$(EXEEXT) + $(AM_V_CXXLD)$(clients_memslap_LINK) $(clients_memslap_OBJECTS) $(clients_memslap_LDADD) $(LIBS) +clients/memstat.$(OBJEXT): clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) + +clients/memstat$(EXEEXT): $(clients_memstat_OBJECTS) $(clients_memstat_DEPENDENCIES) $(EXTRA_clients_memstat_DEPENDENCIES) clients/$(am__dirstamp) + @rm -f clients/memstat$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(clients_memstat_OBJECTS) $(clients_memstat_LDADD) $(LIBS) +clients/memtouch.$(OBJEXT): clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) + +clients/memtouch$(EXEEXT): $(clients_memtouch_OBJECTS) $(clients_memtouch_DEPENDENCIES) $(EXTRA_clients_memtouch_DEPENDENCIES) clients/$(am__dirstamp) + @rm -f clients/memtouch$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(clients_memtouch_OBJECTS) $(clients_memtouch_LDADD) $(LIBS) +example/$(am__dirstamp): + @$(MKDIR_P) example + @: > example/$(am__dirstamp) +example/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) example/$(DEPDIR) + @: > example/$(DEPDIR)/$(am__dirstamp) +example/byteorder.$(OBJEXT): example/$(am__dirstamp) \ + example/$(DEPDIR)/$(am__dirstamp) +example/interface_v0.$(OBJEXT): example/$(am__dirstamp) \ + example/$(DEPDIR)/$(am__dirstamp) +example/interface_v1.$(OBJEXT): example/$(am__dirstamp) \ + example/$(DEPDIR)/$(am__dirstamp) +example/memcached_light.$(OBJEXT): example/$(am__dirstamp) \ + example/$(DEPDIR)/$(am__dirstamp) +example/storage.$(OBJEXT): example/$(am__dirstamp) \ + example/$(DEPDIR)/$(am__dirstamp) +util/$(am__dirstamp): + @$(MKDIR_P) util + @: > util/$(am__dirstamp) +util/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) util/$(DEPDIR) + @: > util/$(DEPDIR)/$(am__dirstamp) +util/daemon.$(OBJEXT): util/$(am__dirstamp) \ + util/$(DEPDIR)/$(am__dirstamp) +util/pidfile.$(OBJEXT): util/$(am__dirstamp) \ + util/$(DEPDIR)/$(am__dirstamp) + +example/memcached_light$(EXEEXT): $(example_memcached_light_OBJECTS) $(example_memcached_light_DEPENDENCIES) $(EXTRA_example_memcached_light_DEPENDENCIES) example/$(am__dirstamp) + @rm -f example/memcached_light$(EXEEXT) + $(AM_V_CXXLD)$(example_memcached_light_LINK) $(example_memcached_light_OBJECTS) $(example_memcached_light_LDADD) $(LIBS) +libmemcached-1.0/t/$(am__dirstamp): + @$(MKDIR_P) libmemcached-1.0/t + @: > libmemcached-1.0/t/$(am__dirstamp) +libmemcached-1.0/t/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) libmemcached-1.0/t/$(DEPDIR) + @: > libmemcached-1.0/t/$(DEPDIR)/$(am__dirstamp) +libmemcached-1.0/t/c_sasl_test.$(OBJEXT): \ + libmemcached-1.0/t/$(am__dirstamp) \ + libmemcached-1.0/t/$(DEPDIR)/$(am__dirstamp) + +libmemcached-1.0/t/c_sasl_test$(EXEEXT): $(libmemcached_1_0_t_c_sasl_test_OBJECTS) $(libmemcached_1_0_t_c_sasl_test_DEPENDENCIES) $(EXTRA_libmemcached_1_0_t_c_sasl_test_DEPENDENCIES) libmemcached-1.0/t/$(am__dirstamp) + @rm -f libmemcached-1.0/t/c_sasl_test$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(libmemcached_1_0_t_c_sasl_test_OBJECTS) $(libmemcached_1_0_t_c_sasl_test_LDADD) $(LIBS) +libmemcached-1.0/t/c_test.$(OBJEXT): \ + libmemcached-1.0/t/$(am__dirstamp) \ + libmemcached-1.0/t/$(DEPDIR)/$(am__dirstamp) + +libmemcached-1.0/t/c_test$(EXEEXT): $(libmemcached_1_0_t_c_test_OBJECTS) $(libmemcached_1_0_t_c_test_DEPENDENCIES) $(EXTRA_libmemcached_1_0_t_c_test_DEPENDENCIES) libmemcached-1.0/t/$(am__dirstamp) + @rm -f libmemcached-1.0/t/c_test$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(libmemcached_1_0_t_c_test_OBJECTS) $(libmemcached_1_0_t_c_test_LDADD) $(LIBS) +libmemcached-1.0/t/cc_test.$(OBJEXT): \ + libmemcached-1.0/t/$(am__dirstamp) \ + libmemcached-1.0/t/$(DEPDIR)/$(am__dirstamp) + +libmemcached-1.0/t/cc_test$(EXEEXT): $(libmemcached_1_0_t_cc_test_OBJECTS) $(libmemcached_1_0_t_cc_test_DEPENDENCIES) $(EXTRA_libmemcached_1_0_t_cc_test_DEPENDENCIES) libmemcached-1.0/t/$(am__dirstamp) + @rm -f libmemcached-1.0/t/cc_test$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(libmemcached_1_0_t_cc_test_OBJECTS) $(libmemcached_1_0_t_cc_test_LDADD) $(LIBS) +libtest/abort.$(OBJEXT): libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) + +libtest/abort$(EXEEXT): $(libtest_abort_OBJECTS) $(libtest_abort_DEPENDENCIES) $(EXTRA_libtest_abort_DEPENDENCIES) libtest/$(am__dirstamp) + @rm -f libtest/abort$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(libtest_abort_OBJECTS) $(libtest_abort_LDADD) $(LIBS) +libtest/backtrace_test.$(OBJEXT): libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libmemcached/backtrace.$(OBJEXT): libmemcached/$(am__dirstamp) \ + libmemcached/$(DEPDIR)/$(am__dirstamp) + +libtest/backtrace$(EXEEXT): $(libtest_backtrace_OBJECTS) $(libtest_backtrace_DEPENDENCIES) $(EXTRA_libtest_backtrace_DEPENDENCIES) libtest/$(am__dirstamp) + @rm -f libtest/backtrace$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(libtest_backtrace_OBJECTS) $(libtest_backtrace_LDADD) $(LIBS) +libtest/cpu.$(OBJEXT): libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/core_count.$(OBJEXT): libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) + +libtest/core-count$(EXEEXT): $(libtest_core_count_OBJECTS) $(libtest_core_count_DEPENDENCIES) $(EXTRA_libtest_core_count_DEPENDENCIES) libtest/$(am__dirstamp) + @rm -f libtest/core-count$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(libtest_core_count_OBJECTS) $(libtest_core_count_LDADD) $(LIBS) +libtest/skiptest.$(OBJEXT): libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) + +libtest/skiptest$(EXEEXT): $(libtest_skiptest_OBJECTS) $(libtest_skiptest_DEPENDENCIES) $(EXTRA_libtest_skiptest_DEPENDENCIES) libtest/$(am__dirstamp) + @rm -f libtest/skiptest$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(libtest_skiptest_OBJECTS) $(libtest_skiptest_LDADD) $(LIBS) +libtest/libtest_unittest-unittest.$(OBJEXT): libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) + +libtest/unittest$(EXEEXT): $(libtest_unittest_OBJECTS) $(libtest_unittest_DEPENDENCIES) $(EXTRA_libtest_unittest_DEPENDENCIES) libtest/$(am__dirstamp) + @rm -f libtest/unittest$(EXEEXT) + $(AM_V_CXXLD)$(libtest_unittest_LINK) $(libtest_unittest_OBJECTS) $(libtest_unittest_LDADD) $(LIBS) +libtest/wait.$(OBJEXT): libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) +libtest/dream.$(OBJEXT): libtest/$(am__dirstamp) \ + libtest/$(DEPDIR)/$(am__dirstamp) + +libtest/wait$(EXEEXT): $(libtest_wait_OBJECTS) $(libtest_wait_DEPENDENCIES) $(EXTRA_libtest_wait_DEPENDENCIES) libtest/$(am__dirstamp) + @rm -f libtest/wait$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(libtest_wait_OBJECTS) $(libtest_wait_LDADD) $(LIBS) +tests/libmemcached-1.0/$(am__dirstamp): + @$(MKDIR_P) tests/libmemcached-1.0 + @: > tests/libmemcached-1.0/$(am__dirstamp) +tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) tests/libmemcached-1.0/$(DEPDIR) + @: > tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/atomsmasher.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/callback_counter.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/debug.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/fetch_all_results.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/generate.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/print.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/$(am__dirstamp): + @$(MKDIR_P) tests + @: > tests/$(am__dirstamp) + +tests/atomsmasher$(EXEEXT): $(tests_atomsmasher_OBJECTS) $(tests_atomsmasher_DEPENDENCIES) $(EXTRA_tests_atomsmasher_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/atomsmasher$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tests_atomsmasher_OBJECTS) $(tests_atomsmasher_LDADD) $(LIBS) +tests/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) tests/$(DEPDIR) + @: > tests/$(DEPDIR)/$(am__dirstamp) +tests/tests_cycle-cycle.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) + +tests/cycle$(EXEEXT): $(tests_cycle_OBJECTS) $(tests_cycle_DEPENDENCIES) $(EXTRA_tests_cycle_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/cycle$(EXEEXT) + $(AM_V_CXXLD)$(tests_cycle_LINK) $(tests_cycle_OBJECTS) $(tests_cycle_LDADD) $(LIBS) +tests/tests_failure-failure.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) +clients/tests_failure-execute.$(OBJEXT): clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) +clients/tests_failure-generator.$(OBJEXT): clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_failure-callback_counter.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_failure-fetch_all_results.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_failure-generate.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_failure-print.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) + +tests/failure$(EXEEXT): $(tests_failure_OBJECTS) $(tests_failure_DEPENDENCIES) $(EXTRA_tests_failure_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/failure$(EXEEXT) + $(AM_V_CXXLD)$(tests_failure_LINK) $(tests_failure_OBJECTS) $(tests_failure_LDADD) $(LIBS) +tests/tests_hash_plus-hash_plus.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) + +tests/hash_plus$(EXEEXT): $(tests_hash_plus_OBJECTS) $(tests_hash_plus_DEPENDENCIES) $(EXTRA_tests_hash_plus_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/hash_plus$(EXEEXT) + $(AM_V_CXXLD)$(tests_hash_plus_LINK) $(tests_hash_plus_OBJECTS) $(tests_hash_plus_LDADD) $(LIBS) +tests/libmemcached-1.0/tests_libmemcached_1_0_internals-internals.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_internals-string.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) + +tests/libmemcached-1.0/internals$(EXEEXT): $(tests_libmemcached_1_0_internals_OBJECTS) $(tests_libmemcached_1_0_internals_DEPENDENCIES) $(EXTRA_tests_libmemcached_1_0_internals_DEPENDENCIES) tests/libmemcached-1.0/$(am__dirstamp) + @rm -f tests/libmemcached-1.0/internals$(EXEEXT) + $(AM_V_CXXLD)$(tests_libmemcached_1_0_internals_LINK) $(tests_libmemcached_1_0_internals_OBJECTS) $(tests_libmemcached_1_0_internals_LDADD) $(LIBS) +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-basic.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-debug.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-deprecated.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-error_conditions.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-ketama.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-namespace.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-parser.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-pool.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-print.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-replication.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-sasl.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-virtual_buckets.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +clients/tests_libmemcached_1_0_sasl-execute.$(OBJEXT): \ + clients/$(am__dirstamp) clients/$(DEPDIR)/$(am__dirstamp) +clients/tests_libmemcached_1_0_sasl-generator.$(OBJEXT): \ + clients/$(am__dirstamp) clients/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-callback_counter.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-fetch_all_results.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-generate.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) + +tests/libmemcached-1.0/sasl$(EXEEXT): $(tests_libmemcached_1_0_sasl_OBJECTS) $(tests_libmemcached_1_0_sasl_DEPENDENCIES) $(EXTRA_tests_libmemcached_1_0_sasl_DEPENDENCIES) tests/libmemcached-1.0/$(am__dirstamp) + @rm -f tests/libmemcached-1.0/sasl$(EXEEXT) + $(AM_V_CXXLD)$(tests_libmemcached_1_0_sasl_LINK) $(tests_libmemcached_1_0_sasl_OBJECTS) $(tests_libmemcached_1_0_sasl_LDADD) $(LIBS) +clients/tests_libmemcached_1_0_testapp-generator.$(OBJEXT): \ + clients/$(am__dirstamp) clients/$(DEPDIR)/$(am__dirstamp) +clients/tests_libmemcached_1_0_testapp-execute.$(OBJEXT): \ + clients/$(am__dirstamp) clients/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-all_tests.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-basic.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-callback_counter.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-callbacks.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-debug.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-deprecated.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-dump.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-encoding_key.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-error_conditions.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-exist.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-fetch_all_results.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-generate.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-haldenbrand.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-ketama.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-mem_functions.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-memcached_get.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-namespace.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-parser.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-pool.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-print.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-replication.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-server_add.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-setup_and_teardowns.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-stat.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-touch.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-virtual_buckets.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) + +tests/libmemcached-1.0/testapp$(EXEEXT): $(tests_libmemcached_1_0_testapp_OBJECTS) $(tests_libmemcached_1_0_testapp_DEPENDENCIES) $(EXTRA_tests_libmemcached_1_0_testapp_DEPENDENCIES) tests/libmemcached-1.0/$(am__dirstamp) + @rm -f tests/libmemcached-1.0/testapp$(EXEEXT) + $(AM_V_CXXLD)$(tests_libmemcached_1_0_testapp_LINK) $(tests_libmemcached_1_0_testapp_OBJECTS) $(tests_libmemcached_1_0_testapp_LDADD) $(LIBS) +clients/tests_libmemcached_1_0_testsocket-execute.$(OBJEXT): \ + clients/$(am__dirstamp) clients/$(DEPDIR)/$(am__dirstamp) +clients/tests_libmemcached_1_0_testsocket-generator.$(OBJEXT): \ + clients/$(am__dirstamp) clients/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-all_tests_socket.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-basic.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-callback_counter.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-callbacks.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-debug.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-deprecated.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-dump.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-encoding_key.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-error_conditions.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-exist.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-fetch_all_results.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-generate.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-haldenbrand.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-ketama.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-mem_functions.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-memcached_get.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-namespace.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-parser.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-pool.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-print.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-replication.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-server_add.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-setup_and_teardowns.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-stat.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-touch.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-virtual_buckets.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) + +tests/libmemcached-1.0/testsocket$(EXEEXT): $(tests_libmemcached_1_0_testsocket_OBJECTS) $(tests_libmemcached_1_0_testsocket_DEPENDENCIES) $(EXTRA_tests_libmemcached_1_0_testsocket_DEPENDENCIES) tests/libmemcached-1.0/$(am__dirstamp) + @rm -f tests/libmemcached-1.0/testsocket$(EXEEXT) + $(AM_V_CXXLD)$(tests_libmemcached_1_0_testsocket_LINK) $(tests_libmemcached_1_0_testsocket_OBJECTS) $(tests_libmemcached_1_0_testsocket_LDADD) $(LIBS) +tests/tests_memcapable-memcapable.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) + +tests/memcapable$(EXEEXT): $(tests_memcapable_OBJECTS) $(tests_memcapable_DEPENDENCIES) $(EXTRA_tests_memcapable_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/memcapable$(EXEEXT) + $(AM_V_CXXLD)$(tests_memcapable_LINK) $(tests_memcapable_OBJECTS) $(tests_memcapable_LDADD) $(LIBS) +tests/tests_memcat-memcat.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) + +tests/memcat$(EXEEXT): $(tests_memcat_OBJECTS) $(tests_memcat_DEPENDENCIES) $(EXTRA_tests_memcat_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/memcat$(EXEEXT) + $(AM_V_CXXLD)$(tests_memcat_LINK) $(tests_memcat_OBJECTS) $(tests_memcat_LDADD) $(LIBS) +tests/tests_memcp-memcp.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) + +tests/memcp$(EXEEXT): $(tests_memcp_OBJECTS) $(tests_memcp_DEPENDENCIES) $(EXTRA_tests_memcp_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/memcp$(EXEEXT) + $(AM_V_CXXLD)$(tests_memcp_LINK) $(tests_memcp_OBJECTS) $(tests_memcp_LDADD) $(LIBS) +tests/tests_memdump-memdump.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) + +tests/memdump$(EXEEXT): $(tests_memdump_OBJECTS) $(tests_memdump_DEPENDENCIES) $(EXTRA_tests_memdump_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/memdump$(EXEEXT) + $(AM_V_CXXLD)$(tests_memdump_LINK) $(tests_memdump_OBJECTS) $(tests_memdump_LDADD) $(LIBS) +tests/tests_memerror-memerror.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) + +tests/memerror$(EXEEXT): $(tests_memerror_OBJECTS) $(tests_memerror_DEPENDENCIES) $(EXTRA_tests_memerror_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/memerror$(EXEEXT) + $(AM_V_CXXLD)$(tests_memerror_LINK) $(tests_memerror_OBJECTS) $(tests_memerror_LDADD) $(LIBS) +tests/tests_memexist-memexist.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) + +tests/memexist$(EXEEXT): $(tests_memexist_OBJECTS) $(tests_memexist_DEPENDENCIES) $(EXTRA_tests_memexist_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/memexist$(EXEEXT) + $(AM_V_CXXLD)$(tests_memexist_LINK) $(tests_memexist_OBJECTS) $(tests_memexist_LDADD) $(LIBS) +tests/tests_memflush-memflush.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) + +tests/memflush$(EXEEXT): $(tests_memflush_OBJECTS) $(tests_memflush_DEPENDENCIES) $(EXTRA_tests_memflush_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/memflush$(EXEEXT) + $(AM_V_CXXLD)$(tests_memflush_LINK) $(tests_memflush_OBJECTS) $(tests_memflush_LDADD) $(LIBS) +tests/tests_memping-memping.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) + +tests/memping$(EXEEXT): $(tests_memping_OBJECTS) $(tests_memping_DEPENDENCIES) $(EXTRA_tests_memping_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/memping$(EXEEXT) + $(AM_V_CXXLD)$(tests_memping_LINK) $(tests_memping_OBJECTS) $(tests_memping_LDADD) $(LIBS) +tests/tests_memrm-memrm.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) + +tests/memrm$(EXEEXT): $(tests_memrm_OBJECTS) $(tests_memrm_DEPENDENCIES) $(EXTRA_tests_memrm_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/memrm$(EXEEXT) + $(AM_V_CXXLD)$(tests_memrm_LINK) $(tests_memrm_OBJECTS) $(tests_memrm_LDADD) $(LIBS) +tests/tests_memslap-memslap.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) + +tests/memslap$(EXEEXT): $(tests_memslap_OBJECTS) $(tests_memslap_DEPENDENCIES) $(EXTRA_tests_memslap_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/memslap$(EXEEXT) + $(AM_V_CXXLD)$(tests_memslap_LINK) $(tests_memslap_OBJECTS) $(tests_memslap_LDADD) $(LIBS) +tests/tests_memstat-memstat.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) + +tests/memstat$(EXEEXT): $(tests_memstat_OBJECTS) $(tests_memstat_DEPENDENCIES) $(EXTRA_tests_memstat_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/memstat$(EXEEXT) + $(AM_V_CXXLD)$(tests_memstat_LINK) $(tests_memstat_OBJECTS) $(tests_memstat_LDADD) $(LIBS) +tests/tests_memtouch-memtouch.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) + +tests/memtouch$(EXEEXT): $(tests_memtouch_OBJECTS) $(tests_memtouch_DEPENDENCIES) $(EXTRA_tests_memtouch_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/memtouch$(EXEEXT) + $(AM_V_CXXLD)$(tests_memtouch_LINK) $(tests_memtouch_OBJECTS) $(tests_memtouch_LDADD) $(LIBS) +tests/tests_parser-parser.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) + +tests/parser$(EXEEXT): $(tests_parser_OBJECTS) $(tests_parser_DEPENDENCIES) $(EXTRA_tests_parser_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/parser$(EXEEXT) + $(AM_V_CXXLD)$(tests_parser_LINK) $(tests_parser_OBJECTS) $(tests_parser_LDADD) $(LIBS) +tests/hashkit_functions.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) + +tests/testhashkit$(EXEEXT): $(tests_testhashkit_OBJECTS) $(tests_testhashkit_DEPENDENCIES) $(EXTRA_tests_testhashkit_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/testhashkit$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tests_testhashkit_OBJECTS) $(tests_testhashkit_LDADD) $(LIBS) +clients/tests_testplus-execute.$(OBJEXT): clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) +clients/tests_testplus-generator.$(OBJEXT): clients/$(am__dirstamp) \ + clients/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_testplus-callback_counter.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_testplus-fetch_all_results.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_testplus-generate.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_testplus-plus.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) +tests/libmemcached-1.0/tests_testplus-print.$(OBJEXT): \ + tests/libmemcached-1.0/$(am__dirstamp) \ + tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) + +tests/testplus$(EXEEXT): $(tests_testplus_OBJECTS) $(tests_testplus_DEPENDENCIES) $(EXTRA_tests_testplus_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/testplus$(EXEEXT) + $(AM_V_CXXLD)$(tests_testplus_LINK) $(tests_testplus_OBJECTS) $(tests_testplus_LDADD) $(LIBS) +tests/mem_udp.$(OBJEXT): tests/$(am__dirstamp) \ + tests/$(DEPDIR)/$(am__dirstamp) + +tests/testudp$(EXEEXT): $(tests_testudp_OBJECTS) $(tests_testudp_DEPENDENCIES) $(EXTRA_tests_testudp_DEPENDENCIES) tests/$(am__dirstamp) + @rm -f tests/testudp$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(tests_testudp_OBJECTS) $(tests_testudp_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + -rm -f clients/*.$(OBJEXT) + -rm -f clients/*.lo + -rm -f example/*.$(OBJEXT) + -rm -f libhashkit/*.$(OBJEXT) + -rm -f libhashkit/*.lo + -rm -f libmemcached-1.0/t/*.$(OBJEXT) + -rm -f libmemcached/*.$(OBJEXT) + -rm -f libmemcached/*.lo + -rm -f libmemcached/csl/*.$(OBJEXT) + -rm -f libmemcached/csl/*.lo + -rm -f libmemcachedprotocol/*.$(OBJEXT) + -rm -f libmemcachedprotocol/*.lo + -rm -f libmemcachedutil/*.$(OBJEXT) + -rm -f libmemcachedutil/*.lo + -rm -f libtest/*.$(OBJEXT) + -rm -f libtest/*.lo + -rm -f libtest/exception/*.$(OBJEXT) + -rm -f libtest/exception/*.lo + -rm -f tests/*.$(OBJEXT) + -rm -f tests/libmemcached-1.0/*.$(OBJEXT) + -rm -f util/*.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/clients_memcapable-memcapable.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/clients_memslap-execute.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/clients_memslap-generator.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/clients_memslap-memslap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/execute.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/generator.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/memaslap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/memcat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/memcp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/memdump.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/memerror.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/memexist.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/memflush.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/memparse.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/memping.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/memrm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/memstat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/memtouch.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/ms_conn.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/ms_setting.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/ms_sigsegv.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/ms_stats.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/ms_task.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/ms_thread.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/tests_failure-execute.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/tests_failure-generator.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/tests_libmemcached_1_0_sasl-execute.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/tests_libmemcached_1_0_sasl-generator.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/tests_libmemcached_1_0_testapp-execute.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/tests_libmemcached_1_0_testapp-generator.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/tests_libmemcached_1_0_testsocket-execute.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/tests_libmemcached_1_0_testsocket-generator.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/tests_testplus-execute.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/tests_testplus-generator.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@clients/$(DEPDIR)/utilities.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@example/$(DEPDIR)/byteorder.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@example/$(DEPDIR)/interface_v0.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@example/$(DEPDIR)/interface_v1.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@example/$(DEPDIR)/memcached_light.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@example/$(DEPDIR)/storage.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-aes.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-algorithm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-behavior.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-crc32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-digest.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-encrypt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-fnv_32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-fnv_64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-function.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-has.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-hashkit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-hsieh.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-jenkins.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-ketama.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-md5.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-murmur.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-murmur3.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-murmur3_api.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-nohsieh.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-one_at_a_time.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-rijndael.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-str_algorithm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-strerror.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-string.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-aes.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-algorithm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-behavior.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-crc32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-digest.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-encrypt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-fnv_32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-fnv_64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-function.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-has.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-hashkit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-hsieh.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-jenkins.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-ketama.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-md5.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-murmur.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-murmur3.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-murmur3_api.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-nohsieh.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-one_at_a_time.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-rijndael.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-str_algorithm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-strerror.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-string.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-aes.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-algorithm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-behavior.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-crc32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-digest.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-encrypt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-fnv_32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-fnv_64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-function.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-has.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-hashkit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-hsieh.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-jenkins.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-ketama.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-md5.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-murmur.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-murmur3.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-murmur3_api.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-nohsieh.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-one_at_a_time.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-rijndael.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-str_algorithm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-strerror.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-string.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-aes.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-algorithm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-behavior.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-crc32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-digest.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-encrypt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-fnv_32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-fnv_64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-function.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-has.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-hashkit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-hsieh.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-jenkins.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-ketama.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-md5.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-murmur.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-murmur3.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-murmur3_api.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-nohsieh.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-one_at_a_time.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-rijndael.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-str_algorithm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-strerror.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-string.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached-1.0/t/$(DEPDIR)/c_sasl_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached-1.0/t/$(DEPDIR)/c_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached-1.0/t/$(DEPDIR)/cc_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/backtrace.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/clients_memcapable-byteorder.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-allocators.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-analyze.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-array.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-auto.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-backtrace.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-behavior.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-byteorder.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-callback.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-connect.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-delete.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-do.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-dump.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-encoding_key.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-error.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-exist.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-fetch.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-flag.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-flush.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-flush_buffers.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-get.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-hash.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-hosts.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-initialize_query.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-instance.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-io.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-key.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-memcached.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-namespace.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-options.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-parse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-poll.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-purge.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-quit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-response.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-result.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-sasl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-server.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-server_list.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-stats.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-storage.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-strerror.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-string.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-touch.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-udp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-verbosity.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-version.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-virtual_bucket.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-byteorder.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcached_libmemcachedutil_la-backtrace.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-allocators.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-analyze.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-array.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-auto.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-backtrace.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-behavior.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-byteorder.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-callback.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-connect.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-delete.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-do.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-dump.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-encoding_key.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-error.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-exist.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-fetch.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-flag.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-flush.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-flush_buffers.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-get.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-hash.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-hosts.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-initialize_query.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-instance.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-io.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-key.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-memcached.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-namespace.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-options.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-parse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-poll.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-purge.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-quit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-response.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-result.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-sasl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-server.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-server_list.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-stats.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-storage.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-strerror.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-string.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-touch.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-udp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-verbosity.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-version.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-virtual_bucket.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedutilinternal_la-backtrace.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/csl/$(DEPDIR)/libmemcached_libmemcached_la-context.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/csl/$(DEPDIR)/libmemcached_libmemcached_la-parser.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/csl/$(DEPDIR)/libmemcached_libmemcached_la-scanner.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/csl/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-context.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/csl/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-parser.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcached/csl/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-scanner.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcachedprotocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-ascii_handler.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcachedprotocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-binary_handler.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcachedprotocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-cache.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcachedprotocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-handler.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcachedprotocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-pedantic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcachedutil/$(DEPDIR)/libmemcached_libmemcachedutil_la-flush.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcachedutil/$(DEPDIR)/libmemcached_libmemcachedutil_la-pid.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcachedutil/$(DEPDIR)/libmemcached_libmemcachedutil_la-ping.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcachedutil/$(DEPDIR)/libmemcached_libmemcachedutil_la-pool.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcachedutil/$(DEPDIR)/libmemcached_libmemcachedutil_la-version.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcachedutil/$(DEPDIR)/libmemcachedinternal_libmemcachedutilinternal_la-flush.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcachedutil/$(DEPDIR)/libmemcachedinternal_libmemcachedutilinternal_la-pid.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcachedutil/$(DEPDIR)/libmemcachedinternal_libmemcachedutilinternal_la-ping.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcachedutil/$(DEPDIR)/libmemcachedinternal_libmemcachedutilinternal_la-pool.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libmemcachedutil/$(DEPDIR)/libmemcachedinternal_libmemcachedutilinternal_la-version.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/abort.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/backtrace_test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/core_count.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/cpu.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/dream.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-alarm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-binaries.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-blobslap_worker.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-client.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-cmdline.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-collection.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-comparison.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-core.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-cpu.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-dns.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-dream.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-drizzled.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-exception.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-formatter.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-framework.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-gearmand.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-has.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-http.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-is_local.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-killpid.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-libtool.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-main.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-memcached.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-port.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-result.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-runner.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-server.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-server_container.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-signal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-socket.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-strerror.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-timer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-tmpfile.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_libtest_la-vchar.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/libtest_unittest-unittest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/skiptest.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/$(DEPDIR)/wait.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libtest/exception/$(DEPDIR)/libtest_libtest_la-fatal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/hashkit_functions.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/mem_udp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_cycle-cycle.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_failure-failure.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_hash_plus-hash_plus.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_memcapable-memcapable.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_memcat-memcat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_memcp-memcp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_memdump-memdump.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_memerror-memerror.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_memexist-memexist.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_memflush-memflush.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_memping-memping.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_memrm-memrm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_memslap-memslap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_memstat-memstat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_memtouch-memtouch.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_parser-parser.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/atomsmasher.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/callback_counter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/debug.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/fetch_all_results.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/generate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/print.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_failure-callback_counter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_failure-fetch_all_results.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_failure-generate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_failure-print.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_internals-internals.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_internals-string.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-basic.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-callback_counter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-debug.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-deprecated.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-error_conditions.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-fetch_all_results.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-generate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-ketama.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-namespace.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-parser.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-pool.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-print.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-replication.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-sasl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-virtual_buckets.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-all_tests.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-basic.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-callback_counter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-callbacks.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-debug.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-deprecated.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-dump.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-encoding_key.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-error_conditions.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-exist.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-fetch_all_results.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-generate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-haldenbrand.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-ketama.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-mem_functions.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-memcached_get.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-namespace.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-parser.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-pool.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-print.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-replication.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-server_add.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-setup_and_teardowns.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-stat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-touch.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-virtual_buckets.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-all_tests_socket.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-basic.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-callback_counter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-callbacks.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-debug.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-deprecated.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-dump.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-encoding_key.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-error_conditions.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-exist.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-fetch_all_results.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-generate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-haldenbrand.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-ketama.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-mem_functions.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-memcached_get.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-namespace.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-parser.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-pool.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-print.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-replication.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-server_add.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-setup_and_teardowns.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-stat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-touch.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-virtual_buckets.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-callback_counter.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-fetch_all_results.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-generate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-plus.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-print.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/daemon.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/pidfile.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +libmemcached/libmemcached_libmemcached_la-array.lo: libmemcached/array.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CFLAGS) $(CFLAGS) -MT libmemcached/libmemcached_libmemcached_la-array.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-array.Tpo -c -o libmemcached/libmemcached_libmemcached_la-array.lo `test -f 'libmemcached/array.c' || echo '$(srcdir)/'`libmemcached/array.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-array.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-array.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libmemcached/array.c' object='libmemcached/libmemcached_libmemcached_la-array.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CFLAGS) $(CFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-array.lo `test -f 'libmemcached/array.c' || echo '$(srcdir)/'`libmemcached/array.c + +libmemcached/libmemcached_libmemcached_la-virtual_bucket.lo: libmemcached/virtual_bucket.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CFLAGS) $(CFLAGS) -MT libmemcached/libmemcached_libmemcached_la-virtual_bucket.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-virtual_bucket.Tpo -c -o libmemcached/libmemcached_libmemcached_la-virtual_bucket.lo `test -f 'libmemcached/virtual_bucket.c' || echo '$(srcdir)/'`libmemcached/virtual_bucket.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-virtual_bucket.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-virtual_bucket.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libmemcached/virtual_bucket.c' object='libmemcached/libmemcached_libmemcached_la-virtual_bucket.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CFLAGS) $(CFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-virtual_bucket.lo `test -f 'libmemcached/virtual_bucket.c' || echo '$(srcdir)/'`libmemcached/virtual_bucket.c + +libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-ascii_handler.lo: libmemcachedprotocol/ascii_handler.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedprotocol_la_CFLAGS) $(CFLAGS) -MT libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-ascii_handler.lo -MD -MP -MF libmemcachedprotocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-ascii_handler.Tpo -c -o libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-ascii_handler.lo `test -f 'libmemcachedprotocol/ascii_handler.c' || echo '$(srcdir)/'`libmemcachedprotocol/ascii_handler.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libmemcachedprotocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-ascii_handler.Tpo libmemcachedprotocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-ascii_handler.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libmemcachedprotocol/ascii_handler.c' object='libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-ascii_handler.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedprotocol_la_CFLAGS) $(CFLAGS) -c -o libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-ascii_handler.lo `test -f 'libmemcachedprotocol/ascii_handler.c' || echo '$(srcdir)/'`libmemcachedprotocol/ascii_handler.c + +libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-binary_handler.lo: libmemcachedprotocol/binary_handler.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedprotocol_la_CFLAGS) $(CFLAGS) -MT libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-binary_handler.lo -MD -MP -MF libmemcachedprotocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-binary_handler.Tpo -c -o libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-binary_handler.lo `test -f 'libmemcachedprotocol/binary_handler.c' || echo '$(srcdir)/'`libmemcachedprotocol/binary_handler.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libmemcachedprotocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-binary_handler.Tpo libmemcachedprotocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-binary_handler.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libmemcachedprotocol/binary_handler.c' object='libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-binary_handler.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedprotocol_la_CFLAGS) $(CFLAGS) -c -o libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-binary_handler.lo `test -f 'libmemcachedprotocol/binary_handler.c' || echo '$(srcdir)/'`libmemcachedprotocol/binary_handler.c + +libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-cache.lo: libmemcachedprotocol/cache.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedprotocol_la_CFLAGS) $(CFLAGS) -MT libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-cache.lo -MD -MP -MF libmemcachedprotocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-cache.Tpo -c -o libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-cache.lo `test -f 'libmemcachedprotocol/cache.c' || echo '$(srcdir)/'`libmemcachedprotocol/cache.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libmemcachedprotocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-cache.Tpo libmemcachedprotocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-cache.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libmemcachedprotocol/cache.c' object='libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-cache.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedprotocol_la_CFLAGS) $(CFLAGS) -c -o libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-cache.lo `test -f 'libmemcachedprotocol/cache.c' || echo '$(srcdir)/'`libmemcachedprotocol/cache.c + +libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-handler.lo: libmemcachedprotocol/handler.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedprotocol_la_CFLAGS) $(CFLAGS) -MT libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-handler.lo -MD -MP -MF libmemcachedprotocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-handler.Tpo -c -o libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-handler.lo `test -f 'libmemcachedprotocol/handler.c' || echo '$(srcdir)/'`libmemcachedprotocol/handler.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libmemcachedprotocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-handler.Tpo libmemcachedprotocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-handler.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libmemcachedprotocol/handler.c' object='libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-handler.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedprotocol_la_CFLAGS) $(CFLAGS) -c -o libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-handler.lo `test -f 'libmemcachedprotocol/handler.c' || echo '$(srcdir)/'`libmemcachedprotocol/handler.c + +libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-pedantic.lo: libmemcachedprotocol/pedantic.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedprotocol_la_CFLAGS) $(CFLAGS) -MT libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-pedantic.lo -MD -MP -MF libmemcachedprotocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-pedantic.Tpo -c -o libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-pedantic.lo `test -f 'libmemcachedprotocol/pedantic.c' || echo '$(srcdir)/'`libmemcachedprotocol/pedantic.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libmemcachedprotocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-pedantic.Tpo libmemcachedprotocol/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-pedantic.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libmemcachedprotocol/pedantic.c' object='libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-pedantic.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedprotocol_la_CFLAGS) $(CFLAGS) -c -o libmemcachedprotocol/libmemcached_libmemcachedprotocol_la-pedantic.lo `test -f 'libmemcachedprotocol/pedantic.c' || echo '$(srcdir)/'`libmemcachedprotocol/pedantic.c + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-array.lo: libmemcached/array.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CFLAGS) $(CFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-array.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-array.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-array.lo `test -f 'libmemcached/array.c' || echo '$(srcdir)/'`libmemcached/array.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-array.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-array.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libmemcached/array.c' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-array.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CFLAGS) $(CFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-array.lo `test -f 'libmemcached/array.c' || echo '$(srcdir)/'`libmemcached/array.c + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-virtual_bucket.lo: libmemcached/virtual_bucket.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CFLAGS) $(CFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-virtual_bucket.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-virtual_bucket.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-virtual_bucket.lo `test -f 'libmemcached/virtual_bucket.c' || echo '$(srcdir)/'`libmemcached/virtual_bucket.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-virtual_bucket.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-virtual_bucket.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libmemcached/virtual_bucket.c' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-virtual_bucket.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CFLAGS) $(CFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-virtual_bucket.lo `test -f 'libmemcached/virtual_bucket.c' || echo '$(srcdir)/'`libmemcached/virtual_bucket.c + +.cc.o: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< + +.cc.obj: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< + +libhashkit/libhashkit_libhashkit_la-aes.lo: libhashkit/aes.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkit_la-aes.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-aes.Tpo -c -o libhashkit/libhashkit_libhashkit_la-aes.lo `test -f 'libhashkit/aes.cc' || echo '$(srcdir)/'`libhashkit/aes.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-aes.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-aes.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/aes.cc' object='libhashkit/libhashkit_libhashkit_la-aes.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-aes.lo `test -f 'libhashkit/aes.cc' || echo '$(srcdir)/'`libhashkit/aes.cc + +libhashkit/libhashkit_libhashkit_la-algorithm.lo: libhashkit/algorithm.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkit_la-algorithm.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-algorithm.Tpo -c -o libhashkit/libhashkit_libhashkit_la-algorithm.lo `test -f 'libhashkit/algorithm.cc' || echo '$(srcdir)/'`libhashkit/algorithm.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-algorithm.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-algorithm.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/algorithm.cc' object='libhashkit/libhashkit_libhashkit_la-algorithm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-algorithm.lo `test -f 'libhashkit/algorithm.cc' || echo '$(srcdir)/'`libhashkit/algorithm.cc + +libhashkit/libhashkit_libhashkit_la-behavior.lo: libhashkit/behavior.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkit_la-behavior.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-behavior.Tpo -c -o libhashkit/libhashkit_libhashkit_la-behavior.lo `test -f 'libhashkit/behavior.cc' || echo '$(srcdir)/'`libhashkit/behavior.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-behavior.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-behavior.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/behavior.cc' object='libhashkit/libhashkit_libhashkit_la-behavior.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-behavior.lo `test -f 'libhashkit/behavior.cc' || echo '$(srcdir)/'`libhashkit/behavior.cc + +libhashkit/libhashkit_libhashkit_la-crc32.lo: libhashkit/crc32.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkit_la-crc32.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-crc32.Tpo -c -o libhashkit/libhashkit_libhashkit_la-crc32.lo `test -f 'libhashkit/crc32.cc' || echo '$(srcdir)/'`libhashkit/crc32.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-crc32.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-crc32.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/crc32.cc' object='libhashkit/libhashkit_libhashkit_la-crc32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-crc32.lo `test -f 'libhashkit/crc32.cc' || echo '$(srcdir)/'`libhashkit/crc32.cc + +libhashkit/libhashkit_libhashkit_la-digest.lo: libhashkit/digest.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkit_la-digest.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-digest.Tpo -c -o libhashkit/libhashkit_libhashkit_la-digest.lo `test -f 'libhashkit/digest.cc' || echo '$(srcdir)/'`libhashkit/digest.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-digest.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-digest.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/digest.cc' object='libhashkit/libhashkit_libhashkit_la-digest.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-digest.lo `test -f 'libhashkit/digest.cc' || echo '$(srcdir)/'`libhashkit/digest.cc + +libhashkit/libhashkit_libhashkit_la-encrypt.lo: libhashkit/encrypt.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkit_la-encrypt.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-encrypt.Tpo -c -o libhashkit/libhashkit_libhashkit_la-encrypt.lo `test -f 'libhashkit/encrypt.cc' || echo '$(srcdir)/'`libhashkit/encrypt.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-encrypt.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-encrypt.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/encrypt.cc' object='libhashkit/libhashkit_libhashkit_la-encrypt.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-encrypt.lo `test -f 'libhashkit/encrypt.cc' || echo '$(srcdir)/'`libhashkit/encrypt.cc + +libhashkit/libhashkit_libhashkit_la-fnv_32.lo: libhashkit/fnv_32.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkit_la-fnv_32.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-fnv_32.Tpo -c -o libhashkit/libhashkit_libhashkit_la-fnv_32.lo `test -f 'libhashkit/fnv_32.cc' || echo '$(srcdir)/'`libhashkit/fnv_32.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-fnv_32.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-fnv_32.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/fnv_32.cc' object='libhashkit/libhashkit_libhashkit_la-fnv_32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-fnv_32.lo `test -f 'libhashkit/fnv_32.cc' || echo '$(srcdir)/'`libhashkit/fnv_32.cc + +libhashkit/libhashkit_libhashkit_la-fnv_64.lo: libhashkit/fnv_64.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkit_la-fnv_64.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-fnv_64.Tpo -c -o libhashkit/libhashkit_libhashkit_la-fnv_64.lo `test -f 'libhashkit/fnv_64.cc' || echo '$(srcdir)/'`libhashkit/fnv_64.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-fnv_64.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-fnv_64.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/fnv_64.cc' object='libhashkit/libhashkit_libhashkit_la-fnv_64.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-fnv_64.lo `test -f 'libhashkit/fnv_64.cc' || echo '$(srcdir)/'`libhashkit/fnv_64.cc + +libhashkit/libhashkit_libhashkit_la-function.lo: libhashkit/function.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkit_la-function.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-function.Tpo -c -o libhashkit/libhashkit_libhashkit_la-function.lo `test -f 'libhashkit/function.cc' || echo '$(srcdir)/'`libhashkit/function.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-function.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-function.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/function.cc' object='libhashkit/libhashkit_libhashkit_la-function.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-function.lo `test -f 'libhashkit/function.cc' || echo '$(srcdir)/'`libhashkit/function.cc + +libhashkit/libhashkit_libhashkit_la-has.lo: libhashkit/has.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkit_la-has.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-has.Tpo -c -o libhashkit/libhashkit_libhashkit_la-has.lo `test -f 'libhashkit/has.cc' || echo '$(srcdir)/'`libhashkit/has.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-has.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-has.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/has.cc' object='libhashkit/libhashkit_libhashkit_la-has.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-has.lo `test -f 'libhashkit/has.cc' || echo '$(srcdir)/'`libhashkit/has.cc + +libhashkit/libhashkit_libhashkit_la-hashkit.lo: libhashkit/hashkit.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkit_la-hashkit.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-hashkit.Tpo -c -o libhashkit/libhashkit_libhashkit_la-hashkit.lo `test -f 'libhashkit/hashkit.cc' || echo '$(srcdir)/'`libhashkit/hashkit.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-hashkit.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-hashkit.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/hashkit.cc' object='libhashkit/libhashkit_libhashkit_la-hashkit.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-hashkit.lo `test -f 'libhashkit/hashkit.cc' || echo '$(srcdir)/'`libhashkit/hashkit.cc + +libhashkit/libhashkit_libhashkit_la-jenkins.lo: libhashkit/jenkins.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkit_la-jenkins.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-jenkins.Tpo -c -o libhashkit/libhashkit_libhashkit_la-jenkins.lo `test -f 'libhashkit/jenkins.cc' || echo '$(srcdir)/'`libhashkit/jenkins.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-jenkins.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-jenkins.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/jenkins.cc' object='libhashkit/libhashkit_libhashkit_la-jenkins.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-jenkins.lo `test -f 'libhashkit/jenkins.cc' || echo '$(srcdir)/'`libhashkit/jenkins.cc + +libhashkit/libhashkit_libhashkit_la-ketama.lo: libhashkit/ketama.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkit_la-ketama.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-ketama.Tpo -c -o libhashkit/libhashkit_libhashkit_la-ketama.lo `test -f 'libhashkit/ketama.cc' || echo '$(srcdir)/'`libhashkit/ketama.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-ketama.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-ketama.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/ketama.cc' object='libhashkit/libhashkit_libhashkit_la-ketama.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-ketama.lo `test -f 'libhashkit/ketama.cc' || echo '$(srcdir)/'`libhashkit/ketama.cc + +libhashkit/libhashkit_libhashkit_la-md5.lo: libhashkit/md5.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkit_la-md5.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-md5.Tpo -c -o libhashkit/libhashkit_libhashkit_la-md5.lo `test -f 'libhashkit/md5.cc' || echo '$(srcdir)/'`libhashkit/md5.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-md5.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-md5.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/md5.cc' object='libhashkit/libhashkit_libhashkit_la-md5.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-md5.lo `test -f 'libhashkit/md5.cc' || echo '$(srcdir)/'`libhashkit/md5.cc + +libhashkit/libhashkit_libhashkit_la-murmur.lo: libhashkit/murmur.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkit_la-murmur.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-murmur.Tpo -c -o libhashkit/libhashkit_libhashkit_la-murmur.lo `test -f 'libhashkit/murmur.cc' || echo '$(srcdir)/'`libhashkit/murmur.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-murmur.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-murmur.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/murmur.cc' object='libhashkit/libhashkit_libhashkit_la-murmur.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-murmur.lo `test -f 'libhashkit/murmur.cc' || echo '$(srcdir)/'`libhashkit/murmur.cc + +libhashkit/libhashkit_libhashkit_la-murmur3.lo: libhashkit/murmur3.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkit_la-murmur3.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-murmur3.Tpo -c -o libhashkit/libhashkit_libhashkit_la-murmur3.lo `test -f 'libhashkit/murmur3.cc' || echo '$(srcdir)/'`libhashkit/murmur3.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-murmur3.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-murmur3.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/murmur3.cc' object='libhashkit/libhashkit_libhashkit_la-murmur3.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-murmur3.lo `test -f 'libhashkit/murmur3.cc' || echo '$(srcdir)/'`libhashkit/murmur3.cc + +libhashkit/libhashkit_libhashkit_la-murmur3_api.lo: libhashkit/murmur3_api.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkit_la-murmur3_api.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-murmur3_api.Tpo -c -o libhashkit/libhashkit_libhashkit_la-murmur3_api.lo `test -f 'libhashkit/murmur3_api.cc' || echo '$(srcdir)/'`libhashkit/murmur3_api.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-murmur3_api.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-murmur3_api.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/murmur3_api.cc' object='libhashkit/libhashkit_libhashkit_la-murmur3_api.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-murmur3_api.lo `test -f 'libhashkit/murmur3_api.cc' || echo '$(srcdir)/'`libhashkit/murmur3_api.cc + +libhashkit/libhashkit_libhashkit_la-one_at_a_time.lo: libhashkit/one_at_a_time.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkit_la-one_at_a_time.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-one_at_a_time.Tpo -c -o libhashkit/libhashkit_libhashkit_la-one_at_a_time.lo `test -f 'libhashkit/one_at_a_time.cc' || echo '$(srcdir)/'`libhashkit/one_at_a_time.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-one_at_a_time.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-one_at_a_time.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/one_at_a_time.cc' object='libhashkit/libhashkit_libhashkit_la-one_at_a_time.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-one_at_a_time.lo `test -f 'libhashkit/one_at_a_time.cc' || echo '$(srcdir)/'`libhashkit/one_at_a_time.cc + +libhashkit/libhashkit_libhashkit_la-rijndael.lo: libhashkit/rijndael.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkit_la-rijndael.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-rijndael.Tpo -c -o libhashkit/libhashkit_libhashkit_la-rijndael.lo `test -f 'libhashkit/rijndael.cc' || echo '$(srcdir)/'`libhashkit/rijndael.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-rijndael.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-rijndael.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/rijndael.cc' object='libhashkit/libhashkit_libhashkit_la-rijndael.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-rijndael.lo `test -f 'libhashkit/rijndael.cc' || echo '$(srcdir)/'`libhashkit/rijndael.cc + +libhashkit/libhashkit_libhashkit_la-str_algorithm.lo: libhashkit/str_algorithm.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkit_la-str_algorithm.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-str_algorithm.Tpo -c -o libhashkit/libhashkit_libhashkit_la-str_algorithm.lo `test -f 'libhashkit/str_algorithm.cc' || echo '$(srcdir)/'`libhashkit/str_algorithm.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-str_algorithm.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-str_algorithm.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/str_algorithm.cc' object='libhashkit/libhashkit_libhashkit_la-str_algorithm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-str_algorithm.lo `test -f 'libhashkit/str_algorithm.cc' || echo '$(srcdir)/'`libhashkit/str_algorithm.cc + +libhashkit/libhashkit_libhashkit_la-strerror.lo: libhashkit/strerror.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkit_la-strerror.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-strerror.Tpo -c -o libhashkit/libhashkit_libhashkit_la-strerror.lo `test -f 'libhashkit/strerror.cc' || echo '$(srcdir)/'`libhashkit/strerror.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-strerror.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-strerror.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/strerror.cc' object='libhashkit/libhashkit_libhashkit_la-strerror.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-strerror.lo `test -f 'libhashkit/strerror.cc' || echo '$(srcdir)/'`libhashkit/strerror.cc + +libhashkit/libhashkit_libhashkit_la-string.lo: libhashkit/string.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkit_la-string.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-string.Tpo -c -o libhashkit/libhashkit_libhashkit_la-string.lo `test -f 'libhashkit/string.cc' || echo '$(srcdir)/'`libhashkit/string.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-string.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-string.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/string.cc' object='libhashkit/libhashkit_libhashkit_la-string.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-string.lo `test -f 'libhashkit/string.cc' || echo '$(srcdir)/'`libhashkit/string.cc + +libhashkit/libhashkit_libhashkit_la-hsieh.lo: libhashkit/hsieh.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkit_la-hsieh.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-hsieh.Tpo -c -o libhashkit/libhashkit_libhashkit_la-hsieh.lo `test -f 'libhashkit/hsieh.cc' || echo '$(srcdir)/'`libhashkit/hsieh.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-hsieh.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-hsieh.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/hsieh.cc' object='libhashkit/libhashkit_libhashkit_la-hsieh.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-hsieh.lo `test -f 'libhashkit/hsieh.cc' || echo '$(srcdir)/'`libhashkit/hsieh.cc + +libhashkit/libhashkit_libhashkit_la-nohsieh.lo: libhashkit/nohsieh.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkit_la-nohsieh.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-nohsieh.Tpo -c -o libhashkit/libhashkit_libhashkit_la-nohsieh.lo `test -f 'libhashkit/nohsieh.cc' || echo '$(srcdir)/'`libhashkit/nohsieh.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-nohsieh.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkit_la-nohsieh.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/nohsieh.cc' object='libhashkit/libhashkit_libhashkit_la-nohsieh.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkit_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkit_la-nohsieh.lo `test -f 'libhashkit/nohsieh.cc' || echo '$(srcdir)/'`libhashkit/nohsieh.cc + +libhashkit/libhashkit_libhashkitinc_la-aes.lo: libhashkit/aes.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-aes.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-aes.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-aes.lo `test -f 'libhashkit/aes.cc' || echo '$(srcdir)/'`libhashkit/aes.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-aes.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-aes.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/aes.cc' object='libhashkit/libhashkit_libhashkitinc_la-aes.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-aes.lo `test -f 'libhashkit/aes.cc' || echo '$(srcdir)/'`libhashkit/aes.cc + +libhashkit/libhashkit_libhashkitinc_la-algorithm.lo: libhashkit/algorithm.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-algorithm.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-algorithm.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-algorithm.lo `test -f 'libhashkit/algorithm.cc' || echo '$(srcdir)/'`libhashkit/algorithm.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-algorithm.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-algorithm.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/algorithm.cc' object='libhashkit/libhashkit_libhashkitinc_la-algorithm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-algorithm.lo `test -f 'libhashkit/algorithm.cc' || echo '$(srcdir)/'`libhashkit/algorithm.cc + +libhashkit/libhashkit_libhashkitinc_la-behavior.lo: libhashkit/behavior.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-behavior.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-behavior.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-behavior.lo `test -f 'libhashkit/behavior.cc' || echo '$(srcdir)/'`libhashkit/behavior.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-behavior.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-behavior.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/behavior.cc' object='libhashkit/libhashkit_libhashkitinc_la-behavior.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-behavior.lo `test -f 'libhashkit/behavior.cc' || echo '$(srcdir)/'`libhashkit/behavior.cc + +libhashkit/libhashkit_libhashkitinc_la-crc32.lo: libhashkit/crc32.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-crc32.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-crc32.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-crc32.lo `test -f 'libhashkit/crc32.cc' || echo '$(srcdir)/'`libhashkit/crc32.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-crc32.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-crc32.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/crc32.cc' object='libhashkit/libhashkit_libhashkitinc_la-crc32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-crc32.lo `test -f 'libhashkit/crc32.cc' || echo '$(srcdir)/'`libhashkit/crc32.cc + +libhashkit/libhashkit_libhashkitinc_la-digest.lo: libhashkit/digest.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-digest.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-digest.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-digest.lo `test -f 'libhashkit/digest.cc' || echo '$(srcdir)/'`libhashkit/digest.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-digest.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-digest.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/digest.cc' object='libhashkit/libhashkit_libhashkitinc_la-digest.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-digest.lo `test -f 'libhashkit/digest.cc' || echo '$(srcdir)/'`libhashkit/digest.cc + +libhashkit/libhashkit_libhashkitinc_la-encrypt.lo: libhashkit/encrypt.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-encrypt.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-encrypt.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-encrypt.lo `test -f 'libhashkit/encrypt.cc' || echo '$(srcdir)/'`libhashkit/encrypt.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-encrypt.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-encrypt.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/encrypt.cc' object='libhashkit/libhashkit_libhashkitinc_la-encrypt.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-encrypt.lo `test -f 'libhashkit/encrypt.cc' || echo '$(srcdir)/'`libhashkit/encrypt.cc + +libhashkit/libhashkit_libhashkitinc_la-fnv_32.lo: libhashkit/fnv_32.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-fnv_32.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-fnv_32.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-fnv_32.lo `test -f 'libhashkit/fnv_32.cc' || echo '$(srcdir)/'`libhashkit/fnv_32.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-fnv_32.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-fnv_32.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/fnv_32.cc' object='libhashkit/libhashkit_libhashkitinc_la-fnv_32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-fnv_32.lo `test -f 'libhashkit/fnv_32.cc' || echo '$(srcdir)/'`libhashkit/fnv_32.cc + +libhashkit/libhashkit_libhashkitinc_la-fnv_64.lo: libhashkit/fnv_64.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-fnv_64.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-fnv_64.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-fnv_64.lo `test -f 'libhashkit/fnv_64.cc' || echo '$(srcdir)/'`libhashkit/fnv_64.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-fnv_64.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-fnv_64.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/fnv_64.cc' object='libhashkit/libhashkit_libhashkitinc_la-fnv_64.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-fnv_64.lo `test -f 'libhashkit/fnv_64.cc' || echo '$(srcdir)/'`libhashkit/fnv_64.cc + +libhashkit/libhashkit_libhashkitinc_la-function.lo: libhashkit/function.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-function.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-function.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-function.lo `test -f 'libhashkit/function.cc' || echo '$(srcdir)/'`libhashkit/function.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-function.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-function.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/function.cc' object='libhashkit/libhashkit_libhashkitinc_la-function.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-function.lo `test -f 'libhashkit/function.cc' || echo '$(srcdir)/'`libhashkit/function.cc + +libhashkit/libhashkit_libhashkitinc_la-has.lo: libhashkit/has.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-has.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-has.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-has.lo `test -f 'libhashkit/has.cc' || echo '$(srcdir)/'`libhashkit/has.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-has.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-has.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/has.cc' object='libhashkit/libhashkit_libhashkitinc_la-has.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-has.lo `test -f 'libhashkit/has.cc' || echo '$(srcdir)/'`libhashkit/has.cc + +libhashkit/libhashkit_libhashkitinc_la-hashkit.lo: libhashkit/hashkit.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-hashkit.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-hashkit.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-hashkit.lo `test -f 'libhashkit/hashkit.cc' || echo '$(srcdir)/'`libhashkit/hashkit.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-hashkit.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-hashkit.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/hashkit.cc' object='libhashkit/libhashkit_libhashkitinc_la-hashkit.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-hashkit.lo `test -f 'libhashkit/hashkit.cc' || echo '$(srcdir)/'`libhashkit/hashkit.cc + +libhashkit/libhashkit_libhashkitinc_la-jenkins.lo: libhashkit/jenkins.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-jenkins.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-jenkins.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-jenkins.lo `test -f 'libhashkit/jenkins.cc' || echo '$(srcdir)/'`libhashkit/jenkins.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-jenkins.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-jenkins.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/jenkins.cc' object='libhashkit/libhashkit_libhashkitinc_la-jenkins.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-jenkins.lo `test -f 'libhashkit/jenkins.cc' || echo '$(srcdir)/'`libhashkit/jenkins.cc + +libhashkit/libhashkit_libhashkitinc_la-ketama.lo: libhashkit/ketama.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-ketama.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-ketama.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-ketama.lo `test -f 'libhashkit/ketama.cc' || echo '$(srcdir)/'`libhashkit/ketama.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-ketama.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-ketama.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/ketama.cc' object='libhashkit/libhashkit_libhashkitinc_la-ketama.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-ketama.lo `test -f 'libhashkit/ketama.cc' || echo '$(srcdir)/'`libhashkit/ketama.cc + +libhashkit/libhashkit_libhashkitinc_la-md5.lo: libhashkit/md5.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-md5.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-md5.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-md5.lo `test -f 'libhashkit/md5.cc' || echo '$(srcdir)/'`libhashkit/md5.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-md5.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-md5.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/md5.cc' object='libhashkit/libhashkit_libhashkitinc_la-md5.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-md5.lo `test -f 'libhashkit/md5.cc' || echo '$(srcdir)/'`libhashkit/md5.cc + +libhashkit/libhashkit_libhashkitinc_la-murmur.lo: libhashkit/murmur.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-murmur.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-murmur.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-murmur.lo `test -f 'libhashkit/murmur.cc' || echo '$(srcdir)/'`libhashkit/murmur.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-murmur.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-murmur.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/murmur.cc' object='libhashkit/libhashkit_libhashkitinc_la-murmur.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-murmur.lo `test -f 'libhashkit/murmur.cc' || echo '$(srcdir)/'`libhashkit/murmur.cc + +libhashkit/libhashkit_libhashkitinc_la-murmur3.lo: libhashkit/murmur3.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-murmur3.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-murmur3.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-murmur3.lo `test -f 'libhashkit/murmur3.cc' || echo '$(srcdir)/'`libhashkit/murmur3.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-murmur3.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-murmur3.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/murmur3.cc' object='libhashkit/libhashkit_libhashkitinc_la-murmur3.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-murmur3.lo `test -f 'libhashkit/murmur3.cc' || echo '$(srcdir)/'`libhashkit/murmur3.cc + +libhashkit/libhashkit_libhashkitinc_la-murmur3_api.lo: libhashkit/murmur3_api.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-murmur3_api.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-murmur3_api.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-murmur3_api.lo `test -f 'libhashkit/murmur3_api.cc' || echo '$(srcdir)/'`libhashkit/murmur3_api.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-murmur3_api.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-murmur3_api.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/murmur3_api.cc' object='libhashkit/libhashkit_libhashkitinc_la-murmur3_api.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-murmur3_api.lo `test -f 'libhashkit/murmur3_api.cc' || echo '$(srcdir)/'`libhashkit/murmur3_api.cc + +libhashkit/libhashkit_libhashkitinc_la-one_at_a_time.lo: libhashkit/one_at_a_time.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-one_at_a_time.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-one_at_a_time.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-one_at_a_time.lo `test -f 'libhashkit/one_at_a_time.cc' || echo '$(srcdir)/'`libhashkit/one_at_a_time.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-one_at_a_time.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-one_at_a_time.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/one_at_a_time.cc' object='libhashkit/libhashkit_libhashkitinc_la-one_at_a_time.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-one_at_a_time.lo `test -f 'libhashkit/one_at_a_time.cc' || echo '$(srcdir)/'`libhashkit/one_at_a_time.cc + +libhashkit/libhashkit_libhashkitinc_la-rijndael.lo: libhashkit/rijndael.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-rijndael.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-rijndael.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-rijndael.lo `test -f 'libhashkit/rijndael.cc' || echo '$(srcdir)/'`libhashkit/rijndael.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-rijndael.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-rijndael.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/rijndael.cc' object='libhashkit/libhashkit_libhashkitinc_la-rijndael.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-rijndael.lo `test -f 'libhashkit/rijndael.cc' || echo '$(srcdir)/'`libhashkit/rijndael.cc + +libhashkit/libhashkit_libhashkitinc_la-str_algorithm.lo: libhashkit/str_algorithm.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-str_algorithm.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-str_algorithm.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-str_algorithm.lo `test -f 'libhashkit/str_algorithm.cc' || echo '$(srcdir)/'`libhashkit/str_algorithm.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-str_algorithm.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-str_algorithm.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/str_algorithm.cc' object='libhashkit/libhashkit_libhashkitinc_la-str_algorithm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-str_algorithm.lo `test -f 'libhashkit/str_algorithm.cc' || echo '$(srcdir)/'`libhashkit/str_algorithm.cc + +libhashkit/libhashkit_libhashkitinc_la-strerror.lo: libhashkit/strerror.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-strerror.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-strerror.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-strerror.lo `test -f 'libhashkit/strerror.cc' || echo '$(srcdir)/'`libhashkit/strerror.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-strerror.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-strerror.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/strerror.cc' object='libhashkit/libhashkit_libhashkitinc_la-strerror.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-strerror.lo `test -f 'libhashkit/strerror.cc' || echo '$(srcdir)/'`libhashkit/strerror.cc + +libhashkit/libhashkit_libhashkitinc_la-string.lo: libhashkit/string.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-string.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-string.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-string.lo `test -f 'libhashkit/string.cc' || echo '$(srcdir)/'`libhashkit/string.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-string.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-string.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/string.cc' object='libhashkit/libhashkit_libhashkitinc_la-string.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-string.lo `test -f 'libhashkit/string.cc' || echo '$(srcdir)/'`libhashkit/string.cc + +libhashkit/libhashkit_libhashkitinc_la-hsieh.lo: libhashkit/hsieh.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-hsieh.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-hsieh.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-hsieh.lo `test -f 'libhashkit/hsieh.cc' || echo '$(srcdir)/'`libhashkit/hsieh.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-hsieh.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-hsieh.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/hsieh.cc' object='libhashkit/libhashkit_libhashkitinc_la-hsieh.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-hsieh.lo `test -f 'libhashkit/hsieh.cc' || echo '$(srcdir)/'`libhashkit/hsieh.cc + +libhashkit/libhashkit_libhashkitinc_la-nohsieh.lo: libhashkit/nohsieh.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libhashkit_libhashkitinc_la-nohsieh.lo -MD -MP -MF libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-nohsieh.Tpo -c -o libhashkit/libhashkit_libhashkitinc_la-nohsieh.lo `test -f 'libhashkit/nohsieh.cc' || echo '$(srcdir)/'`libhashkit/nohsieh.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-nohsieh.Tpo libhashkit/$(DEPDIR)/libhashkit_libhashkitinc_la-nohsieh.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/nohsieh.cc' object='libhashkit/libhashkit_libhashkitinc_la-nohsieh.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhashkit_libhashkitinc_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libhashkit_libhashkitinc_la-nohsieh.lo `test -f 'libhashkit/nohsieh.cc' || echo '$(srcdir)/'`libhashkit/nohsieh.cc + +libmemcached/csl/libmemcached_libmemcached_la-context.lo: libmemcached/csl/context.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/csl/libmemcached_libmemcached_la-context.lo -MD -MP -MF libmemcached/csl/$(DEPDIR)/libmemcached_libmemcached_la-context.Tpo -c -o libmemcached/csl/libmemcached_libmemcached_la-context.lo `test -f 'libmemcached/csl/context.cc' || echo '$(srcdir)/'`libmemcached/csl/context.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/csl/$(DEPDIR)/libmemcached_libmemcached_la-context.Tpo libmemcached/csl/$(DEPDIR)/libmemcached_libmemcached_la-context.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/csl/context.cc' object='libmemcached/csl/libmemcached_libmemcached_la-context.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/csl/libmemcached_libmemcached_la-context.lo `test -f 'libmemcached/csl/context.cc' || echo '$(srcdir)/'`libmemcached/csl/context.cc + +libmemcached/csl/libmemcached_libmemcached_la-parser.lo: libmemcached/csl/parser.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/csl/libmemcached_libmemcached_la-parser.lo -MD -MP -MF libmemcached/csl/$(DEPDIR)/libmemcached_libmemcached_la-parser.Tpo -c -o libmemcached/csl/libmemcached_libmemcached_la-parser.lo `test -f 'libmemcached/csl/parser.cc' || echo '$(srcdir)/'`libmemcached/csl/parser.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/csl/$(DEPDIR)/libmemcached_libmemcached_la-parser.Tpo libmemcached/csl/$(DEPDIR)/libmemcached_libmemcached_la-parser.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/csl/parser.cc' object='libmemcached/csl/libmemcached_libmemcached_la-parser.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/csl/libmemcached_libmemcached_la-parser.lo `test -f 'libmemcached/csl/parser.cc' || echo '$(srcdir)/'`libmemcached/csl/parser.cc + +libmemcached/csl/libmemcached_libmemcached_la-scanner.lo: libmemcached/csl/scanner.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/csl/libmemcached_libmemcached_la-scanner.lo -MD -MP -MF libmemcached/csl/$(DEPDIR)/libmemcached_libmemcached_la-scanner.Tpo -c -o libmemcached/csl/libmemcached_libmemcached_la-scanner.lo `test -f 'libmemcached/csl/scanner.cc' || echo '$(srcdir)/'`libmemcached/csl/scanner.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/csl/$(DEPDIR)/libmemcached_libmemcached_la-scanner.Tpo libmemcached/csl/$(DEPDIR)/libmemcached_libmemcached_la-scanner.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/csl/scanner.cc' object='libmemcached/csl/libmemcached_libmemcached_la-scanner.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/csl/libmemcached_libmemcached_la-scanner.lo `test -f 'libmemcached/csl/scanner.cc' || echo '$(srcdir)/'`libmemcached/csl/scanner.cc + +libmemcached/libmemcached_libmemcached_la-instance.lo: libmemcached/instance.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-instance.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-instance.Tpo -c -o libmemcached/libmemcached_libmemcached_la-instance.lo `test -f 'libmemcached/instance.cc' || echo '$(srcdir)/'`libmemcached/instance.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-instance.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-instance.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/instance.cc' object='libmemcached/libmemcached_libmemcached_la-instance.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-instance.lo `test -f 'libmemcached/instance.cc' || echo '$(srcdir)/'`libmemcached/instance.cc + +libhashkit/libmemcached_libmemcached_la-aes.lo: libhashkit/aes.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcached_libmemcached_la-aes.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-aes.Tpo -c -o libhashkit/libmemcached_libmemcached_la-aes.lo `test -f 'libhashkit/aes.cc' || echo '$(srcdir)/'`libhashkit/aes.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-aes.Tpo libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-aes.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/aes.cc' object='libhashkit/libmemcached_libmemcached_la-aes.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcached_libmemcached_la-aes.lo `test -f 'libhashkit/aes.cc' || echo '$(srcdir)/'`libhashkit/aes.cc + +libhashkit/libmemcached_libmemcached_la-algorithm.lo: libhashkit/algorithm.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcached_libmemcached_la-algorithm.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-algorithm.Tpo -c -o libhashkit/libmemcached_libmemcached_la-algorithm.lo `test -f 'libhashkit/algorithm.cc' || echo '$(srcdir)/'`libhashkit/algorithm.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-algorithm.Tpo libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-algorithm.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/algorithm.cc' object='libhashkit/libmemcached_libmemcached_la-algorithm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcached_libmemcached_la-algorithm.lo `test -f 'libhashkit/algorithm.cc' || echo '$(srcdir)/'`libhashkit/algorithm.cc + +libhashkit/libmemcached_libmemcached_la-behavior.lo: libhashkit/behavior.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcached_libmemcached_la-behavior.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-behavior.Tpo -c -o libhashkit/libmemcached_libmemcached_la-behavior.lo `test -f 'libhashkit/behavior.cc' || echo '$(srcdir)/'`libhashkit/behavior.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-behavior.Tpo libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-behavior.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/behavior.cc' object='libhashkit/libmemcached_libmemcached_la-behavior.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcached_libmemcached_la-behavior.lo `test -f 'libhashkit/behavior.cc' || echo '$(srcdir)/'`libhashkit/behavior.cc + +libhashkit/libmemcached_libmemcached_la-crc32.lo: libhashkit/crc32.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcached_libmemcached_la-crc32.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-crc32.Tpo -c -o libhashkit/libmemcached_libmemcached_la-crc32.lo `test -f 'libhashkit/crc32.cc' || echo '$(srcdir)/'`libhashkit/crc32.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-crc32.Tpo libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-crc32.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/crc32.cc' object='libhashkit/libmemcached_libmemcached_la-crc32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcached_libmemcached_la-crc32.lo `test -f 'libhashkit/crc32.cc' || echo '$(srcdir)/'`libhashkit/crc32.cc + +libhashkit/libmemcached_libmemcached_la-digest.lo: libhashkit/digest.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcached_libmemcached_la-digest.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-digest.Tpo -c -o libhashkit/libmemcached_libmemcached_la-digest.lo `test -f 'libhashkit/digest.cc' || echo '$(srcdir)/'`libhashkit/digest.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-digest.Tpo libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-digest.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/digest.cc' object='libhashkit/libmemcached_libmemcached_la-digest.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcached_libmemcached_la-digest.lo `test -f 'libhashkit/digest.cc' || echo '$(srcdir)/'`libhashkit/digest.cc + +libhashkit/libmemcached_libmemcached_la-encrypt.lo: libhashkit/encrypt.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcached_libmemcached_la-encrypt.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-encrypt.Tpo -c -o libhashkit/libmemcached_libmemcached_la-encrypt.lo `test -f 'libhashkit/encrypt.cc' || echo '$(srcdir)/'`libhashkit/encrypt.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-encrypt.Tpo libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-encrypt.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/encrypt.cc' object='libhashkit/libmemcached_libmemcached_la-encrypt.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcached_libmemcached_la-encrypt.lo `test -f 'libhashkit/encrypt.cc' || echo '$(srcdir)/'`libhashkit/encrypt.cc + +libhashkit/libmemcached_libmemcached_la-fnv_32.lo: libhashkit/fnv_32.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcached_libmemcached_la-fnv_32.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-fnv_32.Tpo -c -o libhashkit/libmemcached_libmemcached_la-fnv_32.lo `test -f 'libhashkit/fnv_32.cc' || echo '$(srcdir)/'`libhashkit/fnv_32.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-fnv_32.Tpo libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-fnv_32.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/fnv_32.cc' object='libhashkit/libmemcached_libmemcached_la-fnv_32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcached_libmemcached_la-fnv_32.lo `test -f 'libhashkit/fnv_32.cc' || echo '$(srcdir)/'`libhashkit/fnv_32.cc + +libhashkit/libmemcached_libmemcached_la-fnv_64.lo: libhashkit/fnv_64.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcached_libmemcached_la-fnv_64.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-fnv_64.Tpo -c -o libhashkit/libmemcached_libmemcached_la-fnv_64.lo `test -f 'libhashkit/fnv_64.cc' || echo '$(srcdir)/'`libhashkit/fnv_64.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-fnv_64.Tpo libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-fnv_64.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/fnv_64.cc' object='libhashkit/libmemcached_libmemcached_la-fnv_64.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcached_libmemcached_la-fnv_64.lo `test -f 'libhashkit/fnv_64.cc' || echo '$(srcdir)/'`libhashkit/fnv_64.cc + +libhashkit/libmemcached_libmemcached_la-function.lo: libhashkit/function.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcached_libmemcached_la-function.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-function.Tpo -c -o libhashkit/libmemcached_libmemcached_la-function.lo `test -f 'libhashkit/function.cc' || echo '$(srcdir)/'`libhashkit/function.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-function.Tpo libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-function.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/function.cc' object='libhashkit/libmemcached_libmemcached_la-function.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcached_libmemcached_la-function.lo `test -f 'libhashkit/function.cc' || echo '$(srcdir)/'`libhashkit/function.cc + +libhashkit/libmemcached_libmemcached_la-has.lo: libhashkit/has.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcached_libmemcached_la-has.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-has.Tpo -c -o libhashkit/libmemcached_libmemcached_la-has.lo `test -f 'libhashkit/has.cc' || echo '$(srcdir)/'`libhashkit/has.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-has.Tpo libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-has.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/has.cc' object='libhashkit/libmemcached_libmemcached_la-has.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcached_libmemcached_la-has.lo `test -f 'libhashkit/has.cc' || echo '$(srcdir)/'`libhashkit/has.cc + +libhashkit/libmemcached_libmemcached_la-hashkit.lo: libhashkit/hashkit.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcached_libmemcached_la-hashkit.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-hashkit.Tpo -c -o libhashkit/libmemcached_libmemcached_la-hashkit.lo `test -f 'libhashkit/hashkit.cc' || echo '$(srcdir)/'`libhashkit/hashkit.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-hashkit.Tpo libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-hashkit.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/hashkit.cc' object='libhashkit/libmemcached_libmemcached_la-hashkit.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcached_libmemcached_la-hashkit.lo `test -f 'libhashkit/hashkit.cc' || echo '$(srcdir)/'`libhashkit/hashkit.cc + +libhashkit/libmemcached_libmemcached_la-jenkins.lo: libhashkit/jenkins.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcached_libmemcached_la-jenkins.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-jenkins.Tpo -c -o libhashkit/libmemcached_libmemcached_la-jenkins.lo `test -f 'libhashkit/jenkins.cc' || echo '$(srcdir)/'`libhashkit/jenkins.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-jenkins.Tpo libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-jenkins.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/jenkins.cc' object='libhashkit/libmemcached_libmemcached_la-jenkins.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcached_libmemcached_la-jenkins.lo `test -f 'libhashkit/jenkins.cc' || echo '$(srcdir)/'`libhashkit/jenkins.cc + +libhashkit/libmemcached_libmemcached_la-ketama.lo: libhashkit/ketama.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcached_libmemcached_la-ketama.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-ketama.Tpo -c -o libhashkit/libmemcached_libmemcached_la-ketama.lo `test -f 'libhashkit/ketama.cc' || echo '$(srcdir)/'`libhashkit/ketama.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-ketama.Tpo libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-ketama.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/ketama.cc' object='libhashkit/libmemcached_libmemcached_la-ketama.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcached_libmemcached_la-ketama.lo `test -f 'libhashkit/ketama.cc' || echo '$(srcdir)/'`libhashkit/ketama.cc + +libhashkit/libmemcached_libmemcached_la-md5.lo: libhashkit/md5.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcached_libmemcached_la-md5.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-md5.Tpo -c -o libhashkit/libmemcached_libmemcached_la-md5.lo `test -f 'libhashkit/md5.cc' || echo '$(srcdir)/'`libhashkit/md5.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-md5.Tpo libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-md5.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/md5.cc' object='libhashkit/libmemcached_libmemcached_la-md5.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcached_libmemcached_la-md5.lo `test -f 'libhashkit/md5.cc' || echo '$(srcdir)/'`libhashkit/md5.cc + +libhashkit/libmemcached_libmemcached_la-murmur.lo: libhashkit/murmur.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcached_libmemcached_la-murmur.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-murmur.Tpo -c -o libhashkit/libmemcached_libmemcached_la-murmur.lo `test -f 'libhashkit/murmur.cc' || echo '$(srcdir)/'`libhashkit/murmur.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-murmur.Tpo libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-murmur.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/murmur.cc' object='libhashkit/libmemcached_libmemcached_la-murmur.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcached_libmemcached_la-murmur.lo `test -f 'libhashkit/murmur.cc' || echo '$(srcdir)/'`libhashkit/murmur.cc + +libhashkit/libmemcached_libmemcached_la-murmur3.lo: libhashkit/murmur3.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcached_libmemcached_la-murmur3.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-murmur3.Tpo -c -o libhashkit/libmemcached_libmemcached_la-murmur3.lo `test -f 'libhashkit/murmur3.cc' || echo '$(srcdir)/'`libhashkit/murmur3.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-murmur3.Tpo libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-murmur3.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/murmur3.cc' object='libhashkit/libmemcached_libmemcached_la-murmur3.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcached_libmemcached_la-murmur3.lo `test -f 'libhashkit/murmur3.cc' || echo '$(srcdir)/'`libhashkit/murmur3.cc + +libhashkit/libmemcached_libmemcached_la-murmur3_api.lo: libhashkit/murmur3_api.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcached_libmemcached_la-murmur3_api.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-murmur3_api.Tpo -c -o libhashkit/libmemcached_libmemcached_la-murmur3_api.lo `test -f 'libhashkit/murmur3_api.cc' || echo '$(srcdir)/'`libhashkit/murmur3_api.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-murmur3_api.Tpo libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-murmur3_api.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/murmur3_api.cc' object='libhashkit/libmemcached_libmemcached_la-murmur3_api.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcached_libmemcached_la-murmur3_api.lo `test -f 'libhashkit/murmur3_api.cc' || echo '$(srcdir)/'`libhashkit/murmur3_api.cc + +libhashkit/libmemcached_libmemcached_la-one_at_a_time.lo: libhashkit/one_at_a_time.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcached_libmemcached_la-one_at_a_time.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-one_at_a_time.Tpo -c -o libhashkit/libmemcached_libmemcached_la-one_at_a_time.lo `test -f 'libhashkit/one_at_a_time.cc' || echo '$(srcdir)/'`libhashkit/one_at_a_time.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-one_at_a_time.Tpo libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-one_at_a_time.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/one_at_a_time.cc' object='libhashkit/libmemcached_libmemcached_la-one_at_a_time.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcached_libmemcached_la-one_at_a_time.lo `test -f 'libhashkit/one_at_a_time.cc' || echo '$(srcdir)/'`libhashkit/one_at_a_time.cc + +libhashkit/libmemcached_libmemcached_la-rijndael.lo: libhashkit/rijndael.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcached_libmemcached_la-rijndael.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-rijndael.Tpo -c -o libhashkit/libmemcached_libmemcached_la-rijndael.lo `test -f 'libhashkit/rijndael.cc' || echo '$(srcdir)/'`libhashkit/rijndael.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-rijndael.Tpo libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-rijndael.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/rijndael.cc' object='libhashkit/libmemcached_libmemcached_la-rijndael.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcached_libmemcached_la-rijndael.lo `test -f 'libhashkit/rijndael.cc' || echo '$(srcdir)/'`libhashkit/rijndael.cc + +libhashkit/libmemcached_libmemcached_la-str_algorithm.lo: libhashkit/str_algorithm.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcached_libmemcached_la-str_algorithm.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-str_algorithm.Tpo -c -o libhashkit/libmemcached_libmemcached_la-str_algorithm.lo `test -f 'libhashkit/str_algorithm.cc' || echo '$(srcdir)/'`libhashkit/str_algorithm.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-str_algorithm.Tpo libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-str_algorithm.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/str_algorithm.cc' object='libhashkit/libmemcached_libmemcached_la-str_algorithm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcached_libmemcached_la-str_algorithm.lo `test -f 'libhashkit/str_algorithm.cc' || echo '$(srcdir)/'`libhashkit/str_algorithm.cc + +libhashkit/libmemcached_libmemcached_la-strerror.lo: libhashkit/strerror.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcached_libmemcached_la-strerror.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-strerror.Tpo -c -o libhashkit/libmemcached_libmemcached_la-strerror.lo `test -f 'libhashkit/strerror.cc' || echo '$(srcdir)/'`libhashkit/strerror.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-strerror.Tpo libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-strerror.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/strerror.cc' object='libhashkit/libmemcached_libmemcached_la-strerror.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcached_libmemcached_la-strerror.lo `test -f 'libhashkit/strerror.cc' || echo '$(srcdir)/'`libhashkit/strerror.cc + +libhashkit/libmemcached_libmemcached_la-string.lo: libhashkit/string.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcached_libmemcached_la-string.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-string.Tpo -c -o libhashkit/libmemcached_libmemcached_la-string.lo `test -f 'libhashkit/string.cc' || echo '$(srcdir)/'`libhashkit/string.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-string.Tpo libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-string.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/string.cc' object='libhashkit/libmemcached_libmemcached_la-string.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcached_libmemcached_la-string.lo `test -f 'libhashkit/string.cc' || echo '$(srcdir)/'`libhashkit/string.cc + +libhashkit/libmemcached_libmemcached_la-hsieh.lo: libhashkit/hsieh.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcached_libmemcached_la-hsieh.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-hsieh.Tpo -c -o libhashkit/libmemcached_libmemcached_la-hsieh.lo `test -f 'libhashkit/hsieh.cc' || echo '$(srcdir)/'`libhashkit/hsieh.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-hsieh.Tpo libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-hsieh.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/hsieh.cc' object='libhashkit/libmemcached_libmemcached_la-hsieh.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcached_libmemcached_la-hsieh.lo `test -f 'libhashkit/hsieh.cc' || echo '$(srcdir)/'`libhashkit/hsieh.cc + +libhashkit/libmemcached_libmemcached_la-nohsieh.lo: libhashkit/nohsieh.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcached_libmemcached_la-nohsieh.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-nohsieh.Tpo -c -o libhashkit/libmemcached_libmemcached_la-nohsieh.lo `test -f 'libhashkit/nohsieh.cc' || echo '$(srcdir)/'`libhashkit/nohsieh.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-nohsieh.Tpo libhashkit/$(DEPDIR)/libmemcached_libmemcached_la-nohsieh.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/nohsieh.cc' object='libhashkit/libmemcached_libmemcached_la-nohsieh.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcached_libmemcached_la-nohsieh.lo `test -f 'libhashkit/nohsieh.cc' || echo '$(srcdir)/'`libhashkit/nohsieh.cc + +libmemcached/libmemcached_libmemcached_la-allocators.lo: libmemcached/allocators.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-allocators.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-allocators.Tpo -c -o libmemcached/libmemcached_libmemcached_la-allocators.lo `test -f 'libmemcached/allocators.cc' || echo '$(srcdir)/'`libmemcached/allocators.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-allocators.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-allocators.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/allocators.cc' object='libmemcached/libmemcached_libmemcached_la-allocators.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-allocators.lo `test -f 'libmemcached/allocators.cc' || echo '$(srcdir)/'`libmemcached/allocators.cc + +libmemcached/libmemcached_libmemcached_la-analyze.lo: libmemcached/analyze.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-analyze.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-analyze.Tpo -c -o libmemcached/libmemcached_libmemcached_la-analyze.lo `test -f 'libmemcached/analyze.cc' || echo '$(srcdir)/'`libmemcached/analyze.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-analyze.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-analyze.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/analyze.cc' object='libmemcached/libmemcached_libmemcached_la-analyze.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-analyze.lo `test -f 'libmemcached/analyze.cc' || echo '$(srcdir)/'`libmemcached/analyze.cc + +libmemcached/libmemcached_libmemcached_la-auto.lo: libmemcached/auto.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-auto.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-auto.Tpo -c -o libmemcached/libmemcached_libmemcached_la-auto.lo `test -f 'libmemcached/auto.cc' || echo '$(srcdir)/'`libmemcached/auto.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-auto.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-auto.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/auto.cc' object='libmemcached/libmemcached_libmemcached_la-auto.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-auto.lo `test -f 'libmemcached/auto.cc' || echo '$(srcdir)/'`libmemcached/auto.cc + +libmemcached/libmemcached_libmemcached_la-backtrace.lo: libmemcached/backtrace.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-backtrace.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-backtrace.Tpo -c -o libmemcached/libmemcached_libmemcached_la-backtrace.lo `test -f 'libmemcached/backtrace.cc' || echo '$(srcdir)/'`libmemcached/backtrace.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-backtrace.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-backtrace.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/backtrace.cc' object='libmemcached/libmemcached_libmemcached_la-backtrace.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-backtrace.lo `test -f 'libmemcached/backtrace.cc' || echo '$(srcdir)/'`libmemcached/backtrace.cc + +libmemcached/libmemcached_libmemcached_la-behavior.lo: libmemcached/behavior.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-behavior.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-behavior.Tpo -c -o libmemcached/libmemcached_libmemcached_la-behavior.lo `test -f 'libmemcached/behavior.cc' || echo '$(srcdir)/'`libmemcached/behavior.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-behavior.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-behavior.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/behavior.cc' object='libmemcached/libmemcached_libmemcached_la-behavior.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-behavior.lo `test -f 'libmemcached/behavior.cc' || echo '$(srcdir)/'`libmemcached/behavior.cc + +libmemcached/libmemcached_libmemcached_la-byteorder.lo: libmemcached/byteorder.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-byteorder.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-byteorder.Tpo -c -o libmemcached/libmemcached_libmemcached_la-byteorder.lo `test -f 'libmemcached/byteorder.cc' || echo '$(srcdir)/'`libmemcached/byteorder.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-byteorder.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-byteorder.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/byteorder.cc' object='libmemcached/libmemcached_libmemcached_la-byteorder.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-byteorder.lo `test -f 'libmemcached/byteorder.cc' || echo '$(srcdir)/'`libmemcached/byteorder.cc + +libmemcached/libmemcached_libmemcached_la-callback.lo: libmemcached/callback.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-callback.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-callback.Tpo -c -o libmemcached/libmemcached_libmemcached_la-callback.lo `test -f 'libmemcached/callback.cc' || echo '$(srcdir)/'`libmemcached/callback.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-callback.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-callback.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/callback.cc' object='libmemcached/libmemcached_libmemcached_la-callback.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-callback.lo `test -f 'libmemcached/callback.cc' || echo '$(srcdir)/'`libmemcached/callback.cc + +libmemcached/libmemcached_libmemcached_la-connect.lo: libmemcached/connect.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-connect.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-connect.Tpo -c -o libmemcached/libmemcached_libmemcached_la-connect.lo `test -f 'libmemcached/connect.cc' || echo '$(srcdir)/'`libmemcached/connect.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-connect.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-connect.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/connect.cc' object='libmemcached/libmemcached_libmemcached_la-connect.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-connect.lo `test -f 'libmemcached/connect.cc' || echo '$(srcdir)/'`libmemcached/connect.cc + +libmemcached/libmemcached_libmemcached_la-delete.lo: libmemcached/delete.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-delete.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-delete.Tpo -c -o libmemcached/libmemcached_libmemcached_la-delete.lo `test -f 'libmemcached/delete.cc' || echo '$(srcdir)/'`libmemcached/delete.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-delete.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-delete.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/delete.cc' object='libmemcached/libmemcached_libmemcached_la-delete.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-delete.lo `test -f 'libmemcached/delete.cc' || echo '$(srcdir)/'`libmemcached/delete.cc + +libmemcached/libmemcached_libmemcached_la-do.lo: libmemcached/do.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-do.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-do.Tpo -c -o libmemcached/libmemcached_libmemcached_la-do.lo `test -f 'libmemcached/do.cc' || echo '$(srcdir)/'`libmemcached/do.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-do.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-do.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/do.cc' object='libmemcached/libmemcached_libmemcached_la-do.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-do.lo `test -f 'libmemcached/do.cc' || echo '$(srcdir)/'`libmemcached/do.cc + +libmemcached/libmemcached_libmemcached_la-dump.lo: libmemcached/dump.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-dump.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-dump.Tpo -c -o libmemcached/libmemcached_libmemcached_la-dump.lo `test -f 'libmemcached/dump.cc' || echo '$(srcdir)/'`libmemcached/dump.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-dump.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-dump.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/dump.cc' object='libmemcached/libmemcached_libmemcached_la-dump.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-dump.lo `test -f 'libmemcached/dump.cc' || echo '$(srcdir)/'`libmemcached/dump.cc + +libmemcached/libmemcached_libmemcached_la-error.lo: libmemcached/error.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-error.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-error.Tpo -c -o libmemcached/libmemcached_libmemcached_la-error.lo `test -f 'libmemcached/error.cc' || echo '$(srcdir)/'`libmemcached/error.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-error.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-error.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/error.cc' object='libmemcached/libmemcached_libmemcached_la-error.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-error.lo `test -f 'libmemcached/error.cc' || echo '$(srcdir)/'`libmemcached/error.cc + +libmemcached/libmemcached_libmemcached_la-exist.lo: libmemcached/exist.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-exist.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-exist.Tpo -c -o libmemcached/libmemcached_libmemcached_la-exist.lo `test -f 'libmemcached/exist.cc' || echo '$(srcdir)/'`libmemcached/exist.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-exist.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-exist.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/exist.cc' object='libmemcached/libmemcached_libmemcached_la-exist.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-exist.lo `test -f 'libmemcached/exist.cc' || echo '$(srcdir)/'`libmemcached/exist.cc + +libmemcached/libmemcached_libmemcached_la-fetch.lo: libmemcached/fetch.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-fetch.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-fetch.Tpo -c -o libmemcached/libmemcached_libmemcached_la-fetch.lo `test -f 'libmemcached/fetch.cc' || echo '$(srcdir)/'`libmemcached/fetch.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-fetch.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-fetch.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/fetch.cc' object='libmemcached/libmemcached_libmemcached_la-fetch.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-fetch.lo `test -f 'libmemcached/fetch.cc' || echo '$(srcdir)/'`libmemcached/fetch.cc + +libmemcached/libmemcached_libmemcached_la-flag.lo: libmemcached/flag.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-flag.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-flag.Tpo -c -o libmemcached/libmemcached_libmemcached_la-flag.lo `test -f 'libmemcached/flag.cc' || echo '$(srcdir)/'`libmemcached/flag.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-flag.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-flag.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/flag.cc' object='libmemcached/libmemcached_libmemcached_la-flag.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-flag.lo `test -f 'libmemcached/flag.cc' || echo '$(srcdir)/'`libmemcached/flag.cc + +libmemcached/libmemcached_libmemcached_la-flush.lo: libmemcached/flush.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-flush.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-flush.Tpo -c -o libmemcached/libmemcached_libmemcached_la-flush.lo `test -f 'libmemcached/flush.cc' || echo '$(srcdir)/'`libmemcached/flush.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-flush.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-flush.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/flush.cc' object='libmemcached/libmemcached_libmemcached_la-flush.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-flush.lo `test -f 'libmemcached/flush.cc' || echo '$(srcdir)/'`libmemcached/flush.cc + +libmemcached/libmemcached_libmemcached_la-flush_buffers.lo: libmemcached/flush_buffers.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-flush_buffers.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-flush_buffers.Tpo -c -o libmemcached/libmemcached_libmemcached_la-flush_buffers.lo `test -f 'libmemcached/flush_buffers.cc' || echo '$(srcdir)/'`libmemcached/flush_buffers.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-flush_buffers.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-flush_buffers.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/flush_buffers.cc' object='libmemcached/libmemcached_libmemcached_la-flush_buffers.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-flush_buffers.lo `test -f 'libmemcached/flush_buffers.cc' || echo '$(srcdir)/'`libmemcached/flush_buffers.cc + +libmemcached/libmemcached_libmemcached_la-get.lo: libmemcached/get.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-get.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-get.Tpo -c -o libmemcached/libmemcached_libmemcached_la-get.lo `test -f 'libmemcached/get.cc' || echo '$(srcdir)/'`libmemcached/get.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-get.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-get.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/get.cc' object='libmemcached/libmemcached_libmemcached_la-get.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-get.lo `test -f 'libmemcached/get.cc' || echo '$(srcdir)/'`libmemcached/get.cc + +libmemcached/libmemcached_libmemcached_la-hash.lo: libmemcached/hash.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-hash.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-hash.Tpo -c -o libmemcached/libmemcached_libmemcached_la-hash.lo `test -f 'libmemcached/hash.cc' || echo '$(srcdir)/'`libmemcached/hash.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-hash.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-hash.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/hash.cc' object='libmemcached/libmemcached_libmemcached_la-hash.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-hash.lo `test -f 'libmemcached/hash.cc' || echo '$(srcdir)/'`libmemcached/hash.cc + +libmemcached/libmemcached_libmemcached_la-hosts.lo: libmemcached/hosts.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-hosts.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-hosts.Tpo -c -o libmemcached/libmemcached_libmemcached_la-hosts.lo `test -f 'libmemcached/hosts.cc' || echo '$(srcdir)/'`libmemcached/hosts.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-hosts.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-hosts.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/hosts.cc' object='libmemcached/libmemcached_libmemcached_la-hosts.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-hosts.lo `test -f 'libmemcached/hosts.cc' || echo '$(srcdir)/'`libmemcached/hosts.cc + +libmemcached/libmemcached_libmemcached_la-initialize_query.lo: libmemcached/initialize_query.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-initialize_query.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-initialize_query.Tpo -c -o libmemcached/libmemcached_libmemcached_la-initialize_query.lo `test -f 'libmemcached/initialize_query.cc' || echo '$(srcdir)/'`libmemcached/initialize_query.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-initialize_query.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-initialize_query.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/initialize_query.cc' object='libmemcached/libmemcached_libmemcached_la-initialize_query.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-initialize_query.lo `test -f 'libmemcached/initialize_query.cc' || echo '$(srcdir)/'`libmemcached/initialize_query.cc + +libmemcached/libmemcached_libmemcached_la-io.lo: libmemcached/io.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-io.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-io.Tpo -c -o libmemcached/libmemcached_libmemcached_la-io.lo `test -f 'libmemcached/io.cc' || echo '$(srcdir)/'`libmemcached/io.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-io.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-io.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/io.cc' object='libmemcached/libmemcached_libmemcached_la-io.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-io.lo `test -f 'libmemcached/io.cc' || echo '$(srcdir)/'`libmemcached/io.cc + +libmemcached/libmemcached_libmemcached_la-key.lo: libmemcached/key.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-key.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-key.Tpo -c -o libmemcached/libmemcached_libmemcached_la-key.lo `test -f 'libmemcached/key.cc' || echo '$(srcdir)/'`libmemcached/key.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-key.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-key.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/key.cc' object='libmemcached/libmemcached_libmemcached_la-key.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-key.lo `test -f 'libmemcached/key.cc' || echo '$(srcdir)/'`libmemcached/key.cc + +libmemcached/libmemcached_libmemcached_la-memcached.lo: libmemcached/memcached.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-memcached.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-memcached.Tpo -c -o libmemcached/libmemcached_libmemcached_la-memcached.lo `test -f 'libmemcached/memcached.cc' || echo '$(srcdir)/'`libmemcached/memcached.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-memcached.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-memcached.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/memcached.cc' object='libmemcached/libmemcached_libmemcached_la-memcached.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-memcached.lo `test -f 'libmemcached/memcached.cc' || echo '$(srcdir)/'`libmemcached/memcached.cc + +libmemcached/libmemcached_libmemcached_la-encoding_key.lo: libmemcached/encoding_key.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-encoding_key.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-encoding_key.Tpo -c -o libmemcached/libmemcached_libmemcached_la-encoding_key.lo `test -f 'libmemcached/encoding_key.cc' || echo '$(srcdir)/'`libmemcached/encoding_key.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-encoding_key.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-encoding_key.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/encoding_key.cc' object='libmemcached/libmemcached_libmemcached_la-encoding_key.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-encoding_key.lo `test -f 'libmemcached/encoding_key.cc' || echo '$(srcdir)/'`libmemcached/encoding_key.cc + +libmemcached/libmemcached_libmemcached_la-namespace.lo: libmemcached/namespace.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-namespace.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-namespace.Tpo -c -o libmemcached/libmemcached_libmemcached_la-namespace.lo `test -f 'libmemcached/namespace.cc' || echo '$(srcdir)/'`libmemcached/namespace.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-namespace.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-namespace.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/namespace.cc' object='libmemcached/libmemcached_libmemcached_la-namespace.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-namespace.lo `test -f 'libmemcached/namespace.cc' || echo '$(srcdir)/'`libmemcached/namespace.cc + +libmemcached/libmemcached_libmemcached_la-options.lo: libmemcached/options.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-options.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-options.Tpo -c -o libmemcached/libmemcached_libmemcached_la-options.lo `test -f 'libmemcached/options.cc' || echo '$(srcdir)/'`libmemcached/options.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-options.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-options.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/options.cc' object='libmemcached/libmemcached_libmemcached_la-options.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-options.lo `test -f 'libmemcached/options.cc' || echo '$(srcdir)/'`libmemcached/options.cc + +libmemcached/libmemcached_libmemcached_la-parse.lo: libmemcached/parse.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-parse.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-parse.Tpo -c -o libmemcached/libmemcached_libmemcached_la-parse.lo `test -f 'libmemcached/parse.cc' || echo '$(srcdir)/'`libmemcached/parse.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-parse.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-parse.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/parse.cc' object='libmemcached/libmemcached_libmemcached_la-parse.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-parse.lo `test -f 'libmemcached/parse.cc' || echo '$(srcdir)/'`libmemcached/parse.cc + +libmemcached/libmemcached_libmemcached_la-poll.lo: libmemcached/poll.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-poll.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-poll.Tpo -c -o libmemcached/libmemcached_libmemcached_la-poll.lo `test -f 'libmemcached/poll.cc' || echo '$(srcdir)/'`libmemcached/poll.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-poll.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-poll.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/poll.cc' object='libmemcached/libmemcached_libmemcached_la-poll.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-poll.lo `test -f 'libmemcached/poll.cc' || echo '$(srcdir)/'`libmemcached/poll.cc + +libmemcached/libmemcached_libmemcached_la-purge.lo: libmemcached/purge.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-purge.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-purge.Tpo -c -o libmemcached/libmemcached_libmemcached_la-purge.lo `test -f 'libmemcached/purge.cc' || echo '$(srcdir)/'`libmemcached/purge.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-purge.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-purge.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/purge.cc' object='libmemcached/libmemcached_libmemcached_la-purge.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-purge.lo `test -f 'libmemcached/purge.cc' || echo '$(srcdir)/'`libmemcached/purge.cc + +libmemcached/libmemcached_libmemcached_la-quit.lo: libmemcached/quit.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-quit.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-quit.Tpo -c -o libmemcached/libmemcached_libmemcached_la-quit.lo `test -f 'libmemcached/quit.cc' || echo '$(srcdir)/'`libmemcached/quit.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-quit.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-quit.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/quit.cc' object='libmemcached/libmemcached_libmemcached_la-quit.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-quit.lo `test -f 'libmemcached/quit.cc' || echo '$(srcdir)/'`libmemcached/quit.cc + +libmemcached/libmemcached_libmemcached_la-response.lo: libmemcached/response.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-response.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-response.Tpo -c -o libmemcached/libmemcached_libmemcached_la-response.lo `test -f 'libmemcached/response.cc' || echo '$(srcdir)/'`libmemcached/response.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-response.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-response.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/response.cc' object='libmemcached/libmemcached_libmemcached_la-response.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-response.lo `test -f 'libmemcached/response.cc' || echo '$(srcdir)/'`libmemcached/response.cc + +libmemcached/libmemcached_libmemcached_la-result.lo: libmemcached/result.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-result.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-result.Tpo -c -o libmemcached/libmemcached_libmemcached_la-result.lo `test -f 'libmemcached/result.cc' || echo '$(srcdir)/'`libmemcached/result.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-result.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-result.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/result.cc' object='libmemcached/libmemcached_libmemcached_la-result.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-result.lo `test -f 'libmemcached/result.cc' || echo '$(srcdir)/'`libmemcached/result.cc + +libmemcached/libmemcached_libmemcached_la-sasl.lo: libmemcached/sasl.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-sasl.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-sasl.Tpo -c -o libmemcached/libmemcached_libmemcached_la-sasl.lo `test -f 'libmemcached/sasl.cc' || echo '$(srcdir)/'`libmemcached/sasl.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-sasl.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-sasl.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/sasl.cc' object='libmemcached/libmemcached_libmemcached_la-sasl.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-sasl.lo `test -f 'libmemcached/sasl.cc' || echo '$(srcdir)/'`libmemcached/sasl.cc + +libmemcached/libmemcached_libmemcached_la-server.lo: libmemcached/server.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-server.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-server.Tpo -c -o libmemcached/libmemcached_libmemcached_la-server.lo `test -f 'libmemcached/server.cc' || echo '$(srcdir)/'`libmemcached/server.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-server.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-server.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/server.cc' object='libmemcached/libmemcached_libmemcached_la-server.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-server.lo `test -f 'libmemcached/server.cc' || echo '$(srcdir)/'`libmemcached/server.cc + +libmemcached/libmemcached_libmemcached_la-server_list.lo: libmemcached/server_list.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-server_list.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-server_list.Tpo -c -o libmemcached/libmemcached_libmemcached_la-server_list.lo `test -f 'libmemcached/server_list.cc' || echo '$(srcdir)/'`libmemcached/server_list.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-server_list.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-server_list.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/server_list.cc' object='libmemcached/libmemcached_libmemcached_la-server_list.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-server_list.lo `test -f 'libmemcached/server_list.cc' || echo '$(srcdir)/'`libmemcached/server_list.cc + +libmemcached/libmemcached_libmemcached_la-stats.lo: libmemcached/stats.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-stats.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-stats.Tpo -c -o libmemcached/libmemcached_libmemcached_la-stats.lo `test -f 'libmemcached/stats.cc' || echo '$(srcdir)/'`libmemcached/stats.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-stats.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-stats.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/stats.cc' object='libmemcached/libmemcached_libmemcached_la-stats.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-stats.lo `test -f 'libmemcached/stats.cc' || echo '$(srcdir)/'`libmemcached/stats.cc + +libmemcached/libmemcached_libmemcached_la-storage.lo: libmemcached/storage.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-storage.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-storage.Tpo -c -o libmemcached/libmemcached_libmemcached_la-storage.lo `test -f 'libmemcached/storage.cc' || echo '$(srcdir)/'`libmemcached/storage.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-storage.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-storage.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/storage.cc' object='libmemcached/libmemcached_libmemcached_la-storage.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-storage.lo `test -f 'libmemcached/storage.cc' || echo '$(srcdir)/'`libmemcached/storage.cc + +libmemcached/libmemcached_libmemcached_la-strerror.lo: libmemcached/strerror.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-strerror.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-strerror.Tpo -c -o libmemcached/libmemcached_libmemcached_la-strerror.lo `test -f 'libmemcached/strerror.cc' || echo '$(srcdir)/'`libmemcached/strerror.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-strerror.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-strerror.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/strerror.cc' object='libmemcached/libmemcached_libmemcached_la-strerror.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-strerror.lo `test -f 'libmemcached/strerror.cc' || echo '$(srcdir)/'`libmemcached/strerror.cc + +libmemcached/libmemcached_libmemcached_la-string.lo: libmemcached/string.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-string.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-string.Tpo -c -o libmemcached/libmemcached_libmemcached_la-string.lo `test -f 'libmemcached/string.cc' || echo '$(srcdir)/'`libmemcached/string.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-string.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-string.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/string.cc' object='libmemcached/libmemcached_libmemcached_la-string.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-string.lo `test -f 'libmemcached/string.cc' || echo '$(srcdir)/'`libmemcached/string.cc + +libmemcached/libmemcached_libmemcached_la-touch.lo: libmemcached/touch.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-touch.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-touch.Tpo -c -o libmemcached/libmemcached_libmemcached_la-touch.lo `test -f 'libmemcached/touch.cc' || echo '$(srcdir)/'`libmemcached/touch.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-touch.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-touch.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/touch.cc' object='libmemcached/libmemcached_libmemcached_la-touch.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-touch.lo `test -f 'libmemcached/touch.cc' || echo '$(srcdir)/'`libmemcached/touch.cc + +libmemcached/libmemcached_libmemcached_la-udp.lo: libmemcached/udp.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-udp.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-udp.Tpo -c -o libmemcached/libmemcached_libmemcached_la-udp.lo `test -f 'libmemcached/udp.cc' || echo '$(srcdir)/'`libmemcached/udp.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-udp.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-udp.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/udp.cc' object='libmemcached/libmemcached_libmemcached_la-udp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-udp.lo `test -f 'libmemcached/udp.cc' || echo '$(srcdir)/'`libmemcached/udp.cc + +libmemcached/libmemcached_libmemcached_la-verbosity.lo: libmemcached/verbosity.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-verbosity.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-verbosity.Tpo -c -o libmemcached/libmemcached_libmemcached_la-verbosity.lo `test -f 'libmemcached/verbosity.cc' || echo '$(srcdir)/'`libmemcached/verbosity.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-verbosity.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-verbosity.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/verbosity.cc' object='libmemcached/libmemcached_libmemcached_la-verbosity.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-verbosity.lo `test -f 'libmemcached/verbosity.cc' || echo '$(srcdir)/'`libmemcached/verbosity.cc + +libmemcached/libmemcached_libmemcached_la-version.lo: libmemcached/version.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcached_la-version.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-version.Tpo -c -o libmemcached/libmemcached_libmemcached_la-version.lo `test -f 'libmemcached/version.cc' || echo '$(srcdir)/'`libmemcached/version.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-version.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcached_la-version.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/version.cc' object='libmemcached/libmemcached_libmemcached_la-version.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcached_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcached_la-version.lo `test -f 'libmemcached/version.cc' || echo '$(srcdir)/'`libmemcached/version.cc + +libmemcached/libmemcached_libmemcachedprotocol_la-byteorder.lo: libmemcached/byteorder.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedprotocol_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcachedprotocol_la-byteorder.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-byteorder.Tpo -c -o libmemcached/libmemcached_libmemcachedprotocol_la-byteorder.lo `test -f 'libmemcached/byteorder.cc' || echo '$(srcdir)/'`libmemcached/byteorder.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-byteorder.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcachedprotocol_la-byteorder.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/byteorder.cc' object='libmemcached/libmemcached_libmemcachedprotocol_la-byteorder.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedprotocol_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcachedprotocol_la-byteorder.lo `test -f 'libmemcached/byteorder.cc' || echo '$(srcdir)/'`libmemcached/byteorder.cc + +libmemcached/libmemcached_libmemcachedutil_la-backtrace.lo: libmemcached/backtrace.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedutil_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcached_libmemcachedutil_la-backtrace.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcached_libmemcachedutil_la-backtrace.Tpo -c -o libmemcached/libmemcached_libmemcachedutil_la-backtrace.lo `test -f 'libmemcached/backtrace.cc' || echo '$(srcdir)/'`libmemcached/backtrace.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcached_libmemcachedutil_la-backtrace.Tpo libmemcached/$(DEPDIR)/libmemcached_libmemcachedutil_la-backtrace.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/backtrace.cc' object='libmemcached/libmemcached_libmemcachedutil_la-backtrace.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedutil_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcached_libmemcachedutil_la-backtrace.lo `test -f 'libmemcached/backtrace.cc' || echo '$(srcdir)/'`libmemcached/backtrace.cc + +libmemcachedutil/libmemcached_libmemcachedutil_la-flush.lo: libmemcachedutil/flush.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedutil_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcachedutil/libmemcached_libmemcachedutil_la-flush.lo -MD -MP -MF libmemcachedutil/$(DEPDIR)/libmemcached_libmemcachedutil_la-flush.Tpo -c -o libmemcachedutil/libmemcached_libmemcachedutil_la-flush.lo `test -f 'libmemcachedutil/flush.cc' || echo '$(srcdir)/'`libmemcachedutil/flush.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcachedutil/$(DEPDIR)/libmemcached_libmemcachedutil_la-flush.Tpo libmemcachedutil/$(DEPDIR)/libmemcached_libmemcachedutil_la-flush.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcachedutil/flush.cc' object='libmemcachedutil/libmemcached_libmemcachedutil_la-flush.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedutil_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcachedutil/libmemcached_libmemcachedutil_la-flush.lo `test -f 'libmemcachedutil/flush.cc' || echo '$(srcdir)/'`libmemcachedutil/flush.cc + +libmemcachedutil/libmemcached_libmemcachedutil_la-pid.lo: libmemcachedutil/pid.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedutil_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcachedutil/libmemcached_libmemcachedutil_la-pid.lo -MD -MP -MF libmemcachedutil/$(DEPDIR)/libmemcached_libmemcachedutil_la-pid.Tpo -c -o libmemcachedutil/libmemcached_libmemcachedutil_la-pid.lo `test -f 'libmemcachedutil/pid.cc' || echo '$(srcdir)/'`libmemcachedutil/pid.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcachedutil/$(DEPDIR)/libmemcached_libmemcachedutil_la-pid.Tpo libmemcachedutil/$(DEPDIR)/libmemcached_libmemcachedutil_la-pid.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcachedutil/pid.cc' object='libmemcachedutil/libmemcached_libmemcachedutil_la-pid.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedutil_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcachedutil/libmemcached_libmemcachedutil_la-pid.lo `test -f 'libmemcachedutil/pid.cc' || echo '$(srcdir)/'`libmemcachedutil/pid.cc + +libmemcachedutil/libmemcached_libmemcachedutil_la-ping.lo: libmemcachedutil/ping.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedutil_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcachedutil/libmemcached_libmemcachedutil_la-ping.lo -MD -MP -MF libmemcachedutil/$(DEPDIR)/libmemcached_libmemcachedutil_la-ping.Tpo -c -o libmemcachedutil/libmemcached_libmemcachedutil_la-ping.lo `test -f 'libmemcachedutil/ping.cc' || echo '$(srcdir)/'`libmemcachedutil/ping.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcachedutil/$(DEPDIR)/libmemcached_libmemcachedutil_la-ping.Tpo libmemcachedutil/$(DEPDIR)/libmemcached_libmemcachedutil_la-ping.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcachedutil/ping.cc' object='libmemcachedutil/libmemcached_libmemcachedutil_la-ping.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedutil_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcachedutil/libmemcached_libmemcachedutil_la-ping.lo `test -f 'libmemcachedutil/ping.cc' || echo '$(srcdir)/'`libmemcachedutil/ping.cc + +libmemcachedutil/libmemcached_libmemcachedutil_la-pool.lo: libmemcachedutil/pool.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedutil_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcachedutil/libmemcached_libmemcachedutil_la-pool.lo -MD -MP -MF libmemcachedutil/$(DEPDIR)/libmemcached_libmemcachedutil_la-pool.Tpo -c -o libmemcachedutil/libmemcached_libmemcachedutil_la-pool.lo `test -f 'libmemcachedutil/pool.cc' || echo '$(srcdir)/'`libmemcachedutil/pool.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcachedutil/$(DEPDIR)/libmemcached_libmemcachedutil_la-pool.Tpo libmemcachedutil/$(DEPDIR)/libmemcached_libmemcachedutil_la-pool.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcachedutil/pool.cc' object='libmemcachedutil/libmemcached_libmemcachedutil_la-pool.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedutil_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcachedutil/libmemcached_libmemcachedutil_la-pool.lo `test -f 'libmemcachedutil/pool.cc' || echo '$(srcdir)/'`libmemcachedutil/pool.cc + +libmemcachedutil/libmemcached_libmemcachedutil_la-version.lo: libmemcachedutil/version.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedutil_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcachedutil/libmemcached_libmemcachedutil_la-version.lo -MD -MP -MF libmemcachedutil/$(DEPDIR)/libmemcached_libmemcachedutil_la-version.Tpo -c -o libmemcachedutil/libmemcached_libmemcachedutil_la-version.lo `test -f 'libmemcachedutil/version.cc' || echo '$(srcdir)/'`libmemcachedutil/version.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcachedutil/$(DEPDIR)/libmemcached_libmemcachedutil_la-version.Tpo libmemcachedutil/$(DEPDIR)/libmemcached_libmemcachedutil_la-version.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcachedutil/version.cc' object='libmemcachedutil/libmemcached_libmemcachedutil_la-version.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcached_libmemcachedutil_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcachedutil/libmemcached_libmemcachedutil_la-version.lo `test -f 'libmemcachedutil/version.cc' || echo '$(srcdir)/'`libmemcachedutil/version.cc + +libmemcached/csl/libmemcachedinternal_libmemcachedinternal_la-context.lo: libmemcached/csl/context.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/csl/libmemcachedinternal_libmemcachedinternal_la-context.lo -MD -MP -MF libmemcached/csl/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-context.Tpo -c -o libmemcached/csl/libmemcachedinternal_libmemcachedinternal_la-context.lo `test -f 'libmemcached/csl/context.cc' || echo '$(srcdir)/'`libmemcached/csl/context.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/csl/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-context.Tpo libmemcached/csl/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-context.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/csl/context.cc' object='libmemcached/csl/libmemcachedinternal_libmemcachedinternal_la-context.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/csl/libmemcachedinternal_libmemcachedinternal_la-context.lo `test -f 'libmemcached/csl/context.cc' || echo '$(srcdir)/'`libmemcached/csl/context.cc + +libmemcached/csl/libmemcachedinternal_libmemcachedinternal_la-parser.lo: libmemcached/csl/parser.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/csl/libmemcachedinternal_libmemcachedinternal_la-parser.lo -MD -MP -MF libmemcached/csl/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-parser.Tpo -c -o libmemcached/csl/libmemcachedinternal_libmemcachedinternal_la-parser.lo `test -f 'libmemcached/csl/parser.cc' || echo '$(srcdir)/'`libmemcached/csl/parser.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/csl/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-parser.Tpo libmemcached/csl/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-parser.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/csl/parser.cc' object='libmemcached/csl/libmemcachedinternal_libmemcachedinternal_la-parser.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/csl/libmemcachedinternal_libmemcachedinternal_la-parser.lo `test -f 'libmemcached/csl/parser.cc' || echo '$(srcdir)/'`libmemcached/csl/parser.cc + +libmemcached/csl/libmemcachedinternal_libmemcachedinternal_la-scanner.lo: libmemcached/csl/scanner.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/csl/libmemcachedinternal_libmemcachedinternal_la-scanner.lo -MD -MP -MF libmemcached/csl/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-scanner.Tpo -c -o libmemcached/csl/libmemcachedinternal_libmemcachedinternal_la-scanner.lo `test -f 'libmemcached/csl/scanner.cc' || echo '$(srcdir)/'`libmemcached/csl/scanner.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/csl/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-scanner.Tpo libmemcached/csl/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-scanner.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/csl/scanner.cc' object='libmemcached/csl/libmemcachedinternal_libmemcachedinternal_la-scanner.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/csl/libmemcachedinternal_libmemcachedinternal_la-scanner.lo `test -f 'libmemcached/csl/scanner.cc' || echo '$(srcdir)/'`libmemcached/csl/scanner.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-instance.lo: libmemcached/instance.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-instance.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-instance.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-instance.lo `test -f 'libmemcached/instance.cc' || echo '$(srcdir)/'`libmemcached/instance.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-instance.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-instance.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/instance.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-instance.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-instance.lo `test -f 'libmemcached/instance.cc' || echo '$(srcdir)/'`libmemcached/instance.cc + +libhashkit/libmemcachedinternal_libmemcachedinternal_la-aes.lo: libhashkit/aes.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcachedinternal_libmemcachedinternal_la-aes.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-aes.Tpo -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-aes.lo `test -f 'libhashkit/aes.cc' || echo '$(srcdir)/'`libhashkit/aes.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-aes.Tpo libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-aes.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/aes.cc' object='libhashkit/libmemcachedinternal_libmemcachedinternal_la-aes.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-aes.lo `test -f 'libhashkit/aes.cc' || echo '$(srcdir)/'`libhashkit/aes.cc + +libhashkit/libmemcachedinternal_libmemcachedinternal_la-algorithm.lo: libhashkit/algorithm.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcachedinternal_libmemcachedinternal_la-algorithm.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-algorithm.Tpo -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-algorithm.lo `test -f 'libhashkit/algorithm.cc' || echo '$(srcdir)/'`libhashkit/algorithm.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-algorithm.Tpo libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-algorithm.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/algorithm.cc' object='libhashkit/libmemcachedinternal_libmemcachedinternal_la-algorithm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-algorithm.lo `test -f 'libhashkit/algorithm.cc' || echo '$(srcdir)/'`libhashkit/algorithm.cc + +libhashkit/libmemcachedinternal_libmemcachedinternal_la-behavior.lo: libhashkit/behavior.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcachedinternal_libmemcachedinternal_la-behavior.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-behavior.Tpo -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-behavior.lo `test -f 'libhashkit/behavior.cc' || echo '$(srcdir)/'`libhashkit/behavior.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-behavior.Tpo libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-behavior.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/behavior.cc' object='libhashkit/libmemcachedinternal_libmemcachedinternal_la-behavior.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-behavior.lo `test -f 'libhashkit/behavior.cc' || echo '$(srcdir)/'`libhashkit/behavior.cc + +libhashkit/libmemcachedinternal_libmemcachedinternal_la-crc32.lo: libhashkit/crc32.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcachedinternal_libmemcachedinternal_la-crc32.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-crc32.Tpo -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-crc32.lo `test -f 'libhashkit/crc32.cc' || echo '$(srcdir)/'`libhashkit/crc32.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-crc32.Tpo libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-crc32.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/crc32.cc' object='libhashkit/libmemcachedinternal_libmemcachedinternal_la-crc32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-crc32.lo `test -f 'libhashkit/crc32.cc' || echo '$(srcdir)/'`libhashkit/crc32.cc + +libhashkit/libmemcachedinternal_libmemcachedinternal_la-digest.lo: libhashkit/digest.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcachedinternal_libmemcachedinternal_la-digest.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-digest.Tpo -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-digest.lo `test -f 'libhashkit/digest.cc' || echo '$(srcdir)/'`libhashkit/digest.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-digest.Tpo libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-digest.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/digest.cc' object='libhashkit/libmemcachedinternal_libmemcachedinternal_la-digest.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-digest.lo `test -f 'libhashkit/digest.cc' || echo '$(srcdir)/'`libhashkit/digest.cc + +libhashkit/libmemcachedinternal_libmemcachedinternal_la-encrypt.lo: libhashkit/encrypt.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcachedinternal_libmemcachedinternal_la-encrypt.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-encrypt.Tpo -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-encrypt.lo `test -f 'libhashkit/encrypt.cc' || echo '$(srcdir)/'`libhashkit/encrypt.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-encrypt.Tpo libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-encrypt.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/encrypt.cc' object='libhashkit/libmemcachedinternal_libmemcachedinternal_la-encrypt.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-encrypt.lo `test -f 'libhashkit/encrypt.cc' || echo '$(srcdir)/'`libhashkit/encrypt.cc + +libhashkit/libmemcachedinternal_libmemcachedinternal_la-fnv_32.lo: libhashkit/fnv_32.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcachedinternal_libmemcachedinternal_la-fnv_32.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-fnv_32.Tpo -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-fnv_32.lo `test -f 'libhashkit/fnv_32.cc' || echo '$(srcdir)/'`libhashkit/fnv_32.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-fnv_32.Tpo libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-fnv_32.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/fnv_32.cc' object='libhashkit/libmemcachedinternal_libmemcachedinternal_la-fnv_32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-fnv_32.lo `test -f 'libhashkit/fnv_32.cc' || echo '$(srcdir)/'`libhashkit/fnv_32.cc + +libhashkit/libmemcachedinternal_libmemcachedinternal_la-fnv_64.lo: libhashkit/fnv_64.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcachedinternal_libmemcachedinternal_la-fnv_64.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-fnv_64.Tpo -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-fnv_64.lo `test -f 'libhashkit/fnv_64.cc' || echo '$(srcdir)/'`libhashkit/fnv_64.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-fnv_64.Tpo libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-fnv_64.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/fnv_64.cc' object='libhashkit/libmemcachedinternal_libmemcachedinternal_la-fnv_64.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-fnv_64.lo `test -f 'libhashkit/fnv_64.cc' || echo '$(srcdir)/'`libhashkit/fnv_64.cc + +libhashkit/libmemcachedinternal_libmemcachedinternal_la-function.lo: libhashkit/function.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcachedinternal_libmemcachedinternal_la-function.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-function.Tpo -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-function.lo `test -f 'libhashkit/function.cc' || echo '$(srcdir)/'`libhashkit/function.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-function.Tpo libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-function.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/function.cc' object='libhashkit/libmemcachedinternal_libmemcachedinternal_la-function.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-function.lo `test -f 'libhashkit/function.cc' || echo '$(srcdir)/'`libhashkit/function.cc + +libhashkit/libmemcachedinternal_libmemcachedinternal_la-has.lo: libhashkit/has.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcachedinternal_libmemcachedinternal_la-has.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-has.Tpo -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-has.lo `test -f 'libhashkit/has.cc' || echo '$(srcdir)/'`libhashkit/has.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-has.Tpo libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-has.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/has.cc' object='libhashkit/libmemcachedinternal_libmemcachedinternal_la-has.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-has.lo `test -f 'libhashkit/has.cc' || echo '$(srcdir)/'`libhashkit/has.cc + +libhashkit/libmemcachedinternal_libmemcachedinternal_la-hashkit.lo: libhashkit/hashkit.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcachedinternal_libmemcachedinternal_la-hashkit.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-hashkit.Tpo -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-hashkit.lo `test -f 'libhashkit/hashkit.cc' || echo '$(srcdir)/'`libhashkit/hashkit.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-hashkit.Tpo libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-hashkit.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/hashkit.cc' object='libhashkit/libmemcachedinternal_libmemcachedinternal_la-hashkit.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-hashkit.lo `test -f 'libhashkit/hashkit.cc' || echo '$(srcdir)/'`libhashkit/hashkit.cc + +libhashkit/libmemcachedinternal_libmemcachedinternal_la-jenkins.lo: libhashkit/jenkins.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcachedinternal_libmemcachedinternal_la-jenkins.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-jenkins.Tpo -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-jenkins.lo `test -f 'libhashkit/jenkins.cc' || echo '$(srcdir)/'`libhashkit/jenkins.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-jenkins.Tpo libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-jenkins.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/jenkins.cc' object='libhashkit/libmemcachedinternal_libmemcachedinternal_la-jenkins.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-jenkins.lo `test -f 'libhashkit/jenkins.cc' || echo '$(srcdir)/'`libhashkit/jenkins.cc + +libhashkit/libmemcachedinternal_libmemcachedinternal_la-ketama.lo: libhashkit/ketama.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcachedinternal_libmemcachedinternal_la-ketama.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-ketama.Tpo -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-ketama.lo `test -f 'libhashkit/ketama.cc' || echo '$(srcdir)/'`libhashkit/ketama.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-ketama.Tpo libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-ketama.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/ketama.cc' object='libhashkit/libmemcachedinternal_libmemcachedinternal_la-ketama.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-ketama.lo `test -f 'libhashkit/ketama.cc' || echo '$(srcdir)/'`libhashkit/ketama.cc + +libhashkit/libmemcachedinternal_libmemcachedinternal_la-md5.lo: libhashkit/md5.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcachedinternal_libmemcachedinternal_la-md5.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-md5.Tpo -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-md5.lo `test -f 'libhashkit/md5.cc' || echo '$(srcdir)/'`libhashkit/md5.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-md5.Tpo libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-md5.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/md5.cc' object='libhashkit/libmemcachedinternal_libmemcachedinternal_la-md5.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-md5.lo `test -f 'libhashkit/md5.cc' || echo '$(srcdir)/'`libhashkit/md5.cc + +libhashkit/libmemcachedinternal_libmemcachedinternal_la-murmur.lo: libhashkit/murmur.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcachedinternal_libmemcachedinternal_la-murmur.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-murmur.Tpo -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-murmur.lo `test -f 'libhashkit/murmur.cc' || echo '$(srcdir)/'`libhashkit/murmur.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-murmur.Tpo libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-murmur.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/murmur.cc' object='libhashkit/libmemcachedinternal_libmemcachedinternal_la-murmur.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-murmur.lo `test -f 'libhashkit/murmur.cc' || echo '$(srcdir)/'`libhashkit/murmur.cc + +libhashkit/libmemcachedinternal_libmemcachedinternal_la-murmur3.lo: libhashkit/murmur3.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcachedinternal_libmemcachedinternal_la-murmur3.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-murmur3.Tpo -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-murmur3.lo `test -f 'libhashkit/murmur3.cc' || echo '$(srcdir)/'`libhashkit/murmur3.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-murmur3.Tpo libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-murmur3.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/murmur3.cc' object='libhashkit/libmemcachedinternal_libmemcachedinternal_la-murmur3.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-murmur3.lo `test -f 'libhashkit/murmur3.cc' || echo '$(srcdir)/'`libhashkit/murmur3.cc + +libhashkit/libmemcachedinternal_libmemcachedinternal_la-murmur3_api.lo: libhashkit/murmur3_api.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcachedinternal_libmemcachedinternal_la-murmur3_api.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-murmur3_api.Tpo -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-murmur3_api.lo `test -f 'libhashkit/murmur3_api.cc' || echo '$(srcdir)/'`libhashkit/murmur3_api.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-murmur3_api.Tpo libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-murmur3_api.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/murmur3_api.cc' object='libhashkit/libmemcachedinternal_libmemcachedinternal_la-murmur3_api.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-murmur3_api.lo `test -f 'libhashkit/murmur3_api.cc' || echo '$(srcdir)/'`libhashkit/murmur3_api.cc + +libhashkit/libmemcachedinternal_libmemcachedinternal_la-one_at_a_time.lo: libhashkit/one_at_a_time.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcachedinternal_libmemcachedinternal_la-one_at_a_time.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-one_at_a_time.Tpo -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-one_at_a_time.lo `test -f 'libhashkit/one_at_a_time.cc' || echo '$(srcdir)/'`libhashkit/one_at_a_time.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-one_at_a_time.Tpo libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-one_at_a_time.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/one_at_a_time.cc' object='libhashkit/libmemcachedinternal_libmemcachedinternal_la-one_at_a_time.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-one_at_a_time.lo `test -f 'libhashkit/one_at_a_time.cc' || echo '$(srcdir)/'`libhashkit/one_at_a_time.cc + +libhashkit/libmemcachedinternal_libmemcachedinternal_la-rijndael.lo: libhashkit/rijndael.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcachedinternal_libmemcachedinternal_la-rijndael.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-rijndael.Tpo -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-rijndael.lo `test -f 'libhashkit/rijndael.cc' || echo '$(srcdir)/'`libhashkit/rijndael.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-rijndael.Tpo libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-rijndael.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/rijndael.cc' object='libhashkit/libmemcachedinternal_libmemcachedinternal_la-rijndael.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-rijndael.lo `test -f 'libhashkit/rijndael.cc' || echo '$(srcdir)/'`libhashkit/rijndael.cc + +libhashkit/libmemcachedinternal_libmemcachedinternal_la-str_algorithm.lo: libhashkit/str_algorithm.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcachedinternal_libmemcachedinternal_la-str_algorithm.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-str_algorithm.Tpo -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-str_algorithm.lo `test -f 'libhashkit/str_algorithm.cc' || echo '$(srcdir)/'`libhashkit/str_algorithm.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-str_algorithm.Tpo libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-str_algorithm.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/str_algorithm.cc' object='libhashkit/libmemcachedinternal_libmemcachedinternal_la-str_algorithm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-str_algorithm.lo `test -f 'libhashkit/str_algorithm.cc' || echo '$(srcdir)/'`libhashkit/str_algorithm.cc + +libhashkit/libmemcachedinternal_libmemcachedinternal_la-strerror.lo: libhashkit/strerror.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcachedinternal_libmemcachedinternal_la-strerror.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-strerror.Tpo -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-strerror.lo `test -f 'libhashkit/strerror.cc' || echo '$(srcdir)/'`libhashkit/strerror.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-strerror.Tpo libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-strerror.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/strerror.cc' object='libhashkit/libmemcachedinternal_libmemcachedinternal_la-strerror.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-strerror.lo `test -f 'libhashkit/strerror.cc' || echo '$(srcdir)/'`libhashkit/strerror.cc + +libhashkit/libmemcachedinternal_libmemcachedinternal_la-string.lo: libhashkit/string.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcachedinternal_libmemcachedinternal_la-string.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-string.Tpo -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-string.lo `test -f 'libhashkit/string.cc' || echo '$(srcdir)/'`libhashkit/string.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-string.Tpo libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-string.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/string.cc' object='libhashkit/libmemcachedinternal_libmemcachedinternal_la-string.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-string.lo `test -f 'libhashkit/string.cc' || echo '$(srcdir)/'`libhashkit/string.cc + +libhashkit/libmemcachedinternal_libmemcachedinternal_la-hsieh.lo: libhashkit/hsieh.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcachedinternal_libmemcachedinternal_la-hsieh.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-hsieh.Tpo -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-hsieh.lo `test -f 'libhashkit/hsieh.cc' || echo '$(srcdir)/'`libhashkit/hsieh.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-hsieh.Tpo libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-hsieh.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/hsieh.cc' object='libhashkit/libmemcachedinternal_libmemcachedinternal_la-hsieh.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-hsieh.lo `test -f 'libhashkit/hsieh.cc' || echo '$(srcdir)/'`libhashkit/hsieh.cc + +libhashkit/libmemcachedinternal_libmemcachedinternal_la-nohsieh.lo: libhashkit/nohsieh.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libhashkit/libmemcachedinternal_libmemcachedinternal_la-nohsieh.lo -MD -MP -MF libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-nohsieh.Tpo -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-nohsieh.lo `test -f 'libhashkit/nohsieh.cc' || echo '$(srcdir)/'`libhashkit/nohsieh.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-nohsieh.Tpo libhashkit/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-nohsieh.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libhashkit/nohsieh.cc' object='libhashkit/libmemcachedinternal_libmemcachedinternal_la-nohsieh.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libhashkit/libmemcachedinternal_libmemcachedinternal_la-nohsieh.lo `test -f 'libhashkit/nohsieh.cc' || echo '$(srcdir)/'`libhashkit/nohsieh.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-allocators.lo: libmemcached/allocators.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-allocators.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-allocators.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-allocators.lo `test -f 'libmemcached/allocators.cc' || echo '$(srcdir)/'`libmemcached/allocators.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-allocators.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-allocators.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/allocators.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-allocators.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-allocators.lo `test -f 'libmemcached/allocators.cc' || echo '$(srcdir)/'`libmemcached/allocators.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-analyze.lo: libmemcached/analyze.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-analyze.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-analyze.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-analyze.lo `test -f 'libmemcached/analyze.cc' || echo '$(srcdir)/'`libmemcached/analyze.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-analyze.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-analyze.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/analyze.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-analyze.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-analyze.lo `test -f 'libmemcached/analyze.cc' || echo '$(srcdir)/'`libmemcached/analyze.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-auto.lo: libmemcached/auto.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-auto.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-auto.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-auto.lo `test -f 'libmemcached/auto.cc' || echo '$(srcdir)/'`libmemcached/auto.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-auto.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-auto.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/auto.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-auto.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-auto.lo `test -f 'libmemcached/auto.cc' || echo '$(srcdir)/'`libmemcached/auto.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-backtrace.lo: libmemcached/backtrace.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-backtrace.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-backtrace.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-backtrace.lo `test -f 'libmemcached/backtrace.cc' || echo '$(srcdir)/'`libmemcached/backtrace.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-backtrace.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-backtrace.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/backtrace.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-backtrace.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-backtrace.lo `test -f 'libmemcached/backtrace.cc' || echo '$(srcdir)/'`libmemcached/backtrace.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-behavior.lo: libmemcached/behavior.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-behavior.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-behavior.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-behavior.lo `test -f 'libmemcached/behavior.cc' || echo '$(srcdir)/'`libmemcached/behavior.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-behavior.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-behavior.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/behavior.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-behavior.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-behavior.lo `test -f 'libmemcached/behavior.cc' || echo '$(srcdir)/'`libmemcached/behavior.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-byteorder.lo: libmemcached/byteorder.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-byteorder.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-byteorder.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-byteorder.lo `test -f 'libmemcached/byteorder.cc' || echo '$(srcdir)/'`libmemcached/byteorder.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-byteorder.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-byteorder.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/byteorder.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-byteorder.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-byteorder.lo `test -f 'libmemcached/byteorder.cc' || echo '$(srcdir)/'`libmemcached/byteorder.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-callback.lo: libmemcached/callback.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-callback.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-callback.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-callback.lo `test -f 'libmemcached/callback.cc' || echo '$(srcdir)/'`libmemcached/callback.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-callback.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-callback.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/callback.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-callback.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-callback.lo `test -f 'libmemcached/callback.cc' || echo '$(srcdir)/'`libmemcached/callback.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-connect.lo: libmemcached/connect.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-connect.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-connect.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-connect.lo `test -f 'libmemcached/connect.cc' || echo '$(srcdir)/'`libmemcached/connect.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-connect.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-connect.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/connect.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-connect.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-connect.lo `test -f 'libmemcached/connect.cc' || echo '$(srcdir)/'`libmemcached/connect.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-delete.lo: libmemcached/delete.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-delete.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-delete.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-delete.lo `test -f 'libmemcached/delete.cc' || echo '$(srcdir)/'`libmemcached/delete.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-delete.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-delete.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/delete.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-delete.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-delete.lo `test -f 'libmemcached/delete.cc' || echo '$(srcdir)/'`libmemcached/delete.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-do.lo: libmemcached/do.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-do.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-do.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-do.lo `test -f 'libmemcached/do.cc' || echo '$(srcdir)/'`libmemcached/do.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-do.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-do.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/do.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-do.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-do.lo `test -f 'libmemcached/do.cc' || echo '$(srcdir)/'`libmemcached/do.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-dump.lo: libmemcached/dump.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-dump.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-dump.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-dump.lo `test -f 'libmemcached/dump.cc' || echo '$(srcdir)/'`libmemcached/dump.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-dump.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-dump.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/dump.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-dump.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-dump.lo `test -f 'libmemcached/dump.cc' || echo '$(srcdir)/'`libmemcached/dump.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-error.lo: libmemcached/error.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-error.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-error.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-error.lo `test -f 'libmemcached/error.cc' || echo '$(srcdir)/'`libmemcached/error.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-error.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-error.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/error.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-error.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-error.lo `test -f 'libmemcached/error.cc' || echo '$(srcdir)/'`libmemcached/error.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-exist.lo: libmemcached/exist.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-exist.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-exist.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-exist.lo `test -f 'libmemcached/exist.cc' || echo '$(srcdir)/'`libmemcached/exist.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-exist.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-exist.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/exist.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-exist.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-exist.lo `test -f 'libmemcached/exist.cc' || echo '$(srcdir)/'`libmemcached/exist.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-fetch.lo: libmemcached/fetch.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-fetch.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-fetch.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-fetch.lo `test -f 'libmemcached/fetch.cc' || echo '$(srcdir)/'`libmemcached/fetch.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-fetch.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-fetch.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/fetch.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-fetch.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-fetch.lo `test -f 'libmemcached/fetch.cc' || echo '$(srcdir)/'`libmemcached/fetch.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-flag.lo: libmemcached/flag.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-flag.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-flag.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-flag.lo `test -f 'libmemcached/flag.cc' || echo '$(srcdir)/'`libmemcached/flag.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-flag.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-flag.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/flag.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-flag.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-flag.lo `test -f 'libmemcached/flag.cc' || echo '$(srcdir)/'`libmemcached/flag.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-flush.lo: libmemcached/flush.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-flush.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-flush.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-flush.lo `test -f 'libmemcached/flush.cc' || echo '$(srcdir)/'`libmemcached/flush.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-flush.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-flush.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/flush.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-flush.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-flush.lo `test -f 'libmemcached/flush.cc' || echo '$(srcdir)/'`libmemcached/flush.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-flush_buffers.lo: libmemcached/flush_buffers.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-flush_buffers.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-flush_buffers.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-flush_buffers.lo `test -f 'libmemcached/flush_buffers.cc' || echo '$(srcdir)/'`libmemcached/flush_buffers.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-flush_buffers.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-flush_buffers.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/flush_buffers.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-flush_buffers.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-flush_buffers.lo `test -f 'libmemcached/flush_buffers.cc' || echo '$(srcdir)/'`libmemcached/flush_buffers.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-get.lo: libmemcached/get.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-get.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-get.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-get.lo `test -f 'libmemcached/get.cc' || echo '$(srcdir)/'`libmemcached/get.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-get.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-get.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/get.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-get.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-get.lo `test -f 'libmemcached/get.cc' || echo '$(srcdir)/'`libmemcached/get.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-hash.lo: libmemcached/hash.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-hash.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-hash.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-hash.lo `test -f 'libmemcached/hash.cc' || echo '$(srcdir)/'`libmemcached/hash.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-hash.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-hash.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/hash.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-hash.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-hash.lo `test -f 'libmemcached/hash.cc' || echo '$(srcdir)/'`libmemcached/hash.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-hosts.lo: libmemcached/hosts.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-hosts.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-hosts.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-hosts.lo `test -f 'libmemcached/hosts.cc' || echo '$(srcdir)/'`libmemcached/hosts.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-hosts.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-hosts.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/hosts.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-hosts.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-hosts.lo `test -f 'libmemcached/hosts.cc' || echo '$(srcdir)/'`libmemcached/hosts.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-initialize_query.lo: libmemcached/initialize_query.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-initialize_query.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-initialize_query.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-initialize_query.lo `test -f 'libmemcached/initialize_query.cc' || echo '$(srcdir)/'`libmemcached/initialize_query.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-initialize_query.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-initialize_query.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/initialize_query.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-initialize_query.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-initialize_query.lo `test -f 'libmemcached/initialize_query.cc' || echo '$(srcdir)/'`libmemcached/initialize_query.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-io.lo: libmemcached/io.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-io.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-io.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-io.lo `test -f 'libmemcached/io.cc' || echo '$(srcdir)/'`libmemcached/io.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-io.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-io.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/io.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-io.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-io.lo `test -f 'libmemcached/io.cc' || echo '$(srcdir)/'`libmemcached/io.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-key.lo: libmemcached/key.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-key.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-key.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-key.lo `test -f 'libmemcached/key.cc' || echo '$(srcdir)/'`libmemcached/key.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-key.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-key.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/key.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-key.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-key.lo `test -f 'libmemcached/key.cc' || echo '$(srcdir)/'`libmemcached/key.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-memcached.lo: libmemcached/memcached.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-memcached.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-memcached.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-memcached.lo `test -f 'libmemcached/memcached.cc' || echo '$(srcdir)/'`libmemcached/memcached.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-memcached.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-memcached.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/memcached.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-memcached.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-memcached.lo `test -f 'libmemcached/memcached.cc' || echo '$(srcdir)/'`libmemcached/memcached.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-encoding_key.lo: libmemcached/encoding_key.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-encoding_key.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-encoding_key.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-encoding_key.lo `test -f 'libmemcached/encoding_key.cc' || echo '$(srcdir)/'`libmemcached/encoding_key.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-encoding_key.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-encoding_key.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/encoding_key.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-encoding_key.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-encoding_key.lo `test -f 'libmemcached/encoding_key.cc' || echo '$(srcdir)/'`libmemcached/encoding_key.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-namespace.lo: libmemcached/namespace.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-namespace.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-namespace.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-namespace.lo `test -f 'libmemcached/namespace.cc' || echo '$(srcdir)/'`libmemcached/namespace.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-namespace.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-namespace.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/namespace.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-namespace.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-namespace.lo `test -f 'libmemcached/namespace.cc' || echo '$(srcdir)/'`libmemcached/namespace.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-options.lo: libmemcached/options.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-options.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-options.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-options.lo `test -f 'libmemcached/options.cc' || echo '$(srcdir)/'`libmemcached/options.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-options.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-options.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/options.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-options.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-options.lo `test -f 'libmemcached/options.cc' || echo '$(srcdir)/'`libmemcached/options.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-parse.lo: libmemcached/parse.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-parse.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-parse.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-parse.lo `test -f 'libmemcached/parse.cc' || echo '$(srcdir)/'`libmemcached/parse.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-parse.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-parse.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/parse.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-parse.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-parse.lo `test -f 'libmemcached/parse.cc' || echo '$(srcdir)/'`libmemcached/parse.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-poll.lo: libmemcached/poll.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-poll.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-poll.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-poll.lo `test -f 'libmemcached/poll.cc' || echo '$(srcdir)/'`libmemcached/poll.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-poll.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-poll.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/poll.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-poll.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-poll.lo `test -f 'libmemcached/poll.cc' || echo '$(srcdir)/'`libmemcached/poll.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-purge.lo: libmemcached/purge.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-purge.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-purge.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-purge.lo `test -f 'libmemcached/purge.cc' || echo '$(srcdir)/'`libmemcached/purge.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-purge.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-purge.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/purge.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-purge.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-purge.lo `test -f 'libmemcached/purge.cc' || echo '$(srcdir)/'`libmemcached/purge.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-quit.lo: libmemcached/quit.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-quit.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-quit.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-quit.lo `test -f 'libmemcached/quit.cc' || echo '$(srcdir)/'`libmemcached/quit.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-quit.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-quit.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/quit.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-quit.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-quit.lo `test -f 'libmemcached/quit.cc' || echo '$(srcdir)/'`libmemcached/quit.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-response.lo: libmemcached/response.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-response.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-response.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-response.lo `test -f 'libmemcached/response.cc' || echo '$(srcdir)/'`libmemcached/response.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-response.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-response.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/response.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-response.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-response.lo `test -f 'libmemcached/response.cc' || echo '$(srcdir)/'`libmemcached/response.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-result.lo: libmemcached/result.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-result.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-result.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-result.lo `test -f 'libmemcached/result.cc' || echo '$(srcdir)/'`libmemcached/result.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-result.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-result.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/result.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-result.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-result.lo `test -f 'libmemcached/result.cc' || echo '$(srcdir)/'`libmemcached/result.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-sasl.lo: libmemcached/sasl.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-sasl.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-sasl.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-sasl.lo `test -f 'libmemcached/sasl.cc' || echo '$(srcdir)/'`libmemcached/sasl.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-sasl.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-sasl.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/sasl.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-sasl.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-sasl.lo `test -f 'libmemcached/sasl.cc' || echo '$(srcdir)/'`libmemcached/sasl.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-server.lo: libmemcached/server.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-server.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-server.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-server.lo `test -f 'libmemcached/server.cc' || echo '$(srcdir)/'`libmemcached/server.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-server.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-server.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/server.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-server.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-server.lo `test -f 'libmemcached/server.cc' || echo '$(srcdir)/'`libmemcached/server.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-server_list.lo: libmemcached/server_list.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-server_list.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-server_list.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-server_list.lo `test -f 'libmemcached/server_list.cc' || echo '$(srcdir)/'`libmemcached/server_list.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-server_list.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-server_list.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/server_list.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-server_list.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-server_list.lo `test -f 'libmemcached/server_list.cc' || echo '$(srcdir)/'`libmemcached/server_list.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-stats.lo: libmemcached/stats.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-stats.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-stats.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-stats.lo `test -f 'libmemcached/stats.cc' || echo '$(srcdir)/'`libmemcached/stats.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-stats.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-stats.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/stats.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-stats.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-stats.lo `test -f 'libmemcached/stats.cc' || echo '$(srcdir)/'`libmemcached/stats.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-storage.lo: libmemcached/storage.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-storage.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-storage.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-storage.lo `test -f 'libmemcached/storage.cc' || echo '$(srcdir)/'`libmemcached/storage.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-storage.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-storage.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/storage.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-storage.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-storage.lo `test -f 'libmemcached/storage.cc' || echo '$(srcdir)/'`libmemcached/storage.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-strerror.lo: libmemcached/strerror.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-strerror.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-strerror.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-strerror.lo `test -f 'libmemcached/strerror.cc' || echo '$(srcdir)/'`libmemcached/strerror.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-strerror.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-strerror.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/strerror.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-strerror.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-strerror.lo `test -f 'libmemcached/strerror.cc' || echo '$(srcdir)/'`libmemcached/strerror.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-string.lo: libmemcached/string.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-string.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-string.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-string.lo `test -f 'libmemcached/string.cc' || echo '$(srcdir)/'`libmemcached/string.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-string.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-string.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/string.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-string.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-string.lo `test -f 'libmemcached/string.cc' || echo '$(srcdir)/'`libmemcached/string.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-touch.lo: libmemcached/touch.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-touch.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-touch.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-touch.lo `test -f 'libmemcached/touch.cc' || echo '$(srcdir)/'`libmemcached/touch.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-touch.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-touch.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/touch.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-touch.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-touch.lo `test -f 'libmemcached/touch.cc' || echo '$(srcdir)/'`libmemcached/touch.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-udp.lo: libmemcached/udp.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-udp.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-udp.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-udp.lo `test -f 'libmemcached/udp.cc' || echo '$(srcdir)/'`libmemcached/udp.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-udp.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-udp.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/udp.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-udp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-udp.lo `test -f 'libmemcached/udp.cc' || echo '$(srcdir)/'`libmemcached/udp.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-verbosity.lo: libmemcached/verbosity.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-verbosity.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-verbosity.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-verbosity.lo `test -f 'libmemcached/verbosity.cc' || echo '$(srcdir)/'`libmemcached/verbosity.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-verbosity.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-verbosity.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/verbosity.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-verbosity.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-verbosity.lo `test -f 'libmemcached/verbosity.cc' || echo '$(srcdir)/'`libmemcached/verbosity.cc + +libmemcached/libmemcachedinternal_libmemcachedinternal_la-version.lo: libmemcached/version.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedinternal_la-version.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-version.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-version.lo `test -f 'libmemcached/version.cc' || echo '$(srcdir)/'`libmemcached/version.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-version.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedinternal_la-version.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/version.cc' object='libmemcached/libmemcachedinternal_libmemcachedinternal_la-version.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedinternal_la-version.lo `test -f 'libmemcached/version.cc' || echo '$(srcdir)/'`libmemcached/version.cc + +libmemcached/libmemcachedinternal_libmemcachedutilinternal_la-backtrace.lo: libmemcached/backtrace.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedutilinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/libmemcachedinternal_libmemcachedutilinternal_la-backtrace.lo -MD -MP -MF libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedutilinternal_la-backtrace.Tpo -c -o libmemcached/libmemcachedinternal_libmemcachedutilinternal_la-backtrace.lo `test -f 'libmemcached/backtrace.cc' || echo '$(srcdir)/'`libmemcached/backtrace.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedutilinternal_la-backtrace.Tpo libmemcached/$(DEPDIR)/libmemcachedinternal_libmemcachedutilinternal_la-backtrace.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/backtrace.cc' object='libmemcached/libmemcachedinternal_libmemcachedutilinternal_la-backtrace.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedutilinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/libmemcachedinternal_libmemcachedutilinternal_la-backtrace.lo `test -f 'libmemcached/backtrace.cc' || echo '$(srcdir)/'`libmemcached/backtrace.cc + +libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-flush.lo: libmemcachedutil/flush.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedutilinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-flush.lo -MD -MP -MF libmemcachedutil/$(DEPDIR)/libmemcachedinternal_libmemcachedutilinternal_la-flush.Tpo -c -o libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-flush.lo `test -f 'libmemcachedutil/flush.cc' || echo '$(srcdir)/'`libmemcachedutil/flush.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcachedutil/$(DEPDIR)/libmemcachedinternal_libmemcachedutilinternal_la-flush.Tpo libmemcachedutil/$(DEPDIR)/libmemcachedinternal_libmemcachedutilinternal_la-flush.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcachedutil/flush.cc' object='libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-flush.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedutilinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-flush.lo `test -f 'libmemcachedutil/flush.cc' || echo '$(srcdir)/'`libmemcachedutil/flush.cc + +libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-pid.lo: libmemcachedutil/pid.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedutilinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-pid.lo -MD -MP -MF libmemcachedutil/$(DEPDIR)/libmemcachedinternal_libmemcachedutilinternal_la-pid.Tpo -c -o libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-pid.lo `test -f 'libmemcachedutil/pid.cc' || echo '$(srcdir)/'`libmemcachedutil/pid.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcachedutil/$(DEPDIR)/libmemcachedinternal_libmemcachedutilinternal_la-pid.Tpo libmemcachedutil/$(DEPDIR)/libmemcachedinternal_libmemcachedutilinternal_la-pid.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcachedutil/pid.cc' object='libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-pid.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedutilinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-pid.lo `test -f 'libmemcachedutil/pid.cc' || echo '$(srcdir)/'`libmemcachedutil/pid.cc + +libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-ping.lo: libmemcachedutil/ping.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedutilinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-ping.lo -MD -MP -MF libmemcachedutil/$(DEPDIR)/libmemcachedinternal_libmemcachedutilinternal_la-ping.Tpo -c -o libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-ping.lo `test -f 'libmemcachedutil/ping.cc' || echo '$(srcdir)/'`libmemcachedutil/ping.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcachedutil/$(DEPDIR)/libmemcachedinternal_libmemcachedutilinternal_la-ping.Tpo libmemcachedutil/$(DEPDIR)/libmemcachedinternal_libmemcachedutilinternal_la-ping.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcachedutil/ping.cc' object='libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-ping.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedutilinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-ping.lo `test -f 'libmemcachedutil/ping.cc' || echo '$(srcdir)/'`libmemcachedutil/ping.cc + +libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-pool.lo: libmemcachedutil/pool.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedutilinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-pool.lo -MD -MP -MF libmemcachedutil/$(DEPDIR)/libmemcachedinternal_libmemcachedutilinternal_la-pool.Tpo -c -o libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-pool.lo `test -f 'libmemcachedutil/pool.cc' || echo '$(srcdir)/'`libmemcachedutil/pool.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcachedutil/$(DEPDIR)/libmemcachedinternal_libmemcachedutilinternal_la-pool.Tpo libmemcachedutil/$(DEPDIR)/libmemcachedinternal_libmemcachedutilinternal_la-pool.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcachedutil/pool.cc' object='libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-pool.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedutilinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-pool.lo `test -f 'libmemcachedutil/pool.cc' || echo '$(srcdir)/'`libmemcachedutil/pool.cc + +libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-version.lo: libmemcachedutil/version.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedutilinternal_la_CXXFLAGS) $(CXXFLAGS) -MT libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-version.lo -MD -MP -MF libmemcachedutil/$(DEPDIR)/libmemcachedinternal_libmemcachedutilinternal_la-version.Tpo -c -o libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-version.lo `test -f 'libmemcachedutil/version.cc' || echo '$(srcdir)/'`libmemcachedutil/version.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcachedutil/$(DEPDIR)/libmemcachedinternal_libmemcachedutilinternal_la-version.Tpo libmemcachedutil/$(DEPDIR)/libmemcachedinternal_libmemcachedutilinternal_la-version.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcachedutil/version.cc' object='libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-version.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libmemcachedinternal_libmemcachedutilinternal_la_CXXFLAGS) $(CXXFLAGS) -c -o libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-version.lo `test -f 'libmemcachedutil/version.cc' || echo '$(srcdir)/'`libmemcachedutil/version.cc + +libtest/libtest_libtest_la-alarm.lo: libtest/alarm.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-alarm.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-alarm.Tpo -c -o libtest/libtest_libtest_la-alarm.lo `test -f 'libtest/alarm.cc' || echo '$(srcdir)/'`libtest/alarm.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-alarm.Tpo libtest/$(DEPDIR)/libtest_libtest_la-alarm.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/alarm.cc' object='libtest/libtest_libtest_la-alarm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-alarm.lo `test -f 'libtest/alarm.cc' || echo '$(srcdir)/'`libtest/alarm.cc + +libtest/libtest_libtest_la-binaries.lo: libtest/binaries.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-binaries.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-binaries.Tpo -c -o libtest/libtest_libtest_la-binaries.lo `test -f 'libtest/binaries.cc' || echo '$(srcdir)/'`libtest/binaries.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-binaries.Tpo libtest/$(DEPDIR)/libtest_libtest_la-binaries.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/binaries.cc' object='libtest/libtest_libtest_la-binaries.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-binaries.lo `test -f 'libtest/binaries.cc' || echo '$(srcdir)/'`libtest/binaries.cc + +libtest/libtest_libtest_la-cmdline.lo: libtest/cmdline.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-cmdline.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-cmdline.Tpo -c -o libtest/libtest_libtest_la-cmdline.lo `test -f 'libtest/cmdline.cc' || echo '$(srcdir)/'`libtest/cmdline.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-cmdline.Tpo libtest/$(DEPDIR)/libtest_libtest_la-cmdline.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/cmdline.cc' object='libtest/libtest_libtest_la-cmdline.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-cmdline.lo `test -f 'libtest/cmdline.cc' || echo '$(srcdir)/'`libtest/cmdline.cc + +libtest/libtest_libtest_la-collection.lo: libtest/collection.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-collection.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-collection.Tpo -c -o libtest/libtest_libtest_la-collection.lo `test -f 'libtest/collection.cc' || echo '$(srcdir)/'`libtest/collection.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-collection.Tpo libtest/$(DEPDIR)/libtest_libtest_la-collection.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/collection.cc' object='libtest/libtest_libtest_la-collection.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-collection.lo `test -f 'libtest/collection.cc' || echo '$(srcdir)/'`libtest/collection.cc + +libtest/libtest_libtest_la-comparison.lo: libtest/comparison.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-comparison.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-comparison.Tpo -c -o libtest/libtest_libtest_la-comparison.lo `test -f 'libtest/comparison.cc' || echo '$(srcdir)/'`libtest/comparison.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-comparison.Tpo libtest/$(DEPDIR)/libtest_libtest_la-comparison.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/comparison.cc' object='libtest/libtest_libtest_la-comparison.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-comparison.lo `test -f 'libtest/comparison.cc' || echo '$(srcdir)/'`libtest/comparison.cc + +libtest/libtest_libtest_la-core.lo: libtest/core.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-core.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-core.Tpo -c -o libtest/libtest_libtest_la-core.lo `test -f 'libtest/core.cc' || echo '$(srcdir)/'`libtest/core.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-core.Tpo libtest/$(DEPDIR)/libtest_libtest_la-core.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/core.cc' object='libtest/libtest_libtest_la-core.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-core.lo `test -f 'libtest/core.cc' || echo '$(srcdir)/'`libtest/core.cc + +libtest/libtest_libtest_la-cpu.lo: libtest/cpu.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-cpu.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-cpu.Tpo -c -o libtest/libtest_libtest_la-cpu.lo `test -f 'libtest/cpu.cc' || echo '$(srcdir)/'`libtest/cpu.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-cpu.Tpo libtest/$(DEPDIR)/libtest_libtest_la-cpu.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/cpu.cc' object='libtest/libtest_libtest_la-cpu.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-cpu.lo `test -f 'libtest/cpu.cc' || echo '$(srcdir)/'`libtest/cpu.cc + +libtest/libtest_libtest_la-dns.lo: libtest/dns.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-dns.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-dns.Tpo -c -o libtest/libtest_libtest_la-dns.lo `test -f 'libtest/dns.cc' || echo '$(srcdir)/'`libtest/dns.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-dns.Tpo libtest/$(DEPDIR)/libtest_libtest_la-dns.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/dns.cc' object='libtest/libtest_libtest_la-dns.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-dns.lo `test -f 'libtest/dns.cc' || echo '$(srcdir)/'`libtest/dns.cc + +libtest/libtest_libtest_la-dream.lo: libtest/dream.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-dream.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-dream.Tpo -c -o libtest/libtest_libtest_la-dream.lo `test -f 'libtest/dream.cc' || echo '$(srcdir)/'`libtest/dream.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-dream.Tpo libtest/$(DEPDIR)/libtest_libtest_la-dream.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/dream.cc' object='libtest/libtest_libtest_la-dream.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-dream.lo `test -f 'libtest/dream.cc' || echo '$(srcdir)/'`libtest/dream.cc + +libtest/libtest_libtest_la-drizzled.lo: libtest/drizzled.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-drizzled.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-drizzled.Tpo -c -o libtest/libtest_libtest_la-drizzled.lo `test -f 'libtest/drizzled.cc' || echo '$(srcdir)/'`libtest/drizzled.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-drizzled.Tpo libtest/$(DEPDIR)/libtest_libtest_la-drizzled.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/drizzled.cc' object='libtest/libtest_libtest_la-drizzled.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-drizzled.lo `test -f 'libtest/drizzled.cc' || echo '$(srcdir)/'`libtest/drizzled.cc + +libtest/libtest_libtest_la-exception.lo: libtest/exception.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-exception.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-exception.Tpo -c -o libtest/libtest_libtest_la-exception.lo `test -f 'libtest/exception.cc' || echo '$(srcdir)/'`libtest/exception.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-exception.Tpo libtest/$(DEPDIR)/libtest_libtest_la-exception.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/exception.cc' object='libtest/libtest_libtest_la-exception.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-exception.lo `test -f 'libtest/exception.cc' || echo '$(srcdir)/'`libtest/exception.cc + +libtest/exception/libtest_libtest_la-fatal.lo: libtest/exception/fatal.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/exception/libtest_libtest_la-fatal.lo -MD -MP -MF libtest/exception/$(DEPDIR)/libtest_libtest_la-fatal.Tpo -c -o libtest/exception/libtest_libtest_la-fatal.lo `test -f 'libtest/exception/fatal.cc' || echo '$(srcdir)/'`libtest/exception/fatal.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/exception/$(DEPDIR)/libtest_libtest_la-fatal.Tpo libtest/exception/$(DEPDIR)/libtest_libtest_la-fatal.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/exception/fatal.cc' object='libtest/exception/libtest_libtest_la-fatal.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/exception/libtest_libtest_la-fatal.lo `test -f 'libtest/exception/fatal.cc' || echo '$(srcdir)/'`libtest/exception/fatal.cc + +libtest/libtest_libtest_la-formatter.lo: libtest/formatter.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-formatter.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-formatter.Tpo -c -o libtest/libtest_libtest_la-formatter.lo `test -f 'libtest/formatter.cc' || echo '$(srcdir)/'`libtest/formatter.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-formatter.Tpo libtest/$(DEPDIR)/libtest_libtest_la-formatter.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/formatter.cc' object='libtest/libtest_libtest_la-formatter.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-formatter.lo `test -f 'libtest/formatter.cc' || echo '$(srcdir)/'`libtest/formatter.cc + +libtest/libtest_libtest_la-client.lo: libtest/client.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-client.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-client.Tpo -c -o libtest/libtest_libtest_la-client.lo `test -f 'libtest/client.cc' || echo '$(srcdir)/'`libtest/client.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-client.Tpo libtest/$(DEPDIR)/libtest_libtest_la-client.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/client.cc' object='libtest/libtest_libtest_la-client.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-client.lo `test -f 'libtest/client.cc' || echo '$(srcdir)/'`libtest/client.cc + +libtest/libtest_libtest_la-framework.lo: libtest/framework.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-framework.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-framework.Tpo -c -o libtest/libtest_libtest_la-framework.lo `test -f 'libtest/framework.cc' || echo '$(srcdir)/'`libtest/framework.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-framework.Tpo libtest/$(DEPDIR)/libtest_libtest_la-framework.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/framework.cc' object='libtest/libtest_libtest_la-framework.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-framework.lo `test -f 'libtest/framework.cc' || echo '$(srcdir)/'`libtest/framework.cc + +libtest/libtest_libtest_la-has.lo: libtest/has.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-has.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-has.Tpo -c -o libtest/libtest_libtest_la-has.lo `test -f 'libtest/has.cc' || echo '$(srcdir)/'`libtest/has.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-has.Tpo libtest/$(DEPDIR)/libtest_libtest_la-has.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/has.cc' object='libtest/libtest_libtest_la-has.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-has.lo `test -f 'libtest/has.cc' || echo '$(srcdir)/'`libtest/has.cc + +libtest/libtest_libtest_la-http.lo: libtest/http.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-http.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-http.Tpo -c -o libtest/libtest_libtest_la-http.lo `test -f 'libtest/http.cc' || echo '$(srcdir)/'`libtest/http.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-http.Tpo libtest/$(DEPDIR)/libtest_libtest_la-http.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/http.cc' object='libtest/libtest_libtest_la-http.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-http.lo `test -f 'libtest/http.cc' || echo '$(srcdir)/'`libtest/http.cc + +libtest/libtest_libtest_la-is_local.lo: libtest/is_local.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-is_local.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-is_local.Tpo -c -o libtest/libtest_libtest_la-is_local.lo `test -f 'libtest/is_local.cc' || echo '$(srcdir)/'`libtest/is_local.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-is_local.Tpo libtest/$(DEPDIR)/libtest_libtest_la-is_local.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/is_local.cc' object='libtest/libtest_libtest_la-is_local.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-is_local.lo `test -f 'libtest/is_local.cc' || echo '$(srcdir)/'`libtest/is_local.cc + +libtest/libtest_libtest_la-killpid.lo: libtest/killpid.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-killpid.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-killpid.Tpo -c -o libtest/libtest_libtest_la-killpid.lo `test -f 'libtest/killpid.cc' || echo '$(srcdir)/'`libtest/killpid.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-killpid.Tpo libtest/$(DEPDIR)/libtest_libtest_la-killpid.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/killpid.cc' object='libtest/libtest_libtest_la-killpid.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-killpid.lo `test -f 'libtest/killpid.cc' || echo '$(srcdir)/'`libtest/killpid.cc + +libtest/libtest_libtest_la-libtool.lo: libtest/libtool.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-libtool.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-libtool.Tpo -c -o libtest/libtest_libtest_la-libtool.lo `test -f 'libtest/libtool.cc' || echo '$(srcdir)/'`libtest/libtool.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-libtool.Tpo libtest/$(DEPDIR)/libtest_libtest_la-libtool.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/libtool.cc' object='libtest/libtest_libtest_la-libtool.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-libtool.lo `test -f 'libtest/libtool.cc' || echo '$(srcdir)/'`libtest/libtool.cc + +libtest/libtest_libtest_la-main.lo: libtest/main.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-main.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-main.Tpo -c -o libtest/libtest_libtest_la-main.lo `test -f 'libtest/main.cc' || echo '$(srcdir)/'`libtest/main.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-main.Tpo libtest/$(DEPDIR)/libtest_libtest_la-main.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/main.cc' object='libtest/libtest_libtest_la-main.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-main.lo `test -f 'libtest/main.cc' || echo '$(srcdir)/'`libtest/main.cc + +libtest/libtest_libtest_la-port.lo: libtest/port.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-port.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-port.Tpo -c -o libtest/libtest_libtest_la-port.lo `test -f 'libtest/port.cc' || echo '$(srcdir)/'`libtest/port.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-port.Tpo libtest/$(DEPDIR)/libtest_libtest_la-port.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/port.cc' object='libtest/libtest_libtest_la-port.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-port.lo `test -f 'libtest/port.cc' || echo '$(srcdir)/'`libtest/port.cc + +libtest/libtest_libtest_la-result.lo: libtest/result.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-result.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-result.Tpo -c -o libtest/libtest_libtest_la-result.lo `test -f 'libtest/result.cc' || echo '$(srcdir)/'`libtest/result.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-result.Tpo libtest/$(DEPDIR)/libtest_libtest_la-result.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/result.cc' object='libtest/libtest_libtest_la-result.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-result.lo `test -f 'libtest/result.cc' || echo '$(srcdir)/'`libtest/result.cc + +libtest/libtest_libtest_la-runner.lo: libtest/runner.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-runner.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-runner.Tpo -c -o libtest/libtest_libtest_la-runner.lo `test -f 'libtest/runner.cc' || echo '$(srcdir)/'`libtest/runner.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-runner.Tpo libtest/$(DEPDIR)/libtest_libtest_la-runner.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/runner.cc' object='libtest/libtest_libtest_la-runner.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-runner.lo `test -f 'libtest/runner.cc' || echo '$(srcdir)/'`libtest/runner.cc + +libtest/libtest_libtest_la-server.lo: libtest/server.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-server.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-server.Tpo -c -o libtest/libtest_libtest_la-server.lo `test -f 'libtest/server.cc' || echo '$(srcdir)/'`libtest/server.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-server.Tpo libtest/$(DEPDIR)/libtest_libtest_la-server.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/server.cc' object='libtest/libtest_libtest_la-server.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-server.lo `test -f 'libtest/server.cc' || echo '$(srcdir)/'`libtest/server.cc + +libtest/libtest_libtest_la-server_container.lo: libtest/server_container.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-server_container.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-server_container.Tpo -c -o libtest/libtest_libtest_la-server_container.lo `test -f 'libtest/server_container.cc' || echo '$(srcdir)/'`libtest/server_container.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-server_container.Tpo libtest/$(DEPDIR)/libtest_libtest_la-server_container.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/server_container.cc' object='libtest/libtest_libtest_la-server_container.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-server_container.lo `test -f 'libtest/server_container.cc' || echo '$(srcdir)/'`libtest/server_container.cc + +libtest/libtest_libtest_la-signal.lo: libtest/signal.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-signal.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-signal.Tpo -c -o libtest/libtest_libtest_la-signal.lo `test -f 'libtest/signal.cc' || echo '$(srcdir)/'`libtest/signal.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-signal.Tpo libtest/$(DEPDIR)/libtest_libtest_la-signal.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/signal.cc' object='libtest/libtest_libtest_la-signal.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-signal.lo `test -f 'libtest/signal.cc' || echo '$(srcdir)/'`libtest/signal.cc + +libtest/libtest_libtest_la-socket.lo: libtest/socket.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-socket.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-socket.Tpo -c -o libtest/libtest_libtest_la-socket.lo `test -f 'libtest/socket.cc' || echo '$(srcdir)/'`libtest/socket.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-socket.Tpo libtest/$(DEPDIR)/libtest_libtest_la-socket.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/socket.cc' object='libtest/libtest_libtest_la-socket.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-socket.lo `test -f 'libtest/socket.cc' || echo '$(srcdir)/'`libtest/socket.cc + +libtest/libtest_libtest_la-strerror.lo: libtest/strerror.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-strerror.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-strerror.Tpo -c -o libtest/libtest_libtest_la-strerror.lo `test -f 'libtest/strerror.cc' || echo '$(srcdir)/'`libtest/strerror.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-strerror.Tpo libtest/$(DEPDIR)/libtest_libtest_la-strerror.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/strerror.cc' object='libtest/libtest_libtest_la-strerror.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-strerror.lo `test -f 'libtest/strerror.cc' || echo '$(srcdir)/'`libtest/strerror.cc + +libtest/libtest_libtest_la-timer.lo: libtest/timer.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-timer.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-timer.Tpo -c -o libtest/libtest_libtest_la-timer.lo `test -f 'libtest/timer.cc' || echo '$(srcdir)/'`libtest/timer.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-timer.Tpo libtest/$(DEPDIR)/libtest_libtest_la-timer.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/timer.cc' object='libtest/libtest_libtest_la-timer.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-timer.lo `test -f 'libtest/timer.cc' || echo '$(srcdir)/'`libtest/timer.cc + +libtest/libtest_libtest_la-tmpfile.lo: libtest/tmpfile.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-tmpfile.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-tmpfile.Tpo -c -o libtest/libtest_libtest_la-tmpfile.lo `test -f 'libtest/tmpfile.cc' || echo '$(srcdir)/'`libtest/tmpfile.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-tmpfile.Tpo libtest/$(DEPDIR)/libtest_libtest_la-tmpfile.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/tmpfile.cc' object='libtest/libtest_libtest_la-tmpfile.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-tmpfile.lo `test -f 'libtest/tmpfile.cc' || echo '$(srcdir)/'`libtest/tmpfile.cc + +libtest/libtest_libtest_la-vchar.lo: libtest/vchar.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-vchar.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-vchar.Tpo -c -o libtest/libtest_libtest_la-vchar.lo `test -f 'libtest/vchar.cc' || echo '$(srcdir)/'`libtest/vchar.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-vchar.Tpo libtest/$(DEPDIR)/libtest_libtest_la-vchar.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/vchar.cc' object='libtest/libtest_libtest_la-vchar.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-vchar.lo `test -f 'libtest/vchar.cc' || echo '$(srcdir)/'`libtest/vchar.cc + +libtest/libtest_libtest_la-memcached.lo: libtest/memcached.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-memcached.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-memcached.Tpo -c -o libtest/libtest_libtest_la-memcached.lo `test -f 'libtest/memcached.cc' || echo '$(srcdir)/'`libtest/memcached.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-memcached.Tpo libtest/$(DEPDIR)/libtest_libtest_la-memcached.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/memcached.cc' object='libtest/libtest_libtest_la-memcached.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-memcached.lo `test -f 'libtest/memcached.cc' || echo '$(srcdir)/'`libtest/memcached.cc + +libtest/libtest_libtest_la-gearmand.lo: libtest/gearmand.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-gearmand.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-gearmand.Tpo -c -o libtest/libtest_libtest_la-gearmand.lo `test -f 'libtest/gearmand.cc' || echo '$(srcdir)/'`libtest/gearmand.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-gearmand.Tpo libtest/$(DEPDIR)/libtest_libtest_la-gearmand.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/gearmand.cc' object='libtest/libtest_libtest_la-gearmand.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-gearmand.lo `test -f 'libtest/gearmand.cc' || echo '$(srcdir)/'`libtest/gearmand.cc + +libtest/libtest_libtest_la-blobslap_worker.lo: libtest/blobslap_worker.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_libtest_la-blobslap_worker.lo -MD -MP -MF libtest/$(DEPDIR)/libtest_libtest_la-blobslap_worker.Tpo -c -o libtest/libtest_libtest_la-blobslap_worker.lo `test -f 'libtest/blobslap_worker.cc' || echo '$(srcdir)/'`libtest/blobslap_worker.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_libtest_la-blobslap_worker.Tpo libtest/$(DEPDIR)/libtest_libtest_la-blobslap_worker.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/blobslap_worker.cc' object='libtest/libtest_libtest_la-blobslap_worker.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_libtest_la_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_libtest_la-blobslap_worker.lo `test -f 'libtest/blobslap_worker.cc' || echo '$(srcdir)/'`libtest/blobslap_worker.cc + +clients/clients_memcapable-memcapable.o: clients/memcapable.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(clients_memcapable_CXXFLAGS) $(CXXFLAGS) -MT clients/clients_memcapable-memcapable.o -MD -MP -MF clients/$(DEPDIR)/clients_memcapable-memcapable.Tpo -c -o clients/clients_memcapable-memcapable.o `test -f 'clients/memcapable.cc' || echo '$(srcdir)/'`clients/memcapable.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/clients_memcapable-memcapable.Tpo clients/$(DEPDIR)/clients_memcapable-memcapable.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/memcapable.cc' object='clients/clients_memcapable-memcapable.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(clients_memcapable_CXXFLAGS) $(CXXFLAGS) -c -o clients/clients_memcapable-memcapable.o `test -f 'clients/memcapable.cc' || echo '$(srcdir)/'`clients/memcapable.cc + +clients/clients_memcapable-memcapable.obj: clients/memcapable.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(clients_memcapable_CXXFLAGS) $(CXXFLAGS) -MT clients/clients_memcapable-memcapable.obj -MD -MP -MF clients/$(DEPDIR)/clients_memcapable-memcapable.Tpo -c -o clients/clients_memcapable-memcapable.obj `if test -f 'clients/memcapable.cc'; then $(CYGPATH_W) 'clients/memcapable.cc'; else $(CYGPATH_W) '$(srcdir)/clients/memcapable.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/clients_memcapable-memcapable.Tpo clients/$(DEPDIR)/clients_memcapable-memcapable.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/memcapable.cc' object='clients/clients_memcapable-memcapable.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(clients_memcapable_CXXFLAGS) $(CXXFLAGS) -c -o clients/clients_memcapable-memcapable.obj `if test -f 'clients/memcapable.cc'; then $(CYGPATH_W) 'clients/memcapable.cc'; else $(CYGPATH_W) '$(srcdir)/clients/memcapable.cc'; fi` + +libmemcached/clients_memcapable-byteorder.o: libmemcached/byteorder.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(clients_memcapable_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/clients_memcapable-byteorder.o -MD -MP -MF libmemcached/$(DEPDIR)/clients_memcapable-byteorder.Tpo -c -o libmemcached/clients_memcapable-byteorder.o `test -f 'libmemcached/byteorder.cc' || echo '$(srcdir)/'`libmemcached/byteorder.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/clients_memcapable-byteorder.Tpo libmemcached/$(DEPDIR)/clients_memcapable-byteorder.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/byteorder.cc' object='libmemcached/clients_memcapable-byteorder.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(clients_memcapable_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/clients_memcapable-byteorder.o `test -f 'libmemcached/byteorder.cc' || echo '$(srcdir)/'`libmemcached/byteorder.cc + +libmemcached/clients_memcapable-byteorder.obj: libmemcached/byteorder.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(clients_memcapable_CXXFLAGS) $(CXXFLAGS) -MT libmemcached/clients_memcapable-byteorder.obj -MD -MP -MF libmemcached/$(DEPDIR)/clients_memcapable-byteorder.Tpo -c -o libmemcached/clients_memcapable-byteorder.obj `if test -f 'libmemcached/byteorder.cc'; then $(CYGPATH_W) 'libmemcached/byteorder.cc'; else $(CYGPATH_W) '$(srcdir)/libmemcached/byteorder.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libmemcached/$(DEPDIR)/clients_memcapable-byteorder.Tpo libmemcached/$(DEPDIR)/clients_memcapable-byteorder.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libmemcached/byteorder.cc' object='libmemcached/clients_memcapable-byteorder.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(clients_memcapable_CXXFLAGS) $(CXXFLAGS) -c -o libmemcached/clients_memcapable-byteorder.obj `if test -f 'libmemcached/byteorder.cc'; then $(CYGPATH_W) 'libmemcached/byteorder.cc'; else $(CYGPATH_W) '$(srcdir)/libmemcached/byteorder.cc'; fi` + +clients/clients_memslap-memslap.o: clients/memslap.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(clients_memslap_CXXFLAGS) $(CXXFLAGS) -MT clients/clients_memslap-memslap.o -MD -MP -MF clients/$(DEPDIR)/clients_memslap-memslap.Tpo -c -o clients/clients_memslap-memslap.o `test -f 'clients/memslap.cc' || echo '$(srcdir)/'`clients/memslap.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/clients_memslap-memslap.Tpo clients/$(DEPDIR)/clients_memslap-memslap.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/memslap.cc' object='clients/clients_memslap-memslap.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(clients_memslap_CXXFLAGS) $(CXXFLAGS) -c -o clients/clients_memslap-memslap.o `test -f 'clients/memslap.cc' || echo '$(srcdir)/'`clients/memslap.cc + +clients/clients_memslap-memslap.obj: clients/memslap.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(clients_memslap_CXXFLAGS) $(CXXFLAGS) -MT clients/clients_memslap-memslap.obj -MD -MP -MF clients/$(DEPDIR)/clients_memslap-memslap.Tpo -c -o clients/clients_memslap-memslap.obj `if test -f 'clients/memslap.cc'; then $(CYGPATH_W) 'clients/memslap.cc'; else $(CYGPATH_W) '$(srcdir)/clients/memslap.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/clients_memslap-memslap.Tpo clients/$(DEPDIR)/clients_memslap-memslap.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/memslap.cc' object='clients/clients_memslap-memslap.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(clients_memslap_CXXFLAGS) $(CXXFLAGS) -c -o clients/clients_memslap-memslap.obj `if test -f 'clients/memslap.cc'; then $(CYGPATH_W) 'clients/memslap.cc'; else $(CYGPATH_W) '$(srcdir)/clients/memslap.cc'; fi` + +clients/clients_memslap-generator.o: clients/generator.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(clients_memslap_CXXFLAGS) $(CXXFLAGS) -MT clients/clients_memslap-generator.o -MD -MP -MF clients/$(DEPDIR)/clients_memslap-generator.Tpo -c -o clients/clients_memslap-generator.o `test -f 'clients/generator.cc' || echo '$(srcdir)/'`clients/generator.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/clients_memslap-generator.Tpo clients/$(DEPDIR)/clients_memslap-generator.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/generator.cc' object='clients/clients_memslap-generator.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(clients_memslap_CXXFLAGS) $(CXXFLAGS) -c -o clients/clients_memslap-generator.o `test -f 'clients/generator.cc' || echo '$(srcdir)/'`clients/generator.cc + +clients/clients_memslap-generator.obj: clients/generator.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(clients_memslap_CXXFLAGS) $(CXXFLAGS) -MT clients/clients_memslap-generator.obj -MD -MP -MF clients/$(DEPDIR)/clients_memslap-generator.Tpo -c -o clients/clients_memslap-generator.obj `if test -f 'clients/generator.cc'; then $(CYGPATH_W) 'clients/generator.cc'; else $(CYGPATH_W) '$(srcdir)/clients/generator.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/clients_memslap-generator.Tpo clients/$(DEPDIR)/clients_memslap-generator.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/generator.cc' object='clients/clients_memslap-generator.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(clients_memslap_CXXFLAGS) $(CXXFLAGS) -c -o clients/clients_memslap-generator.obj `if test -f 'clients/generator.cc'; then $(CYGPATH_W) 'clients/generator.cc'; else $(CYGPATH_W) '$(srcdir)/clients/generator.cc'; fi` + +clients/clients_memslap-execute.o: clients/execute.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(clients_memslap_CXXFLAGS) $(CXXFLAGS) -MT clients/clients_memslap-execute.o -MD -MP -MF clients/$(DEPDIR)/clients_memslap-execute.Tpo -c -o clients/clients_memslap-execute.o `test -f 'clients/execute.cc' || echo '$(srcdir)/'`clients/execute.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/clients_memslap-execute.Tpo clients/$(DEPDIR)/clients_memslap-execute.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/execute.cc' object='clients/clients_memslap-execute.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(clients_memslap_CXXFLAGS) $(CXXFLAGS) -c -o clients/clients_memslap-execute.o `test -f 'clients/execute.cc' || echo '$(srcdir)/'`clients/execute.cc + +clients/clients_memslap-execute.obj: clients/execute.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(clients_memslap_CXXFLAGS) $(CXXFLAGS) -MT clients/clients_memslap-execute.obj -MD -MP -MF clients/$(DEPDIR)/clients_memslap-execute.Tpo -c -o clients/clients_memslap-execute.obj `if test -f 'clients/execute.cc'; then $(CYGPATH_W) 'clients/execute.cc'; else $(CYGPATH_W) '$(srcdir)/clients/execute.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/clients_memslap-execute.Tpo clients/$(DEPDIR)/clients_memslap-execute.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/execute.cc' object='clients/clients_memslap-execute.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(clients_memslap_CXXFLAGS) $(CXXFLAGS) -c -o clients/clients_memslap-execute.obj `if test -f 'clients/execute.cc'; then $(CYGPATH_W) 'clients/execute.cc'; else $(CYGPATH_W) '$(srcdir)/clients/execute.cc'; fi` + +libtest/libtest_unittest-unittest.o: libtest/unittest.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_unittest_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_unittest-unittest.o -MD -MP -MF libtest/$(DEPDIR)/libtest_unittest-unittest.Tpo -c -o libtest/libtest_unittest-unittest.o `test -f 'libtest/unittest.cc' || echo '$(srcdir)/'`libtest/unittest.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_unittest-unittest.Tpo libtest/$(DEPDIR)/libtest_unittest-unittest.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/unittest.cc' object='libtest/libtest_unittest-unittest.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_unittest_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_unittest-unittest.o `test -f 'libtest/unittest.cc' || echo '$(srcdir)/'`libtest/unittest.cc + +libtest/libtest_unittest-unittest.obj: libtest/unittest.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_unittest_CXXFLAGS) $(CXXFLAGS) -MT libtest/libtest_unittest-unittest.obj -MD -MP -MF libtest/$(DEPDIR)/libtest_unittest-unittest.Tpo -c -o libtest/libtest_unittest-unittest.obj `if test -f 'libtest/unittest.cc'; then $(CYGPATH_W) 'libtest/unittest.cc'; else $(CYGPATH_W) '$(srcdir)/libtest/unittest.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libtest/$(DEPDIR)/libtest_unittest-unittest.Tpo libtest/$(DEPDIR)/libtest_unittest-unittest.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libtest/unittest.cc' object='libtest/libtest_unittest-unittest.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libtest_unittest_CXXFLAGS) $(CXXFLAGS) -c -o libtest/libtest_unittest-unittest.obj `if test -f 'libtest/unittest.cc'; then $(CYGPATH_W) 'libtest/unittest.cc'; else $(CYGPATH_W) '$(srcdir)/libtest/unittest.cc'; fi` + +tests/tests_cycle-cycle.o: tests/cycle.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_cycle_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_cycle-cycle.o -MD -MP -MF tests/$(DEPDIR)/tests_cycle-cycle.Tpo -c -o tests/tests_cycle-cycle.o `test -f 'tests/cycle.cc' || echo '$(srcdir)/'`tests/cycle.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_cycle-cycle.Tpo tests/$(DEPDIR)/tests_cycle-cycle.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/cycle.cc' object='tests/tests_cycle-cycle.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_cycle_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_cycle-cycle.o `test -f 'tests/cycle.cc' || echo '$(srcdir)/'`tests/cycle.cc + +tests/tests_cycle-cycle.obj: tests/cycle.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_cycle_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_cycle-cycle.obj -MD -MP -MF tests/$(DEPDIR)/tests_cycle-cycle.Tpo -c -o tests/tests_cycle-cycle.obj `if test -f 'tests/cycle.cc'; then $(CYGPATH_W) 'tests/cycle.cc'; else $(CYGPATH_W) '$(srcdir)/tests/cycle.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_cycle-cycle.Tpo tests/$(DEPDIR)/tests_cycle-cycle.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/cycle.cc' object='tests/tests_cycle-cycle.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_cycle_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_cycle-cycle.obj `if test -f 'tests/cycle.cc'; then $(CYGPATH_W) 'tests/cycle.cc'; else $(CYGPATH_W) '$(srcdir)/tests/cycle.cc'; fi` + +tests/tests_failure-failure.o: tests/failure.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_failure-failure.o -MD -MP -MF tests/$(DEPDIR)/tests_failure-failure.Tpo -c -o tests/tests_failure-failure.o `test -f 'tests/failure.cc' || echo '$(srcdir)/'`tests/failure.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_failure-failure.Tpo tests/$(DEPDIR)/tests_failure-failure.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/failure.cc' object='tests/tests_failure-failure.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_failure-failure.o `test -f 'tests/failure.cc' || echo '$(srcdir)/'`tests/failure.cc + +tests/tests_failure-failure.obj: tests/failure.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_failure-failure.obj -MD -MP -MF tests/$(DEPDIR)/tests_failure-failure.Tpo -c -o tests/tests_failure-failure.obj `if test -f 'tests/failure.cc'; then $(CYGPATH_W) 'tests/failure.cc'; else $(CYGPATH_W) '$(srcdir)/tests/failure.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_failure-failure.Tpo tests/$(DEPDIR)/tests_failure-failure.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/failure.cc' object='tests/tests_failure-failure.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_failure-failure.obj `if test -f 'tests/failure.cc'; then $(CYGPATH_W) 'tests/failure.cc'; else $(CYGPATH_W) '$(srcdir)/tests/failure.cc'; fi` + +clients/tests_failure-execute.o: clients/execute.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -MT clients/tests_failure-execute.o -MD -MP -MF clients/$(DEPDIR)/tests_failure-execute.Tpo -c -o clients/tests_failure-execute.o `test -f 'clients/execute.cc' || echo '$(srcdir)/'`clients/execute.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/tests_failure-execute.Tpo clients/$(DEPDIR)/tests_failure-execute.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/execute.cc' object='clients/tests_failure-execute.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -c -o clients/tests_failure-execute.o `test -f 'clients/execute.cc' || echo '$(srcdir)/'`clients/execute.cc + +clients/tests_failure-execute.obj: clients/execute.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -MT clients/tests_failure-execute.obj -MD -MP -MF clients/$(DEPDIR)/tests_failure-execute.Tpo -c -o clients/tests_failure-execute.obj `if test -f 'clients/execute.cc'; then $(CYGPATH_W) 'clients/execute.cc'; else $(CYGPATH_W) '$(srcdir)/clients/execute.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/tests_failure-execute.Tpo clients/$(DEPDIR)/tests_failure-execute.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/execute.cc' object='clients/tests_failure-execute.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -c -o clients/tests_failure-execute.obj `if test -f 'clients/execute.cc'; then $(CYGPATH_W) 'clients/execute.cc'; else $(CYGPATH_W) '$(srcdir)/clients/execute.cc'; fi` + +clients/tests_failure-generator.o: clients/generator.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -MT clients/tests_failure-generator.o -MD -MP -MF clients/$(DEPDIR)/tests_failure-generator.Tpo -c -o clients/tests_failure-generator.o `test -f 'clients/generator.cc' || echo '$(srcdir)/'`clients/generator.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/tests_failure-generator.Tpo clients/$(DEPDIR)/tests_failure-generator.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/generator.cc' object='clients/tests_failure-generator.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -c -o clients/tests_failure-generator.o `test -f 'clients/generator.cc' || echo '$(srcdir)/'`clients/generator.cc + +clients/tests_failure-generator.obj: clients/generator.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -MT clients/tests_failure-generator.obj -MD -MP -MF clients/$(DEPDIR)/tests_failure-generator.Tpo -c -o clients/tests_failure-generator.obj `if test -f 'clients/generator.cc'; then $(CYGPATH_W) 'clients/generator.cc'; else $(CYGPATH_W) '$(srcdir)/clients/generator.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/tests_failure-generator.Tpo clients/$(DEPDIR)/tests_failure-generator.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/generator.cc' object='clients/tests_failure-generator.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -c -o clients/tests_failure-generator.obj `if test -f 'clients/generator.cc'; then $(CYGPATH_W) 'clients/generator.cc'; else $(CYGPATH_W) '$(srcdir)/clients/generator.cc'; fi` + +tests/libmemcached-1.0/tests_failure-callback_counter.o: tests/libmemcached-1.0/callback_counter.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_failure-callback_counter.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_failure-callback_counter.Tpo -c -o tests/libmemcached-1.0/tests_failure-callback_counter.o `test -f 'tests/libmemcached-1.0/callback_counter.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/callback_counter.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_failure-callback_counter.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_failure-callback_counter.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/callback_counter.cc' object='tests/libmemcached-1.0/tests_failure-callback_counter.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_failure-callback_counter.o `test -f 'tests/libmemcached-1.0/callback_counter.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/callback_counter.cc + +tests/libmemcached-1.0/tests_failure-callback_counter.obj: tests/libmemcached-1.0/callback_counter.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_failure-callback_counter.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_failure-callback_counter.Tpo -c -o tests/libmemcached-1.0/tests_failure-callback_counter.obj `if test -f 'tests/libmemcached-1.0/callback_counter.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/callback_counter.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/callback_counter.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_failure-callback_counter.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_failure-callback_counter.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/callback_counter.cc' object='tests/libmemcached-1.0/tests_failure-callback_counter.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_failure-callback_counter.obj `if test -f 'tests/libmemcached-1.0/callback_counter.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/callback_counter.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/callback_counter.cc'; fi` + +tests/libmemcached-1.0/tests_failure-fetch_all_results.o: tests/libmemcached-1.0/fetch_all_results.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_failure-fetch_all_results.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_failure-fetch_all_results.Tpo -c -o tests/libmemcached-1.0/tests_failure-fetch_all_results.o `test -f 'tests/libmemcached-1.0/fetch_all_results.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/fetch_all_results.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_failure-fetch_all_results.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_failure-fetch_all_results.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/fetch_all_results.cc' object='tests/libmemcached-1.0/tests_failure-fetch_all_results.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_failure-fetch_all_results.o `test -f 'tests/libmemcached-1.0/fetch_all_results.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/fetch_all_results.cc + +tests/libmemcached-1.0/tests_failure-fetch_all_results.obj: tests/libmemcached-1.0/fetch_all_results.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_failure-fetch_all_results.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_failure-fetch_all_results.Tpo -c -o tests/libmemcached-1.0/tests_failure-fetch_all_results.obj `if test -f 'tests/libmemcached-1.0/fetch_all_results.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/fetch_all_results.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/fetch_all_results.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_failure-fetch_all_results.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_failure-fetch_all_results.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/fetch_all_results.cc' object='tests/libmemcached-1.0/tests_failure-fetch_all_results.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_failure-fetch_all_results.obj `if test -f 'tests/libmemcached-1.0/fetch_all_results.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/fetch_all_results.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/fetch_all_results.cc'; fi` + +tests/libmemcached-1.0/tests_failure-generate.o: tests/libmemcached-1.0/generate.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_failure-generate.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_failure-generate.Tpo -c -o tests/libmemcached-1.0/tests_failure-generate.o `test -f 'tests/libmemcached-1.0/generate.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/generate.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_failure-generate.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_failure-generate.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/generate.cc' object='tests/libmemcached-1.0/tests_failure-generate.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_failure-generate.o `test -f 'tests/libmemcached-1.0/generate.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/generate.cc + +tests/libmemcached-1.0/tests_failure-generate.obj: tests/libmemcached-1.0/generate.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_failure-generate.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_failure-generate.Tpo -c -o tests/libmemcached-1.0/tests_failure-generate.obj `if test -f 'tests/libmemcached-1.0/generate.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/generate.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/generate.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_failure-generate.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_failure-generate.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/generate.cc' object='tests/libmemcached-1.0/tests_failure-generate.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_failure-generate.obj `if test -f 'tests/libmemcached-1.0/generate.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/generate.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/generate.cc'; fi` + +tests/libmemcached-1.0/tests_failure-print.o: tests/libmemcached-1.0/print.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_failure-print.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_failure-print.Tpo -c -o tests/libmemcached-1.0/tests_failure-print.o `test -f 'tests/libmemcached-1.0/print.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/print.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_failure-print.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_failure-print.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/print.cc' object='tests/libmemcached-1.0/tests_failure-print.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_failure-print.o `test -f 'tests/libmemcached-1.0/print.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/print.cc + +tests/libmemcached-1.0/tests_failure-print.obj: tests/libmemcached-1.0/print.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_failure-print.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_failure-print.Tpo -c -o tests/libmemcached-1.0/tests_failure-print.obj `if test -f 'tests/libmemcached-1.0/print.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/print.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/print.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_failure-print.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_failure-print.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/print.cc' object='tests/libmemcached-1.0/tests_failure-print.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_failure_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_failure-print.obj `if test -f 'tests/libmemcached-1.0/print.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/print.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/print.cc'; fi` + +tests/tests_hash_plus-hash_plus.o: tests/hash_plus.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_hash_plus_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_hash_plus-hash_plus.o -MD -MP -MF tests/$(DEPDIR)/tests_hash_plus-hash_plus.Tpo -c -o tests/tests_hash_plus-hash_plus.o `test -f 'tests/hash_plus.cc' || echo '$(srcdir)/'`tests/hash_plus.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_hash_plus-hash_plus.Tpo tests/$(DEPDIR)/tests_hash_plus-hash_plus.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/hash_plus.cc' object='tests/tests_hash_plus-hash_plus.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_hash_plus_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_hash_plus-hash_plus.o `test -f 'tests/hash_plus.cc' || echo '$(srcdir)/'`tests/hash_plus.cc + +tests/tests_hash_plus-hash_plus.obj: tests/hash_plus.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_hash_plus_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_hash_plus-hash_plus.obj -MD -MP -MF tests/$(DEPDIR)/tests_hash_plus-hash_plus.Tpo -c -o tests/tests_hash_plus-hash_plus.obj `if test -f 'tests/hash_plus.cc'; then $(CYGPATH_W) 'tests/hash_plus.cc'; else $(CYGPATH_W) '$(srcdir)/tests/hash_plus.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_hash_plus-hash_plus.Tpo tests/$(DEPDIR)/tests_hash_plus-hash_plus.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/hash_plus.cc' object='tests/tests_hash_plus-hash_plus.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_hash_plus_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_hash_plus-hash_plus.obj `if test -f 'tests/hash_plus.cc'; then $(CYGPATH_W) 'tests/hash_plus.cc'; else $(CYGPATH_W) '$(srcdir)/tests/hash_plus.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_internals-internals.o: tests/libmemcached-1.0/internals.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_internals_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_internals-internals.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_internals-internals.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_internals-internals.o `test -f 'tests/libmemcached-1.0/internals.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/internals.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_internals-internals.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_internals-internals.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/internals.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_internals-internals.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_internals_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_internals-internals.o `test -f 'tests/libmemcached-1.0/internals.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/internals.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_internals-internals.obj: tests/libmemcached-1.0/internals.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_internals_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_internals-internals.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_internals-internals.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_internals-internals.obj `if test -f 'tests/libmemcached-1.0/internals.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/internals.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/internals.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_internals-internals.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_internals-internals.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/internals.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_internals-internals.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_internals_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_internals-internals.obj `if test -f 'tests/libmemcached-1.0/internals.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/internals.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/internals.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_internals-string.o: tests/libmemcached-1.0/string.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_internals_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_internals-string.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_internals-string.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_internals-string.o `test -f 'tests/libmemcached-1.0/string.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/string.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_internals-string.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_internals-string.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/string.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_internals-string.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_internals_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_internals-string.o `test -f 'tests/libmemcached-1.0/string.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/string.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_internals-string.obj: tests/libmemcached-1.0/string.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_internals_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_internals-string.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_internals-string.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_internals-string.obj `if test -f 'tests/libmemcached-1.0/string.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/string.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/string.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_internals-string.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_internals-string.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/string.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_internals-string.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_internals_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_internals-string.obj `if test -f 'tests/libmemcached-1.0/string.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/string.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/string.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-basic.o: tests/libmemcached-1.0/basic.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-basic.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-basic.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-basic.o `test -f 'tests/libmemcached-1.0/basic.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/basic.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-basic.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-basic.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/basic.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-basic.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-basic.o `test -f 'tests/libmemcached-1.0/basic.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/basic.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-basic.obj: tests/libmemcached-1.0/basic.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-basic.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-basic.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-basic.obj `if test -f 'tests/libmemcached-1.0/basic.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/basic.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/basic.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-basic.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-basic.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/basic.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-basic.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-basic.obj `if test -f 'tests/libmemcached-1.0/basic.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/basic.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/basic.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-debug.o: tests/libmemcached-1.0/debug.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-debug.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-debug.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-debug.o `test -f 'tests/libmemcached-1.0/debug.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/debug.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-debug.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-debug.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/debug.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-debug.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-debug.o `test -f 'tests/libmemcached-1.0/debug.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/debug.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-debug.obj: tests/libmemcached-1.0/debug.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-debug.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-debug.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-debug.obj `if test -f 'tests/libmemcached-1.0/debug.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/debug.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/debug.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-debug.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-debug.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/debug.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-debug.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-debug.obj `if test -f 'tests/libmemcached-1.0/debug.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/debug.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/debug.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-deprecated.o: tests/libmemcached-1.0/deprecated.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-deprecated.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-deprecated.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-deprecated.o `test -f 'tests/libmemcached-1.0/deprecated.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/deprecated.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-deprecated.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-deprecated.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/deprecated.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-deprecated.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-deprecated.o `test -f 'tests/libmemcached-1.0/deprecated.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/deprecated.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-deprecated.obj: tests/libmemcached-1.0/deprecated.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-deprecated.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-deprecated.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-deprecated.obj `if test -f 'tests/libmemcached-1.0/deprecated.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/deprecated.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/deprecated.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-deprecated.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-deprecated.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/deprecated.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-deprecated.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-deprecated.obj `if test -f 'tests/libmemcached-1.0/deprecated.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/deprecated.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/deprecated.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-error_conditions.o: tests/libmemcached-1.0/error_conditions.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-error_conditions.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-error_conditions.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-error_conditions.o `test -f 'tests/libmemcached-1.0/error_conditions.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/error_conditions.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-error_conditions.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-error_conditions.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/error_conditions.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-error_conditions.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-error_conditions.o `test -f 'tests/libmemcached-1.0/error_conditions.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/error_conditions.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-error_conditions.obj: tests/libmemcached-1.0/error_conditions.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-error_conditions.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-error_conditions.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-error_conditions.obj `if test -f 'tests/libmemcached-1.0/error_conditions.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/error_conditions.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/error_conditions.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-error_conditions.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-error_conditions.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/error_conditions.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-error_conditions.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-error_conditions.obj `if test -f 'tests/libmemcached-1.0/error_conditions.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/error_conditions.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/error_conditions.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-ketama.o: tests/libmemcached-1.0/ketama.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-ketama.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-ketama.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-ketama.o `test -f 'tests/libmemcached-1.0/ketama.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/ketama.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-ketama.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-ketama.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/ketama.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-ketama.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-ketama.o `test -f 'tests/libmemcached-1.0/ketama.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/ketama.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-ketama.obj: tests/libmemcached-1.0/ketama.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-ketama.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-ketama.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-ketama.obj `if test -f 'tests/libmemcached-1.0/ketama.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/ketama.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/ketama.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-ketama.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-ketama.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/ketama.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-ketama.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-ketama.obj `if test -f 'tests/libmemcached-1.0/ketama.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/ketama.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/ketama.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-namespace.o: tests/libmemcached-1.0/namespace.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-namespace.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-namespace.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-namespace.o `test -f 'tests/libmemcached-1.0/namespace.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/namespace.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-namespace.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-namespace.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/namespace.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-namespace.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-namespace.o `test -f 'tests/libmemcached-1.0/namespace.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/namespace.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-namespace.obj: tests/libmemcached-1.0/namespace.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-namespace.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-namespace.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-namespace.obj `if test -f 'tests/libmemcached-1.0/namespace.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/namespace.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/namespace.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-namespace.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-namespace.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/namespace.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-namespace.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-namespace.obj `if test -f 'tests/libmemcached-1.0/namespace.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/namespace.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/namespace.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-parser.o: tests/libmemcached-1.0/parser.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-parser.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-parser.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-parser.o `test -f 'tests/libmemcached-1.0/parser.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/parser.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-parser.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-parser.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/parser.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-parser.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-parser.o `test -f 'tests/libmemcached-1.0/parser.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/parser.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-parser.obj: tests/libmemcached-1.0/parser.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-parser.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-parser.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-parser.obj `if test -f 'tests/libmemcached-1.0/parser.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/parser.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/parser.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-parser.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-parser.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/parser.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-parser.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-parser.obj `if test -f 'tests/libmemcached-1.0/parser.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/parser.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/parser.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-pool.o: tests/libmemcached-1.0/pool.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-pool.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-pool.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-pool.o `test -f 'tests/libmemcached-1.0/pool.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/pool.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-pool.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-pool.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/pool.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-pool.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-pool.o `test -f 'tests/libmemcached-1.0/pool.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/pool.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-pool.obj: tests/libmemcached-1.0/pool.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-pool.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-pool.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-pool.obj `if test -f 'tests/libmemcached-1.0/pool.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/pool.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/pool.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-pool.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-pool.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/pool.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-pool.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-pool.obj `if test -f 'tests/libmemcached-1.0/pool.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/pool.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/pool.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-print.o: tests/libmemcached-1.0/print.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-print.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-print.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-print.o `test -f 'tests/libmemcached-1.0/print.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/print.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-print.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-print.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/print.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-print.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-print.o `test -f 'tests/libmemcached-1.0/print.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/print.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-print.obj: tests/libmemcached-1.0/print.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-print.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-print.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-print.obj `if test -f 'tests/libmemcached-1.0/print.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/print.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/print.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-print.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-print.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/print.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-print.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-print.obj `if test -f 'tests/libmemcached-1.0/print.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/print.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/print.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-replication.o: tests/libmemcached-1.0/replication.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-replication.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-replication.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-replication.o `test -f 'tests/libmemcached-1.0/replication.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/replication.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-replication.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-replication.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/replication.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-replication.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-replication.o `test -f 'tests/libmemcached-1.0/replication.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/replication.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-replication.obj: tests/libmemcached-1.0/replication.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-replication.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-replication.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-replication.obj `if test -f 'tests/libmemcached-1.0/replication.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/replication.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/replication.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-replication.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-replication.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/replication.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-replication.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-replication.obj `if test -f 'tests/libmemcached-1.0/replication.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/replication.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/replication.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-sasl.o: tests/libmemcached-1.0/sasl.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-sasl.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-sasl.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-sasl.o `test -f 'tests/libmemcached-1.0/sasl.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/sasl.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-sasl.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-sasl.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/sasl.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-sasl.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-sasl.o `test -f 'tests/libmemcached-1.0/sasl.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/sasl.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-sasl.obj: tests/libmemcached-1.0/sasl.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-sasl.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-sasl.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-sasl.obj `if test -f 'tests/libmemcached-1.0/sasl.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/sasl.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/sasl.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-sasl.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-sasl.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/sasl.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-sasl.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-sasl.obj `if test -f 'tests/libmemcached-1.0/sasl.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/sasl.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/sasl.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-virtual_buckets.o: tests/libmemcached-1.0/virtual_buckets.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-virtual_buckets.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-virtual_buckets.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-virtual_buckets.o `test -f 'tests/libmemcached-1.0/virtual_buckets.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/virtual_buckets.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-virtual_buckets.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-virtual_buckets.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/virtual_buckets.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-virtual_buckets.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-virtual_buckets.o `test -f 'tests/libmemcached-1.0/virtual_buckets.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/virtual_buckets.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-virtual_buckets.obj: tests/libmemcached-1.0/virtual_buckets.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-virtual_buckets.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-virtual_buckets.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-virtual_buckets.obj `if test -f 'tests/libmemcached-1.0/virtual_buckets.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/virtual_buckets.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/virtual_buckets.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-virtual_buckets.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-virtual_buckets.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/virtual_buckets.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-virtual_buckets.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-virtual_buckets.obj `if test -f 'tests/libmemcached-1.0/virtual_buckets.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/virtual_buckets.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/virtual_buckets.cc'; fi` + +clients/tests_libmemcached_1_0_sasl-execute.o: clients/execute.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT clients/tests_libmemcached_1_0_sasl-execute.o -MD -MP -MF clients/$(DEPDIR)/tests_libmemcached_1_0_sasl-execute.Tpo -c -o clients/tests_libmemcached_1_0_sasl-execute.o `test -f 'clients/execute.cc' || echo '$(srcdir)/'`clients/execute.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/tests_libmemcached_1_0_sasl-execute.Tpo clients/$(DEPDIR)/tests_libmemcached_1_0_sasl-execute.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/execute.cc' object='clients/tests_libmemcached_1_0_sasl-execute.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o clients/tests_libmemcached_1_0_sasl-execute.o `test -f 'clients/execute.cc' || echo '$(srcdir)/'`clients/execute.cc + +clients/tests_libmemcached_1_0_sasl-execute.obj: clients/execute.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT clients/tests_libmemcached_1_0_sasl-execute.obj -MD -MP -MF clients/$(DEPDIR)/tests_libmemcached_1_0_sasl-execute.Tpo -c -o clients/tests_libmemcached_1_0_sasl-execute.obj `if test -f 'clients/execute.cc'; then $(CYGPATH_W) 'clients/execute.cc'; else $(CYGPATH_W) '$(srcdir)/clients/execute.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/tests_libmemcached_1_0_sasl-execute.Tpo clients/$(DEPDIR)/tests_libmemcached_1_0_sasl-execute.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/execute.cc' object='clients/tests_libmemcached_1_0_sasl-execute.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o clients/tests_libmemcached_1_0_sasl-execute.obj `if test -f 'clients/execute.cc'; then $(CYGPATH_W) 'clients/execute.cc'; else $(CYGPATH_W) '$(srcdir)/clients/execute.cc'; fi` + +clients/tests_libmemcached_1_0_sasl-generator.o: clients/generator.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT clients/tests_libmemcached_1_0_sasl-generator.o -MD -MP -MF clients/$(DEPDIR)/tests_libmemcached_1_0_sasl-generator.Tpo -c -o clients/tests_libmemcached_1_0_sasl-generator.o `test -f 'clients/generator.cc' || echo '$(srcdir)/'`clients/generator.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/tests_libmemcached_1_0_sasl-generator.Tpo clients/$(DEPDIR)/tests_libmemcached_1_0_sasl-generator.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/generator.cc' object='clients/tests_libmemcached_1_0_sasl-generator.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o clients/tests_libmemcached_1_0_sasl-generator.o `test -f 'clients/generator.cc' || echo '$(srcdir)/'`clients/generator.cc + +clients/tests_libmemcached_1_0_sasl-generator.obj: clients/generator.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT clients/tests_libmemcached_1_0_sasl-generator.obj -MD -MP -MF clients/$(DEPDIR)/tests_libmemcached_1_0_sasl-generator.Tpo -c -o clients/tests_libmemcached_1_0_sasl-generator.obj `if test -f 'clients/generator.cc'; then $(CYGPATH_W) 'clients/generator.cc'; else $(CYGPATH_W) '$(srcdir)/clients/generator.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/tests_libmemcached_1_0_sasl-generator.Tpo clients/$(DEPDIR)/tests_libmemcached_1_0_sasl-generator.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/generator.cc' object='clients/tests_libmemcached_1_0_sasl-generator.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o clients/tests_libmemcached_1_0_sasl-generator.obj `if test -f 'clients/generator.cc'; then $(CYGPATH_W) 'clients/generator.cc'; else $(CYGPATH_W) '$(srcdir)/clients/generator.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-callback_counter.o: tests/libmemcached-1.0/callback_counter.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-callback_counter.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-callback_counter.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-callback_counter.o `test -f 'tests/libmemcached-1.0/callback_counter.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/callback_counter.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-callback_counter.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-callback_counter.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/callback_counter.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-callback_counter.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-callback_counter.o `test -f 'tests/libmemcached-1.0/callback_counter.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/callback_counter.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-callback_counter.obj: tests/libmemcached-1.0/callback_counter.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-callback_counter.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-callback_counter.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-callback_counter.obj `if test -f 'tests/libmemcached-1.0/callback_counter.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/callback_counter.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/callback_counter.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-callback_counter.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-callback_counter.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/callback_counter.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-callback_counter.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-callback_counter.obj `if test -f 'tests/libmemcached-1.0/callback_counter.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/callback_counter.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/callback_counter.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-fetch_all_results.o: tests/libmemcached-1.0/fetch_all_results.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-fetch_all_results.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-fetch_all_results.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-fetch_all_results.o `test -f 'tests/libmemcached-1.0/fetch_all_results.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/fetch_all_results.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-fetch_all_results.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-fetch_all_results.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/fetch_all_results.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-fetch_all_results.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-fetch_all_results.o `test -f 'tests/libmemcached-1.0/fetch_all_results.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/fetch_all_results.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-fetch_all_results.obj: tests/libmemcached-1.0/fetch_all_results.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-fetch_all_results.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-fetch_all_results.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-fetch_all_results.obj `if test -f 'tests/libmemcached-1.0/fetch_all_results.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/fetch_all_results.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/fetch_all_results.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-fetch_all_results.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-fetch_all_results.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/fetch_all_results.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-fetch_all_results.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-fetch_all_results.obj `if test -f 'tests/libmemcached-1.0/fetch_all_results.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/fetch_all_results.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/fetch_all_results.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-generate.o: tests/libmemcached-1.0/generate.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-generate.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-generate.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-generate.o `test -f 'tests/libmemcached-1.0/generate.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/generate.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-generate.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-generate.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/generate.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-generate.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-generate.o `test -f 'tests/libmemcached-1.0/generate.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/generate.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-generate.obj: tests/libmemcached-1.0/generate.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-generate.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-generate.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-generate.obj `if test -f 'tests/libmemcached-1.0/generate.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/generate.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/generate.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-generate.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_sasl-generate.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/generate.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-generate.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_sasl_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_sasl-generate.obj `if test -f 'tests/libmemcached-1.0/generate.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/generate.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/generate.cc'; fi` + +clients/tests_libmemcached_1_0_testapp-generator.o: clients/generator.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT clients/tests_libmemcached_1_0_testapp-generator.o -MD -MP -MF clients/$(DEPDIR)/tests_libmemcached_1_0_testapp-generator.Tpo -c -o clients/tests_libmemcached_1_0_testapp-generator.o `test -f 'clients/generator.cc' || echo '$(srcdir)/'`clients/generator.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/tests_libmemcached_1_0_testapp-generator.Tpo clients/$(DEPDIR)/tests_libmemcached_1_0_testapp-generator.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/generator.cc' object='clients/tests_libmemcached_1_0_testapp-generator.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o clients/tests_libmemcached_1_0_testapp-generator.o `test -f 'clients/generator.cc' || echo '$(srcdir)/'`clients/generator.cc + +clients/tests_libmemcached_1_0_testapp-generator.obj: clients/generator.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT clients/tests_libmemcached_1_0_testapp-generator.obj -MD -MP -MF clients/$(DEPDIR)/tests_libmemcached_1_0_testapp-generator.Tpo -c -o clients/tests_libmemcached_1_0_testapp-generator.obj `if test -f 'clients/generator.cc'; then $(CYGPATH_W) 'clients/generator.cc'; else $(CYGPATH_W) '$(srcdir)/clients/generator.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/tests_libmemcached_1_0_testapp-generator.Tpo clients/$(DEPDIR)/tests_libmemcached_1_0_testapp-generator.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/generator.cc' object='clients/tests_libmemcached_1_0_testapp-generator.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o clients/tests_libmemcached_1_0_testapp-generator.obj `if test -f 'clients/generator.cc'; then $(CYGPATH_W) 'clients/generator.cc'; else $(CYGPATH_W) '$(srcdir)/clients/generator.cc'; fi` + +clients/tests_libmemcached_1_0_testapp-execute.o: clients/execute.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT clients/tests_libmemcached_1_0_testapp-execute.o -MD -MP -MF clients/$(DEPDIR)/tests_libmemcached_1_0_testapp-execute.Tpo -c -o clients/tests_libmemcached_1_0_testapp-execute.o `test -f 'clients/execute.cc' || echo '$(srcdir)/'`clients/execute.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/tests_libmemcached_1_0_testapp-execute.Tpo clients/$(DEPDIR)/tests_libmemcached_1_0_testapp-execute.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/execute.cc' object='clients/tests_libmemcached_1_0_testapp-execute.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o clients/tests_libmemcached_1_0_testapp-execute.o `test -f 'clients/execute.cc' || echo '$(srcdir)/'`clients/execute.cc + +clients/tests_libmemcached_1_0_testapp-execute.obj: clients/execute.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT clients/tests_libmemcached_1_0_testapp-execute.obj -MD -MP -MF clients/$(DEPDIR)/tests_libmemcached_1_0_testapp-execute.Tpo -c -o clients/tests_libmemcached_1_0_testapp-execute.obj `if test -f 'clients/execute.cc'; then $(CYGPATH_W) 'clients/execute.cc'; else $(CYGPATH_W) '$(srcdir)/clients/execute.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/tests_libmemcached_1_0_testapp-execute.Tpo clients/$(DEPDIR)/tests_libmemcached_1_0_testapp-execute.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/execute.cc' object='clients/tests_libmemcached_1_0_testapp-execute.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o clients/tests_libmemcached_1_0_testapp-execute.obj `if test -f 'clients/execute.cc'; then $(CYGPATH_W) 'clients/execute.cc'; else $(CYGPATH_W) '$(srcdir)/clients/execute.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-all_tests.o: tests/libmemcached-1.0/all_tests.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-all_tests.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-all_tests.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-all_tests.o `test -f 'tests/libmemcached-1.0/all_tests.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/all_tests.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-all_tests.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-all_tests.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/all_tests.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-all_tests.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-all_tests.o `test -f 'tests/libmemcached-1.0/all_tests.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/all_tests.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-all_tests.obj: tests/libmemcached-1.0/all_tests.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-all_tests.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-all_tests.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-all_tests.obj `if test -f 'tests/libmemcached-1.0/all_tests.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/all_tests.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/all_tests.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-all_tests.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-all_tests.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/all_tests.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-all_tests.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-all_tests.obj `if test -f 'tests/libmemcached-1.0/all_tests.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/all_tests.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/all_tests.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-basic.o: tests/libmemcached-1.0/basic.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-basic.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-basic.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-basic.o `test -f 'tests/libmemcached-1.0/basic.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/basic.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-basic.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-basic.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/basic.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-basic.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-basic.o `test -f 'tests/libmemcached-1.0/basic.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/basic.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-basic.obj: tests/libmemcached-1.0/basic.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-basic.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-basic.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-basic.obj `if test -f 'tests/libmemcached-1.0/basic.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/basic.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/basic.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-basic.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-basic.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/basic.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-basic.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-basic.obj `if test -f 'tests/libmemcached-1.0/basic.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/basic.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/basic.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-callback_counter.o: tests/libmemcached-1.0/callback_counter.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-callback_counter.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-callback_counter.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-callback_counter.o `test -f 'tests/libmemcached-1.0/callback_counter.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/callback_counter.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-callback_counter.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-callback_counter.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/callback_counter.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-callback_counter.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-callback_counter.o `test -f 'tests/libmemcached-1.0/callback_counter.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/callback_counter.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-callback_counter.obj: tests/libmemcached-1.0/callback_counter.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-callback_counter.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-callback_counter.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-callback_counter.obj `if test -f 'tests/libmemcached-1.0/callback_counter.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/callback_counter.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/callback_counter.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-callback_counter.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-callback_counter.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/callback_counter.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-callback_counter.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-callback_counter.obj `if test -f 'tests/libmemcached-1.0/callback_counter.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/callback_counter.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/callback_counter.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-callbacks.o: tests/libmemcached-1.0/callbacks.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-callbacks.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-callbacks.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-callbacks.o `test -f 'tests/libmemcached-1.0/callbacks.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/callbacks.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-callbacks.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-callbacks.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/callbacks.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-callbacks.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-callbacks.o `test -f 'tests/libmemcached-1.0/callbacks.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/callbacks.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-callbacks.obj: tests/libmemcached-1.0/callbacks.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-callbacks.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-callbacks.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-callbacks.obj `if test -f 'tests/libmemcached-1.0/callbacks.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/callbacks.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/callbacks.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-callbacks.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-callbacks.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/callbacks.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-callbacks.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-callbacks.obj `if test -f 'tests/libmemcached-1.0/callbacks.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/callbacks.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/callbacks.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-debug.o: tests/libmemcached-1.0/debug.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-debug.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-debug.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-debug.o `test -f 'tests/libmemcached-1.0/debug.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/debug.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-debug.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-debug.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/debug.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-debug.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-debug.o `test -f 'tests/libmemcached-1.0/debug.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/debug.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-debug.obj: tests/libmemcached-1.0/debug.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-debug.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-debug.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-debug.obj `if test -f 'tests/libmemcached-1.0/debug.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/debug.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/debug.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-debug.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-debug.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/debug.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-debug.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-debug.obj `if test -f 'tests/libmemcached-1.0/debug.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/debug.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/debug.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-deprecated.o: tests/libmemcached-1.0/deprecated.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-deprecated.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-deprecated.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-deprecated.o `test -f 'tests/libmemcached-1.0/deprecated.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/deprecated.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-deprecated.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-deprecated.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/deprecated.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-deprecated.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-deprecated.o `test -f 'tests/libmemcached-1.0/deprecated.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/deprecated.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-deprecated.obj: tests/libmemcached-1.0/deprecated.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-deprecated.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-deprecated.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-deprecated.obj `if test -f 'tests/libmemcached-1.0/deprecated.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/deprecated.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/deprecated.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-deprecated.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-deprecated.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/deprecated.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-deprecated.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-deprecated.obj `if test -f 'tests/libmemcached-1.0/deprecated.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/deprecated.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/deprecated.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-dump.o: tests/libmemcached-1.0/dump.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-dump.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-dump.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-dump.o `test -f 'tests/libmemcached-1.0/dump.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/dump.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-dump.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-dump.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/dump.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-dump.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-dump.o `test -f 'tests/libmemcached-1.0/dump.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/dump.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-dump.obj: tests/libmemcached-1.0/dump.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-dump.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-dump.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-dump.obj `if test -f 'tests/libmemcached-1.0/dump.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/dump.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/dump.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-dump.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-dump.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/dump.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-dump.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-dump.obj `if test -f 'tests/libmemcached-1.0/dump.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/dump.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/dump.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-encoding_key.o: tests/libmemcached-1.0/encoding_key.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-encoding_key.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-encoding_key.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-encoding_key.o `test -f 'tests/libmemcached-1.0/encoding_key.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/encoding_key.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-encoding_key.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-encoding_key.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/encoding_key.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-encoding_key.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-encoding_key.o `test -f 'tests/libmemcached-1.0/encoding_key.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/encoding_key.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-encoding_key.obj: tests/libmemcached-1.0/encoding_key.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-encoding_key.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-encoding_key.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-encoding_key.obj `if test -f 'tests/libmemcached-1.0/encoding_key.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/encoding_key.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/encoding_key.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-encoding_key.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-encoding_key.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/encoding_key.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-encoding_key.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-encoding_key.obj `if test -f 'tests/libmemcached-1.0/encoding_key.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/encoding_key.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/encoding_key.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-error_conditions.o: tests/libmemcached-1.0/error_conditions.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-error_conditions.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-error_conditions.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-error_conditions.o `test -f 'tests/libmemcached-1.0/error_conditions.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/error_conditions.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-error_conditions.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-error_conditions.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/error_conditions.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-error_conditions.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-error_conditions.o `test -f 'tests/libmemcached-1.0/error_conditions.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/error_conditions.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-error_conditions.obj: tests/libmemcached-1.0/error_conditions.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-error_conditions.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-error_conditions.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-error_conditions.obj `if test -f 'tests/libmemcached-1.0/error_conditions.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/error_conditions.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/error_conditions.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-error_conditions.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-error_conditions.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/error_conditions.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-error_conditions.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-error_conditions.obj `if test -f 'tests/libmemcached-1.0/error_conditions.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/error_conditions.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/error_conditions.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-exist.o: tests/libmemcached-1.0/exist.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-exist.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-exist.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-exist.o `test -f 'tests/libmemcached-1.0/exist.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/exist.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-exist.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-exist.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/exist.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-exist.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-exist.o `test -f 'tests/libmemcached-1.0/exist.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/exist.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-exist.obj: tests/libmemcached-1.0/exist.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-exist.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-exist.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-exist.obj `if test -f 'tests/libmemcached-1.0/exist.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/exist.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/exist.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-exist.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-exist.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/exist.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-exist.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-exist.obj `if test -f 'tests/libmemcached-1.0/exist.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/exist.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/exist.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-fetch_all_results.o: tests/libmemcached-1.0/fetch_all_results.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-fetch_all_results.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-fetch_all_results.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-fetch_all_results.o `test -f 'tests/libmemcached-1.0/fetch_all_results.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/fetch_all_results.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-fetch_all_results.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-fetch_all_results.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/fetch_all_results.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-fetch_all_results.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-fetch_all_results.o `test -f 'tests/libmemcached-1.0/fetch_all_results.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/fetch_all_results.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-fetch_all_results.obj: tests/libmemcached-1.0/fetch_all_results.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-fetch_all_results.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-fetch_all_results.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-fetch_all_results.obj `if test -f 'tests/libmemcached-1.0/fetch_all_results.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/fetch_all_results.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/fetch_all_results.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-fetch_all_results.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-fetch_all_results.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/fetch_all_results.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-fetch_all_results.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-fetch_all_results.obj `if test -f 'tests/libmemcached-1.0/fetch_all_results.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/fetch_all_results.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/fetch_all_results.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-generate.o: tests/libmemcached-1.0/generate.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-generate.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-generate.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-generate.o `test -f 'tests/libmemcached-1.0/generate.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/generate.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-generate.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-generate.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/generate.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-generate.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-generate.o `test -f 'tests/libmemcached-1.0/generate.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/generate.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-generate.obj: tests/libmemcached-1.0/generate.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-generate.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-generate.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-generate.obj `if test -f 'tests/libmemcached-1.0/generate.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/generate.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/generate.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-generate.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-generate.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/generate.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-generate.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-generate.obj `if test -f 'tests/libmemcached-1.0/generate.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/generate.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/generate.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-haldenbrand.o: tests/libmemcached-1.0/haldenbrand.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-haldenbrand.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-haldenbrand.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-haldenbrand.o `test -f 'tests/libmemcached-1.0/haldenbrand.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/haldenbrand.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-haldenbrand.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-haldenbrand.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/haldenbrand.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-haldenbrand.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-haldenbrand.o `test -f 'tests/libmemcached-1.0/haldenbrand.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/haldenbrand.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-haldenbrand.obj: tests/libmemcached-1.0/haldenbrand.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-haldenbrand.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-haldenbrand.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-haldenbrand.obj `if test -f 'tests/libmemcached-1.0/haldenbrand.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/haldenbrand.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/haldenbrand.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-haldenbrand.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-haldenbrand.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/haldenbrand.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-haldenbrand.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-haldenbrand.obj `if test -f 'tests/libmemcached-1.0/haldenbrand.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/haldenbrand.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/haldenbrand.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-ketama.o: tests/libmemcached-1.0/ketama.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-ketama.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-ketama.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-ketama.o `test -f 'tests/libmemcached-1.0/ketama.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/ketama.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-ketama.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-ketama.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/ketama.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-ketama.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-ketama.o `test -f 'tests/libmemcached-1.0/ketama.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/ketama.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-ketama.obj: tests/libmemcached-1.0/ketama.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-ketama.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-ketama.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-ketama.obj `if test -f 'tests/libmemcached-1.0/ketama.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/ketama.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/ketama.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-ketama.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-ketama.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/ketama.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-ketama.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-ketama.obj `if test -f 'tests/libmemcached-1.0/ketama.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/ketama.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/ketama.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-mem_functions.o: tests/libmemcached-1.0/mem_functions.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-mem_functions.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-mem_functions.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-mem_functions.o `test -f 'tests/libmemcached-1.0/mem_functions.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/mem_functions.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-mem_functions.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-mem_functions.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/mem_functions.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-mem_functions.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-mem_functions.o `test -f 'tests/libmemcached-1.0/mem_functions.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/mem_functions.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-mem_functions.obj: tests/libmemcached-1.0/mem_functions.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-mem_functions.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-mem_functions.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-mem_functions.obj `if test -f 'tests/libmemcached-1.0/mem_functions.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/mem_functions.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/mem_functions.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-mem_functions.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-mem_functions.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/mem_functions.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-mem_functions.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-mem_functions.obj `if test -f 'tests/libmemcached-1.0/mem_functions.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/mem_functions.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/mem_functions.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-memcached_get.o: tests/libmemcached-1.0/memcached_get.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-memcached_get.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-memcached_get.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-memcached_get.o `test -f 'tests/libmemcached-1.0/memcached_get.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/memcached_get.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-memcached_get.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-memcached_get.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/memcached_get.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-memcached_get.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-memcached_get.o `test -f 'tests/libmemcached-1.0/memcached_get.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/memcached_get.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-memcached_get.obj: tests/libmemcached-1.0/memcached_get.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-memcached_get.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-memcached_get.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-memcached_get.obj `if test -f 'tests/libmemcached-1.0/memcached_get.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/memcached_get.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/memcached_get.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-memcached_get.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-memcached_get.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/memcached_get.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-memcached_get.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-memcached_get.obj `if test -f 'tests/libmemcached-1.0/memcached_get.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/memcached_get.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/memcached_get.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-namespace.o: tests/libmemcached-1.0/namespace.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-namespace.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-namespace.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-namespace.o `test -f 'tests/libmemcached-1.0/namespace.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/namespace.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-namespace.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-namespace.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/namespace.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-namespace.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-namespace.o `test -f 'tests/libmemcached-1.0/namespace.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/namespace.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-namespace.obj: tests/libmemcached-1.0/namespace.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-namespace.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-namespace.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-namespace.obj `if test -f 'tests/libmemcached-1.0/namespace.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/namespace.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/namespace.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-namespace.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-namespace.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/namespace.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-namespace.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-namespace.obj `if test -f 'tests/libmemcached-1.0/namespace.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/namespace.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/namespace.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-parser.o: tests/libmemcached-1.0/parser.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-parser.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-parser.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-parser.o `test -f 'tests/libmemcached-1.0/parser.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/parser.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-parser.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-parser.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/parser.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-parser.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-parser.o `test -f 'tests/libmemcached-1.0/parser.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/parser.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-parser.obj: tests/libmemcached-1.0/parser.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-parser.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-parser.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-parser.obj `if test -f 'tests/libmemcached-1.0/parser.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/parser.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/parser.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-parser.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-parser.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/parser.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-parser.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-parser.obj `if test -f 'tests/libmemcached-1.0/parser.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/parser.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/parser.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-pool.o: tests/libmemcached-1.0/pool.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-pool.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-pool.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-pool.o `test -f 'tests/libmemcached-1.0/pool.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/pool.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-pool.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-pool.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/pool.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-pool.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-pool.o `test -f 'tests/libmemcached-1.0/pool.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/pool.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-pool.obj: tests/libmemcached-1.0/pool.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-pool.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-pool.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-pool.obj `if test -f 'tests/libmemcached-1.0/pool.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/pool.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/pool.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-pool.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-pool.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/pool.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-pool.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-pool.obj `if test -f 'tests/libmemcached-1.0/pool.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/pool.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/pool.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-print.o: tests/libmemcached-1.0/print.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-print.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-print.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-print.o `test -f 'tests/libmemcached-1.0/print.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/print.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-print.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-print.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/print.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-print.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-print.o `test -f 'tests/libmemcached-1.0/print.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/print.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-print.obj: tests/libmemcached-1.0/print.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-print.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-print.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-print.obj `if test -f 'tests/libmemcached-1.0/print.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/print.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/print.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-print.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-print.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/print.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-print.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-print.obj `if test -f 'tests/libmemcached-1.0/print.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/print.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/print.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-replication.o: tests/libmemcached-1.0/replication.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-replication.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-replication.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-replication.o `test -f 'tests/libmemcached-1.0/replication.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/replication.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-replication.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-replication.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/replication.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-replication.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-replication.o `test -f 'tests/libmemcached-1.0/replication.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/replication.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-replication.obj: tests/libmemcached-1.0/replication.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-replication.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-replication.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-replication.obj `if test -f 'tests/libmemcached-1.0/replication.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/replication.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/replication.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-replication.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-replication.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/replication.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-replication.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-replication.obj `if test -f 'tests/libmemcached-1.0/replication.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/replication.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/replication.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-server_add.o: tests/libmemcached-1.0/server_add.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-server_add.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-server_add.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-server_add.o `test -f 'tests/libmemcached-1.0/server_add.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/server_add.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-server_add.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-server_add.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/server_add.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-server_add.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-server_add.o `test -f 'tests/libmemcached-1.0/server_add.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/server_add.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-server_add.obj: tests/libmemcached-1.0/server_add.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-server_add.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-server_add.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-server_add.obj `if test -f 'tests/libmemcached-1.0/server_add.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/server_add.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/server_add.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-server_add.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-server_add.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/server_add.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-server_add.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-server_add.obj `if test -f 'tests/libmemcached-1.0/server_add.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/server_add.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/server_add.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-setup_and_teardowns.o: tests/libmemcached-1.0/setup_and_teardowns.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-setup_and_teardowns.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-setup_and_teardowns.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-setup_and_teardowns.o `test -f 'tests/libmemcached-1.0/setup_and_teardowns.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/setup_and_teardowns.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-setup_and_teardowns.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-setup_and_teardowns.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/setup_and_teardowns.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-setup_and_teardowns.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-setup_and_teardowns.o `test -f 'tests/libmemcached-1.0/setup_and_teardowns.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/setup_and_teardowns.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-setup_and_teardowns.obj: tests/libmemcached-1.0/setup_and_teardowns.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-setup_and_teardowns.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-setup_and_teardowns.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-setup_and_teardowns.obj `if test -f 'tests/libmemcached-1.0/setup_and_teardowns.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/setup_and_teardowns.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/setup_and_teardowns.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-setup_and_teardowns.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-setup_and_teardowns.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/setup_and_teardowns.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-setup_and_teardowns.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-setup_and_teardowns.obj `if test -f 'tests/libmemcached-1.0/setup_and_teardowns.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/setup_and_teardowns.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/setup_and_teardowns.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-stat.o: tests/libmemcached-1.0/stat.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-stat.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-stat.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-stat.o `test -f 'tests/libmemcached-1.0/stat.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/stat.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-stat.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-stat.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/stat.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-stat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-stat.o `test -f 'tests/libmemcached-1.0/stat.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/stat.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-stat.obj: tests/libmemcached-1.0/stat.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-stat.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-stat.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-stat.obj `if test -f 'tests/libmemcached-1.0/stat.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/stat.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/stat.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-stat.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-stat.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/stat.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-stat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-stat.obj `if test -f 'tests/libmemcached-1.0/stat.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/stat.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/stat.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-touch.o: tests/libmemcached-1.0/touch.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-touch.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-touch.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-touch.o `test -f 'tests/libmemcached-1.0/touch.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/touch.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-touch.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-touch.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/touch.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-touch.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-touch.o `test -f 'tests/libmemcached-1.0/touch.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/touch.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-touch.obj: tests/libmemcached-1.0/touch.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-touch.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-touch.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-touch.obj `if test -f 'tests/libmemcached-1.0/touch.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/touch.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/touch.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-touch.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-touch.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/touch.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-touch.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-touch.obj `if test -f 'tests/libmemcached-1.0/touch.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/touch.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/touch.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-virtual_buckets.o: tests/libmemcached-1.0/virtual_buckets.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-virtual_buckets.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-virtual_buckets.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-virtual_buckets.o `test -f 'tests/libmemcached-1.0/virtual_buckets.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/virtual_buckets.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-virtual_buckets.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-virtual_buckets.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/virtual_buckets.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-virtual_buckets.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-virtual_buckets.o `test -f 'tests/libmemcached-1.0/virtual_buckets.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/virtual_buckets.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-virtual_buckets.obj: tests/libmemcached-1.0/virtual_buckets.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-virtual_buckets.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-virtual_buckets.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-virtual_buckets.obj `if test -f 'tests/libmemcached-1.0/virtual_buckets.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/virtual_buckets.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/virtual_buckets.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-virtual_buckets.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testapp-virtual_buckets.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/virtual_buckets.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-virtual_buckets.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testapp_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testapp-virtual_buckets.obj `if test -f 'tests/libmemcached-1.0/virtual_buckets.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/virtual_buckets.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/virtual_buckets.cc'; fi` + +clients/tests_libmemcached_1_0_testsocket-execute.o: clients/execute.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT clients/tests_libmemcached_1_0_testsocket-execute.o -MD -MP -MF clients/$(DEPDIR)/tests_libmemcached_1_0_testsocket-execute.Tpo -c -o clients/tests_libmemcached_1_0_testsocket-execute.o `test -f 'clients/execute.cc' || echo '$(srcdir)/'`clients/execute.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/tests_libmemcached_1_0_testsocket-execute.Tpo clients/$(DEPDIR)/tests_libmemcached_1_0_testsocket-execute.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/execute.cc' object='clients/tests_libmemcached_1_0_testsocket-execute.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o clients/tests_libmemcached_1_0_testsocket-execute.o `test -f 'clients/execute.cc' || echo '$(srcdir)/'`clients/execute.cc + +clients/tests_libmemcached_1_0_testsocket-execute.obj: clients/execute.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT clients/tests_libmemcached_1_0_testsocket-execute.obj -MD -MP -MF clients/$(DEPDIR)/tests_libmemcached_1_0_testsocket-execute.Tpo -c -o clients/tests_libmemcached_1_0_testsocket-execute.obj `if test -f 'clients/execute.cc'; then $(CYGPATH_W) 'clients/execute.cc'; else $(CYGPATH_W) '$(srcdir)/clients/execute.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/tests_libmemcached_1_0_testsocket-execute.Tpo clients/$(DEPDIR)/tests_libmemcached_1_0_testsocket-execute.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/execute.cc' object='clients/tests_libmemcached_1_0_testsocket-execute.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o clients/tests_libmemcached_1_0_testsocket-execute.obj `if test -f 'clients/execute.cc'; then $(CYGPATH_W) 'clients/execute.cc'; else $(CYGPATH_W) '$(srcdir)/clients/execute.cc'; fi` + +clients/tests_libmemcached_1_0_testsocket-generator.o: clients/generator.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT clients/tests_libmemcached_1_0_testsocket-generator.o -MD -MP -MF clients/$(DEPDIR)/tests_libmemcached_1_0_testsocket-generator.Tpo -c -o clients/tests_libmemcached_1_0_testsocket-generator.o `test -f 'clients/generator.cc' || echo '$(srcdir)/'`clients/generator.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/tests_libmemcached_1_0_testsocket-generator.Tpo clients/$(DEPDIR)/tests_libmemcached_1_0_testsocket-generator.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/generator.cc' object='clients/tests_libmemcached_1_0_testsocket-generator.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o clients/tests_libmemcached_1_0_testsocket-generator.o `test -f 'clients/generator.cc' || echo '$(srcdir)/'`clients/generator.cc + +clients/tests_libmemcached_1_0_testsocket-generator.obj: clients/generator.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT clients/tests_libmemcached_1_0_testsocket-generator.obj -MD -MP -MF clients/$(DEPDIR)/tests_libmemcached_1_0_testsocket-generator.Tpo -c -o clients/tests_libmemcached_1_0_testsocket-generator.obj `if test -f 'clients/generator.cc'; then $(CYGPATH_W) 'clients/generator.cc'; else $(CYGPATH_W) '$(srcdir)/clients/generator.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/tests_libmemcached_1_0_testsocket-generator.Tpo clients/$(DEPDIR)/tests_libmemcached_1_0_testsocket-generator.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/generator.cc' object='clients/tests_libmemcached_1_0_testsocket-generator.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o clients/tests_libmemcached_1_0_testsocket-generator.obj `if test -f 'clients/generator.cc'; then $(CYGPATH_W) 'clients/generator.cc'; else $(CYGPATH_W) '$(srcdir)/clients/generator.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-all_tests_socket.o: tests/libmemcached-1.0/all_tests_socket.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-all_tests_socket.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-all_tests_socket.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-all_tests_socket.o `test -f 'tests/libmemcached-1.0/all_tests_socket.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/all_tests_socket.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-all_tests_socket.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-all_tests_socket.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/all_tests_socket.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-all_tests_socket.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-all_tests_socket.o `test -f 'tests/libmemcached-1.0/all_tests_socket.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/all_tests_socket.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-all_tests_socket.obj: tests/libmemcached-1.0/all_tests_socket.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-all_tests_socket.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-all_tests_socket.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-all_tests_socket.obj `if test -f 'tests/libmemcached-1.0/all_tests_socket.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/all_tests_socket.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/all_tests_socket.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-all_tests_socket.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-all_tests_socket.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/all_tests_socket.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-all_tests_socket.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-all_tests_socket.obj `if test -f 'tests/libmemcached-1.0/all_tests_socket.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/all_tests_socket.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/all_tests_socket.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-basic.o: tests/libmemcached-1.0/basic.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-basic.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-basic.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-basic.o `test -f 'tests/libmemcached-1.0/basic.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/basic.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-basic.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-basic.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/basic.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-basic.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-basic.o `test -f 'tests/libmemcached-1.0/basic.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/basic.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-basic.obj: tests/libmemcached-1.0/basic.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-basic.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-basic.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-basic.obj `if test -f 'tests/libmemcached-1.0/basic.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/basic.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/basic.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-basic.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-basic.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/basic.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-basic.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-basic.obj `if test -f 'tests/libmemcached-1.0/basic.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/basic.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/basic.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-callback_counter.o: tests/libmemcached-1.0/callback_counter.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-callback_counter.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-callback_counter.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-callback_counter.o `test -f 'tests/libmemcached-1.0/callback_counter.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/callback_counter.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-callback_counter.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-callback_counter.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/callback_counter.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-callback_counter.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-callback_counter.o `test -f 'tests/libmemcached-1.0/callback_counter.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/callback_counter.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-callback_counter.obj: tests/libmemcached-1.0/callback_counter.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-callback_counter.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-callback_counter.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-callback_counter.obj `if test -f 'tests/libmemcached-1.0/callback_counter.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/callback_counter.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/callback_counter.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-callback_counter.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-callback_counter.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/callback_counter.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-callback_counter.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-callback_counter.obj `if test -f 'tests/libmemcached-1.0/callback_counter.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/callback_counter.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/callback_counter.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-callbacks.o: tests/libmemcached-1.0/callbacks.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-callbacks.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-callbacks.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-callbacks.o `test -f 'tests/libmemcached-1.0/callbacks.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/callbacks.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-callbacks.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-callbacks.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/callbacks.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-callbacks.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-callbacks.o `test -f 'tests/libmemcached-1.0/callbacks.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/callbacks.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-callbacks.obj: tests/libmemcached-1.0/callbacks.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-callbacks.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-callbacks.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-callbacks.obj `if test -f 'tests/libmemcached-1.0/callbacks.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/callbacks.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/callbacks.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-callbacks.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-callbacks.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/callbacks.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-callbacks.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-callbacks.obj `if test -f 'tests/libmemcached-1.0/callbacks.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/callbacks.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/callbacks.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-debug.o: tests/libmemcached-1.0/debug.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-debug.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-debug.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-debug.o `test -f 'tests/libmemcached-1.0/debug.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/debug.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-debug.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-debug.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/debug.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-debug.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-debug.o `test -f 'tests/libmemcached-1.0/debug.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/debug.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-debug.obj: tests/libmemcached-1.0/debug.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-debug.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-debug.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-debug.obj `if test -f 'tests/libmemcached-1.0/debug.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/debug.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/debug.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-debug.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-debug.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/debug.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-debug.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-debug.obj `if test -f 'tests/libmemcached-1.0/debug.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/debug.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/debug.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-deprecated.o: tests/libmemcached-1.0/deprecated.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-deprecated.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-deprecated.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-deprecated.o `test -f 'tests/libmemcached-1.0/deprecated.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/deprecated.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-deprecated.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-deprecated.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/deprecated.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-deprecated.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-deprecated.o `test -f 'tests/libmemcached-1.0/deprecated.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/deprecated.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-deprecated.obj: tests/libmemcached-1.0/deprecated.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-deprecated.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-deprecated.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-deprecated.obj `if test -f 'tests/libmemcached-1.0/deprecated.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/deprecated.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/deprecated.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-deprecated.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-deprecated.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/deprecated.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-deprecated.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-deprecated.obj `if test -f 'tests/libmemcached-1.0/deprecated.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/deprecated.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/deprecated.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-dump.o: tests/libmemcached-1.0/dump.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-dump.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-dump.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-dump.o `test -f 'tests/libmemcached-1.0/dump.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/dump.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-dump.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-dump.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/dump.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-dump.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-dump.o `test -f 'tests/libmemcached-1.0/dump.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/dump.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-dump.obj: tests/libmemcached-1.0/dump.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-dump.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-dump.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-dump.obj `if test -f 'tests/libmemcached-1.0/dump.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/dump.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/dump.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-dump.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-dump.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/dump.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-dump.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-dump.obj `if test -f 'tests/libmemcached-1.0/dump.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/dump.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/dump.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-encoding_key.o: tests/libmemcached-1.0/encoding_key.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-encoding_key.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-encoding_key.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-encoding_key.o `test -f 'tests/libmemcached-1.0/encoding_key.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/encoding_key.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-encoding_key.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-encoding_key.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/encoding_key.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-encoding_key.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-encoding_key.o `test -f 'tests/libmemcached-1.0/encoding_key.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/encoding_key.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-encoding_key.obj: tests/libmemcached-1.0/encoding_key.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-encoding_key.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-encoding_key.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-encoding_key.obj `if test -f 'tests/libmemcached-1.0/encoding_key.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/encoding_key.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/encoding_key.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-encoding_key.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-encoding_key.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/encoding_key.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-encoding_key.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-encoding_key.obj `if test -f 'tests/libmemcached-1.0/encoding_key.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/encoding_key.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/encoding_key.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-error_conditions.o: tests/libmemcached-1.0/error_conditions.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-error_conditions.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-error_conditions.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-error_conditions.o `test -f 'tests/libmemcached-1.0/error_conditions.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/error_conditions.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-error_conditions.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-error_conditions.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/error_conditions.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-error_conditions.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-error_conditions.o `test -f 'tests/libmemcached-1.0/error_conditions.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/error_conditions.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-error_conditions.obj: tests/libmemcached-1.0/error_conditions.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-error_conditions.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-error_conditions.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-error_conditions.obj `if test -f 'tests/libmemcached-1.0/error_conditions.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/error_conditions.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/error_conditions.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-error_conditions.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-error_conditions.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/error_conditions.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-error_conditions.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-error_conditions.obj `if test -f 'tests/libmemcached-1.0/error_conditions.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/error_conditions.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/error_conditions.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-exist.o: tests/libmemcached-1.0/exist.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-exist.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-exist.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-exist.o `test -f 'tests/libmemcached-1.0/exist.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/exist.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-exist.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-exist.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/exist.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-exist.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-exist.o `test -f 'tests/libmemcached-1.0/exist.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/exist.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-exist.obj: tests/libmemcached-1.0/exist.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-exist.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-exist.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-exist.obj `if test -f 'tests/libmemcached-1.0/exist.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/exist.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/exist.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-exist.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-exist.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/exist.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-exist.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-exist.obj `if test -f 'tests/libmemcached-1.0/exist.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/exist.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/exist.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-fetch_all_results.o: tests/libmemcached-1.0/fetch_all_results.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-fetch_all_results.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-fetch_all_results.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-fetch_all_results.o `test -f 'tests/libmemcached-1.0/fetch_all_results.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/fetch_all_results.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-fetch_all_results.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-fetch_all_results.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/fetch_all_results.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-fetch_all_results.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-fetch_all_results.o `test -f 'tests/libmemcached-1.0/fetch_all_results.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/fetch_all_results.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-fetch_all_results.obj: tests/libmemcached-1.0/fetch_all_results.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-fetch_all_results.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-fetch_all_results.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-fetch_all_results.obj `if test -f 'tests/libmemcached-1.0/fetch_all_results.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/fetch_all_results.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/fetch_all_results.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-fetch_all_results.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-fetch_all_results.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/fetch_all_results.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-fetch_all_results.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-fetch_all_results.obj `if test -f 'tests/libmemcached-1.0/fetch_all_results.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/fetch_all_results.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/fetch_all_results.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-generate.o: tests/libmemcached-1.0/generate.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-generate.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-generate.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-generate.o `test -f 'tests/libmemcached-1.0/generate.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/generate.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-generate.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-generate.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/generate.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-generate.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-generate.o `test -f 'tests/libmemcached-1.0/generate.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/generate.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-generate.obj: tests/libmemcached-1.0/generate.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-generate.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-generate.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-generate.obj `if test -f 'tests/libmemcached-1.0/generate.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/generate.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/generate.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-generate.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-generate.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/generate.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-generate.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-generate.obj `if test -f 'tests/libmemcached-1.0/generate.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/generate.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/generate.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-haldenbrand.o: tests/libmemcached-1.0/haldenbrand.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-haldenbrand.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-haldenbrand.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-haldenbrand.o `test -f 'tests/libmemcached-1.0/haldenbrand.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/haldenbrand.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-haldenbrand.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-haldenbrand.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/haldenbrand.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-haldenbrand.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-haldenbrand.o `test -f 'tests/libmemcached-1.0/haldenbrand.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/haldenbrand.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-haldenbrand.obj: tests/libmemcached-1.0/haldenbrand.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-haldenbrand.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-haldenbrand.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-haldenbrand.obj `if test -f 'tests/libmemcached-1.0/haldenbrand.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/haldenbrand.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/haldenbrand.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-haldenbrand.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-haldenbrand.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/haldenbrand.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-haldenbrand.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-haldenbrand.obj `if test -f 'tests/libmemcached-1.0/haldenbrand.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/haldenbrand.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/haldenbrand.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-ketama.o: tests/libmemcached-1.0/ketama.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-ketama.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-ketama.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-ketama.o `test -f 'tests/libmemcached-1.0/ketama.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/ketama.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-ketama.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-ketama.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/ketama.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-ketama.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-ketama.o `test -f 'tests/libmemcached-1.0/ketama.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/ketama.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-ketama.obj: tests/libmemcached-1.0/ketama.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-ketama.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-ketama.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-ketama.obj `if test -f 'tests/libmemcached-1.0/ketama.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/ketama.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/ketama.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-ketama.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-ketama.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/ketama.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-ketama.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-ketama.obj `if test -f 'tests/libmemcached-1.0/ketama.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/ketama.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/ketama.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-mem_functions.o: tests/libmemcached-1.0/mem_functions.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-mem_functions.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-mem_functions.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-mem_functions.o `test -f 'tests/libmemcached-1.0/mem_functions.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/mem_functions.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-mem_functions.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-mem_functions.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/mem_functions.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-mem_functions.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-mem_functions.o `test -f 'tests/libmemcached-1.0/mem_functions.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/mem_functions.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-mem_functions.obj: tests/libmemcached-1.0/mem_functions.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-mem_functions.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-mem_functions.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-mem_functions.obj `if test -f 'tests/libmemcached-1.0/mem_functions.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/mem_functions.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/mem_functions.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-mem_functions.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-mem_functions.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/mem_functions.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-mem_functions.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-mem_functions.obj `if test -f 'tests/libmemcached-1.0/mem_functions.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/mem_functions.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/mem_functions.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-memcached_get.o: tests/libmemcached-1.0/memcached_get.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-memcached_get.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-memcached_get.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-memcached_get.o `test -f 'tests/libmemcached-1.0/memcached_get.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/memcached_get.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-memcached_get.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-memcached_get.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/memcached_get.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-memcached_get.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-memcached_get.o `test -f 'tests/libmemcached-1.0/memcached_get.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/memcached_get.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-memcached_get.obj: tests/libmemcached-1.0/memcached_get.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-memcached_get.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-memcached_get.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-memcached_get.obj `if test -f 'tests/libmemcached-1.0/memcached_get.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/memcached_get.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/memcached_get.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-memcached_get.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-memcached_get.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/memcached_get.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-memcached_get.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-memcached_get.obj `if test -f 'tests/libmemcached-1.0/memcached_get.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/memcached_get.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/memcached_get.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-namespace.o: tests/libmemcached-1.0/namespace.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-namespace.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-namespace.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-namespace.o `test -f 'tests/libmemcached-1.0/namespace.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/namespace.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-namespace.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-namespace.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/namespace.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-namespace.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-namespace.o `test -f 'tests/libmemcached-1.0/namespace.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/namespace.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-namespace.obj: tests/libmemcached-1.0/namespace.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-namespace.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-namespace.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-namespace.obj `if test -f 'tests/libmemcached-1.0/namespace.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/namespace.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/namespace.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-namespace.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-namespace.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/namespace.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-namespace.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-namespace.obj `if test -f 'tests/libmemcached-1.0/namespace.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/namespace.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/namespace.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-parser.o: tests/libmemcached-1.0/parser.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-parser.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-parser.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-parser.o `test -f 'tests/libmemcached-1.0/parser.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/parser.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-parser.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-parser.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/parser.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-parser.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-parser.o `test -f 'tests/libmemcached-1.0/parser.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/parser.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-parser.obj: tests/libmemcached-1.0/parser.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-parser.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-parser.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-parser.obj `if test -f 'tests/libmemcached-1.0/parser.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/parser.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/parser.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-parser.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-parser.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/parser.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-parser.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-parser.obj `if test -f 'tests/libmemcached-1.0/parser.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/parser.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/parser.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-pool.o: tests/libmemcached-1.0/pool.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-pool.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-pool.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-pool.o `test -f 'tests/libmemcached-1.0/pool.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/pool.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-pool.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-pool.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/pool.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-pool.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-pool.o `test -f 'tests/libmemcached-1.0/pool.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/pool.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-pool.obj: tests/libmemcached-1.0/pool.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-pool.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-pool.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-pool.obj `if test -f 'tests/libmemcached-1.0/pool.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/pool.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/pool.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-pool.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-pool.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/pool.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-pool.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-pool.obj `if test -f 'tests/libmemcached-1.0/pool.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/pool.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/pool.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-print.o: tests/libmemcached-1.0/print.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-print.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-print.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-print.o `test -f 'tests/libmemcached-1.0/print.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/print.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-print.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-print.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/print.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-print.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-print.o `test -f 'tests/libmemcached-1.0/print.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/print.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-print.obj: tests/libmemcached-1.0/print.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-print.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-print.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-print.obj `if test -f 'tests/libmemcached-1.0/print.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/print.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/print.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-print.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-print.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/print.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-print.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-print.obj `if test -f 'tests/libmemcached-1.0/print.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/print.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/print.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-replication.o: tests/libmemcached-1.0/replication.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-replication.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-replication.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-replication.o `test -f 'tests/libmemcached-1.0/replication.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/replication.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-replication.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-replication.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/replication.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-replication.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-replication.o `test -f 'tests/libmemcached-1.0/replication.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/replication.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-replication.obj: tests/libmemcached-1.0/replication.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-replication.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-replication.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-replication.obj `if test -f 'tests/libmemcached-1.0/replication.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/replication.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/replication.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-replication.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-replication.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/replication.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-replication.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-replication.obj `if test -f 'tests/libmemcached-1.0/replication.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/replication.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/replication.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-server_add.o: tests/libmemcached-1.0/server_add.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-server_add.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-server_add.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-server_add.o `test -f 'tests/libmemcached-1.0/server_add.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/server_add.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-server_add.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-server_add.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/server_add.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-server_add.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-server_add.o `test -f 'tests/libmemcached-1.0/server_add.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/server_add.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-server_add.obj: tests/libmemcached-1.0/server_add.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-server_add.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-server_add.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-server_add.obj `if test -f 'tests/libmemcached-1.0/server_add.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/server_add.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/server_add.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-server_add.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-server_add.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/server_add.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-server_add.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-server_add.obj `if test -f 'tests/libmemcached-1.0/server_add.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/server_add.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/server_add.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-setup_and_teardowns.o: tests/libmemcached-1.0/setup_and_teardowns.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-setup_and_teardowns.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-setup_and_teardowns.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-setup_and_teardowns.o `test -f 'tests/libmemcached-1.0/setup_and_teardowns.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/setup_and_teardowns.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-setup_and_teardowns.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-setup_and_teardowns.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/setup_and_teardowns.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-setup_and_teardowns.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-setup_and_teardowns.o `test -f 'tests/libmemcached-1.0/setup_and_teardowns.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/setup_and_teardowns.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-setup_and_teardowns.obj: tests/libmemcached-1.0/setup_and_teardowns.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-setup_and_teardowns.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-setup_and_teardowns.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-setup_and_teardowns.obj `if test -f 'tests/libmemcached-1.0/setup_and_teardowns.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/setup_and_teardowns.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/setup_and_teardowns.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-setup_and_teardowns.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-setup_and_teardowns.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/setup_and_teardowns.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-setup_and_teardowns.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-setup_and_teardowns.obj `if test -f 'tests/libmemcached-1.0/setup_and_teardowns.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/setup_and_teardowns.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/setup_and_teardowns.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-stat.o: tests/libmemcached-1.0/stat.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-stat.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-stat.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-stat.o `test -f 'tests/libmemcached-1.0/stat.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/stat.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-stat.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-stat.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/stat.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-stat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-stat.o `test -f 'tests/libmemcached-1.0/stat.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/stat.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-stat.obj: tests/libmemcached-1.0/stat.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-stat.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-stat.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-stat.obj `if test -f 'tests/libmemcached-1.0/stat.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/stat.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/stat.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-stat.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-stat.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/stat.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-stat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-stat.obj `if test -f 'tests/libmemcached-1.0/stat.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/stat.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/stat.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-touch.o: tests/libmemcached-1.0/touch.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-touch.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-touch.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-touch.o `test -f 'tests/libmemcached-1.0/touch.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/touch.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-touch.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-touch.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/touch.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-touch.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-touch.o `test -f 'tests/libmemcached-1.0/touch.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/touch.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-touch.obj: tests/libmemcached-1.0/touch.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-touch.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-touch.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-touch.obj `if test -f 'tests/libmemcached-1.0/touch.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/touch.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/touch.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-touch.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-touch.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/touch.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-touch.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-touch.obj `if test -f 'tests/libmemcached-1.0/touch.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/touch.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/touch.cc'; fi` + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-virtual_buckets.o: tests/libmemcached-1.0/virtual_buckets.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-virtual_buckets.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-virtual_buckets.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-virtual_buckets.o `test -f 'tests/libmemcached-1.0/virtual_buckets.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/virtual_buckets.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-virtual_buckets.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-virtual_buckets.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/virtual_buckets.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-virtual_buckets.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-virtual_buckets.o `test -f 'tests/libmemcached-1.0/virtual_buckets.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/virtual_buckets.cc + +tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-virtual_buckets.obj: tests/libmemcached-1.0/virtual_buckets.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-virtual_buckets.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-virtual_buckets.Tpo -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-virtual_buckets.obj `if test -f 'tests/libmemcached-1.0/virtual_buckets.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/virtual_buckets.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/virtual_buckets.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-virtual_buckets.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_libmemcached_1_0_testsocket-virtual_buckets.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/virtual_buckets.cc' object='tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-virtual_buckets.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_libmemcached_1_0_testsocket_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_libmemcached_1_0_testsocket-virtual_buckets.obj `if test -f 'tests/libmemcached-1.0/virtual_buckets.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/virtual_buckets.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/virtual_buckets.cc'; fi` + +tests/tests_memcapable-memcapable.o: tests/memcapable.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memcapable_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_memcapable-memcapable.o -MD -MP -MF tests/$(DEPDIR)/tests_memcapable-memcapable.Tpo -c -o tests/tests_memcapable-memcapable.o `test -f 'tests/memcapable.cc' || echo '$(srcdir)/'`tests/memcapable.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_memcapable-memcapable.Tpo tests/$(DEPDIR)/tests_memcapable-memcapable.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/memcapable.cc' object='tests/tests_memcapable-memcapable.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memcapable_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_memcapable-memcapable.o `test -f 'tests/memcapable.cc' || echo '$(srcdir)/'`tests/memcapable.cc + +tests/tests_memcapable-memcapable.obj: tests/memcapable.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memcapable_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_memcapable-memcapable.obj -MD -MP -MF tests/$(DEPDIR)/tests_memcapable-memcapable.Tpo -c -o tests/tests_memcapable-memcapable.obj `if test -f 'tests/memcapable.cc'; then $(CYGPATH_W) 'tests/memcapable.cc'; else $(CYGPATH_W) '$(srcdir)/tests/memcapable.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_memcapable-memcapable.Tpo tests/$(DEPDIR)/tests_memcapable-memcapable.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/memcapable.cc' object='tests/tests_memcapable-memcapable.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memcapable_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_memcapable-memcapable.obj `if test -f 'tests/memcapable.cc'; then $(CYGPATH_W) 'tests/memcapable.cc'; else $(CYGPATH_W) '$(srcdir)/tests/memcapable.cc'; fi` + +tests/tests_memcat-memcat.o: tests/memcat.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memcat_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_memcat-memcat.o -MD -MP -MF tests/$(DEPDIR)/tests_memcat-memcat.Tpo -c -o tests/tests_memcat-memcat.o `test -f 'tests/memcat.cc' || echo '$(srcdir)/'`tests/memcat.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_memcat-memcat.Tpo tests/$(DEPDIR)/tests_memcat-memcat.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/memcat.cc' object='tests/tests_memcat-memcat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memcat_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_memcat-memcat.o `test -f 'tests/memcat.cc' || echo '$(srcdir)/'`tests/memcat.cc + +tests/tests_memcat-memcat.obj: tests/memcat.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memcat_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_memcat-memcat.obj -MD -MP -MF tests/$(DEPDIR)/tests_memcat-memcat.Tpo -c -o tests/tests_memcat-memcat.obj `if test -f 'tests/memcat.cc'; then $(CYGPATH_W) 'tests/memcat.cc'; else $(CYGPATH_W) '$(srcdir)/tests/memcat.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_memcat-memcat.Tpo tests/$(DEPDIR)/tests_memcat-memcat.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/memcat.cc' object='tests/tests_memcat-memcat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memcat_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_memcat-memcat.obj `if test -f 'tests/memcat.cc'; then $(CYGPATH_W) 'tests/memcat.cc'; else $(CYGPATH_W) '$(srcdir)/tests/memcat.cc'; fi` + +tests/tests_memcp-memcp.o: tests/memcp.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memcp_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_memcp-memcp.o -MD -MP -MF tests/$(DEPDIR)/tests_memcp-memcp.Tpo -c -o tests/tests_memcp-memcp.o `test -f 'tests/memcp.cc' || echo '$(srcdir)/'`tests/memcp.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_memcp-memcp.Tpo tests/$(DEPDIR)/tests_memcp-memcp.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/memcp.cc' object='tests/tests_memcp-memcp.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memcp_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_memcp-memcp.o `test -f 'tests/memcp.cc' || echo '$(srcdir)/'`tests/memcp.cc + +tests/tests_memcp-memcp.obj: tests/memcp.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memcp_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_memcp-memcp.obj -MD -MP -MF tests/$(DEPDIR)/tests_memcp-memcp.Tpo -c -o tests/tests_memcp-memcp.obj `if test -f 'tests/memcp.cc'; then $(CYGPATH_W) 'tests/memcp.cc'; else $(CYGPATH_W) '$(srcdir)/tests/memcp.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_memcp-memcp.Tpo tests/$(DEPDIR)/tests_memcp-memcp.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/memcp.cc' object='tests/tests_memcp-memcp.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memcp_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_memcp-memcp.obj `if test -f 'tests/memcp.cc'; then $(CYGPATH_W) 'tests/memcp.cc'; else $(CYGPATH_W) '$(srcdir)/tests/memcp.cc'; fi` + +tests/tests_memdump-memdump.o: tests/memdump.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memdump_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_memdump-memdump.o -MD -MP -MF tests/$(DEPDIR)/tests_memdump-memdump.Tpo -c -o tests/tests_memdump-memdump.o `test -f 'tests/memdump.cc' || echo '$(srcdir)/'`tests/memdump.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_memdump-memdump.Tpo tests/$(DEPDIR)/tests_memdump-memdump.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/memdump.cc' object='tests/tests_memdump-memdump.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memdump_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_memdump-memdump.o `test -f 'tests/memdump.cc' || echo '$(srcdir)/'`tests/memdump.cc + +tests/tests_memdump-memdump.obj: tests/memdump.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memdump_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_memdump-memdump.obj -MD -MP -MF tests/$(DEPDIR)/tests_memdump-memdump.Tpo -c -o tests/tests_memdump-memdump.obj `if test -f 'tests/memdump.cc'; then $(CYGPATH_W) 'tests/memdump.cc'; else $(CYGPATH_W) '$(srcdir)/tests/memdump.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_memdump-memdump.Tpo tests/$(DEPDIR)/tests_memdump-memdump.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/memdump.cc' object='tests/tests_memdump-memdump.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memdump_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_memdump-memdump.obj `if test -f 'tests/memdump.cc'; then $(CYGPATH_W) 'tests/memdump.cc'; else $(CYGPATH_W) '$(srcdir)/tests/memdump.cc'; fi` + +tests/tests_memerror-memerror.o: tests/memerror.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memerror_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_memerror-memerror.o -MD -MP -MF tests/$(DEPDIR)/tests_memerror-memerror.Tpo -c -o tests/tests_memerror-memerror.o `test -f 'tests/memerror.cc' || echo '$(srcdir)/'`tests/memerror.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_memerror-memerror.Tpo tests/$(DEPDIR)/tests_memerror-memerror.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/memerror.cc' object='tests/tests_memerror-memerror.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memerror_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_memerror-memerror.o `test -f 'tests/memerror.cc' || echo '$(srcdir)/'`tests/memerror.cc + +tests/tests_memerror-memerror.obj: tests/memerror.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memerror_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_memerror-memerror.obj -MD -MP -MF tests/$(DEPDIR)/tests_memerror-memerror.Tpo -c -o tests/tests_memerror-memerror.obj `if test -f 'tests/memerror.cc'; then $(CYGPATH_W) 'tests/memerror.cc'; else $(CYGPATH_W) '$(srcdir)/tests/memerror.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_memerror-memerror.Tpo tests/$(DEPDIR)/tests_memerror-memerror.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/memerror.cc' object='tests/tests_memerror-memerror.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memerror_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_memerror-memerror.obj `if test -f 'tests/memerror.cc'; then $(CYGPATH_W) 'tests/memerror.cc'; else $(CYGPATH_W) '$(srcdir)/tests/memerror.cc'; fi` + +tests/tests_memexist-memexist.o: tests/memexist.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memexist_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_memexist-memexist.o -MD -MP -MF tests/$(DEPDIR)/tests_memexist-memexist.Tpo -c -o tests/tests_memexist-memexist.o `test -f 'tests/memexist.cc' || echo '$(srcdir)/'`tests/memexist.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_memexist-memexist.Tpo tests/$(DEPDIR)/tests_memexist-memexist.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/memexist.cc' object='tests/tests_memexist-memexist.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memexist_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_memexist-memexist.o `test -f 'tests/memexist.cc' || echo '$(srcdir)/'`tests/memexist.cc + +tests/tests_memexist-memexist.obj: tests/memexist.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memexist_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_memexist-memexist.obj -MD -MP -MF tests/$(DEPDIR)/tests_memexist-memexist.Tpo -c -o tests/tests_memexist-memexist.obj `if test -f 'tests/memexist.cc'; then $(CYGPATH_W) 'tests/memexist.cc'; else $(CYGPATH_W) '$(srcdir)/tests/memexist.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_memexist-memexist.Tpo tests/$(DEPDIR)/tests_memexist-memexist.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/memexist.cc' object='tests/tests_memexist-memexist.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memexist_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_memexist-memexist.obj `if test -f 'tests/memexist.cc'; then $(CYGPATH_W) 'tests/memexist.cc'; else $(CYGPATH_W) '$(srcdir)/tests/memexist.cc'; fi` + +tests/tests_memflush-memflush.o: tests/memflush.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memflush_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_memflush-memflush.o -MD -MP -MF tests/$(DEPDIR)/tests_memflush-memflush.Tpo -c -o tests/tests_memflush-memflush.o `test -f 'tests/memflush.cc' || echo '$(srcdir)/'`tests/memflush.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_memflush-memflush.Tpo tests/$(DEPDIR)/tests_memflush-memflush.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/memflush.cc' object='tests/tests_memflush-memflush.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memflush_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_memflush-memflush.o `test -f 'tests/memflush.cc' || echo '$(srcdir)/'`tests/memflush.cc + +tests/tests_memflush-memflush.obj: tests/memflush.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memflush_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_memflush-memflush.obj -MD -MP -MF tests/$(DEPDIR)/tests_memflush-memflush.Tpo -c -o tests/tests_memflush-memflush.obj `if test -f 'tests/memflush.cc'; then $(CYGPATH_W) 'tests/memflush.cc'; else $(CYGPATH_W) '$(srcdir)/tests/memflush.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_memflush-memflush.Tpo tests/$(DEPDIR)/tests_memflush-memflush.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/memflush.cc' object='tests/tests_memflush-memflush.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memflush_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_memflush-memflush.obj `if test -f 'tests/memflush.cc'; then $(CYGPATH_W) 'tests/memflush.cc'; else $(CYGPATH_W) '$(srcdir)/tests/memflush.cc'; fi` + +tests/tests_memping-memping.o: tests/memping.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memping_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_memping-memping.o -MD -MP -MF tests/$(DEPDIR)/tests_memping-memping.Tpo -c -o tests/tests_memping-memping.o `test -f 'tests/memping.cc' || echo '$(srcdir)/'`tests/memping.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_memping-memping.Tpo tests/$(DEPDIR)/tests_memping-memping.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/memping.cc' object='tests/tests_memping-memping.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memping_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_memping-memping.o `test -f 'tests/memping.cc' || echo '$(srcdir)/'`tests/memping.cc + +tests/tests_memping-memping.obj: tests/memping.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memping_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_memping-memping.obj -MD -MP -MF tests/$(DEPDIR)/tests_memping-memping.Tpo -c -o tests/tests_memping-memping.obj `if test -f 'tests/memping.cc'; then $(CYGPATH_W) 'tests/memping.cc'; else $(CYGPATH_W) '$(srcdir)/tests/memping.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_memping-memping.Tpo tests/$(DEPDIR)/tests_memping-memping.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/memping.cc' object='tests/tests_memping-memping.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memping_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_memping-memping.obj `if test -f 'tests/memping.cc'; then $(CYGPATH_W) 'tests/memping.cc'; else $(CYGPATH_W) '$(srcdir)/tests/memping.cc'; fi` + +tests/tests_memrm-memrm.o: tests/memrm.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memrm_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_memrm-memrm.o -MD -MP -MF tests/$(DEPDIR)/tests_memrm-memrm.Tpo -c -o tests/tests_memrm-memrm.o `test -f 'tests/memrm.cc' || echo '$(srcdir)/'`tests/memrm.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_memrm-memrm.Tpo tests/$(DEPDIR)/tests_memrm-memrm.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/memrm.cc' object='tests/tests_memrm-memrm.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memrm_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_memrm-memrm.o `test -f 'tests/memrm.cc' || echo '$(srcdir)/'`tests/memrm.cc + +tests/tests_memrm-memrm.obj: tests/memrm.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memrm_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_memrm-memrm.obj -MD -MP -MF tests/$(DEPDIR)/tests_memrm-memrm.Tpo -c -o tests/tests_memrm-memrm.obj `if test -f 'tests/memrm.cc'; then $(CYGPATH_W) 'tests/memrm.cc'; else $(CYGPATH_W) '$(srcdir)/tests/memrm.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_memrm-memrm.Tpo tests/$(DEPDIR)/tests_memrm-memrm.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/memrm.cc' object='tests/tests_memrm-memrm.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memrm_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_memrm-memrm.obj `if test -f 'tests/memrm.cc'; then $(CYGPATH_W) 'tests/memrm.cc'; else $(CYGPATH_W) '$(srcdir)/tests/memrm.cc'; fi` + +tests/tests_memslap-memslap.o: tests/memslap.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memslap_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_memslap-memslap.o -MD -MP -MF tests/$(DEPDIR)/tests_memslap-memslap.Tpo -c -o tests/tests_memslap-memslap.o `test -f 'tests/memslap.cc' || echo '$(srcdir)/'`tests/memslap.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_memslap-memslap.Tpo tests/$(DEPDIR)/tests_memslap-memslap.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/memslap.cc' object='tests/tests_memslap-memslap.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memslap_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_memslap-memslap.o `test -f 'tests/memslap.cc' || echo '$(srcdir)/'`tests/memslap.cc + +tests/tests_memslap-memslap.obj: tests/memslap.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memslap_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_memslap-memslap.obj -MD -MP -MF tests/$(DEPDIR)/tests_memslap-memslap.Tpo -c -o tests/tests_memslap-memslap.obj `if test -f 'tests/memslap.cc'; then $(CYGPATH_W) 'tests/memslap.cc'; else $(CYGPATH_W) '$(srcdir)/tests/memslap.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_memslap-memslap.Tpo tests/$(DEPDIR)/tests_memslap-memslap.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/memslap.cc' object='tests/tests_memslap-memslap.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memslap_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_memslap-memslap.obj `if test -f 'tests/memslap.cc'; then $(CYGPATH_W) 'tests/memslap.cc'; else $(CYGPATH_W) '$(srcdir)/tests/memslap.cc'; fi` + +tests/tests_memstat-memstat.o: tests/memstat.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memstat_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_memstat-memstat.o -MD -MP -MF tests/$(DEPDIR)/tests_memstat-memstat.Tpo -c -o tests/tests_memstat-memstat.o `test -f 'tests/memstat.cc' || echo '$(srcdir)/'`tests/memstat.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_memstat-memstat.Tpo tests/$(DEPDIR)/tests_memstat-memstat.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/memstat.cc' object='tests/tests_memstat-memstat.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memstat_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_memstat-memstat.o `test -f 'tests/memstat.cc' || echo '$(srcdir)/'`tests/memstat.cc + +tests/tests_memstat-memstat.obj: tests/memstat.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memstat_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_memstat-memstat.obj -MD -MP -MF tests/$(DEPDIR)/tests_memstat-memstat.Tpo -c -o tests/tests_memstat-memstat.obj `if test -f 'tests/memstat.cc'; then $(CYGPATH_W) 'tests/memstat.cc'; else $(CYGPATH_W) '$(srcdir)/tests/memstat.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_memstat-memstat.Tpo tests/$(DEPDIR)/tests_memstat-memstat.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/memstat.cc' object='tests/tests_memstat-memstat.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memstat_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_memstat-memstat.obj `if test -f 'tests/memstat.cc'; then $(CYGPATH_W) 'tests/memstat.cc'; else $(CYGPATH_W) '$(srcdir)/tests/memstat.cc'; fi` + +tests/tests_memtouch-memtouch.o: tests/memtouch.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memtouch_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_memtouch-memtouch.o -MD -MP -MF tests/$(DEPDIR)/tests_memtouch-memtouch.Tpo -c -o tests/tests_memtouch-memtouch.o `test -f 'tests/memtouch.cc' || echo '$(srcdir)/'`tests/memtouch.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_memtouch-memtouch.Tpo tests/$(DEPDIR)/tests_memtouch-memtouch.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/memtouch.cc' object='tests/tests_memtouch-memtouch.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memtouch_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_memtouch-memtouch.o `test -f 'tests/memtouch.cc' || echo '$(srcdir)/'`tests/memtouch.cc + +tests/tests_memtouch-memtouch.obj: tests/memtouch.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memtouch_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_memtouch-memtouch.obj -MD -MP -MF tests/$(DEPDIR)/tests_memtouch-memtouch.Tpo -c -o tests/tests_memtouch-memtouch.obj `if test -f 'tests/memtouch.cc'; then $(CYGPATH_W) 'tests/memtouch.cc'; else $(CYGPATH_W) '$(srcdir)/tests/memtouch.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_memtouch-memtouch.Tpo tests/$(DEPDIR)/tests_memtouch-memtouch.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/memtouch.cc' object='tests/tests_memtouch-memtouch.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_memtouch_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_memtouch-memtouch.obj `if test -f 'tests/memtouch.cc'; then $(CYGPATH_W) 'tests/memtouch.cc'; else $(CYGPATH_W) '$(srcdir)/tests/memtouch.cc'; fi` + +tests/tests_parser-parser.o: tests/parser.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_parser_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_parser-parser.o -MD -MP -MF tests/$(DEPDIR)/tests_parser-parser.Tpo -c -o tests/tests_parser-parser.o `test -f 'tests/parser.cc' || echo '$(srcdir)/'`tests/parser.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_parser-parser.Tpo tests/$(DEPDIR)/tests_parser-parser.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/parser.cc' object='tests/tests_parser-parser.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_parser_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_parser-parser.o `test -f 'tests/parser.cc' || echo '$(srcdir)/'`tests/parser.cc + +tests/tests_parser-parser.obj: tests/parser.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_parser_CXXFLAGS) $(CXXFLAGS) -MT tests/tests_parser-parser.obj -MD -MP -MF tests/$(DEPDIR)/tests_parser-parser.Tpo -c -o tests/tests_parser-parser.obj `if test -f 'tests/parser.cc'; then $(CYGPATH_W) 'tests/parser.cc'; else $(CYGPATH_W) '$(srcdir)/tests/parser.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_parser-parser.Tpo tests/$(DEPDIR)/tests_parser-parser.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/parser.cc' object='tests/tests_parser-parser.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_parser_CXXFLAGS) $(CXXFLAGS) -c -o tests/tests_parser-parser.obj `if test -f 'tests/parser.cc'; then $(CYGPATH_W) 'tests/parser.cc'; else $(CYGPATH_W) '$(srcdir)/tests/parser.cc'; fi` + +clients/tests_testplus-execute.o: clients/execute.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -MT clients/tests_testplus-execute.o -MD -MP -MF clients/$(DEPDIR)/tests_testplus-execute.Tpo -c -o clients/tests_testplus-execute.o `test -f 'clients/execute.cc' || echo '$(srcdir)/'`clients/execute.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/tests_testplus-execute.Tpo clients/$(DEPDIR)/tests_testplus-execute.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/execute.cc' object='clients/tests_testplus-execute.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -c -o clients/tests_testplus-execute.o `test -f 'clients/execute.cc' || echo '$(srcdir)/'`clients/execute.cc + +clients/tests_testplus-execute.obj: clients/execute.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -MT clients/tests_testplus-execute.obj -MD -MP -MF clients/$(DEPDIR)/tests_testplus-execute.Tpo -c -o clients/tests_testplus-execute.obj `if test -f 'clients/execute.cc'; then $(CYGPATH_W) 'clients/execute.cc'; else $(CYGPATH_W) '$(srcdir)/clients/execute.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/tests_testplus-execute.Tpo clients/$(DEPDIR)/tests_testplus-execute.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/execute.cc' object='clients/tests_testplus-execute.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -c -o clients/tests_testplus-execute.obj `if test -f 'clients/execute.cc'; then $(CYGPATH_W) 'clients/execute.cc'; else $(CYGPATH_W) '$(srcdir)/clients/execute.cc'; fi` + +clients/tests_testplus-generator.o: clients/generator.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -MT clients/tests_testplus-generator.o -MD -MP -MF clients/$(DEPDIR)/tests_testplus-generator.Tpo -c -o clients/tests_testplus-generator.o `test -f 'clients/generator.cc' || echo '$(srcdir)/'`clients/generator.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/tests_testplus-generator.Tpo clients/$(DEPDIR)/tests_testplus-generator.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/generator.cc' object='clients/tests_testplus-generator.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -c -o clients/tests_testplus-generator.o `test -f 'clients/generator.cc' || echo '$(srcdir)/'`clients/generator.cc + +clients/tests_testplus-generator.obj: clients/generator.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -MT clients/tests_testplus-generator.obj -MD -MP -MF clients/$(DEPDIR)/tests_testplus-generator.Tpo -c -o clients/tests_testplus-generator.obj `if test -f 'clients/generator.cc'; then $(CYGPATH_W) 'clients/generator.cc'; else $(CYGPATH_W) '$(srcdir)/clients/generator.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) clients/$(DEPDIR)/tests_testplus-generator.Tpo clients/$(DEPDIR)/tests_testplus-generator.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='clients/generator.cc' object='clients/tests_testplus-generator.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -c -o clients/tests_testplus-generator.obj `if test -f 'clients/generator.cc'; then $(CYGPATH_W) 'clients/generator.cc'; else $(CYGPATH_W) '$(srcdir)/clients/generator.cc'; fi` + +tests/libmemcached-1.0/tests_testplus-callback_counter.o: tests/libmemcached-1.0/callback_counter.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_testplus-callback_counter.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-callback_counter.Tpo -c -o tests/libmemcached-1.0/tests_testplus-callback_counter.o `test -f 'tests/libmemcached-1.0/callback_counter.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/callback_counter.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-callback_counter.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-callback_counter.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/callback_counter.cc' object='tests/libmemcached-1.0/tests_testplus-callback_counter.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_testplus-callback_counter.o `test -f 'tests/libmemcached-1.0/callback_counter.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/callback_counter.cc + +tests/libmemcached-1.0/tests_testplus-callback_counter.obj: tests/libmemcached-1.0/callback_counter.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_testplus-callback_counter.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-callback_counter.Tpo -c -o tests/libmemcached-1.0/tests_testplus-callback_counter.obj `if test -f 'tests/libmemcached-1.0/callback_counter.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/callback_counter.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/callback_counter.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-callback_counter.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-callback_counter.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/callback_counter.cc' object='tests/libmemcached-1.0/tests_testplus-callback_counter.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_testplus-callback_counter.obj `if test -f 'tests/libmemcached-1.0/callback_counter.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/callback_counter.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/callback_counter.cc'; fi` + +tests/libmemcached-1.0/tests_testplus-fetch_all_results.o: tests/libmemcached-1.0/fetch_all_results.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_testplus-fetch_all_results.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-fetch_all_results.Tpo -c -o tests/libmemcached-1.0/tests_testplus-fetch_all_results.o `test -f 'tests/libmemcached-1.0/fetch_all_results.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/fetch_all_results.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-fetch_all_results.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-fetch_all_results.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/fetch_all_results.cc' object='tests/libmemcached-1.0/tests_testplus-fetch_all_results.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_testplus-fetch_all_results.o `test -f 'tests/libmemcached-1.0/fetch_all_results.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/fetch_all_results.cc + +tests/libmemcached-1.0/tests_testplus-fetch_all_results.obj: tests/libmemcached-1.0/fetch_all_results.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_testplus-fetch_all_results.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-fetch_all_results.Tpo -c -o tests/libmemcached-1.0/tests_testplus-fetch_all_results.obj `if test -f 'tests/libmemcached-1.0/fetch_all_results.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/fetch_all_results.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/fetch_all_results.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-fetch_all_results.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-fetch_all_results.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/fetch_all_results.cc' object='tests/libmemcached-1.0/tests_testplus-fetch_all_results.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_testplus-fetch_all_results.obj `if test -f 'tests/libmemcached-1.0/fetch_all_results.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/fetch_all_results.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/fetch_all_results.cc'; fi` + +tests/libmemcached-1.0/tests_testplus-generate.o: tests/libmemcached-1.0/generate.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_testplus-generate.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-generate.Tpo -c -o tests/libmemcached-1.0/tests_testplus-generate.o `test -f 'tests/libmemcached-1.0/generate.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/generate.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-generate.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-generate.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/generate.cc' object='tests/libmemcached-1.0/tests_testplus-generate.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_testplus-generate.o `test -f 'tests/libmemcached-1.0/generate.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/generate.cc + +tests/libmemcached-1.0/tests_testplus-generate.obj: tests/libmemcached-1.0/generate.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_testplus-generate.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-generate.Tpo -c -o tests/libmemcached-1.0/tests_testplus-generate.obj `if test -f 'tests/libmemcached-1.0/generate.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/generate.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/generate.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-generate.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-generate.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/generate.cc' object='tests/libmemcached-1.0/tests_testplus-generate.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_testplus-generate.obj `if test -f 'tests/libmemcached-1.0/generate.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/generate.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/generate.cc'; fi` + +tests/libmemcached-1.0/tests_testplus-plus.o: tests/libmemcached-1.0/plus.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_testplus-plus.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-plus.Tpo -c -o tests/libmemcached-1.0/tests_testplus-plus.o `test -f 'tests/libmemcached-1.0/plus.cpp' || echo '$(srcdir)/'`tests/libmemcached-1.0/plus.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-plus.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-plus.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/plus.cpp' object='tests/libmemcached-1.0/tests_testplus-plus.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_testplus-plus.o `test -f 'tests/libmemcached-1.0/plus.cpp' || echo '$(srcdir)/'`tests/libmemcached-1.0/plus.cpp + +tests/libmemcached-1.0/tests_testplus-plus.obj: tests/libmemcached-1.0/plus.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_testplus-plus.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-plus.Tpo -c -o tests/libmemcached-1.0/tests_testplus-plus.obj `if test -f 'tests/libmemcached-1.0/plus.cpp'; then $(CYGPATH_W) 'tests/libmemcached-1.0/plus.cpp'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/plus.cpp'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-plus.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-plus.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/plus.cpp' object='tests/libmemcached-1.0/tests_testplus-plus.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_testplus-plus.obj `if test -f 'tests/libmemcached-1.0/plus.cpp'; then $(CYGPATH_W) 'tests/libmemcached-1.0/plus.cpp'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/plus.cpp'; fi` + +tests/libmemcached-1.0/tests_testplus-print.o: tests/libmemcached-1.0/print.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_testplus-print.o -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-print.Tpo -c -o tests/libmemcached-1.0/tests_testplus-print.o `test -f 'tests/libmemcached-1.0/print.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/print.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-print.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-print.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/print.cc' object='tests/libmemcached-1.0/tests_testplus-print.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_testplus-print.o `test -f 'tests/libmemcached-1.0/print.cc' || echo '$(srcdir)/'`tests/libmemcached-1.0/print.cc + +tests/libmemcached-1.0/tests_testplus-print.obj: tests/libmemcached-1.0/print.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -MT tests/libmemcached-1.0/tests_testplus-print.obj -MD -MP -MF tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-print.Tpo -c -o tests/libmemcached-1.0/tests_testplus-print.obj `if test -f 'tests/libmemcached-1.0/print.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/print.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/print.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-print.Tpo tests/libmemcached-1.0/$(DEPDIR)/tests_testplus-print.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tests/libmemcached-1.0/print.cc' object='tests/libmemcached-1.0/tests_testplus-print.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tests_testplus_CXXFLAGS) $(CXXFLAGS) -c -o tests/libmemcached-1.0/tests_testplus-print.obj `if test -f 'tests/libmemcached-1.0/print.cc'; then $(CYGPATH_W) 'tests/libmemcached-1.0/print.cc'; else $(CYGPATH_W) '$(srcdir)/tests/libmemcached-1.0/print.cc'; fi` + +.cpp.o: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + -rm -rf clients/.libs clients/_libs + -rm -rf example/.libs example/_libs + -rm -rf libhashkit/.libs libhashkit/_libs + -rm -rf libmemcached/.libs libmemcached/_libs + -rm -rf libmemcached-1.0/t/.libs libmemcached-1.0/t/_libs + -rm -rf libmemcached/csl/.libs libmemcached/csl/_libs + -rm -rf libmemcachedinternal/.libs libmemcachedinternal/_libs + -rm -rf libmemcachedprotocol/.libs libmemcachedprotocol/_libs + -rm -rf libmemcachedutil/.libs libmemcachedutil/_libs + -rm -rf libtest/.libs libtest/_libs + -rm -rf libtest/exception/.libs libtest/exception/_libs + -rm -rf tests/.libs tests/_libs + -rm -rf tests/libmemcached-1.0/.libs tests/libmemcached-1.0/_libs + +distclean-libtool: + -rm -f libtool config.lt +install-man1: $(dist_man_MANS) $(man_MANS) + @$(NORMAL_INSTALL) + @list1=''; \ + list2='$(dist_man_MANS) $(man_MANS)'; \ + test -n "$(man1dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.1[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ + done; } + +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man1dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(dist_man_MANS) $(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) +install-man3: $(dist_man_MANS) $(man_MANS) + @$(NORMAL_INSTALL) + @list1=''; \ + list2='$(dist_man_MANS) $(man_MANS)'; \ + test -n "$(man3dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.3[a-z]*$$/p'; \ + fi; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \ + fi; \ + done; \ + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \ + done; } + +uninstall-man3: + @$(NORMAL_UNINSTALL) + @list=''; test -n "$(man3dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(dist_man_MANS) $(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.3[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir) +install-dist_aclocalDATA: $(dist_aclocal_DATA) + @$(NORMAL_INSTALL) + @list='$(dist_aclocal_DATA)'; test -n "$(aclocaldir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(aclocaldir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(aclocaldir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(aclocaldir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(aclocaldir)" || exit $$?; \ + done + +uninstall-dist_aclocalDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_aclocal_DATA)'; test -n "$(aclocaldir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(aclocaldir)'; $(am__uninstall_files_from_dir) +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) +install-nobase_includeHEADERS: $(nobase_include_HEADERS) + @$(NORMAL_INSTALL) + @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ + fi; \ + $(am__nobase_list) | while read dir files; do \ + xfiles=; for file in $$files; do \ + if test -f "$$file"; then xfiles="$$xfiles $$file"; \ + else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ + test -z "$$xfiles" || { \ + test "x$$dir" = x. || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)/$$dir'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)/$$dir"; }; \ + echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(includedir)/$$dir'"; \ + $(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(includedir)/$$dir" || exit $$?; }; \ + done + +uninstall-nobase_includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \ + $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ + dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + else \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_LTLIBRARIES) $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +clients/memcapable.log: clients/memcapable$(EXEEXT) + @p='clients/memcapable$(EXEEXT)'; \ + b='clients/memcapable'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +clients/memcat.log: clients/memcat$(EXEEXT) + @p='clients/memcat$(EXEEXT)'; \ + b='clients/memcat'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +clients/memcp.log: clients/memcp$(EXEEXT) + @p='clients/memcp$(EXEEXT)'; \ + b='clients/memcp'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +clients/memdump.log: clients/memdump$(EXEEXT) + @p='clients/memdump$(EXEEXT)'; \ + b='clients/memdump'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +clients/memerror.log: clients/memerror$(EXEEXT) + @p='clients/memerror$(EXEEXT)'; \ + b='clients/memerror'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +clients/memexist.log: clients/memexist$(EXEEXT) + @p='clients/memexist$(EXEEXT)'; \ + b='clients/memexist'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +clients/memtouch.log: clients/memtouch$(EXEEXT) + @p='clients/memtouch$(EXEEXT)'; \ + b='clients/memtouch'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +clients/memflush.log: clients/memflush$(EXEEXT) + @p='clients/memflush$(EXEEXT)'; \ + b='clients/memflush'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +clients/memparse.log: clients/memparse$(EXEEXT) + @p='clients/memparse$(EXEEXT)'; \ + b='clients/memparse'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +clients/memping.log: clients/memping$(EXEEXT) + @p='clients/memping$(EXEEXT)'; \ + b='clients/memping'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +clients/memrm.log: clients/memrm$(EXEEXT) + @p='clients/memrm$(EXEEXT)'; \ + b='clients/memrm'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +clients/memslap.log: clients/memslap$(EXEEXT) + @p='clients/memslap$(EXEEXT)'; \ + b='clients/memslap'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +clients/memstat.log: clients/memstat$(EXEEXT) + @p='clients/memstat$(EXEEXT)'; \ + b='clients/memstat'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +clients/memaslap.log: clients/memaslap$(EXEEXT) + @p='clients/memaslap$(EXEEXT)'; \ + b='clients/memaslap'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +libmemcached-1.0/t/c_test.log: libmemcached-1.0/t/c_test$(EXEEXT) + @p='libmemcached-1.0/t/c_test$(EXEEXT)'; \ + b='libmemcached-1.0/t/c_test'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +libmemcached-1.0/t/c_sasl_test.log: libmemcached-1.0/t/c_sasl_test$(EXEEXT) + @p='libmemcached-1.0/t/c_sasl_test$(EXEEXT)'; \ + b='libmemcached-1.0/t/c_sasl_test'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +libmemcached-1.0/t/cc_test.log: libmemcached-1.0/t/cc_test$(EXEEXT) + @p='libmemcached-1.0/t/cc_test$(EXEEXT)'; \ + b='libmemcached-1.0/t/cc_test'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +libtest/unittest.log: libtest/unittest$(EXEEXT) + @p='libtest/unittest$(EXEEXT)'; \ + b='libtest/unittest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +libtest/skiptest.log: libtest/skiptest$(EXEEXT) + @p='libtest/skiptest$(EXEEXT)'; \ + b='libtest/skiptest'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/cycle.log: tests/cycle$(EXEEXT) + @p='tests/cycle$(EXEEXT)'; \ + b='tests/cycle'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/libmemcached-1.0/internals.log: tests/libmemcached-1.0/internals$(EXEEXT) + @p='tests/libmemcached-1.0/internals$(EXEEXT)'; \ + b='tests/libmemcached-1.0/internals'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/libmemcached-1.0/testapp.log: tests/libmemcached-1.0/testapp$(EXEEXT) + @p='tests/libmemcached-1.0/testapp$(EXEEXT)'; \ + b='tests/libmemcached-1.0/testapp'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/libmemcached-1.0/testsocket.log: tests/libmemcached-1.0/testsocket$(EXEEXT) + @p='tests/libmemcached-1.0/testsocket$(EXEEXT)'; \ + b='tests/libmemcached-1.0/testsocket'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/libmemcached-1.0/sasl.log: tests/libmemcached-1.0/sasl$(EXEEXT) + @p='tests/libmemcached-1.0/sasl$(EXEEXT)'; \ + b='tests/libmemcached-1.0/sasl'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/testudp.log: tests/testudp$(EXEEXT) + @p='tests/testudp$(EXEEXT)'; \ + b='tests/testudp'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/testplus.log: tests/testplus$(EXEEXT) + @p='tests/testplus$(EXEEXT)'; \ + b='tests/testplus'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/parser.log: tests/parser$(EXEEXT) + @p='tests/parser$(EXEEXT)'; \ + b='tests/parser'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/failure.log: tests/failure$(EXEEXT) + @p='tests/failure$(EXEEXT)'; \ + b='tests/failure'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/testhashkit.log: tests/testhashkit$(EXEEXT) + @p='tests/testhashkit$(EXEEXT)'; \ + b='tests/testhashkit'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/hash_plus.log: tests/hash_plus$(EXEEXT) + @p='tests/hash_plus$(EXEEXT)'; \ + b='tests/hash_plus'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/memcapable.log: tests/memcapable$(EXEEXT) + @p='tests/memcapable$(EXEEXT)'; \ + b='tests/memcapable'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/memstat.log: tests/memstat$(EXEEXT) + @p='tests/memstat$(EXEEXT)'; \ + b='tests/memstat'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/memcp.log: tests/memcp$(EXEEXT) + @p='tests/memcp$(EXEEXT)'; \ + b='tests/memcp'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/memflush.log: tests/memflush$(EXEEXT) + @p='tests/memflush$(EXEEXT)'; \ + b='tests/memflush'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/memrm.log: tests/memrm$(EXEEXT) + @p='tests/memrm$(EXEEXT)'; \ + b='tests/memrm'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/memexist.log: tests/memexist$(EXEEXT) + @p='tests/memexist$(EXEEXT)'; \ + b='tests/memexist'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/memtouch.log: tests/memtouch$(EXEEXT) + @p='tests/memtouch$(EXEEXT)'; \ + b='tests/memtouch'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/memcat.log: tests/memcat$(EXEEXT) + @p='tests/memcat$(EXEEXT)'; \ + b='tests/memcat'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/memping.log: tests/memping$(EXEEXT) + @p='tests/memping$(EXEEXT)'; \ + b='tests/memping'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/memerror.log: tests/memerror$(EXEEXT) + @p='tests/memerror$(EXEEXT)'; \ + b='tests/memerror'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/memslap.log: tests/memslap$(EXEEXT) + @p='tests/memslap$(EXEEXT)'; \ + b='tests/memslap'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +tests/memdump.log: tests/memdump$(EXEEXT) + @p='tests/memdump$(EXEEXT)'; \ + b='tests/memdump'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__post_remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__post_remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__post_remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__post_remove_distdir) + +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__post_remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) $(check_LTLIBRARIES) $(check_PROGRAMS) + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) $(DATA) $(HEADERS) \ + mem_config.h +install-binPROGRAMS: install-libLTLIBRARIES + +installdirs: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(aclocaldir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -rm -f clients/$(DEPDIR)/$(am__dirstamp) + -rm -f clients/$(am__dirstamp) + -rm -f example/$(DEPDIR)/$(am__dirstamp) + -rm -f example/$(am__dirstamp) + -rm -f libhashkit/$(DEPDIR)/$(am__dirstamp) + -rm -f libhashkit/$(am__dirstamp) + -rm -f libmemcached-1.0/t/$(DEPDIR)/$(am__dirstamp) + -rm -f libmemcached-1.0/t/$(am__dirstamp) + -rm -f libmemcached/$(DEPDIR)/$(am__dirstamp) + -rm -f libmemcached/$(am__dirstamp) + -rm -f libmemcached/csl/$(DEPDIR)/$(am__dirstamp) + -rm -f libmemcached/csl/$(am__dirstamp) + -rm -f libmemcachedinternal/$(am__dirstamp) + -rm -f libmemcachedprotocol/$(DEPDIR)/$(am__dirstamp) + -rm -f libmemcachedprotocol/$(am__dirstamp) + -rm -f libmemcachedutil/$(DEPDIR)/$(am__dirstamp) + -rm -f libmemcachedutil/$(am__dirstamp) + -rm -f libtest/$(DEPDIR)/$(am__dirstamp) + -rm -f libtest/$(am__dirstamp) + -rm -f libtest/exception/$(DEPDIR)/$(am__dirstamp) + -rm -f libtest/exception/$(am__dirstamp) + -rm -f tests/$(DEPDIR)/$(am__dirstamp) + -rm -f tests/$(am__dirstamp) + -rm -f tests/libmemcached-1.0/$(DEPDIR)/$(am__dirstamp) + -rm -f tests/libmemcached-1.0/$(am__dirstamp) + -rm -f util/$(DEPDIR)/$(am__dirstamp) + -rm -f util/$(am__dirstamp) + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +@BUILD_WIN32_TRUE@install-html-local: +@BUILD_WIN32_TRUE@html-local: +@BUILD_WIN32_TRUE@clean-local: +clean: clean-am + +clean-am: clean-binPROGRAMS clean-checkLTLIBRARIES clean-checkPROGRAMS \ + clean-generic clean-libLTLIBRARIES clean-libtool clean-local \ + clean-noinstLTLIBRARIES clean-noinstPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf clients/$(DEPDIR) example/$(DEPDIR) libhashkit/$(DEPDIR) libmemcached-1.0/t/$(DEPDIR) libmemcached/$(DEPDIR) libmemcached/csl/$(DEPDIR) libmemcachedprotocol/$(DEPDIR) libmemcachedutil/$(DEPDIR) libtest/$(DEPDIR) libtest/exception/$(DEPDIR) tests/$(DEPDIR) tests/libmemcached-1.0/$(DEPDIR) util/$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: html-local + +info: info-am + +info-am: + +install-data-am: install-dist_aclocalDATA install-includeHEADERS \ + install-man install-nobase_includeHEADERS \ + install-pkgconfigDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS install-libLTLIBRARIES + +install-html: install-html-am + +install-html-am: install-html-local + +install-info: install-info-am + +install-info-am: + +install-man: install-man1 install-man3 + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf clients/$(DEPDIR) example/$(DEPDIR) libhashkit/$(DEPDIR) libmemcached-1.0/t/$(DEPDIR) libmemcached/$(DEPDIR) libmemcached/csl/$(DEPDIR) libmemcachedprotocol/$(DEPDIR) libmemcachedutil/$(DEPDIR) libtest/$(DEPDIR) libtest/exception/$(DEPDIR) tests/$(DEPDIR) tests/libmemcached-1.0/$(DEPDIR) util/$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic \ + maintainer-clean-local + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-dist_aclocalDATA \ + uninstall-includeHEADERS uninstall-libLTLIBRARIES \ + uninstall-man uninstall-nobase_includeHEADERS \ + uninstall-pkgconfigDATA + +uninstall-man: uninstall-man1 uninstall-man3 + +.MAKE: all check check-am install install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-TESTS \ + check-am clean clean-binPROGRAMS clean-checkLTLIBRARIES \ + clean-checkPROGRAMS clean-cscope clean-generic \ + clean-libLTLIBRARIES clean-libtool clean-local \ + clean-noinstLTLIBRARIES clean-noinstPROGRAMS cscope \ + cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ + dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ + distcheck distclean distclean-compile distclean-generic \ + distclean-hdr distclean-libtool distclean-tags distcleancheck \ + distdir distuninstallcheck dvi dvi-am html html-am html-local \ + info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dist_aclocalDATA \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-html-local \ + install-includeHEADERS install-info install-info-am \ + install-libLTLIBRARIES install-man install-man1 install-man3 \ + install-nobase_includeHEADERS install-pdf install-pdf-am \ + install-pkgconfigDATA install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic maintainer-clean-local mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am recheck tags tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-dist_aclocalDATA \ + uninstall-includeHEADERS uninstall-libLTLIBRARIES \ + uninstall-man uninstall-man1 uninstall-man3 \ + uninstall-nobase_includeHEADERS uninstall-pkgconfigDATA + + +#includes additional rules from aminclude.am +@INC_AMINCLUDE@ + +@BUILD_WIN32_TRUE@libmemcached/csl/parser.h: libmemcached/csl/parser.cc + +@BUILD_WIN32_TRUE@libmemcached/csl/parser.cc: libmemcached/csl/parser.yy libmemcached/csl/scanner.l libmemcached/csl/scanner.h +@BUILD_WIN32_TRUE@ $(AM_V_YACC)$(am__skipyacc) $(YACC) $(YLFLAGS) $(AM_YFLAGS) -o $@ $< + +@BUILD_WIN32_TRUE@libmemcached/csl/scanner.h: libmemcached/csl/scanner.cc + +@BUILD_WIN32_TRUE@libmemcached/csl/scanner.cc: libmemcached/csl/scanner.l libmemcached/csl/parser.yy +@BUILD_WIN32_TRUE@ $(AM_V_GEN)$(LEX) $< + +@BUILD_WIN32_TRUE@libmemcached/options.cc: libmemcached/csl/parser.h + +@BUILD_WIN32_TRUE@libmemcached/dtrace_probes.h: libmemcached/libmemcached_probes.d +@BUILD_WIN32_TRUE@ $(DTRACE) $(DTRACEFLAGS) -h -o ${top_srcdir}/libmemcached/dtrace_probes.h -s ${top_srcdir}/libmemcached/libmemcached_probes.d + +@BUILD_WIN32_TRUE@libmemcached/libmemcached_probes.o: libmemcached/libmemcached_probes.d ${libmemcached_libmemcached_la_OBJECTS} + +@BUILD_WIN32_TRUE@.d.o: +@BUILD_WIN32_TRUE@ $(DTRACE) $(DTRACEFLAGS) -o $@ -G -s libmemcached/libmemcached_probes.d + +@BUILD_WIN32_FALSE@export LIBTOOL_COMMAND +@BUILD_WIN32_FALSE@export VALGRIND_COMMAND +@BUILD_WIN32_FALSE@export HELGRIND_COMMAND +@BUILD_WIN32_FALSE@export DRD_COMMAND +@BUILD_WIN32_FALSE@export SGCHECK_COMMAND +@BUILD_WIN32_FALSE@export GDB_COMMAND + +@BUILD_WIN32_FALSE@valgrind: +@BUILD_WIN32_FALSE@ @echo make check LOG_COMPILER="\"$(VALGRIND_EXEC_COMMAND)\"" + +@BUILD_WIN32_FALSE@sgcheck: +@BUILD_WIN32_FALSE@ @echo make check LOG_COMPILER="\"$(SGCHECK_EXEC_COMMAND)\"" + +@BUILD_WIN32_FALSE@valgrind-supressions: +@BUILD_WIN32_FALSE@ @echo make check LOG_COMPILER="\"$(VALGRIND_SUPRESSION)\"" + +@BUILD_WIN32_FALSE@gdb: +@BUILD_WIN32_FALSE@ @echo make check LOG_COMPILER="\"$(GDB_COMMAND)\"" + +@BUILD_WIN32_FALSE@helgrind: +@BUILD_WIN32_FALSE@ @echo make check LOG_COMPILER="\"$(HELGRIND_COMMAND)\"" + +@BUILD_WIN32_FALSE@drd: +@BUILD_WIN32_FALSE@ @echo make check LOG_COMPILER="\"$(DRD_COMMAND)\"" + +@BUILD_WIN32_FALSE@.PHONY: clean-libtest-check +@BUILD_WIN32_FALSE@clean-libtest-check: +@BUILD_WIN32_FALSE@ -rm -rf tmp_chroot + +@BUILD_WIN32_FALSE@.PHONY: libtest_tmp_dir +@BUILD_WIN32_FALSE@libtest_tmp_dir: | $(TMP_DIR) + +@BUILD_WIN32_FALSE@$(TMP_DIR): +@BUILD_WIN32_FALSE@ @$(mkdir_p) $(TMP_DIR) +@BUILD_WIN32_FALSE@test-unittest: libtest/unittest +@BUILD_WIN32_FALSE@ @libtest/unittest + +@BUILD_WIN32_FALSE@valgrind-unittest: libtest/unittest +@BUILD_WIN32_FALSE@ @$(VALGRIND_COMMAND) libtest/unittest + +@BUILD_WIN32_FALSE@gdb-unittest: libtest/unittest +@BUILD_WIN32_FALSE@ @$(GDB_COMMAND) libtest/unittest + +@BUILD_WIN32_FALSE@helgrind-unittest: libtest/unittest +@BUILD_WIN32_FALSE@ @$(HELGRIND_COMMAND) libtest/unittest + +@BUILD_WIN32_FALSE@drd-unittest: libtest/unittest +@BUILD_WIN32_FALSE@ @$(DRD_COMMAND) libtest/unittest + +@BUILD_WIN32_FALSE@sgcheck-unittest: libtest/unittest +@BUILD_WIN32_FALSE@ echo $(SGCHECK_COMMAND) +@BUILD_WIN32_FALSE@ @$(SGCHECK_COMMAND) libtest/unittest + +@BUILD_WIN32_FALSE@test-skiptest: libtest/skiptest +@BUILD_WIN32_FALSE@ @libtest/skiptest + +@BUILD_WIN32_FALSE@valgrind-skiptest: libtest/skiptest +@BUILD_WIN32_FALSE@ @$(VALGRIND_COMMAND) libtest/skiptest + +@BUILD_WIN32_FALSE@helgrind-skiptest: libtest/skiptest +@BUILD_WIN32_FALSE@ @$(HELGRIND_COMMAND) libtest/skiptest + +@BUILD_WIN32_FALSE@drd-skiptest: libtest/skiptest +@BUILD_WIN32_FALSE@ @$(DRD_COMMAND) libtest/skiptest +@BUILD_WIN32_FALSE@test-backtrace: libtest/backtrace +@BUILD_WIN32_FALSE@ @libtest/backtrace + +@BUILD_WIN32_FALSE@gdb-backtrace: libtest/backtrace +@BUILD_WIN32_FALSE@ @$(GDB_COMMAND) libtest/backtrace + +@BUILD_WIN32_FALSE@test-start-server: +@BUILD_WIN32_FALSE@ clients/memflush --servers=localhost +@BUILD_WIN32_FALSE@ clients/memcp --servers=localhost /etc/services +@BUILD_WIN32_FALSE@ clients/memcat --servers=localhost /etc/services +@BUILD_WIN32_FALSE@ clients/memrm --servers=localhost /etc/services +@BUILD_WIN32_FALSE@ clients/memstat --servers=localhost +@BUILD_WIN32_FALSE@ clients/memslap --servers=localhost +@BUILD_WIN32_FALSE@ clients/memslap --servers=localhost --concurrency=10 +@BUILD_WIN32_FALSE@ clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 +@BUILD_WIN32_FALSE@ clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 +@BUILD_WIN32_FALSE@ clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 --test=get +@BUILD_WIN32_FALSE@ clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 --test=set +@BUILD_WIN32_FALSE@ clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 --test=set --non-blocking + +@BUILD_WIN32_FALSE@client-valgrind: +@BUILD_WIN32_FALSE@ libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes clients/memslap --servers=localhost +@BUILD_WIN32_FALSE@ libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes clients/memslap --servers=localhost --concurrency=10 +@BUILD_WIN32_FALSE@ libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 +@BUILD_WIN32_FALSE@ libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 +@BUILD_WIN32_FALSE@ libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 --test=get +@BUILD_WIN32_FALSE@ libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 --test=set +@BUILD_WIN32_FALSE@ libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 --test=set --non-blocking + +@BUILD_WIN32_FALSE@.PHONY: clean-docs-check +@BUILD_WIN32_FALSE@clean-docs-check: +@BUILD_WIN32_FALSE@ -rm -rf docs/_build docs/doctrees man/.doctrees/ + +@BUILD_WIN32_FALSE@.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest + +@BUILD_WIN32_FALSE@sphinx-help: +@BUILD_WIN32_FALSE@ @echo "Please use \`make ' where is one of" +@BUILD_WIN32_FALSE@ @echo " html to make standalone HTML files" +@BUILD_WIN32_FALSE@ @echo " singlehtml to make a single large HTML file" +@BUILD_WIN32_FALSE@ @echo " pickle to make pickle files" +@BUILD_WIN32_FALSE@ @echo " json to make JSON files" +@BUILD_WIN32_FALSE@ @echo " htmlhelp to make HTML files and a HTML help project" +@BUILD_WIN32_FALSE@ @echo " qthelp to make HTML files and a qthelp project" +@BUILD_WIN32_FALSE@ @echo " devhelp to make HTML files and a Devhelp project" +@BUILD_WIN32_FALSE@ @echo " epub to make an epub" +@BUILD_WIN32_FALSE@ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" +@BUILD_WIN32_FALSE@ @echo " latexpdf to make LaTeX files and run them through pdflatex" +@BUILD_WIN32_FALSE@ @echo " text to make text files" +@BUILD_WIN32_FALSE@ @echo " man to make manual pages" +@BUILD_WIN32_FALSE@ @echo " changes to make an overview of all changed/added/deprecated items" +@BUILD_WIN32_FALSE@ @echo " linkcheck to check all external links for integrity" +@BUILD_WIN32_FALSE@ @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +@BUILD_WIN32_FALSE@install-html-local: html-local +@BUILD_WIN32_FALSE@ @$(MKDIR_P) $(htmldir)/html +@BUILD_WIN32_FALSE@ @cp -r ${top_builddir}/html $(htmldir)/ + +@BUILD_WIN32_FALSE@html-local: docs/conf.py +@BUILD_WIN32_FALSE@ @PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) ${top_builddir}/html + +@BUILD_WIN32_FALSE@singlehtml: html-local +@BUILD_WIN32_FALSE@ @PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/singlehtml + +@BUILD_WIN32_FALSE@pickle: docs/conf.py +@BUILD_WIN32_FALSE@ PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/pickle +@BUILD_WIN32_FALSE@ @echo +@BUILD_WIN32_FALSE@ @echo "Build finished; now you can process the pickle files." + +@BUILD_WIN32_FALSE@json: docs/conf.py +@BUILD_WIN32_FALSE@ PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/json +@BUILD_WIN32_FALSE@ @echo +@BUILD_WIN32_FALSE@ @echo "Build finished; now you can process the JSON files." + +@BUILD_WIN32_FALSE@htmlhelp: docs/conf.py +@BUILD_WIN32_FALSE@ PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/htmlhelp +@BUILD_WIN32_FALSE@ @echo +@BUILD_WIN32_FALSE@ @echo "Build finished; now you can run HTML Help Workshop with the" \ +@BUILD_WIN32_FALSE@ ".hhp project file in $(SPHINX_BUILDDIR)/htmlhelp." + +@BUILD_WIN32_FALSE@epub: docs/conf.py +@BUILD_WIN32_FALSE@ PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/epub +@BUILD_WIN32_FALSE@ @echo +@BUILD_WIN32_FALSE@ @echo "Build finished. The epub file is in $(SPHINX_BUILDDIR)/epub." + +@BUILD_WIN32_FALSE@latex: docs/conf.py +@BUILD_WIN32_FALSE@ PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/latex +@BUILD_WIN32_FALSE@ @echo +@BUILD_WIN32_FALSE@ @echo "Build finished; the LaTeX files are in $(SPHINX_BUILDDIR)/latex." +@BUILD_WIN32_FALSE@ @echo "Run \`make' in that directory to run these through (pdf)latex" \ +@BUILD_WIN32_FALSE@ "(use \`make latexpdf' here to do that automatically)." + +@BUILD_WIN32_FALSE@latexpdf: latex +@BUILD_WIN32_FALSE@ PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/latex +@BUILD_WIN32_FALSE@ @echo "Running LaTeX files through pdflatex..." +@BUILD_WIN32_FALSE@ make -C $(SPHINX_BUILDDIR)/latex all-pdf +@BUILD_WIN32_FALSE@ @echo "pdflatex finished; the PDF files are in $(SPHINX_BUILDDIR)/latex." + +@BUILD_WIN32_FALSE@text: docs/conf.py +@BUILD_WIN32_FALSE@ @PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/text + +@BUILD_WIN32_FALSE@man: +@BUILD_WIN32_FALSE@ @PYTHONPATH=$(SPHINX_BUILDDIR)/docs $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) ${top_builddir}/man + +@BUILD_WIN32_FALSE@changes: docs/conf.py +@BUILD_WIN32_FALSE@ @PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/changes + +@BUILD_WIN32_FALSE@linkcheck: docs/conf.py +@BUILD_WIN32_FALSE@ PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/linkcheck + +@BUILD_WIN32_FALSE@doctest: docs/conf.py +@BUILD_WIN32_FALSE@ PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/doctest +@BUILD_WIN32_FALSE@ @echo "Testing of doctests in the sources finished, look at the " \ +@BUILD_WIN32_FALSE@ "results in $(SPHINX_BUILDDIR)/doctest/output.txt." + +# Build rule for documentation +@BUILD_WIN32_FALSE@$(dist_man_MANS): $(top_srcdir)/configure.ac +@BUILD_WIN32_FALSE@ $(MAKE) $(AM_MAKEFLAGS) man + +@BUILD_WIN32_FALSE@.NOTPARALLEL: $(dist_man_MANS) + +@BUILD_WIN32_FALSE@libmemcached/csl/parser.h: libmemcached/csl/parser.cc + +@BUILD_WIN32_FALSE@libmemcached/csl/parser.cc: libmemcached/csl/parser.yy libmemcached/csl/scanner.l libmemcached/csl/scanner.h +@BUILD_WIN32_FALSE@ $(AM_V_YACC)$(am__skipyacc) $(YACC) $(YLFLAGS) $(AM_YFLAGS) -o $@ $< + +@BUILD_WIN32_FALSE@libmemcached/csl/scanner.h: libmemcached/csl/scanner.cc + +@BUILD_WIN32_FALSE@libmemcached/csl/scanner.cc: libmemcached/csl/scanner.l libmemcached/csl/parser.yy +@BUILD_WIN32_FALSE@ $(AM_V_GEN)$(LEX) $< + +@BUILD_WIN32_FALSE@libmemcached/options.cc: libmemcached/csl/parser.h + +@BUILD_WIN32_FALSE@libmemcached/dtrace_probes.h: libmemcached/libmemcached_probes.d +@BUILD_WIN32_FALSE@ $(DTRACE) $(DTRACEFLAGS) -h -o ${top_srcdir}/libmemcached/dtrace_probes.h -s ${top_srcdir}/libmemcached/libmemcached_probes.d + +@BUILD_WIN32_FALSE@libmemcached/libmemcached_probes.o: libmemcached/libmemcached_probes.d ${libmemcached_libmemcached_la_OBJECTS} + +@BUILD_WIN32_FALSE@.d.o: +@BUILD_WIN32_FALSE@ $(DTRACE) $(DTRACEFLAGS) -o $@ -G -s libmemcached/libmemcached_probes.d + +@BUILD_WIN32_FALSE@$(RPM_BUILDDIR): +@BUILD_WIN32_FALSE@ @@RPMDEV_SETUPTREE@ + +@BUILD_WIN32_FALSE@$(DIST_ARCHIVES): $(DISTFILES) +@BUILD_WIN32_FALSE@ $(MAKE) $(AM_MAKEFLAGS) dist-gzip + +@BUILD_WIN32_FALSE@$(RPM_SOURCE): | $(RPM_BUILDDIR) $(DIST_ARCHIVES) +@BUILD_WIN32_FALSE@ @rm -f $(BUILD_RPMS) $(BUILD_SRPMS) $(BUILD_RPM_DIR) +@BUILD_WIN32_FALSE@ @cp $(DIST_ARCHIVES) $(RPM_SOURCE) + +@BUILD_WIN32_FALSE@$(RPM_BUILD_TARGET): $(RPM_SOURCE) support/@PACKAGE@.spec +@BUILD_WIN32_FALSE@ @@RPMBUILD@ -ba $(top_srcdir)/support/@PACKAGE@.spec +@BUILD_WIN32_FALSE@ @cp $(BUILD_RPMS) $(BUILD_SRPMS) . + +@BUILD_WIN32_FALSE@.PHONY: rpm-sign +@BUILD_WIN32_FALSE@rpm-sign: $(RPM_BUILD_TARGET) +@BUILD_WIN32_FALSE@ @@RPM@ --addsign $(RPM_DIST) +@BUILD_WIN32_FALSE@ @@RPM@ --checksig $(RPM_DIST) + +@BUILD_WIN32_FALSE@.PHONY: clean-rpm +@BUILD_WIN32_FALSE@clean-rpm: +@BUILD_WIN32_FALSE@ -@rm -f $(BUILD_RPMS) $(BUILD_SRPMS) $(BUILD_RPM_SOURCE) $(BUILD_RPM_DIR) $(RPM_DIST) + +@BUILD_WIN32_FALSE@rpm: $(RPM_BUILD_TARGET) +@BUILD_WIN32_FALSE@dist-rpm: $(RPM_BUILD_TARGET) + +@BUILD_WIN32_FALSE@.PHONY: release +@BUILD_WIN32_FALSE@release: rpm rpm-sign + +@BUILD_WIN32_FALSE@.PHONY: auto-rpmbuild +@BUILD_WIN32_FALSE@auto-rpmbuild: support/@PACKAGE@.spec +@BUILD_WIN32_FALSE@ @auto-br-rpmbuild -ba $(top_srcdir)/support/@PACKAGE@.spec + +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@test-internal: tests/libmemcached-1.0/internals +@BUILD_WIN32_FALSE@@HAVE_DTRACE_FALSE@ @tests/testplus + +@BUILD_WIN32_FALSE@test-socket: tests/libmemcached-1.0/testsocket +@BUILD_WIN32_FALSE@ @tests/libmemcached-1.0/testsocket + +@BUILD_WIN32_FALSE@gdb-socket: tests/libmemcached-1.0/testsocket +@BUILD_WIN32_FALSE@ @$(GDB_COMMAND) tests/libmemcached-1.0/testsocket + +@BUILD_WIN32_FALSE@test-sasl: tests/libmemcached-1.0/sasl +@BUILD_WIN32_FALSE@ @tests/libmemcached-1.0/sasl + +@BUILD_WIN32_FALSE@gdb-sasl: tests/libmemcached-1.0/sasl +@BUILD_WIN32_FALSE@ @$(GDB_COMMAND) tests/libmemcached-1.0/sasl + +@BUILD_WIN32_FALSE@test-udp: tests/testudp +@BUILD_WIN32_FALSE@ @tests/testudp + +@BUILD_WIN32_FALSE@test-plus: tests/testplus +@BUILD_WIN32_FALSE@ @tests/testplus + +@BUILD_WIN32_FALSE@gdb-plus: tests/testplus +@BUILD_WIN32_FALSE@ $(GDB_COMMAND) tests/testplus + +@BUILD_WIN32_FALSE@valgrind-plus: tests/testplus +@BUILD_WIN32_FALSE@ @$(VALGRIND_COMMAND) tests/testplus + +@BUILD_WIN32_FALSE@helgrind-plus: tests/testplus +@BUILD_WIN32_FALSE@ @$(HELGRIND_COMMAND) tests/testplus + +@BUILD_WIN32_FALSE@test-parser: tests/parser +@BUILD_WIN32_FALSE@ @tests/parser + +@BUILD_WIN32_FALSE@valgrind-parser: tests/parser +@BUILD_WIN32_FALSE@ @$(VALGRIND_COMMAND) tests/parser + +@BUILD_WIN32_FALSE@test-failure: tests/failure +@BUILD_WIN32_FALSE@ @tests/failure + +@BUILD_WIN32_FALSE@gdb-failure: tests/failure +@BUILD_WIN32_FALSE@ @$(GDB_COMMAND) tests/failure + +@BUILD_WIN32_FALSE@test-hash: tests/testhashkit +@BUILD_WIN32_FALSE@ @tests/testhashkit + +@BUILD_WIN32_FALSE@test-memslap: tests/memslap +@BUILD_WIN32_FALSE@ @tests/memslap + +@BUILD_WIN32_FALSE@gdb-memslap: tests/memslap +@BUILD_WIN32_FALSE@ @$(GDB_COMMAND) tests/memslap + +@BUILD_WIN32_FALSE@test-memcp: tests/memcp +@BUILD_WIN32_FALSE@ tests/memcp + +@BUILD_WIN32_FALSE@gdb-memcp: tests/memcp +@BUILD_WIN32_FALSE@ @$(GDB_COMMAND) tests/memcp + +@BUILD_WIN32_FALSE@test-memstat: tests/memstat +@BUILD_WIN32_FALSE@ tests/memstat + +@BUILD_WIN32_FALSE@test-memerror: tests/memerror +@BUILD_WIN32_FALSE@ tests/memerror + +@BUILD_WIN32_FALSE@test-memtouch: tests/memtouch +@BUILD_WIN32_FALSE@ tests/memtouch + +@BUILD_WIN32_FALSE@test-memping: tests/memping +@BUILD_WIN32_FALSE@ tests/memping + +@BUILD_WIN32_FALSE@valgrind-memerror: tests/memerror +@BUILD_WIN32_FALSE@ @$(VALGRIND_COMMAND) tests/memerror + +@BUILD_WIN32_FALSE@valgrind-memtouch: tests/memtouch +@BUILD_WIN32_FALSE@ @$(VALGRIND_COMMAND) tests/memtouch + +@BUILD_WIN32_FALSE@test-memdump: tests/memdump +@BUILD_WIN32_FALSE@ tests/memdump + +@BUILD_WIN32_FALSE@gdb-memdump: tests/memdump +@BUILD_WIN32_FALSE@ @$(GDB_COMMAND) tests/memdump + +@BUILD_WIN32_FALSE@valgrind-memdump: tests/memdump +@BUILD_WIN32_FALSE@ @$(VALGRIND_COMMAND) tests/memdump + +@BUILD_WIN32_FALSE@test: check + +@BUILD_WIN32_FALSE@test-mem: tests/libmemcached-1.0/testapp +@BUILD_WIN32_FALSE@ @tests/libmemcached-1.0/testapp + +@BUILD_WIN32_FALSE@test-atom: tests/atomsmasher +@BUILD_WIN32_FALSE@ @tests/atomsmasher + +@BUILD_WIN32_FALSE@test-hashplus: tests/hash_plus +@BUILD_WIN32_FALSE@ @tests/hash_plus + +@BUILD_WIN32_FALSE@test-cycle: tests/cycle +@BUILD_WIN32_FALSE@ @tests/cycle + +@BUILD_WIN32_FALSE@test-memcapable: tests/memcapable +@BUILD_WIN32_FALSE@ @tests/memcapable + +@BUILD_WIN32_FALSE@valgrind-memcapable: tests/memcapable +@BUILD_WIN32_FALSE@ $(VALGRIND_COMMAND) tests/memcapable + +@BUILD_WIN32_FALSE@pahole-mem: tests/testapp +@BUILD_WIN32_FALSE@ @$(PAHOLE_COMMAND) tests/testapp + +@BUILD_WIN32_FALSE@pahole-hash: tests/testhashkit +@BUILD_WIN32_FALSE@ @$(PAHOLE_COMMAND) tests/testhashkit + +@BUILD_WIN32_FALSE@gdb-mem: tests/libmemcached-1.0/testapp +@BUILD_WIN32_FALSE@ @$(GDB_COMMAND) tests/libmemcached-1.0/testapp + +@BUILD_WIN32_FALSE@gdb-atom: tests/atomsmasher +@BUILD_WIN32_FALSE@ @$(GDB_COMMAND) tests/atomsmasher + +@BUILD_WIN32_FALSE@gdb-hash: tests/testhashkit +@BUILD_WIN32_FALSE@ @$(GDB_COMMAND) tests/testhashkit + +@BUILD_WIN32_FALSE@gdb-hashplus: tests/hash_plus +@BUILD_WIN32_FALSE@ @$(GDB_COMMAND) tests/hash_plus + +@BUILD_WIN32_FALSE@gdb-cycle: tests/cycle +@BUILD_WIN32_FALSE@ @$(GDB_COMMAND) tests/cycle + +@BUILD_WIN32_FALSE@valgrind-cycle: tests/cycle +@BUILD_WIN32_FALSE@ $(VALGRIND_COMMAND) tests/cycle + +@BUILD_WIN32_FALSE@valgrind-mem: tests/libmemcached-1.0/testapp +@BUILD_WIN32_FALSE@ @$(VALGRIND_COMMAND) tests/libmemcached-1.0/testapp + +@BUILD_WIN32_FALSE@valgrind-failure: tests/failure +@BUILD_WIN32_FALSE@ @$(VALGRIND_COMMAND) tests/failure + +@BUILD_WIN32_FALSE@valgrind-atom: tests/atomsmasher +@BUILD_WIN32_FALSE@ $(VALGRIND_COMMAND) tests/atomsmasher + +@BUILD_WIN32_FALSE@valgrind-sasl: tests/sasl +@BUILD_WIN32_FALSE@ @$(VALGRIND_COMMAND) tests/sasl + +@BUILD_WIN32_FALSE@valgrind-hash: tests/testhashkit +@BUILD_WIN32_FALSE@ @$(VALGRIND_COMMAND) tests/testhashkit + +@BUILD_WIN32_FALSE@valgrind-hashplus: tests/hash_plus +@BUILD_WIN32_FALSE@ @$(VALGRIND_COMMAND) tests/hash_plus + +@BUILD_WIN32_FALSE@helgrind-cycle: tests/cycle +@BUILD_WIN32_FALSE@ @$(HELGRIND_COMMAND) tests/cycle + +@BUILD_WIN32_FALSE@helgrind-mem: tests/libmemcached-1.0/testapp +@BUILD_WIN32_FALSE@ @$(HELGRIND_COMMAND) tests/libmemcached-1.0/testapp + +@BUILD_WIN32_FALSE@helgrind-atom: tests/atomsmasher +@BUILD_WIN32_FALSE@ @$(HELGRIND_COMMAND) tests/atomsmasher + +@BUILD_WIN32_FALSE@helgrind-hash: tests/testhashkit +@BUILD_WIN32_FALSE@ @$(HELGRIND_COMMAND) tests/testhashkit + +@BUILD_WIN32_FALSE@helgrind-hashplus: tests/hash_plus +@BUILD_WIN32_FALSE@ @$(HELGRIND_COMMAND) tests/hash_plus + +@BUILD_WIN32_FALSE@drd-mem: tests/libmemcached-1.0/testapp +@BUILD_WIN32_FALSE@ @$(DRD_COMMAND) tests/libmemcached-1.0/testapp + +@BUILD_WIN32_FALSE@drd-cycle: tests/cycle +@BUILD_WIN32_FALSE@ @$(DRD_COMMAND) tests/cycle + +@BUILD_WIN32_FALSE@merge-clean: +@BUILD_WIN32_FALSE@ @find ./ | $(GREP) \.gcda | xargs rm -f +@BUILD_WIN32_FALSE@ @find ./ | $(GREP) \.gcno | xargs rm -f +@BUILD_WIN32_FALSE@ @find ./ | $(GREP) \.gz | xargs rm -f +@BUILD_WIN32_FALSE@ @find ./ | $(GREP) \.moved | xargs rm -r -f +@BUILD_WIN32_FALSE@ @find ./ | $(GREP) \\.orig | xargs rm -f +@BUILD_WIN32_FALSE@ @find ./ | $(GREP) \.rej | xargs rm -f +@BUILD_WIN32_FALSE@ @find ./ | $(GREP) \.THIS | xargs rm -f +@BUILD_WIN32_FALSE@ @find ./ | $(GREP) \.OTHER | xargs rm -f +@BUILD_WIN32_FALSE@ @find ./ | $(GREP) \.BASE | xargs rm -f +@BUILD_WIN32_FALSE@ @find ./ | $(GREP) \~$$ | xargs rm -f +@BUILD_WIN32_FALSE@ @echo "Files that need to be either removed or checked in:" +@BUILD_WIN32_FALSE@ @bzr unknowns + +@BUILD_WIN32_FALSE@clean-local: clean-libtest-check clean-docs-check clean-rpm + +@BUILD_WIN32_FALSE@lcov: lcov-clean check +@BUILD_WIN32_FALSE@ @echo +@BUILD_WIN32_FALSE@ @echo " ------------------------------------------------------" +@BUILD_WIN32_FALSE@ @echo "Make sure ./configure was run with '--enable-coverage'" +@BUILD_WIN32_FALSE@ @echo "------------------------------------------------------" +@BUILD_WIN32_FALSE@ @echo +@BUILD_WIN32_FALSE@ @cd libmemcached && lcov --capture --directory . --base-directory .. --output-file lcov.out +@BUILD_WIN32_FALSE@ @genhtml -o lcov --function-coverage -t libmemcached libmemcached/lcov.out + +@BUILD_WIN32_FALSE@lcov-clean: clean +@BUILD_WIN32_FALSE@ @rm -rf lcov */lcov.out +@BUILD_WIN32_FALSE@ @find . -name '*.gcno' | xargs rm -f +@BUILD_WIN32_FALSE@ @find . -name '*.gcda' | xargs rm -f + +maintainer-clean-local: + find . -type f -name '*~' -exec rm -f '{}' \; + -rm -f man/*.1 + -rm -f man/*.3 + -rm -f man/*.8 + -rm -rf man/.doctrees/ + -rm -f Makefile.in + -rm -f aclocal.m4 + -rm -f build-aux/compile + -rm -f build-aux/config.guess + -rm -f build-aux/config.sub + -rm -f build-aux/depcomp + -rm -f build-aux/install-sh + -rm -f build-aux/ltmain.sh + -rm -f build-aux/missing + -rm -f build-aux/test-driver + -rm -f build-aux/ylwrap + -rm -f mem_config.in + -rm -f config.log + -rm -f config.status + -rm -f configure + -rm -f m4/libtool.m4 + -rm -f m4/ltoptions.m4 + -rm -f m4/ltsugar.m4 + -rm -f m4/ltversion.m4 + -rm -f m4/lt~obsolete.m4 + -rm -f m4/test-driver + -rmdir build-aux + -rm -rf ${top_builddir}/html + -rm -f $(DIST_ARCHIVES) + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..b39336c --- /dev/null +++ b/NEWS @@ -0,0 +1 @@ +See Changelog diff --git a/README b/README new file mode 100644 index 0000000..a664bc0 --- /dev/null +++ b/README @@ -0,0 +1,43 @@ +Hi! + +So what is this? It is a library in C for connecting to memcached servers +(http://danga.com/memcached/). It is also a collection of utilities designed +to work with memcached. + +memcat - Copy the value of a key to standard output +memflush - Flush the contents of your servers. +memrm - Remove a key(s) from the server. +memstat - Dump the stats of your servers to standard output +memslap - Load generation utility (benchmark!) + +The library is in production in many locations (upwards to 1000+ nodes). + +The project has information here: http://libmemcached.org/ + +Documentation can be found here: http://docs.libmemcached.org/ + +Want to contribute? If you write more then three good patches, then I will +just ask you to commit directly to the tree. I am happy to have additional +people work on this project. Please checkout README.FIRST. + +You will need a C99 compiler in order to compile this library. Currently we +actively support Linux, MacOSX, FreeBSD, and Solaris. A Windows port is +currently not supported, but one is listed on the homepage that is supported +by someone in the community. + +If you are looking for answers to your questions please check out the +mailing list at: +http://lists.libmemcached.org/ + +Subscription information for the libmemcached mailing list can be found there. + +Please report bugs here: +https://bugs.launchpad.net/libmemcached/ + +You can purchase support from: +http://datadifferential.com/ + + +Cheers, + -Brian Aker + Seattle, WA. diff --git a/README.FIRST b/README.FIRST new file mode 100644 index 0000000..7c93b9b --- /dev/null +++ b/README.FIRST @@ -0,0 +1,31 @@ +Hi! + +If you are getting this code from http://launchpad.net/libmemcached then +continue reading. Otherwise these directions are not for you (well maybe...). + +To obtain code from http://bazaar.launchpad.net/libmemcached you will need to +issue the following command: + +bzr branch lp:libmemcached + +Once the tree is cloned you will need to build the "configure" script. You +can do this by running the script: + +./bootstrap.sh autoreconf + +It will set up all of the files you need to build libmemcached. At that +point it is just the typical "./configure; make; make test; make install" + +For a tarball release do a "make dist" and for an RPM type "make rpm". + +For patches, we prefer you push a branch to launchpad and then submit that +branch to be merged. For more information, see: + +https://help.launchpad.net/Code/UploadingABranch +https://help.launchpad.net/Code/Review + +Thanks and keep hacking! + +Cheers, + -Brian + Seattle, WA. diff --git a/README.win32 b/README.win32 new file mode 100644 index 0000000..5f8bb30 --- /dev/null +++ b/README.win32 @@ -0,0 +1,25 @@ +Hi, + +So you want to know how to build libmemcached on Windows? In order to +have a single build environment you need to install mingw to get a +"unix environment" to run the configure script. + +An easy way to get started is to install the msysgit fullinstall +package from: http://code.google.com/p/msysgit/downloads/list + +msysgit does not contain the "autotools" needed to generate a +configure script, so you need to generate that on another box (this +should not be a problem if you're trying to build from a tar archive). + +msysgit does not contain the tools to build the documentation, so you +need to add --without-docs to configure. + +I'm normally building libmemcached with: + +Ex: +$ ./configure --without-docs --with-memcached=../memcached/memcached.exe +$ make all install + +Happy hacking, + +Trond Norbye diff --git a/THANKS b/THANKS new file mode 100644 index 0000000..971b632 --- /dev/null +++ b/THANKS @@ -0,0 +1,14 @@ +(This is not complete, please send email if I have missed someone.) +Eirik A. Nygaard - IO Patch +Cal Heldenbrand - Awesome feedback on performance +Dustin Sallings - Insight into protocol +Tobias Luetke - Performance Feedback +Andre Cruz - Help with getting the CRC Hash function to match other connectors +Brian Pontz - Hsieh hash +Tim Bunce - Perl Driver work and feedback on API +Kevin Dalley - Bug Fixes +Patrick Galbraith - work on C++ interface +Ross McFarland - Idea for sorting servers. +Marcelo Fernandez - TCP/IP timeout pieces +Yin Chen - Ketama support/weighted support +Monty Taylor - Debian Packages, Cleanup work for configure diff --git a/TODO b/TODO new file mode 100644 index 0000000..64ad32e --- /dev/null +++ b/TODO @@ -0,0 +1,11 @@ +- Write a shell application (?) +- Fix version in command line tools +- Write (more) test cases for all command line tools (!!!) +- Write some sort of "default" options bit for tools +- More examples using libraries +- Doxygen? +- implement more connection/hash algo +- implement compression +- Revisit get() code (look for performance enhancements) +- Add support for managing servers for clusters. +- Build embedded version diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000..140131d --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,1111 @@ +# generated automatically by aclocal 1.13.4 -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) + +# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.13' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.13.4], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.13.4])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is '.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[{ + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each '.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.65])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl +]) +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl +]) + +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST([install_sh])]) + +# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + AC_MSG_WARN(['missing' script is too old or missing]) +fi +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# -------------------- +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) + +# _AM_SET_OPTIONS(OPTIONS) +# ------------------------ +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) + +# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# ("yes" being less verbose, "no" or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor 'install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in "make install-strip", and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +# +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' + +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done + rm -rf conftest.dir + + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + +m4_include([m4/ax_add_am_macro.m4]) +m4_include([m4/ax_am_jobserver.m4]) +m4_include([m4/ax_am_macros.m4]) +m4_include([m4/ax_append_compile_flags.m4]) +m4_include([m4/ax_append_flag.m4]) +m4_include([m4/ax_append_link_flags.m4]) +m4_include([m4/ax_append_to_file.m4]) +m4_include([m4/ax_assert.m4]) +m4_include([m4/ax_check_compile_flag.m4]) +m4_include([m4/ax_check_library.m4]) +m4_include([m4/ax_check_link_flag.m4]) +m4_include([m4/ax_compiler_vendor.m4]) +m4_include([m4/ax_compiler_version.m4]) +m4_include([m4/ax_count_cpus.m4]) +m4_include([m4/ax_cxx_gcc_abi_demangle.m4]) +m4_include([m4/ax_debug.m4]) +m4_include([m4/ax_endian.m4]) +m4_include([m4/ax_file_escapes.m4]) +m4_include([m4/ax_gcc_atomic_builtins.m4]) +m4_include([m4/ax_harden_compiler_flags.m4]) +m4_include([m4/ax_hex_version.m4]) +m4_include([m4/ax_libevent.m4]) +m4_include([m4/ax_memcached.m4]) +m4_include([m4/ax_platform.m4]) +m4_include([m4/ax_print_to_file.m4]) +m4_include([m4/ax_prog_sphinx_build.m4]) +m4_include([m4/ax_pthread.m4]) +m4_include([m4/ax_pthread_timedjoin_np.m4]) +m4_include([m4/ax_restore_flags.m4]) +m4_include([m4/ax_sasl.m4]) +m4_include([m4/ax_save_flags.m4]) +m4_include([m4/ax_uuid.m4]) +m4_include([m4/ax_vcs_checkout.m4]) +m4_include([m4/ax_with_prog.m4]) +m4_include([m4/bottom.m4]) +m4_include([m4/byteorder.m4]) +m4_include([m4/deprecated.m4]) +m4_include([m4/fnv.m4]) +m4_include([m4/gearmand.m4]) +m4_include([m4/have_cinttypes.m4]) +m4_include([m4/have_cstdint.m4]) +m4_include([m4/hsieh.m4]) +m4_include([m4/libgearman.m4]) +m4_include([m4/libtool.m4]) +m4_include([m4/ltoptions.m4]) +m4_include([m4/ltsugar.m4]) +m4_include([m4/ltversion.m4]) +m4_include([m4/lt~obsolete.m4]) +m4_include([m4/memaslap.m4]) +m4_include([m4/murmur.m4]) +m4_include([m4/pandora_enable_dtrace.m4]) +m4_include([m4/protocol_binary.m4]) +m4_include([m4/setsockopt.m4]) +m4_include([m4/socket_send_flags.m4]) +m4_include([m4/visibility.m4]) diff --git a/build-aux/config.guess b/build-aux/config.guess new file mode 100755 index 0000000..b79252d --- /dev/null +++ b/build-aux/config.guess @@ -0,0 +1,1558 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2013 Free Software Foundation, Inc. + +timestamp='2013-06-10' + +# This file 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 3 of the License, or +# (at your option) any later version. +# +# This program 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 . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner. +# +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches with a ChangeLog entry to config-patches@gnu.org. + + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2013 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." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + else + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + cris:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + crisv32:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + frv:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:Linux:*:*) + echo ${UNAME_MACHINE}-pc-linux-${LIBC} + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + ;; + or1k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-${LIBC} + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-${LIBC} + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-${LIBC} + exit ;; + x86_64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; +esac + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +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` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/build-aux/config.sub b/build-aux/config.sub new file mode 100755 index 0000000..d2a9613 --- /dev/null +++ b/build-aux/config.sub @@ -0,0 +1,1791 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2013 Free Software Foundation, Inc. + +timestamp='2013-08-10' + +# This file 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 3 of the License, or +# (at your option) any later version. +# +# This program 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 . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2013 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." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze*) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | be32 | be64 \ + | bfin \ + | c4x | c8051 | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | epiphany \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ + | ns16k | ns32k \ + | open8 \ + | or1k | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pyramid \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | we32k \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pyramid-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze*) + basic_machine=microblaze-xilinx + ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + msys) + basic_machine=i686-pc + os=-msys + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc | ppcbe) basic_machine=powerpc-unknown + ;; + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -nacl*) + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or1k-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/build-aux/depcomp b/build-aux/depcomp new file mode 100755 index 0000000..4ebd5b3 --- /dev/null +++ b/build-aux/depcomp @@ -0,0 +1,791 @@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2013-05-30.07; # UTC + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. + +# This program 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, or (at your option) +# any later version. + +# This program 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 . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Alexandre Oliva . + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. + DEPDIR directory where to store dependencies. + depfile Dependency file to output. + tmpdepfile Temporary file to use when outputting dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +esac + +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Avoid interferences from the environment. +gccflag= dashmflag= + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp +fi + +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The second -e expression handles DOS-style file names with drive + # letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the "deleted header file" problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. +## Some versions of gcc put a space before the ':'. On the theory +## that the space means something, we add a space to the output as +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like '#:fec' to the end of the + # dependency line. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" + echo >> "$depfile" + # The second pass generates a dummy entry for each header file. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" + ;; + +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts '$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + aix_post_process_depfile + ;; + +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" + rm -f "$tmpdepfile" + ;; + +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using '\' : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + set_dir_from "$object" + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + set_base_from "$source" + tmpdepfile=$base.d + + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0; do + # mkdir is a portable test-and-set. + if mkdir "$lockdir" 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rmdir "$lockdir" + break + else + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi + + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" + # Add 'dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + make_dummy_depfile + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in 'foo.d' instead, so we check for that too. + # Subdirectories are respected. + set_dir_from "$object" + set_base_from "$object" + + if test "$libtool" = yes; then + # Libtool generates 2 separate objects for the 2 libraries. These + # two compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; + +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/'"$tab"'\1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/'"$tab"'/ + G + p +}' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for ':' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. + "$@" $dashmflag | + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no eat=no + for arg + do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + if test $eat = yes; then + eat=no + continue + fi + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix=`echo "$object" | sed 's/^.*\././'` + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + # Remove '-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E \ + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + | sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + + IFS=" " + for arg + do + case "$arg" in + -o) + shift + ;; + $object) + shift + ;; + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/build-aux/install-sh b/build-aux/install-sh new file mode 100755 index 0000000..a9244eb --- /dev/null +++ b/build-aux/install-sh @@ -0,0 +1,527 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2011-01-19.21; # UTC + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. + +nl=' +' +IFS=" "" $nl" + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog +rmcmd="$rmprog -f" +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +no_target_directory= + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) dst_arg=$2 + # Protect names problematic for `test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; + + -T) no_target_directory=true;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + # Protect names problematic for `test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names problematic for `test' and other utilities. + case $src in + -* | [=\(\)!]) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + dst=$dst_arg + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" + + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh new file mode 100644 index 0000000..63ae69d --- /dev/null +++ b/build-aux/ltmain.sh @@ -0,0 +1,9655 @@ + +# libtool (GNU libtool) 2.4.2 +# Written by Gordon Matzigkeit , 1996 + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007, 2008, 2009, 2010, 2011 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 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 GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, +# or obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +# Usage: $progname [OPTION]... [MODE-ARG]... +# +# Provide generalized library-building support services. +# +# --config show all configuration variables +# --debug enable verbose shell tracing +# -n, --dry-run display commands without modifying any files +# --features display basic configuration information and exit +# --mode=MODE use operation mode MODE +# --preserve-dup-deps don't remove duplicate dependency libraries +# --quiet, --silent don't print informational messages +# --no-quiet, --no-silent +# print informational messages (default) +# --no-warn don't display warning messages +# --tag=TAG use configuration variables from tag TAG +# -v, --verbose print more informational messages than default +# --no-verbose don't print the extra informational messages +# --version print version information +# -h, --help, --help-all print short, long, or detailed help message +# +# MODE must be one of the following: +# +# clean remove files from the build directory +# compile compile a source file into a libtool object +# execute automatically set library path, then run a program +# finish complete the installation of libtool libraries +# install install libraries or executables +# link create a library or an executable +# uninstall remove libraries from an installed directory +# +# MODE-ARGS vary depending on the MODE. When passed as first option, +# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. +# Try `$progname --help --mode=MODE' for a more detailed description of MODE. +# +# When reporting a bug, please describe a test case to reproduce it and +# include the following information: +# +# host-triplet: $host +# shell: $SHELL +# compiler: $LTCC +# compiler flags: $LTCFLAGS +# linker: $LD (gnu? $with_gnu_ld) +# $progname: (GNU libtool) 2.4.2 +# automake: $automake_version +# autoconf: $autoconf_version +# +# Report bugs to . +# GNU libtool home page: . +# General help using GNU software: . + +PROGRAM=libtool +PACKAGE=libtool +VERSION=2.4.2 +TIMESTAMP="" +package_revision=1.3337 + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs 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 +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + +# NLS nuisances: We save the old values to restore during execute mode. +lt_user_locale= +lt_safe_locale= +for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES +do + eval "if test \"\${$lt_var+set}\" = set; then + save_$lt_var=\$$lt_var + $lt_var=C + export $lt_var + lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" + lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" + fi" +done +LC_ALL=C +LANGUAGE=C +export LANGUAGE LC_ALL + +$lt_unset CDPATH + + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + + + +: ${CP="cp -f"} +test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} +: ${MAKE="make"} +: ${MKDIR="mkdir"} +: ${MV="mv -f"} +: ${RM="rm -f"} +: ${SHELL="${CONFIG_SHELL-/bin/sh}"} +: ${Xsed="$SED -e 1s/^X//"} + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 +EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. +EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. + +exit_status=$EXIT_SUCCESS + +# Make sure IFS has a sensible default +lt_nl=' +' +IFS=" $lt_nl" + +dirname="s,/[^/]*$,," +basename="s,^.*/,," + +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} # func_dirname may be replaced by extended shell implementation + + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "${1}" | $SED "$basename"` +} # func_basename may be replaced by extended shell implementation + + +# func_dirname_and_basename file append nondir_replacement +# perform func_basename and func_dirname in a single function +# call: +# dirname: Compute the dirname of FILE. If nonempty, +# add APPEND to the result, otherwise set result +# to NONDIR_REPLACEMENT. +# value returned in "$func_dirname_result" +# basename: Compute filename of FILE. +# value retuned in "$func_basename_result" +# Implementation must be kept synchronized with func_dirname +# and func_basename. For efficiency, we do not delegate to +# those functions but instead duplicate the functionality here. +func_dirname_and_basename () +{ + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi + func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` +} # func_dirname_and_basename may be replaced by extended shell implementation + + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + 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 may be replaced by extended shell implementation + + +# These SED scripts presuppose an absolute path with a trailing slash. +pathcar='s,^/\([^/]*\).*$,\1,' +pathcdr='s,^/[^/]*,,' +removedotparts=':dotsl + s@/\./@/@g + t dotsl + s,/\.$,/,' +collapseslashes='s@/\{1,\}@/@g' +finalslash='s,/*$,/,' + +# func_normal_abspath PATH +# Remove doubled-up and trailing slashes, "." path components, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +# value returned in "$func_normal_abspath_result" +func_normal_abspath () +{ + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. + ;; + *) + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; + esac + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` + while :; do + # Processed it all yet? + if test "$func_normal_abspath_tpath" = / ; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result" ; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result +} + +# func_relative_path SRCDIR DSTDIR +# generates a relative path from SRCDIR to DSTDIR, with a trailing +# slash if non-empty, suitable for immediately appending a filename +# without needing to append a separator. +# value returned in "$func_relative_path_result" +func_relative_path () +{ + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=${func_dirname_result} + if test "x$func_relative_path_tlibdir" = x ; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done + + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test "x$func_stripname_result" != x ; then + func_relative_path_result=${func_relative_path_result}/${func_stripname_result} + fi + + # Normalisation. If bindir is libdir, return empty string, + # else relative path ending with a slash; either way, target + # file name can be directly appended. + if test ! -z "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result/" + func_relative_path_result=$func_stripname_result + fi +} + +# The name of this program: +func_dirname_and_basename "$progpath" +progname=$func_basename_result + +# Make sure we have an absolute path for reexecution: +case $progpath in + [\\/]*|[A-Za-z]:\\*) ;; + *[\\/]*) + progdir=$func_dirname_result + progdir=`cd "$progdir" && pwd` + progpath="$progdir/$progname" + ;; + *) + save_IFS="$IFS" + IFS=${PATH_SEPARATOR-:} + for progdir in $PATH; do + IFS="$save_IFS" + test -x "$progdir/$progname" && break + done + IFS="$save_IFS" + test -n "$progdir" || progdir=`pwd` + progpath="$progdir/$progname" + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed="${SED}"' -e 1s/^X//' +sed_quote_subst='s/\([`"$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' + +# Sed substitution that converts a w32 file name or path +# which contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + +# Re-`\' parameter expansions in output of double_quote_subst that were +# `\'-ed in input to the same. If an odd number of `\' preceded a '$' +# in input to double_quote_subst, that '$' was protected from expansion. +# Since each input `\' is now two `\'s, look for any number of runs of +# four `\'s followed by two `\'s and then a '$'. `\' that '$'. +bs='\\' +bs2='\\\\' +bs4='\\\\\\\\' +dollar='\$' +sed_double_backslash="\ + s/$bs4/&\\ +/g + s/^$bs2$dollar/$bs&/ + s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g + s/\n//g" + +# Standard options: +opt_dry_run=false +opt_help=false +opt_quiet=false +opt_verbose=false +opt_warning=: + +# func_echo arg... +# Echo program name prefixed message, along with the current mode +# name if it has been set yet. +func_echo () +{ + $ECHO "$progname: ${opt_mode+$opt_mode: }$*" +} + +# func_verbose arg... +# Echo program name prefixed message in verbose mode only. +func_verbose () +{ + $opt_verbose && func_echo ${1+"$@"} + + # A bug in bash halts the script if the last line of a function + # fails when set -e is in force, so we need another command to + # work around that: + : +} + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + +# func_error arg... +# Echo program name prefixed message to standard error. +func_error () +{ + $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 +} + +# func_warning arg... +# Echo program name prefixed warning message to standard error. +func_warning () +{ + $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 + + # bash bug again: + : +} + +# func_fatal_error arg... +# Echo program name prefixed message to standard error, and exit. +func_fatal_error () +{ + func_error ${1+"$@"} + exit $EXIT_FAILURE +} + +# func_fatal_help arg... +# Echo program name prefixed message to standard error, followed by +# a help hint, and exit. +func_fatal_help () +{ + func_error ${1+"$@"} + func_fatal_error "$help" +} +help="Try \`$progname --help' for more information." ## default + + +# func_grep expression filename +# Check whether EXPRESSION matches any line of FILENAME, without output. +func_grep () +{ + $GREP "$1" "$2" >/dev/null 2>&1 +} + + +# func_mkdir_p directory-path +# Make sure the entire path to DIRECTORY-PATH is available. +func_mkdir_p () +{ + my_directory_path="$1" + my_dir_list= + + if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then + + # Protect directory names starting with `-' + case $my_directory_path in + -*) my_directory_path="./$my_directory_path" ;; + esac + + # While some portion of DIR does not yet exist... + while test ! -d "$my_directory_path"; do + # ...make a list in topmost first order. Use a colon delimited + # list incase some portion of path contains whitespace. + my_dir_list="$my_directory_path:$my_dir_list" + + # If the last portion added has no slash in it, the list is done + case $my_directory_path in */*) ;; *) break ;; esac + + # ...otherwise throw away the child directory and loop + my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` + done + my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` + + save_mkdir_p_IFS="$IFS"; IFS=':' + for my_dir in $my_dir_list; do + IFS="$save_mkdir_p_IFS" + # mkdir can fail with a `File exist' error if two processes + # try to create one of the directories concurrently. Don't + # stop in that case! + $MKDIR "$my_dir" 2>/dev/null || : + done + IFS="$save_mkdir_p_IFS" + + # Bail out if we (or some other process) failed to create a directory. + test -d "$my_directory_path" || \ + func_fatal_error "Failed to create \`$1'" + fi +} + + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$opt_dry_run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $MKDIR "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || \ + func_fatal_error "cannot create temporary directory \`$my_tmpdir'" + fi + + $ECHO "$my_tmpdir" +} + + +# func_quote_for_eval arg +# Aesthetically quote ARG to be evaled later. +# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT +# is double-quoted, suitable for a subsequent eval, whereas +# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters +# which are still active within double quotes backslashified. +func_quote_for_eval () +{ + case $1 in + *[\\\`\"\$]*) + func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; + *) + func_quote_for_eval_unquoted_result="$1" ;; + esac + + case $func_quote_for_eval_unquoted_result in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and and variable + # expansion for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" + ;; + *) + func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" + esac +} + + +# func_quote_for_expand arg +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () +{ + case $1 in + *[\\\`\"]*) + my_arg=`$ECHO "$1" | $SED \ + -e "$double_quote_subst" -e "$sed_double_backslash"` ;; + *) + my_arg="$1" ;; + esac + + case $my_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting and command substitution for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + my_arg="\"$my_arg\"" + ;; + esac + + func_quote_for_expand_result="$my_arg" +} + + +# func_show_eval cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. +func_show_eval () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$my_cmd" + my_status=$? + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + + +# func_show_eval_locale cmd [fail_exp] +# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is +# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP +# is given, then evaluate it. Use the saved locale for evaluation. +func_show_eval_locale () +{ + my_cmd="$1" + my_fail_exp="${2-:}" + + ${opt_silent-false} || { + func_quote_for_expand "$my_cmd" + eval "func_echo $func_quote_for_expand_result" + } + + if ${opt_dry_run-false}; then :; else + eval "$lt_user_locale + $my_cmd" + my_status=$? + eval "$lt_safe_locale" + if test "$my_status" -eq 0; then :; else + eval "(exit $my_status); $my_fail_exp" + fi + fi +} + +# func_tr_sh +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () +{ + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac +} + + +# func_version +# Echo version message to standard output and exit. +func_version () +{ + $opt_debug + + $SED -n '/(C)/!b go + :more + /\./!{ + N + s/\n# / / + b more + } + :go + /^# '$PROGRAM' (GNU /,/# warranty; / { + s/^# // + s/^# *$// + s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ + p + }' < "$progpath" + exit $? +} + +# func_usage +# Echo short help message to standard output and exit. +func_usage () +{ + $opt_debug + + $SED -n '/^# Usage:/,/^# *.*--help/ { + s/^# // + s/^# *$// + s/\$progname/'$progname'/ + p + }' < "$progpath" + echo + $ECHO "run \`$progname --help | more' for full usage" + exit $? +} + +# func_help [NOEXIT] +# Echo long help message to standard output and exit, +# unless 'noexit' is passed as argument. +func_help () +{ + $opt_debug + + $SED -n '/^# Usage:/,/# Report bugs to/ { + :print + s/^# // + s/^# *$// + s*\$progname*'$progname'* + s*\$host*'"$host"'* + s*\$SHELL*'"$SHELL"'* + s*\$LTCC*'"$LTCC"'* + s*\$LTCFLAGS*'"$LTCFLAGS"'* + s*\$LD*'"$LD"'* + s/\$with_gnu_ld/'"$with_gnu_ld"'/ + s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ + p + d + } + /^# .* home page:/b print + /^# General help using/b print + ' < "$progpath" + ret=$? + if test -z "$1"; then + exit $ret + fi +} + +# func_missing_arg argname +# Echo program name prefixed message to standard error and set global +# exit_cmd. +func_missing_arg () +{ + $opt_debug + + func_error "missing argument for $1." + exit_cmd=exit +} + + +# func_split_short_opt shortopt +# Set func_split_short_opt_name and func_split_short_opt_arg shell +# variables after splitting SHORTOPT after the 2nd character. +func_split_short_opt () +{ + my_sed_short_opt='1s/^\(..\).*$/\1/;q' + my_sed_short_rest='1s/^..\(.*\)$/\1/;q' + + func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` + func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` +} # func_split_short_opt may be replaced by extended shell implementation + + +# func_split_long_opt longopt +# Set func_split_long_opt_name and func_split_long_opt_arg shell +# variables after splitting LONGOPT at the `=' sign. +func_split_long_opt () +{ + my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' + my_sed_long_arg='1s/^--[^=]*=//' + + func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` + func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` +} # func_split_long_opt may be replaced by extended shell implementation + +exit_cmd=: + + + + + +magic="%%%MAGIC variable%%%" +magic_exe="%%%MAGIC EXE variable%%%" + +# Global variables. +nonopt= +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" +extracted_archives= +extracted_serial=0 + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + +# func_append var value +# Append VALUE to the end of shell variable VAR. +func_append () +{ + eval "${1}=\$${1}\${2}" +} # func_append may be replaced by extended shell implementation + +# func_append_quoted var value +# Quote VALUE and append to the end of shell variable VAR, separated +# by a space. +func_append_quoted () +{ + func_quote_for_eval "${2}" + eval "${1}=\$${1}\\ \$func_quote_for_eval_result" +} # func_append_quoted may be replaced by extended shell implementation + + +# func_arith arithmetic-term... +func_arith () +{ + func_arith_result=`expr "${@}"` +} # func_arith may be replaced by extended shell implementation + + +# func_len string +# STRING may not start with a hyphen. +func_len () +{ + func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` +} # func_len may be replaced by extended shell implementation + + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +} # func_lo2o may be replaced by extended shell implementation + + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +} # func_xform may be replaced by extended shell implementation + + +# func_fatal_configuration arg... +# Echo program name prefixed message to standard error, followed by +# a configuration failure hint, and exit. +func_fatal_configuration () +{ + func_error ${1+"$@"} + func_error "See the $PACKAGE documentation for more information." + func_fatal_error "Fatal configuration error." +} + + +# func_config +# Display the configuration for all the tags in this script. +func_config () +{ + re_begincf='^# ### BEGIN LIBTOOL' + re_endcf='^# ### END LIBTOOL' + + # Default configuration. + $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" + + # Now print the configurations for the tags. + for tagname in $taglist; do + $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" + done + + exit $? +} + +# func_features +# Display the features supported by this script. +func_features () +{ + echo "host: $host" + if test "$build_libtool_libs" = yes; then + echo "enable shared libraries" + else + echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + echo "enable static libraries" + else + echo "disable static libraries" + fi + + exit $? +} + +# func_enable_tag tagname +# Verify that TAGNAME is valid, and either flag an error and exit, or +# enable the TAGNAME tag. We also add TAGNAME to the global $taglist +# variable here. +func_enable_tag () +{ + # Global variable: + tagname="$1" + + re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" + re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" + sed_extractcf="/$re_begincf/,/$re_endcf/p" + + # Validate tagname. + case $tagname in + *[!-_A-Za-z0-9,/]*) + func_fatal_error "invalid tag name: $tagname" + ;; + esac + + # Don't test for the "default" C tag, as we know it's + # there but not specially marked. + case $tagname in + CC) ;; + *) + if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then + taglist="$taglist $tagname" + + # Evaluate the configuration. Be careful to quote the path + # and the sed script, to avoid splitting on whitespace, but + # also don't use non-portable quotes within backquotes within + # quotes we have to do it in 2 steps: + extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` + eval "$extractedcf" + else + func_error "ignoring unknown tag $tagname" + fi + ;; + esac +} + +# func_check_version_match +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () +{ + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + fi + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +# Shorthand for --mode=foo, only valid as the first argument +case $1 in +clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; +compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; +execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; +finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; +install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; +link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; +uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; +esac + + + +# Option defaults: +opt_debug=: +opt_dry_run=false +opt_config=false +opt_preserve_dup_deps=false +opt_features=false +opt_finish=false +opt_help=false +opt_help_all=false +opt_silent=: +opt_warning=: +opt_verbose=: +opt_silent=false +opt_verbose=false + + +# Parse options once, thoroughly. This comes as soon as possible in the +# script to make things like `--version' happen as quickly as we can. +{ + # this just eases exit handling + while test $# -gt 0; do + opt="$1" + shift + case $opt in + --debug|-x) opt_debug='set -x' + func_echo "enabling shell trace mode" + $opt_debug + ;; + --dry-run|--dryrun|-n) + opt_dry_run=: + ;; + --config) + opt_config=: +func_config + ;; + --dlopen|-dlopen) + optarg="$1" + opt_dlopen="${opt_dlopen+$opt_dlopen +}$optarg" + shift + ;; + --preserve-dup-deps) + opt_preserve_dup_deps=: + ;; + --features) + opt_features=: +func_features + ;; + --finish) + opt_finish=: +set dummy --mode finish ${1+"$@"}; shift + ;; + --help) + opt_help=: + ;; + --help-all) + opt_help_all=: +opt_help=': help-all' + ;; + --mode) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_mode="$optarg" +case $optarg in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $opt" + exit_cmd=exit + break + ;; +esac + shift + ;; + --no-silent|--no-quiet) + opt_silent=false +func_append preserve_args " $opt" + ;; + --no-warning|--no-warn) + opt_warning=false +func_append preserve_args " $opt" + ;; + --no-verbose) + opt_verbose=false +func_append preserve_args " $opt" + ;; + --silent|--quiet) + opt_silent=: +func_append preserve_args " $opt" + opt_verbose=false + ;; + --verbose|-v) + opt_verbose=: +func_append preserve_args " $opt" +opt_silent=false + ;; + --tag) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_tag="$optarg" +func_append preserve_args " $opt $optarg" +func_enable_tag "$optarg" + shift + ;; + + -\?|-h) func_usage ;; + --help) func_help ;; + --version) func_version ;; + + # Separate optargs to long options: + --*=*) + func_split_long_opt "$opt" + set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} + shift + ;; + + # Separate non-argument short options: + -\?*|-h*|-n*|-v*) + func_split_short_opt "$opt" + set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} + shift + ;; + + --) break ;; + -*) func_fatal_help "unrecognized option \`$opt'" ;; + *) set dummy "$opt" ${1+"$@"}; shift; break ;; + esac + done + + # Validate options: + + # save first non-option argument + if test "$#" -gt 0; then + nonopt="$opt" + shift + fi + + # preserve --debug + test "$opt_debug" = : || func_append preserve_args " --debug" + + case $host in + *cygwin* | *mingw* | *pw32* | *cegcc*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac + + $opt_help || { + # Sanity checks first: + func_check_version_match + + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + func_fatal_configuration "not configured to build any kind of library" + fi + + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test "$opt_mode" != execute; then + func_error "unrecognized option \`-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$progname --help --mode=$opt_mode' for more information." + } + + + # Bail if the options were screwed + $exit_cmd $EXIT_FAILURE +} + + + + +## ----------- ## +## Main. ## +## ----------- ## + +# func_lalib_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_lalib_p () +{ + test -f "$1" && + $SED -e 4q "$1" 2>/dev/null \ + | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 +} + +# func_lalib_unsafe_p file +# True iff FILE is a libtool `.la' library or `.lo' object file. +# This function implements the same check as func_lalib_p without +# resorting to external programs. To this end, it redirects stdin and +# closes it afterwards, without saving the original file descriptor. +# As a safety measure, use it only where a negative result would be +# fatal anyway. Works if `file' does not exist. +func_lalib_unsafe_p () +{ + lalib_p=no + if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then + for lalib_p_l in 1 2 3 4 + do + read lalib_p_line + case "$lalib_p_line" in + \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; + esac + done + exec 0<&5 5<&- + fi + test "$lalib_p" = yes +} + +# func_ltwrapper_script_p file +# True iff FILE is a libtool wrapper script +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_script_p () +{ + func_lalib_p "$1" +} + +# func_ltwrapper_executable_p file +# True iff FILE is a libtool wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_executable_p () +{ + func_ltwrapper_exec_suffix= + case $1 in + *.exe) ;; + *) func_ltwrapper_exec_suffix=.exe ;; + esac + $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 +} + +# func_ltwrapper_scriptname file +# Assumes file is an ltwrapper_executable +# uses $file to determine the appropriate filename for a +# temporary ltwrapper_script. +func_ltwrapper_scriptname () +{ + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" +} + +# func_ltwrapper_p file +# True iff FILE is a libtool wrapper script or wrapper executable +# This function is only a basic sanity check; it will hardly flush out +# determined imposters. +func_ltwrapper_p () +{ + func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" +} + + +# func_execute_cmds commands fail_cmd +# Execute tilde-delimited COMMANDS. +# If FAIL_CMD is given, eval that upon failure. +# FAIL_CMD may read-access the current command in variable CMD! +func_execute_cmds () +{ + $opt_debug + save_ifs=$IFS; IFS='~' + for cmd in $1; do + IFS=$save_ifs + eval cmd=\"$cmd\" + func_show_eval "$cmd" "${2-:}" + done + IFS=$save_ifs +} + + +# func_source file +# Source FILE, adding directory component if necessary. +# Note that it is not necessary on cygwin/mingw to append a dot to +# FILE even if both FILE and FILE.exe exist: automatic-append-.exe +# behavior happens only for exec(3), not for open(2)! Also, sourcing +# `FILE.' does not work on cygwin managed mounts. +func_source () +{ + $opt_debug + case $1 in + */* | *\\*) . "$1" ;; + *) . "./$1" ;; + esac +} + + +# func_resolve_sysroot PATH +# Replace a leading = in PATH with a sysroot. Store the result into +# func_resolve_sysroot_result +func_resolve_sysroot () +{ + func_resolve_sysroot_result=$1 + case $func_resolve_sysroot_result in + =*) + func_stripname '=' '' "$func_resolve_sysroot_result" + func_resolve_sysroot_result=$lt_sysroot$func_stripname_result + ;; + esac +} + +# func_replace_sysroot PATH +# If PATH begins with the sysroot, replace it with = and +# store the result into func_replace_sysroot_result. +func_replace_sysroot () +{ + case "$lt_sysroot:$1" in + ?*:"$lt_sysroot"*) + func_stripname "$lt_sysroot" '' "$1" + func_replace_sysroot_result="=$func_stripname_result" + ;; + *) + # Including no sysroot. + func_replace_sysroot_result=$1 + ;; + esac +} + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + $opt_debug + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + func_append_quoted CC_quoted "$arg" + done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` + case "$@ " in + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + func_echo "unable to infer tagged configuration" + func_fatal_error "specify a tag with \`--tag'" +# else +# func_verbose "using $tagname tagged configuration" + fi + ;; + esac + fi +} + + + +# func_write_libtool_object output_name pic_name nonpic_name +# Create a libtool object file (analogous to a ".la" file), +# but don't create it if we're doing a dry run. +func_write_libtool_object () +{ + write_libobj=${1} + if test "$build_libtool_libs" = yes; then + write_lobj=\'${2}\' + else + write_lobj=none + fi + + if test "$build_old_libs" = yes; then + write_oldobj=\'${3}\' + else + write_oldobj=none + fi + + $opt_dry_run || { + cat >${write_libobj}T </dev/null` + if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then + func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | + $SED -e "$lt_sed_naive_backslashify"` + else + func_convert_core_file_wine_to_w32_result= + fi + fi +} +# end: func_convert_core_file_wine_to_w32 + + +# func_convert_core_path_wine_to_w32 ARG +# Helper function used by path conversion functions when $build is *nix, and +# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly +# configured wine environment available, with the winepath program in $build's +# $PATH. Assumes ARG has no leading or trailing path separator characters. +# +# ARG is path to be converted from $build format to win32. +# Result is available in $func_convert_core_path_wine_to_w32_result. +# Unconvertible file (directory) names in ARG are skipped; if no directory names +# are convertible, then the result may be empty. +func_convert_core_path_wine_to_w32 () +{ + $opt_debug + # unfortunately, winepath doesn't convert paths, only file names + func_convert_core_path_wine_to_w32_result="" + if test -n "$1"; then + oldIFS=$IFS + IFS=: + for func_convert_core_path_wine_to_w32_f in $1; do + IFS=$oldIFS + func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" + if test -n "$func_convert_core_file_wine_to_w32_result" ; then + if test -z "$func_convert_core_path_wine_to_w32_result"; then + func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" + else + func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" + fi + fi + done + IFS=$oldIFS + fi +} +# end: func_convert_core_path_wine_to_w32 + + +# func_cygpath ARGS... +# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when +# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) +# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or +# (2), returns the Cygwin file name or path in func_cygpath_result (input +# file name or path is assumed to be in w32 format, as previously converted +# from $build's *nix or MSYS format). In case (3), returns the w32 file name +# or path in func_cygpath_result (input file name or path is assumed to be in +# Cygwin format). Returns an empty string on error. +# +# ARGS are passed to cygpath, with the last one being the file name or path to +# be converted. +# +# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH +# environment variable; do not put it in $PATH. +func_cygpath () +{ + $opt_debug + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then + func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` + if test "$?" -ne 0; then + # on failure, ensure result is empty + func_cygpath_result= + fi + else + func_cygpath_result= + func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" + fi +} +#end: func_cygpath + + +# func_convert_core_msys_to_w32 ARG +# Convert file name or path ARG from MSYS format to w32 format. Return +# result in func_convert_core_msys_to_w32_result. +func_convert_core_msys_to_w32 () +{ + $opt_debug + # awkward: cmd appends spaces to result + func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` +} +#end: func_convert_core_msys_to_w32 + + +# func_convert_file_check ARG1 ARG2 +# Verify that ARG1 (a file name in $build format) was converted to $host +# format in ARG2. Otherwise, emit an error message, but continue (resetting +# func_to_host_file_result to ARG1). +func_convert_file_check () +{ + $opt_debug + if test -z "$2" && test -n "$1" ; then + func_error "Could not determine host file name corresponding to" + func_error " \`$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_file_result="$1" + fi +} +# end func_convert_file_check + + +# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH +# Verify that FROM_PATH (a path in $build format) was converted to $host +# format in TO_PATH. Otherwise, emit an error message, but continue, resetting +# func_to_host_file_result to a simplistic fallback value (see below). +func_convert_path_check () +{ + $opt_debug + if test -z "$4" && test -n "$3"; then + func_error "Could not determine the host path corresponding to" + func_error " \`$3'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This is a deliberately simplistic "conversion" and + # should not be "improved". See libtool.info. + if test "x$1" != "x$2"; then + lt_replace_pathsep_chars="s|$1|$2|g" + func_to_host_path_result=`echo "$3" | + $SED -e "$lt_replace_pathsep_chars"` + else + func_to_host_path_result="$3" + fi + fi +} +# end func_convert_path_check + + +# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG +# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT +# and appending REPL if ORIG matches BACKPAT. +func_convert_path_front_back_pathsep () +{ + $opt_debug + case $4 in + $1 ) func_to_host_path_result="$3$func_to_host_path_result" + ;; + esac + case $4 in + $2 ) func_append func_to_host_path_result "$3" + ;; + esac +} +# end func_convert_path_front_back_pathsep + + +################################################## +# $build to $host FILE NAME CONVERSION FUNCTIONS # +################################################## +# invoked via `$to_host_file_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# Result will be available in $func_to_host_file_result. + + +# func_to_host_file ARG +# Converts the file name ARG from $build format to $host format. Return result +# in func_to_host_file_result. +func_to_host_file () +{ + $opt_debug + $to_host_file_cmd "$1" +} +# end func_to_host_file + + +# func_to_tool_file ARG LAZY +# converts the file name ARG from $build format to toolchain format. Return +# result in func_to_tool_file_result. If the conversion in use is listed +# in (the comma separated) LAZY, no conversion takes place. +func_to_tool_file () +{ + $opt_debug + case ,$2, in + *,"$to_tool_file_cmd",*) + func_to_tool_file_result=$1 + ;; + *) + $to_tool_file_cmd "$1" + func_to_tool_file_result=$func_to_host_file_result + ;; + esac +} +# end func_to_tool_file + + +# func_convert_file_noop ARG +# Copy ARG to func_to_host_file_result. +func_convert_file_noop () +{ + func_to_host_file_result="$1" +} +# end func_convert_file_noop + + +# func_convert_file_msys_to_w32 ARG +# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_file_result. +func_convert_file_msys_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_to_host_file_result="$func_convert_core_msys_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_w32 + + +# func_convert_file_cygwin_to_w32 ARG +# Convert file name ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_file_cygwin_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # because $build is cygwin, we call "the" cygpath in $PATH; no need to use + # LT_CYGPATH in this case. + func_to_host_file_result=`cygpath -m "$1"` + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_cygwin_to_w32 + + +# func_convert_file_nix_to_w32 ARG +# Convert file name ARG from *nix to w32 format. Requires a wine environment +# and a working winepath. Returns result in func_to_host_file_result. +func_convert_file_nix_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_file_wine_to_w32 "$1" + func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_w32 + + +# func_convert_file_msys_to_cygwin ARG +# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_file_msys_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_cygpath -u "$func_convert_core_msys_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_cygwin + + +# func_convert_file_nix_to_cygwin ARG +# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed +# in a wine environment, working winepath, and LT_CYGPATH set. Returns result +# in func_to_host_file_result. +func_convert_file_nix_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. + func_convert_core_file_wine_to_w32 "$1" + func_cygpath -u "$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_cygwin + + +############################################# +# $build to $host PATH CONVERSION FUNCTIONS # +############################################# +# invoked via `$to_host_path_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# The result will be available in $func_to_host_path_result. +# +# Path separators are also converted from $build format to $host format. If +# ARG begins or ends with a path separator character, it is preserved (but +# converted to $host format) on output. +# +# All path conversion functions are named using the following convention: +# file name conversion function : func_convert_file_X_to_Y () +# path conversion function : func_convert_path_X_to_Y () +# where, for any given $build/$host combination the 'X_to_Y' value is the +# same. If conversion functions are added for new $build/$host combinations, +# the two new functions must follow this pattern, or func_init_to_host_path_cmd +# will break. + + +# func_init_to_host_path_cmd +# Ensures that function "pointer" variable $to_host_path_cmd is set to the +# appropriate value, based on the value of $to_host_file_cmd. +to_host_path_cmd= +func_init_to_host_path_cmd () +{ + $opt_debug + if test -z "$to_host_path_cmd"; then + func_stripname 'func_convert_file_' '' "$to_host_file_cmd" + to_host_path_cmd="func_convert_path_${func_stripname_result}" + fi +} + + +# func_to_host_path ARG +# Converts the path ARG from $build format to $host format. Return result +# in func_to_host_path_result. +func_to_host_path () +{ + $opt_debug + func_init_to_host_path_cmd + $to_host_path_cmd "$1" +} +# end func_to_host_path + + +# func_convert_path_noop ARG +# Copy ARG to func_to_host_path_result. +func_convert_path_noop () +{ + func_to_host_path_result="$1" +} +# end func_convert_path_noop + + +# func_convert_path_msys_to_w32 ARG +# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_path_result. +func_convert_path_msys_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from ARG. MSYS + # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; + # and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_msys_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_msys_to_w32 + + +# func_convert_path_cygwin_to_w32 ARG +# Convert path ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_path_cygwin_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_cygwin_to_w32 + + +# func_convert_path_nix_to_w32 ARG +# Convert path ARG from *nix to w32 format. Requires a wine environment and +# a working winepath. Returns result in func_to_host_file_result. +func_convert_path_nix_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_nix_to_w32 + + +# func_convert_path_msys_to_cygwin ARG +# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_path_msys_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_msys_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_msys_to_cygwin + + +# func_convert_path_nix_to_cygwin ARG +# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a +# a wine environment, working winepath, and LT_CYGPATH set. Returns result in +# func_to_host_file_result. +func_convert_path_nix_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_nix_to_cygwin + + +# func_mode_compile arg... +func_mode_compile () +{ + $opt_debug + # Get the compilation command and the source file. + base_compile= + srcfile="$nonopt" # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + pie_flag= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg="$arg" + arg_mode=normal + ;; + + target ) + libobj="$arg" + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + test -n "$libobj" && \ + func_fatal_error "you cannot specify \`-o' more than once" + arg_mode=target + continue + ;; + + -pie | -fpie | -fPIE) + func_append pie_flag " $arg" + continue + ;; + + -shared | -static | -prefer-pic | -prefer-non-pic) + func_append later " $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + lastarg= + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" + func_append_quoted lastarg "$arg" + done + IFS="$save_ifs" + func_stripname ' ' '' "$lastarg" + lastarg=$func_stripname_result + + # Add the arguments to base_compile. + func_append base_compile " $lastarg" + continue + ;; + + *) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg="$srcfile" + srcfile="$arg" + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + func_append_quoted base_compile "$lastarg" + done # for arg + + case $arg_mode in + arg) + func_fatal_error "you must specify an argument for -Xcompile" + ;; + target) + func_fatal_error "you must specify a target with \`-o'" + ;; + *) + # Get the name of the library object. + test -z "$libobj" && { + func_basename "$srcfile" + libobj="$func_basename_result" + } + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + case $libobj in + *.[cCFSifmso] | \ + *.ada | *.adb | *.ads | *.asm | \ + *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) + func_xform "$libobj" + libobj=$func_xform_result + ;; + esac + + case $libobj in + *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; + *) + func_fatal_error "cannot determine name of library object from \`$libobj'" + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + continue + ;; + + -static) + build_libtool_libs=no + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + func_quote_for_eval "$libobj" + test "X$libobj" != "X$func_quote_for_eval_result" \ + && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && func_warning "libobj name \`$libobj' may not contain shell special characters." + func_dirname_and_basename "$obj" "/" "" + objname="$func_basename_result" + xdir="$func_dirname_result" + lobj=${xdir}$objdir/$objname + + test -z "$base_compile" && \ + func_fatal_help "you must specify a compilation command" + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2* | cegcc*) + pic_mode=default + ;; + esac + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + $ECHO "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + func_append removelist " $output_obj" + $ECHO "$srcfile" > "$lockfile" + fi + + $opt_dry_run || $RM $removelist + func_append removelist " $lockfile" + trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 + + func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 + srcfile=$func_to_tool_file_result + func_quote_for_eval "$srcfile" + qsrcfile=$func_quote_for_eval_result + + # Only build a PIC object if we are building libtool libraries. + if test "$build_libtool_libs" = yes; then + # Without this assignment, base_compile gets emptied. + fbsd_hideous_sh_bug=$base_compile + + if test "$pic_mode" != no; then + command="$base_compile $qsrcfile $pic_flag" + else + # Don't build PIC code + command="$base_compile $qsrcfile" + fi + + func_mkdir_p "$xdir$objdir" + + if test -z "$output_obj"; then + # Place PIC objects in $objdir + func_append command " -o $lobj" + fi + + func_show_eval_locale "$command" \ + 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + func_show_eval '$MV "$output_obj" "$lobj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + + # Allow error messages only from the first compilation. + if test "$suppress_opt" = yes; then + suppress_output=' >/dev/null 2>&1' + fi + fi + + # Only build a position-dependent object if we build old libraries. + if test "$build_old_libs" = yes; then + if test "$pic_mode" != yes; then + # Don't build PIC code + command="$base_compile $qsrcfile$pie_flag" + else + command="$base_compile $qsrcfile $pic_flag" + fi + if test "$compiler_c_o" = yes; then + func_append command " -o $obj" + fi + + # Suppress compiler output if we already did a PIC compilation. + func_append command "$suppress_output" + func_show_eval_locale "$command" \ + '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' + + if test "$need_locks" = warn && + test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then + $ECHO "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $opt_dry_run || $RM $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + func_show_eval '$MV "$output_obj" "$obj"' \ + 'error=$?; $opt_dry_run || $RM $removelist; exit $error' + fi + fi + + $opt_dry_run || { + func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" + + # Unlock the critical section if it was locked + if test "$need_locks" != no; then + removelist=$lockfile + $RM "$lockfile" + fi + } + + exit $EXIT_SUCCESS +} + +$opt_help || { + test "$opt_mode" = compile && func_mode_compile ${1+"$@"} +} + +func_mode_help () +{ + # We need to display help for each of the modes. + case $opt_mode in + "") + # Generic help is extracted from the usage comments + # at the start of this file. + func_help + ;; + + clean) + $ECHO \ +"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + + compile) + $ECHO \ +"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -no-suppress do not suppress compiler output for multiple passes + -prefer-pic try to build PIC objects only + -prefer-non-pic try to build non-PIC objects only + -shared do not build a \`.o' file suitable for static linking + -static only build a \`.o' file suitable for static linking + -Wc,FLAG pass FLAG directly to the compiler + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + + execute) + $ECHO \ +"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + + finish) + $ECHO \ +"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + + install) + $ECHO \ +"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The following components of INSTALL-COMMAND are treated specially: + + -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + + link) + $ECHO \ +"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -bindir BINDIR specify path to binaries directory (for systems where + libraries must be found in the PATH setting at runtime) + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -shared only do dynamic linking of libtool libraries + -shrext SUFFIX override the standard shared library file extension + -static do not do any dynamic linking of uninstalled libtool libraries + -static-libtool-libs + do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + -weak LIBNAME declare that the target provides the LIBNAME interface + -Wc,FLAG + -Xcompiler FLAG pass linker-specific FLAG directly to the compiler + -Wl,FLAG + -Xlinker FLAG pass linker-specific FLAG directly to the linker + -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + + uninstall) + $ECHO \ +"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + + *) + func_fatal_help "invalid operation mode \`$opt_mode'" + ;; + esac + + echo + $ECHO "Try \`$progname --help' for more information about other modes." +} + +# Now that we've collected a possible --mode arg, show help if necessary +if $opt_help; then + if test "$opt_help" = :; then + func_mode_help + else + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + func_mode_help + done + } | sed -n '1p; 2,$s/^Usage:/ or: /p' + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + echo + func_mode_help + done + } | + sed '1d + /^When reporting/,/^Report/{ + H + d + } + $x + /information about other modes/d + /more detailed .*MODE/d + s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' + fi + exit $? +fi + + +# func_mode_execute arg... +func_mode_execute () +{ + $opt_debug + # The first argument is the command name. + cmd="$nonopt" + test -z "$cmd" && \ + func_fatal_help "you must specify a COMMAND" + + # Handle -dlopen flags immediately. + for file in $opt_dlopen; do + test -f "$file" \ + || func_fatal_help "\`$file' is not a file" + + dir= + case $file in + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$lib' is not a valid libtool archive" + + # Read the libtool library. + dlname= + library_names= + func_source "$file" + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && \ + func_warning "\`$file' was not linked with \`-export-dynamic'" + continue + fi + + func_dirname "$file" "" "." + dir="$func_dirname_result" + + if test -f "$dir/$objdir/$dlname"; then + func_append dir "/$objdir" + else + if test ! -f "$dir/$dlname"; then + func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" + fi + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + func_dirname "$file" "" "." + dir="$func_dirname_result" + ;; + + *) + func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -* | *.la | *.lo ) ;; + *) + # Do a test to see if this is really a libtool program. + if func_ltwrapper_script_p "$file"; then + func_source "$file" + # Transform arg to wrapped name. + file="$progdir/$program" + elif func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + func_source "$func_ltwrapper_scriptname_result" + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + func_append_quoted args "$file" + done + + if test "X$opt_dry_run" = Xfalse; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES + do + eval "if test \"\${save_$lt_var+set}\" = set; then + $lt_var=\$save_$lt_var; export $lt_var + else + $lt_unset $lt_var + fi" + done + + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" + echo "export $shlibpath_var" + fi + $ECHO "$cmd$args" + exit $EXIT_SUCCESS + fi +} + +test "$opt_mode" = execute && func_mode_execute ${1+"$@"} + + +# func_mode_finish arg... +func_mode_finish () +{ + $opt_debug + libs= + libdirs= + admincmds= + + for opt in "$nonopt" ${1+"$@"} + do + if test -d "$opt"; then + func_append libdirs " $opt" + + elif test -f "$opt"; then + if func_lalib_unsafe_p "$opt"; then + func_append libs " $opt" + else + func_warning "\`$opt' is not a valid libtool archive" + fi + + else + func_fatal_error "invalid argument \`$opt'" + fi + done + + if test -n "$libs"; then + if test -n "$lt_sysroot"; then + sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` + sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" + else + sysroot_cmd= + fi + + # Remove sysroot references + if $opt_dry_run; then + for lib in $libs; do + echo "removing references to $lt_sysroot and \`=' prefixes from $lib" + done + else + tmpdir=`func_mktempdir` + for lib in $libs; do + sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + > $tmpdir/tmp-la + mv -f $tmpdir/tmp-la $lib + done + ${RM}r "$tmpdir" + fi + fi + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + func_execute_cmds "$finish_cmds" 'admincmds="$admincmds +'"$cmd"'"' + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $opt_dry_run || eval "$cmds" || func_append admincmds " + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + $opt_silent && exit $EXIT_SUCCESS + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + echo "----------------------------------------------------------------------" + echo "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + echo + echo "If you ever happen to want to link against installed libraries" + echo "in a given directory, LIBDIR, you must either use libtool, and" + echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + echo " during execution" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the \`$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $ECHO " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + echo + + echo "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" + echo "pages." + ;; + *) + echo "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + echo "----------------------------------------------------------------------" + fi + exit $EXIT_SUCCESS +} + +test "$opt_mode" = finish && func_mode_finish ${1+"$@"} + + +# func_mode_install arg... +func_mode_install () +{ + $opt_debug + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + case $nonopt in *shtool*) :;; *) false;; esac; then + # Aesthetically quote it. + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " + arg=$1 + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + func_quote_for_eval "$arg" + func_append install_prog "$func_quote_for_eval_result" + install_shared_prog=$install_prog + case " $install_prog " in + *[\\\ /]cp\ *) install_cp=: ;; + *) install_cp=false ;; + esac + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + no_mode=: + for arg + do + arg2= + if test -n "$dest"; then + func_append files " $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) + if $install_cp; then :; else + prev=$arg + fi + ;; + -g | -m | -o) + prev=$arg + ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + if test "x$prev" = x-m && test -n "$install_override_mode"; then + arg2=$install_override_mode + no_mode=false + fi + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + func_quote_for_eval "$arg" + func_append install_prog " $func_quote_for_eval_result" + if test -n "$arg2"; then + func_quote_for_eval "$arg2" + fi + func_append install_shared_prog " $func_quote_for_eval_result" + done + + test -z "$install_prog" && \ + func_fatal_help "you must specify an install program" + + test -n "$prev" && \ + func_fatal_help "the \`$prev' option requires an argument" + + if test -n "$install_override_mode" && $no_mode; then + if $install_cp; then :; else + func_quote_for_eval "$install_override_mode" + func_append install_shared_prog " -m $func_quote_for_eval_result" + fi + fi + + if test -z "$files"; then + if test -z "$dest"; then + func_fatal_help "no file or destination specified" + else + func_fatal_help "you must specify a destination" + fi + fi + + # Strip any trailing slash from the destination. + func_stripname '' '/' "$dest" + dest=$func_stripname_result + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + func_dirname_and_basename "$dest" "" "." + destdir="$func_dirname_result" + destname="$func_basename_result" + + # Not a directory, so check to see that there is only one file specified. + set dummy $files; shift + test "$#" -gt 1 && \ + func_fatal_help "\`$dest' is not a directory" + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + func_fatal_help "\`$destdir' must be an absolute directory name" + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + func_append staticlibs " $file" + ;; + + *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$file" \ + || func_fatal_help "\`$file' is not a valid libtool archive" + + library_names= + old_library= + relink_command= + func_source "$file" + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) func_append current_libdirs " $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) func_append future_libdirs " $libdir" ;; + esac + fi + + func_dirname "$file" "/" "" + dir="$func_dirname_result" + func_append dir "$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + test "$inst_prefix_dir" = "$destdir" && \ + func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + fi + + func_warning "relinking \`$file'" + func_show_eval "$relink_command" \ + 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' + fi + + # See the names of the shared library. + set dummy $library_names; shift + if test -n "$1"; then + realname="$1" + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ + 'exit $?' + tstripme="$stripme" + case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + case $realname in + *.dll.a) + tstripme="" + ;; + esac + ;; + esac + if test -n "$tstripme" && test -n "$striplib"; then + func_show_eval "$striplib $destdir/$realname" 'exit $?' + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + test "$linkname" != "$realname" \ + && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + func_execute_cmds "$postinstall_cmds" 'exit $?' + fi + + # Install the pseudo-library for information purposes. + func_basename "$file" + name="$func_basename_result" + instname="$dir/$name"i + func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' + + # Maybe install the static library, too. + test -n "$old_library" && func_append staticlibs " $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + func_lo2o "$destfile" + staticdest=$func_lo2o_result + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + func_fatal_help "cannot copy a libtool object to \`$destfile'" + ;; + esac + + # Install the libtool object if requested. + test -n "$destfile" && \ + func_show_eval "$install_prog $file $destfile" 'exit $?' + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + func_lo2o "$file" + staticobj=$func_lo2o_result + func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + func_basename "$file" + destfile="$func_basename_result" + destfile="$destdir/$destfile" + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + func_stripname '' '.exe' "$file" + file=$func_stripname_result + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin* | *mingw*) + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + wrapper=$func_ltwrapper_scriptname_result + else + func_stripname '' '.exe' "$file" + wrapper=$func_stripname_result + fi + ;; + *) + wrapper=$file + ;; + esac + if func_ltwrapper_script_p "$wrapper"; then + notinst_deplibs= + relink_command= + + func_source "$wrapper" + + # Check the variables that should have been set. + test -z "$generated_by_libtool_version" && \ + func_fatal_error "invalid libtool wrapper script \`$wrapper'" + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + func_source "$lib" + fi + libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + func_warning "\`$lib' has not been installed in \`$libdir'" + finalize=no + fi + done + + relink_command= + func_source "$wrapper" + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + $opt_dry_run || { + if test "$finalize" = yes; then + tmpdir=`func_mktempdir` + func_basename "$file$stripped_ext" + file="$func_basename_result" + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` + + $opt_silent || { + func_quote_for_expand "$relink_command" + eval "func_echo $func_quote_for_expand_result" + } + if eval "$relink_command"; then : + else + func_error "error: relink \`$file' with the above command before installing it" + $opt_dry_run || ${RM}r "$tmpdir" + continue + fi + file="$outputname" + else + func_warning "cannot relink \`$file'" + fi + } + else + # Install the binary that we compiled earlier. + file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + func_stripname '' '.exe' "$destfile" + destfile=$func_stripname_result + ;; + esac + ;; + esac + func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' + $opt_dry_run || if test -n "$outputname"; then + ${RM}r "$tmpdir" + fi + ;; + esac + done + + for file in $staticlibs; do + func_basename "$file" + name="$func_basename_result" + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result + + func_show_eval "$install_prog \$file \$oldlib" 'exit $?' + + if test -n "$stripme" && test -n "$old_striplib"; then + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' + fi + + # Do each command in the postinstall commands. + func_execute_cmds "$old_postinstall_cmds" 'exit $?' + done + + test -n "$future_libdirs" && \ + func_warning "remember to run \`$progname --finish$future_libdirs'" + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + $opt_dry_run && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi +} + +test "$opt_mode" = install && func_mode_install ${1+"$@"} + + +# func_generate_dlsyms outputname originator pic_p +# Extract symbols from dlprefiles and create ${outputname}S.o with +# a dlpreopen symbol table. +func_generate_dlsyms () +{ + $opt_debug + my_outputname="$1" + my_originator="$2" + my_pic_p="${3-no}" + my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` + my_dlsyms= + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + my_dlsyms="${my_outputname}S.c" + else + func_error "not configured to extract global symbols from dlpreopened files" + fi + fi + + if test -n "$my_dlsyms"; then + case $my_dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${my_outputname}.nm" + + func_show_eval "$RM $nlist ${nlist}S ${nlist}T" + + # Parse the name list into a source file. + func_verbose "creating $output_objdir/$my_dlsyms" + + $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ +/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ +/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" +#endif + +/* 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 con'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 + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + func_verbose "generating symbol list for \`$output'" + + $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` + for progfile in $progfiles; do + func_to_tool_file "$progfile" func_convert_file_msys_to_w32 + func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" + $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $opt_dry_run || { + eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + if test -n "$export_symbols_regex"; then + $opt_dry_run || { + eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + } + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $opt_dry_run || { + $RM $export_symbols + eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + } + else + $opt_dry_run || { + eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + eval '$MV "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* | *cegcc* ) + eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + } + fi + fi + + for dlprefile in $dlprefiles; do + func_verbose "extracting global C symbols from \`$dlprefile'" + func_basename "$dlprefile" + name="$func_basename_result" + case $host in + *cygwin* | *mingw* | *cegcc* ) + # if an import library, we need to obtain dlname + if func_win32_import_lib_p "$dlprefile"; then + func_tr_sh "$dlprefile" + eval "curr_lafile=\$libfile_$func_tr_sh_result" + dlprefile_dlbasename="" + if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then + # Use subshell, to avoid clobbering current variable values + dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` + if test -n "$dlprefile_dlname" ; then + func_basename "$dlprefile_dlname" + dlprefile_dlbasename="$func_basename_result" + else + # no lafile. user explicitly requested -dlpreopen . + $sharedlib_from_linklib_cmd "$dlprefile" + dlprefile_dlbasename=$sharedlib_from_linklib_result + fi + fi + $opt_dry_run || { + if test -n "$dlprefile_dlbasename" ; then + eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' + else + func_warning "Could not compute DLL name from $name" + eval '$ECHO ": $name " >> "$nlist"' + fi + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | + $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" + } + else # not an import lib + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + fi + ;; + *) + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + ;; + esac + done + + $opt_dry_run || { + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $MV "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if $GREP -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + $GREP -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' + else + echo '/* NONE */' >> "$output_objdir/$my_dlsyms" + fi + + echo >> "$output_objdir/$my_dlsyms" "\ + +/* The mapping between symbol names and symbols. */ +typedef struct { + const char *name; + void *address; +} lt_dlsymlist; +extern LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[]; +LT_DLSYM_CONST lt_dlsymlist +lt_${my_prefix}_LTX_preloaded_symbols[] = +{\ + { \"$my_originator\", (void *) 0 }," + + case $need_lib_prefix in + no) + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + *) + eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" + ;; + esac + echo >> "$output_objdir/$my_dlsyms" "\ + {0, (void *) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_${my_prefix}_LTX_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + } # !$opt_dry_run + + pic_flag_for_symtable= + case "$compile_command " in + *" -static "*) ;; + *) + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; + *-*-hpux*) + pic_flag_for_symtable=" $pic_flag" ;; + *) + if test "X$my_pic_p" != Xno; then + pic_flag_for_symtable=" $pic_flag" + fi + ;; + esac + ;; + esac + symtab_cflags= + for arg in $LTCFLAGS; do + case $arg in + -pie | -fpie | -fPIE) ;; + *) func_append symtab_cflags " $arg" ;; + esac + done + + # Now compile the dynamic symbol file. + func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' + + # Clean up the generated files. + func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' + + # Transform the symbol file into the correct name. + symfileobj="$output_objdir/${my_outputname}S.$objext" + case $host in + *cygwin* | *mingw* | *cegcc* ) + if test -f "$output_objdir/$my_outputname.def"; then + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + else + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + fi + ;; + *) + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` + ;; + esac + ;; + *) + func_fatal_error "unknown suffix for \`$my_dlsyms'" + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` + fi +} + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +# Despite the name, also deal with 64 bit binaries. +func_win32_libid () +{ + $opt_debug + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | + $SED -n -e ' + 1,100{ + / I /{ + s,.*,import, + p + q + } + }'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $ECHO "$win32_libid_type" +} + +# func_cygming_dll_for_implib ARG +# +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib () +{ + $opt_debug + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` +} + +# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs +# +# The is the core of a fallback implementation of a +# platform-specific function to extract the name of the +# DLL associated with the specified import library LIBNAME. +# +# SECTION_NAME is either .idata$6 or .idata$7, depending +# on the platform and compiler that created the implib. +# +# Echos the name of the DLL associated with the +# specified import library. +func_cygming_dll_for_implib_fallback_core () +{ + $opt_debug + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` + $OBJDUMP -s --section "$1" "$2" 2>/dev/null | + $SED '/^Contents of section '"$match_literal"':/{ + # Place marker at beginning of archive member dllname section + s/.*/====MARK====/ + p + d + } + # These lines can sometimes be longer than 43 characters, but + # are always uninteresting + /:[ ]*file format pe[i]\{,1\}-/d + /^In archive [^:]*:/d + # Ensure marker is printed + /^====MARK====/p + # Remove all lines with less than 43 characters + /^.\{43\}/!d + # From remaining lines, remove first 43 characters + s/^.\{43\}//' | + $SED -n ' + # Join marker and all lines until next marker into a single line + /^====MARK====/ b para + H + $ b para + b + :para + x + s/\n//g + # Remove the marker + s/^====MARK====// + # Remove trailing dots and whitespace + s/[\. \t]*$// + # Print + /./p' | + # we now have a list, one entry per line, of the stringified + # contents of the appropriate section of all members of the + # archive which possess that section. Heuristic: eliminate + # all those which have a first or second character that is + # a '.' (that is, objdump's representation of an unprintable + # character.) This should work for all archives with less than + # 0x302f exports -- but will fail for DLLs whose name actually + # begins with a literal '.' or a single character followed by + # a '.'. + # + # Of those that remain, print the first one. + $SED -e '/^\./d;/^.\./d;q' +} + +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + +# func_cygming_dll_for_implib_fallback ARG +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# +# This fallback implementation is for use when $DLLTOOL +# does not support the --identify-strict option. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib_fallback () +{ + $opt_debug + if func_cygming_gnu_implib_p "$1" ; then + # binutils import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` + elif func_cygming_ms_implib_p "$1" ; then + # ms-generated import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` + else + # unknown + sharedlib_from_linklib_result="" + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + $opt_debug + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + if test "$lock_old_archive_extraction" = yes; then + lockfile=$f_ex_an_ar_oldlib.lock + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + fi + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ + 'stat=$?; rm -f "$lockfile"; exit $stat' + if test "$lock_old_archive_extraction" = yes; then + $opt_dry_run || rm -f "$lockfile" + fi + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" + fi +} + + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + $opt_debug + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + func_basename "$my_xlib" + my_xlib="$func_basename_result" + my_xlib_u=$my_xlib + while :; do + case " $extracted_archives " in + *" $my_xlib_u "*) + func_arith $extracted_serial + 1 + extracted_serial=$func_arith_result + my_xlib_u=lt$extracted_serial-$my_xlib ;; + *) break ;; + esac + done + extracted_archives="$extracted_archives $my_xlib_u" + my_xdir="$my_gentop/$my_xlib_u" + + func_mkdir_p "$my_xdir" + + case $host in + *-darwin*) + func_verbose "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + $opt_dry_run || { + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`basename "$darwin_archive"` + darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` + if test -n "$darwin_arches"; then + darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we've a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` + $LIPO -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + $RM -rf unfat-$$ + cd "$darwin_orig_dir" + else + cd $darwin_orig_dir + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + } # !$opt_dry_run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` + done + + func_extract_archives_result="$my_oldobjs" +} + + +# func_emit_wrapper [arg=no] +# +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory in which it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () +{ + func_emit_wrapper_arg1=${1-no} + + $ECHO "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='$sed_quote_subst' + +# Be Bourne compatible +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs 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 +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# 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 + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variables: + generated_by_libtool_version='$macro_version' + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$ECHO are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + file=\"\$0\"" + + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + $ECHO "\ + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + ECHO=\"$qECHO\" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ which is used only on +# windows platforms, and (c) all begin with the string "--lt-" +# (application programs are unlikely to have options which match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's $0 value, followed by "$@". +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=\$0 + shift + for lt_opt + do + case \"\$lt_opt\" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` + test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. + lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` + cat \"\$lt_dump_D/\$lt_dump_F\" + exit 0 + ;; + --lt-*) + \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n \"\$lt_option_debug\"; then + echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" + lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from \$@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case \" \$* \" in + *\\ --lt-*) + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done ;; + esac + func_exec_program_core \${1+\"\$@\"} +} + + # Parse options + func_parse_lt_options \"\$0\" \${1+\"\$@\"} + + # Find the directory that this script lives in. + thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 + if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then + # special case for '.' + if test \"\$thisdir\" = \".\"; then + thisdir=\`pwd\` + fi + # remove .libs from thisdir + case \"\$thisdir\" in + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; + $objdir ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $ECHO "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $MKDIR \"\$progdir\" + else + $RM \"\$progdir/\$file\" + fi" + + $ECHO "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $ECHO \"\$relink_command_output\" >&2 + $RM \"\$progdir/\$file\" + exit 1 + fi + fi + + $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $RM \"\$progdir/\$program\"; + $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $RM \"\$progdir/\$file\" + fi" + else + $ECHO "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $ECHO "\ + + if test -f \"\$progdir/\$program\"; then" + + # fixup the dll searchpath if we need to. + # + # Fix the DLL searchpath if we need to. Do this before prepending + # to shlibpath, because on Windows, both are PATH and uninstalled + # libraries must come first. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $ECHO "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` + + export $shlibpath_var +" + fi + + $ECHO "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. + func_exec_program \${1+\"\$@\"} + fi + else + # The program doesn't exist. + \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 + \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 + fi +fi\ +" +} + + +# func_emit_cwrapperexe_src +# emit the source code for a wrapper executable on stdout +# Must ONLY be called from within func_mode_link because +# it depends on a number of variable set therein. +func_emit_cwrapperexe_src () +{ + cat < +#include +#ifdef _MSC_VER +# include +# include +# include +#else +# include +# include +# ifdef __CYGWIN__ +# include +# endif +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +/* declarations of non-ANSI functions */ +#if defined(__MINGW32__) +# ifdef __STRICT_ANSI__ +int _putenv (const char *); +# endif +#elif defined(__CYGWIN__) +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +/* #elif defined (other platforms) ... */ +#endif + +/* portability defines, excluding path handling macros */ +#if defined(_MSC_VER) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +# define S_IXUSR _S_IEXEC +# ifndef _INTPTR_T_DEFINED +# define _INTPTR_T_DEFINED +# define intptr_t int +# endif +#elif defined(__MINGW32__) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +#elif defined(__CYGWIN__) +# define HAVE_SETENV +# define FOPEN_WB "wb" +/* #elif defined (other platforms) ... */ +#endif + +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef S_IXOTH +# define S_IXOTH 0 +#endif +#ifndef S_IXGRP +# define S_IXGRP 0 +#endif + +/* path handling portability macros */ +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# define FOPEN_WB "wb" +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#ifndef FOPEN_WB +# define FOPEN_WB "w" +#endif +#ifndef _O_BINARY +# define _O_BINARY 0 +#endif + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +#if defined(LT_DEBUGWRAPPER) +static int lt_debug = 1; +#else +static int lt_debug = 0; +#endif + +const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ + +void *xmalloc (size_t num); +char *xstrdup (const char *string); +const char *base_name (const char *name); +char *find_executable (const char *wrapper); +char *chase_symlinks (const char *pathspec); +int make_executable (const char *path); +int check_executable (const char *path); +char *strendzap (char *str, const char *pat); +void lt_debugprintf (const char *file, int line, const char *fmt, ...); +void lt_fatal (const char *file, int line, const char *message, ...); +static const char *nonnull (const char *s); +static const char *nonempty (const char *s); +void lt_setenv (const char *name, const char *value); +char *lt_extend_str (const char *orig_value, const char *add, int to_end); +void lt_update_exe_path (const char *name, const char *value); +void lt_update_lib_path (const char *name, const char *value); +char **prepare_spawn (char **argv); +void lt_dump_script (FILE *f); +EOF + + cat <= 0) + && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) + return 1; + else + return 0; +} + +int +make_executable (const char *path) +{ + int rval = 0; + struct stat st; + + lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", + nonempty (path)); + if ((!path) || (!*path)) + return 0; + + if (stat (path, &st) >= 0) + { + rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); + } + return rval; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise + Does not chase symlinks, even on platforms that support them. +*/ +char * +find_executable (const char *wrapper) +{ + int has_slash = 0; + const char *p; + const char *p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char *concat_name; + + lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", + nonempty (wrapper)); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char *path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char *q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR (*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = + XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = + XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); + tmp_len = strlen (tmp); + concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable (concat_name)) + return concat_name; + XFREE (concat_name); + return NULL; +} + +char * +chase_symlinks (const char *pathspec) +{ +#ifndef S_ISLNK + return xstrdup (pathspec); +#else + char buf[LT_PATHMAX]; + struct stat s; + char *tmp_pathspec = xstrdup (pathspec); + char *p; + int has_symlinks = 0; + while (strlen (tmp_pathspec) && !has_symlinks) + { + lt_debugprintf (__FILE__, __LINE__, + "checking path component for symlinks: %s\n", + tmp_pathspec); + if (lstat (tmp_pathspec, &s) == 0) + { + if (S_ISLNK (s.st_mode) != 0) + { + has_symlinks = 1; + break; + } + + /* search backwards for last DIR_SEPARATOR */ + p = tmp_pathspec + strlen (tmp_pathspec) - 1; + while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + p--; + if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) + { + /* no more DIR_SEPARATORS left */ + break; + } + *p = '\0'; + } + else + { + lt_fatal (__FILE__, __LINE__, + "error accessing file \"%s\": %s", + tmp_pathspec, nonnull (strerror (errno))); + } + } + XFREE (tmp_pathspec); + + if (!has_symlinks) + { + return xstrdup (pathspec); + } + + tmp_pathspec = realpath (pathspec, buf); + if (tmp_pathspec == 0) + { + lt_fatal (__FILE__, __LINE__, + "could not follow symlinks for %s", pathspec); + } + return xstrdup (tmp_pathspec); +#endif +} + +char * +strendzap (char *str, const char *pat) +{ + size_t len, patlen; + + assert (str != NULL); + assert (pat != NULL); + + len = strlen (str); + patlen = strlen (pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp (str, pat) == 0) + *str = '\0'; + } + return str; +} + +void +lt_debugprintf (const char *file, int line, const char *fmt, ...) +{ + va_list args; + if (lt_debug) + { + (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); + } +} + +static void +lt_error_core (int exit_status, const char *file, + int line, const char *mode, + const char *message, va_list ap) +{ + fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *file, int line, const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); + va_end (ap); +} + +static const char * +nonnull (const char *s) +{ + return s ? s : "(null)"; +} + +static const char * +nonempty (const char *s) +{ + return (s && !*s) ? "(empty)" : nonnull (s); +} + +void +lt_setenv (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_setenv) setting '%s' to '%s'\n", + nonnull (name), nonnull (value)); + { +#ifdef HAVE_SETENV + /* always make a copy, for consistency with !HAVE_SETENV */ + char *str = xstrdup (value); + setenv (name, str, 1); +#else + int len = strlen (name) + 1 + strlen (value) + 1; + char *str = XMALLOC (char, len); + sprintf (str, "%s=%s", name, value); + if (putenv (str) != EXIT_SUCCESS) + { + XFREE (str); + } +#endif + } +} + +char * +lt_extend_str (const char *orig_value, const char *add, int to_end) +{ + char *new_value; + if (orig_value && *orig_value) + { + int orig_value_len = strlen (orig_value); + int add_len = strlen (add); + new_value = XMALLOC (char, add_len + orig_value_len + 1); + if (to_end) + { + strcpy (new_value, orig_value); + strcpy (new_value + orig_value_len, add); + } + else + { + strcpy (new_value, add); + strcpy (new_value + add_len, orig_value); + } + } + else + { + new_value = xstrdup (add); + } + return new_value; +} + +void +lt_update_exe_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + /* some systems can't cope with a ':'-terminated path #' */ + int len = strlen (new_value); + while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) + { + new_value[len-1] = '\0'; + } + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +void +lt_update_lib_path (const char *name, const char *value) +{ + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); + + if (name && *name && value && *value) + { + char *new_value = lt_extend_str (getenv (name), value, 0); + lt_setenv (name, new_value); + XFREE (new_value); + } +} + +EOF + case $host_os in + mingw*) + cat <<"EOF" + +/* Prepares an argument vector before calling spawn(). + Note that spawn() does not by itself call the command interpreter + (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : + ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&v); + v.dwPlatformId == VER_PLATFORM_WIN32_NT; + }) ? "cmd.exe" : "command.com"). + Instead it simply concatenates the arguments, separated by ' ', and calls + CreateProcess(). We must quote the arguments since Win32 CreateProcess() + interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a + special way: + - Space and tab are interpreted as delimiters. They are not treated as + delimiters if they are surrounded by double quotes: "...". + - Unescaped double quotes are removed from the input. Their only effect is + that within double quotes, space and tab are treated like normal + characters. + - Backslashes not followed by double quotes are not special. + - But 2*n+1 backslashes followed by a double quote become + n backslashes followed by a double quote (n >= 0): + \" -> " + \\\" -> \" + \\\\\" -> \\" + */ +#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +char ** +prepare_spawn (char **argv) +{ + size_t argc; + char **new_argv; + size_t i; + + /* Count number of arguments. */ + for (argc = 0; argv[argc] != NULL; argc++) + ; + + /* Allocate new argument vector. */ + new_argv = XMALLOC (char *, argc + 1); + + /* Put quoted arguments into the new argument vector. */ + for (i = 0; i < argc; i++) + { + const char *string = argv[i]; + + if (string[0] == '\0') + new_argv[i] = xstrdup ("\"\""); + else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) + { + int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); + size_t length; + unsigned int backslashes; + const char *s; + char *quoted_string; + char *p; + + length = 0; + backslashes = 0; + if (quote_around) + length++; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + length += backslashes + 1; + length++; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + length += backslashes + 1; + + quoted_string = XMALLOC (char, length + 1); + + p = quoted_string; + backslashes = 0; + if (quote_around) + *p++ = '"'; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + { + unsigned int j; + for (j = backslashes + 1; j > 0; j--) + *p++ = '\\'; + } + *p++ = c; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + { + unsigned int j; + for (j = backslashes; j > 0; j--) + *p++ = '\\'; + *p++ = '"'; + } + *p = '\0'; + + new_argv[i] = quoted_string; + } + else + new_argv[i] = (char *) string; + } + new_argv[argc] = NULL; + + return new_argv; +} +EOF + ;; + esac + + cat <<"EOF" +void lt_dump_script (FILE* f) +{ +EOF + func_emit_wrapper yes | + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' + cat <<"EOF" +} +EOF +} +# end: func_emit_cwrapperexe_src + +# func_win32_import_lib_p ARG +# True if ARG is an import lib, as indicated by $file_magic_cmd +func_win32_import_lib_p () +{ + $opt_debug + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in + *import*) : ;; + *) false ;; + esac +} + +# func_mode_link arg... +func_mode_link () +{ + $opt_debug + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + # It is impossible to link a dll without this setting, and + # we shouldn't force the makefile maintainer to figure out + # which system we are compiling for in order to pass an extra + # flag for every libtool invocation. + # allow_undefined=no + + # FIXME: Unfortunately, there are problems with the above when trying + # to make a dll which has undefined symbols, in which case not + # even a static library is built. For now, we need to specify + # -no-undefined on the libtool link line when we can be certain + # that all symbols are satisfied, otherwise we get a static library. + allow_undefined=yes + ;; + *) + allow_undefined=yes + ;; + esac + libtool_args=$nonopt + base_compile="$nonopt $@" + compile_command=$nonopt + finalize_command=$nonopt + + compile_rpath= + finalize_rpath= + compile_shlibpath= + finalize_shlibpath= + convenience= + old_convenience= + deplibs= + old_deplibs= + compiler_flags= + linker_flags= + dllsearchpath= + lib_search_path=`pwd` + inst_prefix_dir= + new_inherited_linker_flags= + + avoid_version=no + bindir= + dlfiles= + dlprefiles= + dlself=no + export_dynamic=no + export_symbols= + export_symbols_regex= + generated= + libobjs= + ltlibs= + module=no + no_install=no + objs= + non_pic_objects= + precious_files_regex= + prefer_static_libs=no + preload=no + prev= + prevarg= + release= + rpath= + xrpath= + perm_rpath= + temp_rpath= + thread_safe=no + vinfo= + vinfo_number=no + weak_libs= + single_module="${wl}-single_module" + func_infer_tag $base_compile + + # We need to know -static, to get the right output filenames. + for arg + do + case $arg in + -shared) + test "$build_libtool_libs" != yes && \ + func_fatal_configuration "can not build a shared library" + build_old_libs=no + break + ;; + -all-static | -static | -static-libtool-libs) + case $arg in + -all-static) + if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + -static) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + ;; + esac + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + shift + func_quote_for_eval "$arg" + qarg=$func_quote_for_eval_unquoted_result + func_append libtool_args " $func_quote_for_eval_result" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + func_append compile_command " @OUTPUT@" + func_append finalize_command " @OUTPUT@" + ;; + esac + + case $prev in + bindir) + bindir="$arg" + prev= + continue + ;; + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + func_append compile_command " @SYMFILE@" + func_append finalize_command " @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + func_append dlfiles " $arg" + else + func_append dlprefiles " $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + test -f "$arg" \ + || func_fatal_error "symbol file \`$arg' does not exist" + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + framework) + case $host in + *-*-darwin*) + case "$deplibs " in + *" $qarg.ltframework "*) ;; + *) func_append deplibs " $qarg.ltframework" # this is fixed later + ;; + esac + ;; + esac + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat "$save_arg"` + do +# func_append moreargs " $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + func_append dlfiles " $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + func_append dlprefiles " $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + done + else + func_fatal_error "link input file \`$arg' does not exist" + fi + arg=$save_arg + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) func_append rpath " $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) func_append xrpath " $arg" ;; + esac + fi + prev= + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + weak) + func_append weak_libs " $arg" + prev= + continue + ;; + xcclinker) + func_append linker_flags " $qarg" + func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xcompiler) + func_append compiler_flags " $qarg" + prev= + func_append compile_command " $qarg" + func_append finalize_command " $qarg" + continue + ;; + xlinker) + func_append linker_flags " $qarg" + func_append compiler_flags " $wl$qarg" + prev= + func_append compile_command " $wl$qarg" + func_append finalize_command " $wl$qarg" + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg="$arg" + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" + func_append finalize_command " $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + func_fatal_error "\`-allow-undefined' must not be used because it is the default" + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -bindir) + prev=bindir + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + func_fatal_error "more than one -exported-symbols argument is not allowed" + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework) + prev=framework + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + func_append compile_command " $arg" + func_append finalize_command " $arg" + ;; + esac + continue + ;; + + -L*) + func_stripname "-L" '' "$arg" + if test -z "$func_stripname_result"; then + if test "$#" -gt 0; then + func_fatal_error "require no space between \`-L' and \`$1'" + else + func_fatal_error "need path for \`-L' option" + fi + fi + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + test -z "$absdir" && \ + func_fatal_error "cannot determine absolute directory name of \`$dir'" + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "* | *" $arg "*) + # Will only happen for absolute or sysroot arguments + ;; + *) + # Preserve sysroot, but never include relative directories + case $dir in + [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; + *) func_append deplibs " -L$dir" ;; + esac + func_append lib_search_path " $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + ::) dllsearchpath=$dir;; + *) func_append dllsearchpath ":$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + func_append deplibs " System.ltframework" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + func_append deplibs " $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + # Darwin uses the -arch flag to determine output architecture. + -model|-arch|-isysroot|--sysroot) + func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + func_append compiler_flags " $arg" + func_append compile_command " $arg" + func_append finalize_command " $arg" + case "$new_inherited_linker_flags " in + *" $arg "*) ;; + * ) func_append new_inherited_linker_flags " $arg" ;; + esac + continue + ;; + + -multi_module) + single_module="${wl}-multi_module" + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) + # The PATH hackery in wrapper scripts is required on Windows + # and Darwin in order for the loader to find any dlls it needs. + func_warning "\`-no-install' is ignored for $host" + func_warning "assuming \`-no-fast-install' instead" + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + func_stripname '-R' '' "$arg" + dir=$func_stripname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + =*) + func_stripname '=' '' "$dir" + dir=$lt_sysroot$func_stripname_result + ;; + *) + func_fatal_error "only absolute run-paths are allowed" + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) func_append xrpath " $dir" ;; + esac + continue + ;; + + -shared) + # The effects of -shared are defined in a previous loop. + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -static | -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -weak) + prev=weak + continue + ;; + + -Wc,*) + func_stripname '-Wc,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + func_append arg " $func_quote_for_eval_result" + func_append compiler_flags " $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Wl,*) + func_stripname '-Wl,' '' "$arg" + args=$func_stripname_result + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + func_quote_for_eval "$flag" + func_append arg " $wl$func_quote_for_eval_result" + func_append compiler_flags " $wl$func_quote_for_eval_result" + func_append linker_flags " $func_quote_for_eval_result" + done + IFS="$save_ifs" + func_stripname ' ' '' "$arg" + arg=$func_stripname_result + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # -msg_* for osf cc + -msg_*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + # Flags to be passed through unchanged, with rationale: + # -64, -mips[0-9] enable 64-bit mode for the SGI compiler + # -r[0-9][0-9]* specify processor for the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler + # +DA*, +DD* enable 64-bit mode for the HP compiler + # -q* compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* architecture-specific flags for GCC + # -F/path path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* profiling flags for GCC + # @file GCC response files + # -tp=* Portland pgcc target processor selection + # --sysroot=* for sysroot support + # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ + -O*|-flto*|-fwhopr*|-fuse-linker-plugin) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + func_append compile_command " $arg" + func_append finalize_command " $arg" + func_append compiler_flags " $arg" + continue + ;; + + # Some other compiler flag. + -* | +*) + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + + *.$objext) + # A standard object. + func_append objs " $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if func_lalib_unsafe_p "$arg"; then + pic_object= + non_pic_object= + + # Read the .lo file + func_source "$arg" + + if test -z "$pic_object" || + test -z "$non_pic_object" || + test "$pic_object" = none && + test "$non_pic_object" = none; then + func_fatal_error "cannot find name of object for \`$arg'" + fi + + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + func_append dlfiles " $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + func_append dlprefiles " $pic_object" + prev= + fi + + # A PIC object. + func_append libobjs " $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + func_append non_pic_objects " $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + func_append non_pic_objects " $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if $opt_dry_run; then + # Extract subdirectory from the argument. + func_dirname "$arg" "/" "" + xdir="$func_dirname_result" + + func_lo2o "$arg" + pic_object=$xdir$objdir/$func_lo2o_result + non_pic_object=$xdir$func_lo2o_result + func_append libobjs " $pic_object" + func_append non_pic_objects " $non_pic_object" + else + func_fatal_error "\`$arg' is not a valid libtool object" + fi + fi + ;; + + *.$libext) + # An archive. + func_append deplibs " $arg" + func_append old_deplibs " $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + func_resolve_sysroot "$arg" + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + func_append dlfiles " $func_resolve_sysroot_result" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + func_append dlprefiles " $func_resolve_sysroot_result" + prev= + else + func_append deplibs " $func_resolve_sysroot_result" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + func_quote_for_eval "$arg" + arg="$func_quote_for_eval_result" + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + done # argument parsing loop + + test -n "$prev" && \ + func_fatal_help "the \`$prevarg' option requires an argument" + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + func_append compile_command " $arg" + func_append finalize_command " $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + func_basename "$output" + outputname="$func_basename_result" + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + func_dirname "$output" "/" "" + output_objdir="$func_dirname_result$objdir" + func_to_tool_file "$output_objdir/" + tool_output_objdir=$func_to_tool_file_result + # Create the object directory. + func_mkdir_p "$output_objdir" + + # Determine the type of output + case $output in + "") + func_fatal_help "you must specify an output file" + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if $opt_preserve_dup_deps ; then + case "$libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append libs " $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if $opt_duplicate_compiler_generated_deps; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; + esac + func_append pre_post_deps " $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + notinst_path= # paths that contain not-installed libtool libraries + + case $linkmode in + lib) + passes="conv dlpreopen link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + + for pass in $passes; do + # The preopen pass in lib mode reverses $deplibs; put it back here + # so that -L comes before libs that need it for instance... + if test "$linkmode,$pass" = "lib,link"; then + ## FIXME: Find the place where the list is rebuilt in the wrong + ## order, and fix it there properly + tmp_deplibs= + for deplib in $deplibs; do + tmp_deplibs="$deplib $tmp_deplibs" + done + deplibs="$tmp_deplibs" + fi + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + esac + fi + if test "$linkmode,$pass" = "lib,dlpreopen"; then + # Collect and forward deplibs of preopened libtool libs + for lib in $dlprefiles; do + # Ignore non-libtool-libs + dependency_libs= + func_resolve_sysroot "$lib" + case $lib in + *.la) func_source "$func_resolve_sysroot_result" ;; + esac + + # Collect preopened libtool deplibs, except any this library + # has declared as weak libs + for deplib in $dependency_libs; do + func_basename "$deplib" + deplib_base=$func_basename_result + case " $weak_libs " in + *" $deplib_base "*) ;; + *) func_append deplibs " $deplib" ;; + esac + done + done + libs="$dlprefiles" + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + + for deplib in $libs; do + lib= + found=no + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + func_append compiler_flags " $deplib" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + func_warning "\`-l' is ignored for archives/objects" + continue + fi + func_stripname '-l' '' "$deplib" + name=$func_stripname_result + if test "$linkmode" = lib; then + searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" + else + searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" + fi + for searchdir in $searchdirs; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if func_lalib_p "$lib"; then + library_names= + old_library= + func_source "$lib" + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + *.ltframework) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + if test "$linkmode" = lib ; then + case "$new_inherited_linker_flags " in + *" $deplib "*) ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; + esac + fi + fi + continue + ;; + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + *) + func_warning "\`-L' is ignored for archives/objects" + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + func_stripname '-R' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) func_append xrpath " $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) + func_resolve_sysroot "$deplib" + lib=$func_resolve_sysroot_result + ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + # Linking convenience modules into shared libraries is allowed, + # but linking other static libraries is non-portable. + case " $dlpreconveniencelibs " in + *" $deplib "*) ;; + *) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + echo + $ECHO "*** Warning: Trying to link with static lib archive $deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because the file extensions .$libext of this argument makes me believe" + echo "*** that it is just a static archive that I should not use here." + else + echo + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + ;; + esac + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + func_append newdlprefiles " $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + func_append newdlfiles " $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + + if test "$found" = yes || test -f "$lib"; then : + else + func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" + fi + + # Check to see that this really is a libtool archive. + func_lalib_unsafe_p "$lib" \ + || func_fatal_error "\`$lib' is not a valid libtool archive" + + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + inherited_linker_flags= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + func_source "$lib" + + # Convert "-framework foo" to "foo.ltframework" + if test -n "$inherited_linker_flags"; then + tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` + for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do + case " $new_inherited_linker_flags " in + *" $tmp_inherited_linker_flag "*) ;; + *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; + esac + done + fi + dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && func_append dlfiles " $dlopen" + test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + # It is a libtool convenience library, so add in its objects. + func_append convenience " $ladir/$objdir/$old_library" + func_append old_convenience " $ladir/$objdir/$old_library" + elif test "$linkmode" != prog && test "$linkmode" != lib; then + func_fatal_error "\`$lib' is not a convenience library" + fi + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + if test -n "$old_library" && + { test "$prefer_static_libs" = yes || + test "$prefer_static_libs,$installed" = "built,no"; }; then + linklib=$old_library + else + for l in $old_library $library_names; do + linklib="$l" + done + fi + if test -z "$linklib"; then + func_fatal_error "cannot find name of link library for \`$lib'" + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + func_fatal_error "cannot -dlopen a convenience library: \`$lib'" + fi + if test -z "$dlname" || + test "$dlopen_support" != yes || + test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + func_append dlprefiles " $lib $dependency_libs" + else + func_append newdlfiles " $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + func_warning "cannot determine absolute directory name of \`$ladir'" + func_warning "passing it literally to the linker, although it might fail" + abs_ladir="$ladir" + fi + ;; + esac + func_basename "$lib" + laname="$func_basename_result" + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + func_warning "library \`$lib' was moved." + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$lt_sysroot$libdir" + absdir="$lt_sysroot$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + func_append notinst_path " $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + func_append notinst_path " $abs_ladir" + fi + fi # $installed = yes + func_stripname 'lib' '.la' "$laname" + name=$func_stripname_result + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir" && test "$linkmode" = prog; then + func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" + fi + case "$host" in + # special handling for platforms with PE-DLLs. + *cygwin* | *mingw* | *cegcc* ) + # Linker will automatically link against shared library if both + # static and shared are present. Therefore, ensure we extract + # symbols from the import library if a shared library is present + # (otherwise, the dlopen module name will be incorrect). We do + # this by putting the import library name into $newdlprefiles. + # We recover the dlopen module name by 'saving' the la file + # name in a special purpose variable, and (later) extracting the + # dlname from the la file. + if test -n "$dlname"; then + func_tr_sh "$dir/$linklib" + eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" + func_append newdlprefiles " $dir/$linklib" + else + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + fi + ;; + * ) + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + func_append newdlprefiles " $dir/$dlname" + else + func_append newdlprefiles " $dir/$linklib" + fi + ;; + esac + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test "$linkmode" = prog && test "$pass" != link; then + func_append newlib_search_path " $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" + ;; + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { { test "$prefer_static_libs" = no || + test "$prefer_static_libs,$installed" = "built,yes"; } || + test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath:" in + *"$absdir:"*) ;; + *) func_append temp_rpath "$absdir:" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + case $host in + *cygwin* | *mingw* | *cegcc*) + # No point in relinking DLLs because paths are not encoded + func_append notinst_deplibs " $lib" + need_relink=no + ;; + *) + if test "$installed" = no; then + func_append notinst_deplibs " $lib" + need_relink=yes + fi + ;; + esac + # This is a shared library + + # Warn about portability, can't link against -module's on some + # systems (darwin). Don't bleat about dlopened modules though! + dlopenmodule="" + for dlpremoduletest in $dlprefiles; do + if test "X$dlpremoduletest" = "X$lib"; then + dlopenmodule="$dlpremoduletest" + break + fi + done + if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then + echo + if test "$linkmode" = prog; then + $ECHO "*** Warning: Linking the executable $output against the loadable module" + else + $ECHO "*** Warning: Linking the shared library $output against the loadable module" + fi + $ECHO "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) func_append compile_rpath " $absdir" ;; + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + shift + realname="$1" + shift + libname=`eval "\\$ECHO \"$libname_spec\""` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw* | *cegcc*) + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + func_basename "$soroot" + soname="$func_basename_result" + func_stripname 'lib' '.dll' "$soname" + newlib=libimp-$func_stripname_result.a + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + func_verbose "extracting exported symbol list from \`$soname'" + func_execute_cmds "$extract_expsyms_cmds" 'exit $?' + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + func_verbose "generating import library for \`$soname'" + func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$opt_mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a (non-dlopened) module then we can not + # link against it, someone is ignoring the earlier warnings + if /usr/bin/file -L $add 2> /dev/null | + $GREP ": [^:]* bundle" >/dev/null ; then + if test "X$dlopenmodule" != "X$lib"; then + $ECHO "*** Warning: lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + echo + echo "*** And there doesn't seem to be a static archive available" + echo "*** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + elif test -n "$old_library"; then + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$absdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + func_fatal_configuration "unsupported hardcode properties" + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) func_append compile_shlibpath "$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && + test "$hardcode_minus_L" != yes && + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) func_append finalize_shlibpath "$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$opt_mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes && + test "$hardcode_direct_absolute" = no; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) func_append finalize_shlibpath "$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + func_append add_dir " -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + echo + $ECHO "*** Warning: This system can not link to static lib archive $lib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + echo "*** But as you try to build a module library, libtool will still create " + echo "*** a static module, that should work as long as the dlopening application" + echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || + test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) func_stripname '-R' '' "$libdir" + temp_xrpath=$func_stripname_result + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) func_append xrpath " $temp_xrpath";; + esac;; + *) func_append temp_deplibs " $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + func_append newlib_search_path " $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result";; + *) func_resolve_sysroot "$deplib" ;; + esac + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $func_resolve_sysroot_result "*) + func_append specialdeplibs " $func_resolve_sysroot_result" ;; + esac + fi + func_append tmp_libs " $func_resolve_sysroot_result" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + path= + case $deplib in + -L*) path="$deplib" ;; + *.la) + func_resolve_sysroot "$deplib" + deplib=$func_resolve_sysroot_result + func_dirname "$deplib" "" "." + dir=$func_dirname_result + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + func_warning "cannot determine absolute directory name of \`$dir'" + absdir="$dir" + fi + ;; + esac + if $GREP "^installed=no" $deplib > /dev/null; then + case $host in + *-*-darwin*) + depdepl= + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$absdir/$objdir/$depdepl" ; then + depdepl="$absdir/$objdir/$depdepl" + darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + if test -z "$darwin_install_name"; then + darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` + fi + func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" + func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" + path= + fi + fi + ;; + *) + path="-L$absdir/$objdir" + ;; + esac + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + test "$absdir" != "$libdir" && \ + func_warning "\`$deplib' seems to be moved" + + path="-L$absdir" + fi + ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + if test "$pass" = link; then + if test "$linkmode" = "prog"; then + compile_deplibs="$new_inherited_linker_flags $compile_deplibs" + finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" + else + compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + fi + fi + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) func_append lib_search_path " $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) func_append tmp_libs " $deplib" ;; + esac + ;; + *) func_append tmp_libs " $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + func_append tmp_libs " $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + fi + if test "$linkmode" = prog || test "$linkmode" = lib; then + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for archives" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for archives" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for archives" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for archives" + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for archives" + + test -n "$release" && \ + func_warning "\`-release' is ignored for archives" + + test -n "$export_symbols$export_symbols_regex" && \ + func_warning "\`-export-symbols' is ignored for archives" + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + func_append objs "$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + func_stripname 'lib' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + test "$module" = no && \ + func_fatal_help "libtool library \`$output' must begin with \`lib'" + + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + func_stripname '' '.la' "$outputname" + name=$func_stripname_result + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + func_stripname '' '.la' "$outputname" + libname=$func_stripname_result + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" + else + echo + $ECHO "*** Warning: Linking the shared library $output against the non-libtool" + $ECHO "*** objects $objs is not portable!" + func_append libobjs " $objs" + fi + fi + + test "$dlself" != no && \ + func_warning "\`-dlopen self' is ignored for libtool libraries" + + set dummy $rpath + shift + test "$#" -gt 1 && \ + func_warning "ignoring multiple \`-rpath's for a libtool library" + + install_libdir="$1" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + test -n "$vinfo" && \ + func_warning "\`-version-info/-version-number' is ignored for convenience libraries" + + test -n "$release" && \ + func_warning "\`-release' is ignored for convenience libraries" + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + shift + IFS="$save_ifs" + + test -n "$7" && \ + func_fatal_help "too many parameters to \`-version-info'" + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$1" + number_minor="$2" + number_revision="$3" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + # correct linux to gnu/linux during the next big refactor + darwin|linux|osf|windows|none) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|qnx|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + func_arith $number_major + $number_minor + current=$func_arith_result + age="$number_minor" + revision="$number_minor" + lt_irix_increment=no + ;; + esac + ;; + no) + current="$1" + revision="$2" + age="$3" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "CURRENT \`$current' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "REVISION \`$revision' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + func_error "AGE \`$age' must be a nonnegative integer" + func_fatal_error "\`$vinfo' is not valid version information" + ;; + esac + + if test "$age" -gt "$current"; then + func_error "AGE \`$age' is greater than the current interface number \`$current'" + func_fatal_error "\`$vinfo' is not valid version information" + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + func_arith $current + 1 + minor_current=$func_arith_result + xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current" + ;; + + irix | nonstopux) + if test "X$lt_irix_increment" = "Xno"; then + func_arith $current - $age + else + func_arith $current - $age + 1 + fi + major=$func_arith_result + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + func_arith $revision - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) # correct to gnu/linux during the next big refactor + func_arith $current - $age + major=.$func_arith_result + versuffix="$major.$age.$revision" + ;; + + osf) + func_arith $current - $age + major=.$func_arith_result + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + func_arith $current - $loop + iface=$func_arith_result + func_arith $loop - 1 + loop=$func_arith_result + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + func_append verstring ":${current}.0" + ;; + + qnx) + major=".$current" + versuffix=".$current" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + func_arith $current - $age + major=$func_arith_result + versuffix="-$major" + ;; + + *) + func_fatal_configuration "unknown library version type \`$version_type'" + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + func_warning "undefined symbols not allowed in $host shared libraries" + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + + fi + + func_generate_dlsyms "$libname" "$libname" "yes" + func_append libobjs " $symfileobj" + test "X$libobjs" = "X " && libobjs= + + if test "$opt_mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$ECHO "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext | *.gcno) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then + if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + func_append removelist " $p" + ;; + *) ;; + esac + done + test -n "$removelist" && \ + func_show_eval "${RM}r \$removelist" + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + func_append oldlibs " $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + #for path in $notinst_path; do + # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` + # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` + # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` + #done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + func_replace_sysroot "$libdir" + func_append temp_xrpath " -R$func_replace_sysroot_result" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) func_append dlfiles " $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) func_append dlprefiles " $lib" ;; + esac + done + + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + func_append deplibs " System.ltframework" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + func_append deplibs " -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $opt_dry_run || $RM conftest.c + cat > conftest.c </dev/null` + $nocaseglob + else + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + fi + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null | + $GREP " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | + $SED -e 10q | + $EGREP "$file_magic_regex" > /dev/null; then + func_append newdeplibs " $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for file magic test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a file magic. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method; shift + match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` + for a_deplib in $deplibs; do + case $a_deplib in + -l*) + func_stripname -l '' "$a_deplib" + name=$func_stripname_result + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + func_append newdeplibs " $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval "\\$ECHO \"$libname_spec\""` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ + $EGREP "$match_pattern_regex" > /dev/null; then + func_append newdeplibs " $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + echo + $ECHO "*** Warning: linker path does not have real file for library $a_deplib." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $ECHO "*** with $libname and none of the candidates passed a file format test" + $ECHO "*** using a regex pattern. Last file checked: $potlib" + fi + fi + ;; + *) + # Add a -L argument. + func_append newdeplibs " $a_deplib" + ;; + esac + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` + done + fi + case $tmp_deplibs in + *[!\ \ ]*) + echo + if test "X$deplibs_check_method" = "Xnone"; then + echo "*** Warning: inter-library dependencies are not supported in this platform." + else + echo "*** Warning: inter-library dependencies are not known to be supported." + fi + echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + ;; + esac + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library with the System framework + newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + echo + echo "*** Warning: libtool could not satisfy all declared inter-library" + $ECHO "*** dependencies of module $libname. Therefore, libtool will create" + echo "*** a static module, that should work as long as the dlopening" + echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + echo "*** The inter-library dependencies that have been dropped here will be" + echo "*** automatically added whenever a program is linked with this library" + echo "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + echo + echo "*** Since this library must not contain undefined symbols," + echo "*** because either the platform does not support them or" + echo "*** it was explicitly requested with -no-undefined," + echo "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + case $host in + *-*-darwin*) + newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) func_append new_libs " $deplib" ;; + esac + ;; + *) func_append new_libs " $deplib" ;; + esac + done + deplibs="$new_libs" + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + # Remove ${wl} instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$opt_mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + func_replace_sysroot "$libdir" + libdir=$func_replace_sysroot_result + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append dep_rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) func_append perm_rpath " $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + func_append rpath "$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + shift + realname="$1" + shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib="$output_objdir/$realname" + linknames= + for link + do + func_append linknames " $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` + test "X$libobjs" = "X " && libobjs= + + delfiles= + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" + export_symbols="$output_objdir/$libname.uexp" + func_append delfiles " $export_symbols" + fi + + orig_export_symbols= + case $host_os in + cygwin* | mingw* | cegcc*) + if test -n "$export_symbols" && test -z "$export_symbols_regex"; then + # exporting using user supplied symfile + if test "x`$SED 1q $export_symbols`" != xEXPORTS; then + # and it's NOT already a .def file. Must figure out + # which of the given symbols are data symbols and tag + # them as such. So, trigger use of export_symbols_cmds. + # export_symbols gets reassigned inside the "prepare + # the list of exported symbols" if statement, so the + # include_expsyms logic still works. + orig_export_symbols="$export_symbols" + export_symbols= + always_export_symbols=yes + fi + fi + ;; + esac + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd1 in $cmds; do + IFS="$save_ifs" + # Take the normal branch if the nm_file_list_spec branch + # doesn't work or if tool conversion is not needed. + case $nm_file_list_spec~$to_tool_file_cmd in + *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) + try_normal_branch=yes + eval cmd=\"$cmd1\" + func_len " $cmd" + len=$func_len_result + ;; + *) + try_normal_branch=no + ;; + esac + if test "$try_normal_branch" = yes \ + && { test "$len" -lt "$max_cmd_len" \ + || test "$max_cmd_len" -le -1; } + then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + elif test -n "$nm_file_list_spec"; then + func_basename "$output" + output_la=$func_basename_result + save_libobjs=$libobjs + save_output=$output + output=${output_objdir}/${output_la}.nm + func_to_tool_file "$output" + libobjs=$nm_file_list_spec$func_to_tool_file_result + func_append delfiles " $output" + func_verbose "creating $NM input file list: $output" + for obj in $save_libobjs; do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > "$output" + eval cmd=\"$cmd1\" + func_show_eval "$cmd" 'exit $?' + output=$save_output + libobjs=$save_libobjs + skipped_export=false + else + # The command line is too long to execute in one step. + func_verbose "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + func_append tmp_deplibs " $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec" && + test "$compiler_needs_object" = yes && + test -z "$libobjs"; then + # extract the archives, so we have objects to list. + # TODO: could optimize this to just extract one archive. + whole_archive_flag_spec= + fi + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + else + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $convenience + func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + func_append linker_flags " $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$opt_mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test "X$skipped_export" != "X:" && + func_len " $test_cmds" && + len=$func_len_result && + test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise + # or, if using GNU ld and skipped_export is not :, use a linker + # script. + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + func_basename "$output" + output_la=$func_basename_result + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + last_robj= + k=1 + + if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then + output=${output_objdir}/${output_la}.lnkscript + func_verbose "creating GNU ld script: $output" + echo 'INPUT (' > $output + for obj in $save_libobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + echo ')' >> $output + func_append delfiles " $output" + func_to_tool_file "$output" + output=$func_to_tool_file_result + elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then + output=${output_objdir}/${output_la}.lnk + func_verbose "creating linker input file list: $output" + : > $output + set x $save_libobjs + shift + firstobj= + if test "$compiler_needs_object" = yes; then + firstobj="$1 " + shift + fi + for obj + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output + done + func_append delfiles " $output" + func_to_tool_file "$output" + output=$firstobj\"$file_list_spec$func_to_tool_file_result\" + else + if test -n "$save_libobjs"; then + func_verbose "creating reloadable object files..." + output=$output_objdir/$output_la-${k}.$objext + eval test_cmds=\"$reload_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + if test "X$objlist" = X || + test "$len" -lt "$max_cmd_len"; then + func_append objlist " $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + reload_objs=$objlist + eval concat_cmds=\"$reload_cmds\" + else + # All subsequent reloadable object files will link in + # the last one created. + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + func_arith $k + 1 + k=$func_arith_result + output=$output_objdir/$output_la-${k}.$objext + objlist=" $obj" + func_len " $last_robj" + func_arith $len0 + $func_len_result + len=$func_arith_result + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\${concat_cmds}$reload_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" + fi + func_append delfiles " $output" + + else + output= + fi + + if ${skipped_export-false}; then + func_verbose "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $opt_dry_run || $RM $export_symbols + libobjs=$output + # Append the command to create the export file. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" + if test -n "$last_robj"; then + eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" + fi + fi + + test -n "$save_libobjs" && + func_verbose "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$opt_mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + if test -n "$export_symbols_regex" && ${skipped_export-false}; then + func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + func_show_eval '$MV "${export_symbols}T" "$export_symbols"' + fi + fi + + if ${skipped_export-false}; then + if test -n "$export_symbols" && test -n "$include_expsyms"; then + tmp_export_symbols="$export_symbols" + test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' + fi + + if test -n "$orig_export_symbols"; then + # The given exports_symbols file has to be filtered, so filter it. + func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" + # FIXME: $output_objdir/$libname.filter potentially contains lots of + # 's' commands which not all seds can handle. GNU sed should be fine + # though. Also, the filter scales superlinearly with the number of + # global variables. join(1) would be nice here, but unfortunately + # isn't a blessed tool. + $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter + func_append delfiles " $export_symbols $output_objdir/$libname.filter" + export_symbols=$output_objdir/$libname.def + $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols + fi + fi + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + test "X$libobjs" = "X " && libobjs= + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + fi + + if test -n "$delfiles"; then + # Append the command to remove temporary files to $cmds. + eval cmds=\"\$cmds~\$RM $delfiles\" + fi + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles + func_append libobjs " $func_extract_archives_result" + test "X$libobjs" = "X " && libobjs= + fi + + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $opt_silent || { + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" + } + $opt_dry_run || eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$opt_mode" = relink; then + ( cd "$output_objdir" && \ + $RM "${realname}T" && \ + $MV "${realname}U" "$realname" ) + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + # Restore the uninstalled library and exit + if test "$opt_mode" = relink; then + $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + func_show_eval '${RM}r "$gentop"' + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + obj) + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + func_warning "\`-dlopen' is ignored for objects" + fi + + case " $deplibs" in + *\ -l* | *\ -L*) + func_warning "\`-l' and \`-L' are ignored for objects" ;; + esac + + test -n "$rpath" && \ + func_warning "\`-rpath' is ignored for objects" + + test -n "$xrpath" && \ + func_warning "\`-R' is ignored for objects" + + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for objects" + + test -n "$release" && \ + func_warning "\`-release' is ignored for objects" + + case $output in + *.lo) + test -n "$objs$old_deplibs" && \ + func_fatal_error "cannot build library object \`$output' from non-libtool objects" + + libobj=$output + func_lo2o "$libobj" + obj=$func_lo2o_result + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $opt_dry_run || $RM $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec and hope we can get by with + # turning comma into space.. + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" + reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` + else + gentop="$output_objdir/${obj}x" + func_append generated " $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # If we're not building shared, we need to use non_pic_objs + test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" + + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + + output="$obj" + func_execute_cmds "$reload_cmds" 'exit $?' + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + func_execute_cmds "$reload_cmds" 'exit $?' + fi + + if test -n "$gentop"; then + func_show_eval '${RM}r "$gentop"' + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) func_stripname '' '.exe' "$output" + output=$func_stripname_result.exe;; + esac + test -n "$vinfo" && \ + func_warning "\`-version-info' is ignored for programs" + + test -n "$release" && \ + func_warning "\`-release' is ignored for programs" + + test "$preload" = yes \ + && test "$dlopen_support" = unknown \ + && test "$dlopen_self" = unknown \ + && test "$dlopen_self_static" = unknown && \ + func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` + ;; + esac + + case $host in + *-*-darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + # But is supposedly fixed on 10.4 or later (yay!). + if test "$tagname" = CXX ; then + case ${MACOSX_DEPLOYMENT_TARGET-10.0} in + 10.[0123]) + func_append compile_command " ${wl}-bind_at_load" + func_append finalize_command " ${wl}-bind_at_load" + ;; + esac + fi + # Time to change all our "foo.ltframework" stuff back to "-framework foo" + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + func_append new_libs " -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) func_append new_libs " $deplib" ;; + esac + ;; + *) func_append new_libs " $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + + func_append compile_command " $compile_deplibs" + func_append finalize_command " $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) func_append finalize_rpath " $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) func_append perm_rpath " $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) + testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + ::) dllsearchpath=$libdir;; + *) func_append dllsearchpath ":$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + ::) dllsearchpath=$testbindir;; + *) func_append dllsearchpath ":$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + func_append rpath " $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) func_append finalize_perm_rpath " $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + fi + + func_generate_dlsyms "$outputname" "@PROGRAM@" "no" + + # template prelinking step + if test -n "$prelink_cmds"; then + func_execute_cmds "$prelink_cmds" 'exit $?' + fi + + wrappers_required=yes + case $host in + *cegcc* | *mingw32ce*) + # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. + wrappers_required=no + ;; + *cygwin* | *mingw* ) + if test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + *) + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + wrappers_required=no + fi + ;; + esac + if test "$wrappers_required" = no; then + # Replace the output file specification. + compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + exit_status=0 + func_show_eval "$link_command" 'exit_status=$?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Delete the generated files. + if test -f "$output_objdir/${outputname}S.${objext}"; then + func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' + fi + + exit $exit_status + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + func_append rpath "$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + func_append rpath "$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $opt_dry_run || $RM $output + # Link the executable and exit + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + exit $EXIT_SUCCESS + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + func_warning "this platform does not like uninstalled shared libraries" + func_warning "\`$output' will be relinked during installation" + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname + + func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output_objdir/$outputname" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + + # Now create the wrapper script. + func_verbose "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + fi + + # Only actually do things if not in dry run mode. + $opt_dry_run || { + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) func_stripname '' '.exe' "$output" + output=$func_stripname_result ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + func_stripname '' '.exe' "$outputname" + outputname=$func_stripname_result ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + func_dirname_and_basename "$output" "" "." + output_name=$func_basename_result + output_path=$func_dirname_result + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $RM $cwrappersource $cwrapper + trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + func_emit_cwrapperexe_src > $cwrappersource + + # The wrapper executable is built using the $host compiler, + # because it contains $host paths and files. If cross- + # compiling, it, like the target executable, must be + # executed on the $host or under an emulation environment. + $opt_dry_run || { + $LTCC $LTCFLAGS -o $cwrapper $cwrappersource + $STRIP $cwrapper + } + + # Now, create the wrapper script for func_source use: + func_ltwrapper_scriptname $cwrapper + $RM $func_ltwrapper_scriptname_result + trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 + $opt_dry_run || { + # note: this script will not be executed, so do not chmod. + if test "x$build" = "x$host" ; then + $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result + else + func_emit_wrapper no > $func_ltwrapper_scriptname_result + fi + } + ;; + * ) + $RM $output + trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 + + func_emit_wrapper no > $output + chmod +x $output + ;; + esac + } + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save $symfileobj" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + if test "$preload" = yes && test -f "$symfileobj"; then + func_append oldobjs " $symfileobj" + fi + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $addlibs + func_append oldobjs " $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + cmds=$old_archive_from_new_cmds + else + + # Add any objects from preloaded convenience libraries + if test -n "$dlprefiles"; then + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + + func_extract_archives $gentop $dlprefiles + func_append oldobjs " $func_extract_archives_result" + fi + + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + func_basename "$obj" + $ECHO "$func_basename_result" + done | sort | sort -uc >/dev/null 2>&1); then + : + else + echo "copying selected object files to avoid basename conflicts..." + gentop="$output_objdir/${outputname}x" + func_append generated " $gentop" + func_mkdir_p "$gentop" + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + func_basename "$obj" + objbase="$func_basename_result" + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + func_arith $counter + 1 + counter=$func_arith_result + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + func_append oldobjs " $gentop/$newobj" + ;; + *) func_append oldobjs " $obj" ;; + esac + done + fi + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result + eval cmds=\"$old_archive_cmds\" + + func_len " $cmds" + len=$func_len_result + if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + elif test -n "$archiver_list_spec"; then + func_verbose "using command file archive linking..." + for obj in $oldobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > $output_objdir/$libname.libcmd + func_to_tool_file "$output_objdir/$libname.libcmd" + oldobjs=" $archiver_list_spec$func_to_tool_file_result" + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + func_verbose "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + oldobjs= + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + eval test_cmds=\"$old_archive_cmds\" + func_len " $test_cmds" + len0=$func_len_result + len=$len0 + for obj in $save_oldobjs + do + func_len " $obj" + func_arith $len + $func_len_result + len=$func_arith_result + func_append objlist " $obj" + if test "$len" -lt "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + len=$len0 + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + func_execute_cmds "$cmds" 'exit $?' + done + + test -n "$generated" && \ + func_show_eval "${RM}r$generated" + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + func_verbose "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + # Only create the output if not a dry run. + $opt_dry_run || { + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + func_basename "$deplib" + name="$func_basename_result" + func_resolve_sysroot "$deplib" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` + test -z "$libdir" && \ + func_fatal_error "\`$deplib' is not a valid libtool archive" + func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" + ;; + -L*) + func_stripname -L '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -L$func_replace_sysroot_result" + ;; + -R*) + func_stripname -R '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -R$func_replace_sysroot_result" + ;; + *) func_append newdependency_libs " $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + + for lib in $dlfiles; do + case $lib in + *.la) + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" + ;; + *) func_append newdlfiles " $lib" ;; + esac + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + *.la) + # Only pass preopened files to the pseudo-archive (for + # eventual linking with the app. that links it) if we + # didn't already link the preopened objects directly into + # the library: + func_basename "$lib" + name="$func_basename_result" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + test -z "$libdir" && \ + func_fatal_error "\`$lib' is not a valid libtool archive" + func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" + ;; + esac + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + func_append newdlfiles " $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + func_append newdlprefiles " $abs" + done + dlprefiles="$newdlprefiles" + fi + $RM $output + # place dlname in correct position for cygwin + # In fact, it would be nice if we could use this code for all target + # systems that can't hard-code library paths into their executables + # and that have no shared library path variable independent of PATH, + # but it turns out we can't easily determine that from inspecting + # libtool variables, so we have to hard-code the OSs to which it + # applies here; at the moment, that means platforms that use the PE + # object format with DLL files. See the long comment at the top of + # tests/bindir.at for full details. + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) + # If a -bindir argument was supplied, place the dll there. + if test "x$bindir" != x ; + then + func_relative_path "$install_libdir" "$bindir" + tdlname=$func_relative_path_result$dlname + else + # Otherwise fall back on heuristic. + tdlname=../bin/$dlname + fi + ;; + esac + $ECHO > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Linker flags that can not go in dependency_libs. +inherited_linker_flags='$new_inherited_linker_flags' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Names of additional weak libraries provided by this library +weak_library_names='$weak_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $ECHO >> $output "\ +relink_command=\"$relink_command\"" + fi + done + } + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' + ;; + esac + exit $EXIT_SUCCESS +} + +{ test "$opt_mode" = link || test "$opt_mode" = relink; } && + func_mode_link ${1+"$@"} + + +# func_mode_uninstall arg... +func_mode_uninstall () +{ + $opt_debug + RM="$nonopt" + files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + for arg + do + case $arg in + -f) func_append RM " $arg"; rmforce=yes ;; + -*) func_append RM " $arg" ;; + *) func_append files " $arg" ;; + esac + done + + test -z "$RM" && \ + func_fatal_help "you must specify an RM program" + + rmdirs= + + for file in $files; do + func_dirname "$file" "" "." + dir="$func_dirname_result" + if test "X$dir" = X.; then + odir="$objdir" + else + odir="$dir/$objdir" + fi + func_basename "$file" + name="$func_basename_result" + test "$opt_mode" = uninstall && odir="$dir" + + # Remember odir for removal later, being careful to avoid duplicates + if test "$opt_mode" = clean; then + case " $rmdirs " in + *" $odir "*) ;; + *) func_append rmdirs " $odir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if { test -L "$file"; } >/dev/null 2>&1 || + { test -h "$file"; } >/dev/null 2>&1 || + test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi + + rmfiles="$file" + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if func_lalib_p "$file"; then + func_source $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + func_append rmfiles " $odir/$n" + done + test -n "$old_library" && func_append rmfiles " $odir/$old_library" + + case "$opt_mode" in + clean) + case " $library_names " in + *" $dlname "*) ;; + *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; + esac + test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if func_lalib_p "$file"; then + + # Read the .lo file + func_source $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" && + test "$pic_object" != none; then + func_append rmfiles " $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" && + test "$non_pic_object" != none; then + func_append rmfiles " $dir/$non_pic_object" + fi + fi + ;; + + *) + if test "$opt_mode" = clean ; then + noexename=$name + case $file in + *.exe) + func_stripname '' '.exe' "$file" + file=$func_stripname_result + func_stripname '' '.exe' "$name" + noexename=$func_stripname_result + # $file with .exe has already been added to rmfiles, + # add $file without .exe + func_append rmfiles " $file" + ;; + esac + # Do a test to see if this is a libtool program. + if func_ltwrapper_p "$file"; then + if func_ltwrapper_executable_p "$file"; then + func_ltwrapper_scriptname "$file" + relink_command= + func_source $func_ltwrapper_scriptname_result + func_append rmfiles " $func_ltwrapper_scriptname_result" + else + relink_command= + func_source $dir/$noexename + fi + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + func_append rmfiles " $odir/$name $odir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + func_append rmfiles " $odir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + func_append rmfiles " $odir/lt-${noexename}.c" + fi + fi + fi + ;; + esac + func_show_eval "$RM $rmfiles" 'exit_status=1' + done + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + func_show_eval "rmdir $dir >/dev/null 2>&1" + fi + done + + exit $exit_status +} + +{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && + func_mode_uninstall ${1+"$@"} + +test -z "$opt_mode" && { + help="$generic_help" + func_fatal_help "you must specify a MODE" +} + +test -z "$exec_cmd" && \ + func_fatal_help "invalid operation mode \`$opt_mode'" + +if test -n "$exec_cmd"; then + eval exec "$exec_cmd" + exit $EXIT_FAILURE +fi + +exit $exit_status + + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +build_libtool_libs=no +build_old_libs=yes +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: +# vi:sw=2 + diff --git a/build-aux/missing b/build-aux/missing new file mode 100755 index 0000000..cdea514 --- /dev/null +++ b/build-aux/missing @@ -0,0 +1,215 @@ +#! /bin/sh +# Common wrapper for a few potentially missing GNU programs. + +scriptversion=2012-06-26.16; # UTC + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard , 1996. + +# This program 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, or (at your option) +# any later version. + +# This program 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 . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try '$0 --help' for more information" + exit 1 +fi + +case $1 in + + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; + + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + +Supported PROGRAM values: + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man + +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" + exit 1 + ;; + +esac + +# Run the given program, remember its exit status. +"$@"; st=$? + +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi + +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'automa4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" + ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/build-aux/test-driver b/build-aux/test-driver new file mode 100755 index 0000000..32bf39e --- /dev/null +++ b/build-aux/test-driver @@ -0,0 +1,127 @@ +#! /bin/sh +# test-driver - basic testsuite driver script. + +scriptversion=2012-06-27.10; # UTC + +# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# +# This program 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, or (at your option) +# any later version. +# +# This program 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 . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +# Make unconditional expansion of undefined variables an error. This +# helps a lot in preventing typo-related bugs. +set -u + +usage_error () +{ + echo "$0: $*" >&2 + print_usage >&2 + exit 2 +} + +print_usage () +{ + cat <$log_file 2>&1 +estatus=$? +if test $enable_hard_errors = no && test $estatus -eq 99; then + estatus=1 +fi + +case $estatus:$expect_failure in + 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; + 0:*) col=$grn res=PASS recheck=no gcopy=no;; + 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; + 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; + *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; + *:*) col=$red res=FAIL recheck=yes gcopy=yes;; +esac + +# Report outcome to console. +echo "${col}${res}${std}: $test_name" + +# Register the test result, and other relevant metadata. +echo ":test-result: $res" > $trs_file +echo ":global-test-result: $res" >> $trs_file +echo ":recheck: $recheck" >> $trs_file +echo ":copy-in-global-log: $gcopy" >> $trs_file + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/clients/client_options.h b/clients/client_options.h new file mode 100644 index 0000000..16ce4be --- /dev/null +++ b/clients/client_options.h @@ -0,0 +1,45 @@ +/* LibMemcached + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: + * + */ + +#pragma once + +typedef struct memcached_help_text_st memcached_help_text_st; + +enum memcached_options { + OPT_SERVERS= 's', + OPT_VERSION= 'V', + OPT_HELP= 'h', + OPT_VERBOSE= 'v', + OPT_DEBUG= 'd', + OPT_ANALYZE= 'a', + OPT_FLAG= 257, + OPT_EXPIRE, + OPT_SET, + OPT_REPLACE, + OPT_ADD, + OPT_SLAP_EXECUTE_NUMBER, + OPT_SLAP_INITIAL_LOAD, + OPT_SLAP_TEST, + OPT_SLAP_CONCURRENCY, + OPT_SLAP_NON_BLOCK, + OPT_SLAP_TCP_NODELAY, + OPT_FLUSH, + OPT_HASH, + OPT_BINARY, + OPT_UDP, + OPT_BUFFER, + OPT_USERNAME, + OPT_PASSWD, + OPT_STAT_ARGS, + OPT_SERVER_VERSION, + OPT_QUIET, + OPT_FILE= 'f' +}; diff --git a/clients/execute.cc b/clients/execute.cc new file mode 100644 index 0000000..4731977 --- /dev/null +++ b/clients/execute.cc @@ -0,0 +1,142 @@ +/* LibMemcached + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: + * + */ + +/* + Execute a memcached_set() a set of pairs. + Return the number of rows set. +*/ + +#include +#include "clients/execute.h" + +unsigned int execute_set(memcached_st *memc, pairs_st *pairs, unsigned int number_of) +{ + uint32_t count= 0; + for (; count < number_of; ++count) + { + memcached_return_t rc= memcached_set(memc, pairs[count].key, pairs[count].key_length, + pairs[count].value, pairs[count].value_length, + 0, 0); + if (memcached_failed(rc)) + { + fprintf(stderr, "%s:%d Failure on %u insert (%s) of %.*s\n", + __FILE__, __LINE__, count, + memcached_last_error_message(memc), + (unsigned int)pairs[count].key_length, pairs[count].key); + + // We will try to reconnect and see if that fixes the issue + memcached_quit(memc); + + return count; + } + } + + return count; +} + +/* + Execute a memcached_get() on a set of pairs. + Return the number of rows retrieved. +*/ +unsigned int execute_get(memcached_st *memc, pairs_st *pairs, unsigned int number_of) +{ + unsigned int x; + unsigned int retrieved; + + + for (retrieved= 0,x= 0; x < number_of; x++) + { + size_t value_length; + uint32_t flags; + + unsigned int fetch_key= (unsigned int)((unsigned int)random() % number_of); + + memcached_return_t rc; + char *value= memcached_get(memc, pairs[fetch_key].key, pairs[fetch_key].key_length, + &value_length, &flags, &rc); + + if (memcached_failed(rc)) + { + fprintf(stderr, "%s:%d Failure on read(%s) of %.*s\n", + __FILE__, __LINE__, + memcached_last_error_message(memc), + (unsigned int)pairs[fetch_key].key_length, pairs[fetch_key].key); + } + else + { + retrieved++; + } + + ::free(value); + } + + return retrieved; +} + +/** + * Callback function to count the number of results + */ +static memcached_return_t callback_counter(const memcached_st *ptr, + memcached_result_st *result, + void *context) +{ + (void)ptr; + (void)result; + unsigned int *counter= (unsigned int *)context; + *counter= *counter + 1; + + return MEMCACHED_SUCCESS; +} + +/** + * Try to run a large mget to get all of the keys + * @param memc memcached handle + * @param keys the keys to get + * @param key_length the length of the keys + * @param number_of the number of keys to try to get + * @return the number of keys received + */ +unsigned int execute_mget(memcached_st *memc, + const char * const *keys, + size_t *key_length, + unsigned int number_of) +{ + unsigned int retrieved= 0; + memcached_execute_fn callbacks[]= { callback_counter }; + memcached_return_t rc; + rc= memcached_mget_execute(memc, keys, key_length, + (size_t)number_of, callbacks, &retrieved, 1); + + if (rc == MEMCACHED_SUCCESS || rc == MEMCACHED_NOTFOUND || + rc == MEMCACHED_BUFFERED || rc == MEMCACHED_END) + { + rc= memcached_fetch_execute(memc, callbacks, (void *)&retrieved, 1); + if (rc != MEMCACHED_SUCCESS && rc != MEMCACHED_NOTFOUND && rc != MEMCACHED_END) + { + fprintf(stderr, "%s:%d Failed to execute mget: %s\n", + __FILE__, __LINE__, + memcached_strerror(memc, rc)); + memcached_quit(memc); + return 0; + } + } + else + { + fprintf(stderr, "%s:%d Failed to execute mget: %s\n", + __FILE__, __LINE__, + memcached_strerror(memc, rc)); + memcached_quit(memc); + return 0; + } + + return retrieved; +} diff --git a/clients/execute.h b/clients/execute.h new file mode 100644 index 0000000..ebf92f6 --- /dev/null +++ b/clients/execute.h @@ -0,0 +1,30 @@ +/* LibMemcached + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: + * + */ + +#pragma once + +#include + +#include +#include "clients/generator.h" + +#ifdef __cplusplus +extern "C" { +#endif + +unsigned int execute_set(memcached_st *memc, pairs_st *pairs, unsigned int number_of); +unsigned int execute_get(memcached_st *memc, pairs_st *pairs, unsigned int number_of); +unsigned int execute_mget(memcached_st *memc, const char * const *keys, size_t *key_length, + unsigned int number_of); + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/clients/generator.cc b/clients/generator.cc new file mode 100644 index 0000000..1f40dae --- /dev/null +++ b/clients/generator.cc @@ -0,0 +1,109 @@ +/* LibMemcached + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: + * + */ + +#include + +#include + +#include +#include +#include +#include +#include + +#include "clients/generator.h" + +#define KEY_BYTES 20 + +/* Use this for string generation */ +static const char ALPHANUMERICS[]= + "0123456789ABCDEFGHIJKLMNOPQRSTWXYZabcdefghijklmnopqrstuvwxyz"; + +#define ALPHANUMERICS_SIZE (sizeof(ALPHANUMERICS)-1) + +static size_t get_alpha_num(void) +{ + return (size_t)random() % ALPHANUMERICS_SIZE; +} + +void get_random_string(char *buffer, size_t size) +{ + char *buffer_ptr= buffer; + + while (--size) + { + *buffer_ptr++= ALPHANUMERICS[get_alpha_num()]; + } + *buffer_ptr++= ALPHANUMERICS[get_alpha_num()]; +} + +void pairs_free(pairs_st *pairs) +{ + if (pairs == NULL) + { + return; + } + + /* We free until we hit the null pair we stores during creation */ + for (uint32_t x= 0; pairs[x].key; x++) + { + free(pairs[x].key); + if (pairs[x].value) + { + free(pairs[x].value); + } + } + + free(pairs); +} + +pairs_st *pairs_generate(uint64_t number_of, size_t value_length) +{ + pairs_st *pairs= (pairs_st*)calloc((size_t)number_of + 1, sizeof(pairs_st)); + + if (pairs == NULL) + { + goto error; + } + + for (uint64_t x= 0; x < number_of; x++) + { + pairs[x].key= (char *)calloc(KEY_BYTES, sizeof(char)); + + if (pairs[x].key == NULL) + goto error; + + get_random_string(pairs[x].key, KEY_BYTES); + pairs[x].key_length= KEY_BYTES; + + if (value_length) + { + pairs[x].value= (char *)calloc(value_length, sizeof(char)); + + if (pairs[x].value == NULL) + goto error; + + get_random_string(pairs[x].value, value_length); + pairs[x].value_length= value_length; + } + else + { + pairs[x].value= NULL; + pairs[x].value_length= 0; + } + } + + return pairs; +error: + std::cerr << "Memory Allocation failure in pairs_generate." << std::endl; + exit(EXIT_SUCCESS); +} diff --git a/clients/generator.h b/clients/generator.h new file mode 100644 index 0000000..e60bfb3 --- /dev/null +++ b/clients/generator.h @@ -0,0 +1,36 @@ +/* LibMemcached + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: + * + */ + +/* + Code to generate data to be pushed into memcached +*/ + +#pragma once + +typedef struct pairs_st pairs_st; + +struct pairs_st { + char *key; + size_t key_length; + char *value; + size_t value_length; +}; + +#ifdef __cplusplus +extern "C" { +#endif + +pairs_st *pairs_generate(uint64_t number_of, size_t value_length); +void pairs_free(pairs_st *pairs); + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/clients/include.am b/clients/include.am new file mode 100644 index 0000000..50c76cc --- /dev/null +++ b/clients/include.am @@ -0,0 +1,128 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +CLIENTS_LDADDS= +CLIENTS_LDADDS+= clients/libutilities.la +CLIENTS_LDADDS+= libmemcached/libmemcached.la + +bin_PROGRAMS+= clients/memcapable +bin_PROGRAMS+= clients/memcat +bin_PROGRAMS+= clients/memcp +bin_PROGRAMS+= clients/memdump +bin_PROGRAMS+= clients/memerror +bin_PROGRAMS+= clients/memexist +bin_PROGRAMS+= clients/memtouch +bin_PROGRAMS+= clients/memflush +bin_PROGRAMS+= clients/memparse +bin_PROGRAMS+= clients/memping +bin_PROGRAMS+= clients/memrm +bin_PROGRAMS+= clients/memslap +bin_PROGRAMS+= clients/memstat + +if BUILD_MEMASLAP +if HAVE_LIBEVENT +if !BUILD_WIN32_WRAPPERS + bin_PROGRAMS+= clients/memaslap +endif +endif +endif + +noinst_HEADERS+= clients/client_options.h +noinst_HEADERS+= clients/execute.h +noinst_HEADERS+= clients/generator.h +noinst_HEADERS+= clients/ms_atomic.h +noinst_HEADERS+= clients/ms_conn.h +noinst_HEADERS+= clients/ms_memslap.h +noinst_HEADERS+= clients/ms_setting.h +noinst_HEADERS+= clients/ms_sigsegv.h +noinst_HEADERS+= clients/ms_stats.h +noinst_HEADERS+= clients/ms_task.h +noinst_HEADERS+= clients/ms_thread.h +noinst_HEADERS+= clients/utilities.h + +noinst_LTLIBRARIES+= clients/libutilities.la +clients_libutilities_la_SOURCES= clients/utilities.cc + +clients_memcat_SOURCES= clients/memcat.cc +clients_memcat_LDADD= $(CLIENTS_LDADDS) + +clients_memparse_SOURCES= clients/memparse.cc +clients_memparse_LDADD= $(CLIENTS_LDADDS) + +clients_memcp_SOURCES= clients/memcp.cc +clients_memcp_LDADD= $(CLIENTS_LDADDS) + +clients_memdump_SOURCES= clients/memdump.cc +clients_memdump_LDADD= $(CLIENTS_LDADDS) + +clients_memstat_SOURCES= clients/memstat.cc +clients_memstat_LDADD= $(CLIENTS_LDADDS) + +clients_memrm_SOURCES= clients/memrm.cc +clients_memrm_LDADD= $(CLIENTS_LDADDS) + +clients_memexist_SOURCES= clients/memexist.cc +clients_memexist_LDADD= $(CLIENTS_LDADDS) + +clients_memtouch_SOURCES= clients/memtouch.cc +clients_memtouch_LDADD= $(CLIENTS_LDADDS) + +clients_memflush_SOURCES= clients/memflush.cc +clients_memflush_LDADD= $(CLIENTS_LDADDS) + +clients_memping_SOURCES= clients/memping.cc +clients_memping_LDADD= $(CLIENTS_LDADDS) libmemcached/libmemcachedutil.la + +clients_memerror_SOURCES= clients/memerror.cc +clients_memerror_LDADD= $(CLIENTS_LDADDS) + +clients_memslap_SOURCES = clients/memslap.cc +clients_memslap_SOURCES+= clients/generator.cc clients/execute.cc +clients_memslap_CXXFLAGS= @PTHREAD_CFLAGS@ +clients_memslap_LDADD= $(CLIENTS_LDADDS) +clients_memslap_LDADD+= @PTHREAD_LIBS@ + +clients_memaslap_SOURCES= +clients_memaslap_SOURCES+= clients/memaslap.c +clients_memaslap_SOURCES+= clients/ms_conn.c +clients_memaslap_SOURCES+= clients/ms_setting.c +clients_memaslap_SOURCES+= clients/ms_sigsegv.c +clients_memaslap_SOURCES+= clients/ms_stats.c +clients_memaslap_SOURCES+= clients/ms_task.c +clients_memaslap_SOURCES+= clients/ms_thread.c + +clients_memaslap_SOURCES+= clients/generator.cc clients/execute.cc +clients_memaslap_LDADD= +clients_memaslap_LDADD+= @LIBEVENT_LIB@ +clients_memaslap_LDADD+= $(CLIENTS_LDADDS) + +clients_memcapable_CXXFLAGS= @PTHREAD_CFLAGS@ +clients_memcapable_SOURCES= +clients_memcapable_SOURCES+= clients/memcapable.cc +clients_memcapable_SOURCES+= libmemcached/byteorder.cc +clients_memcapable_LDADD= $(CLIENTS_LDADDS) +clients_memcapable_LDADD+= @PTHREAD_LIBS@ + +test-start-server: + clients/memflush --servers=localhost + clients/memcp --servers=localhost /etc/services + clients/memcat --servers=localhost /etc/services + clients/memrm --servers=localhost /etc/services + clients/memstat --servers=localhost + clients/memslap --servers=localhost + clients/memslap --servers=localhost --concurrency=10 + clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 + clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 + clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 --test=get + clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 --test=set + clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 --test=set --non-blocking + +client-valgrind: + libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes clients/memslap --servers=localhost + libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes clients/memslap --servers=localhost --concurrency=10 + libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 + libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 + libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 --test=get + libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 --test=set + libtool --mode=execute valgrind --leak-check=yes --show-reachable=yes clients/memslap --servers=localhost --concurrency=10 --initial-load=1000 --execute-number=10 --test=set --non-blocking diff --git a/clients/memaslap.c b/clients/memaslap.c new file mode 100644 index 0000000..0290794 --- /dev/null +++ b/clients/memaslap.c @@ -0,0 +1,917 @@ +/* + * memslap + * + * (c) Copyright 2009, Schooner Information Technology, Inc. + * All rights reserved. + * http://www.schoonerinfotech.com/ + * + * Use and distribution licensed under the BSD license. See + * the COPYING file for full text. + * + * Authors: + * Brian Aker + * Mingqiang Zhuang + * + */ +#include "mem_config.h" + +#include +#include +#include + +#if defined(HAVE_SYS_TIME_H) +# include +#endif + +#if defined(HAVE_TIME_H) +# include +#endif + + +#include "ms_sigsegv.h" +#include "ms_setting.h" +#include "ms_thread.h" + +#define PROGRAM_NAME "memslap" +#define PROGRAM_DESCRIPTION \ + "Generates workload against memcached servers." + +#ifdef __sun + /* For some odd reason the option struct on solaris defines the argument + * as char* and not const char* + */ +#define OPTIONSTRING char* +#else +#define OPTIONSTRING const char* +#endif + +/* options */ +static struct option long_options[]= +{ + { (OPTIONSTRING)"servers", required_argument, NULL, + OPT_SERVERS }, + { (OPTIONSTRING)"threads", required_argument, NULL, + OPT_THREAD_NUMBER }, + { (OPTIONSTRING)"concurrency", required_argument, NULL, + OPT_CONCURRENCY }, + { (OPTIONSTRING)"conn_sock", required_argument, NULL, + OPT_SOCK_PER_CONN }, + { (OPTIONSTRING)"execute_number", required_argument, NULL, + OPT_EXECUTE_NUMBER }, + { (OPTIONSTRING)"time", required_argument, NULL, + OPT_TIME }, + { (OPTIONSTRING)"cfg_cmd", required_argument, NULL, + OPT_CONFIG_CMD }, + { (OPTIONSTRING)"win_size", required_argument, NULL, + OPT_WINDOW_SIZE }, + { (OPTIONSTRING)"fixed_size", required_argument, NULL, + OPT_FIXED_LTH }, + { (OPTIONSTRING)"verify", required_argument, NULL, + OPT_VERIFY }, + { (OPTIONSTRING)"division", required_argument, NULL, + OPT_GETS_DIVISION }, + { (OPTIONSTRING)"stat_freq", required_argument, NULL, + OPT_STAT_FREQ }, + { (OPTIONSTRING)"exp_verify", required_argument, NULL, + OPT_EXPIRE }, + { (OPTIONSTRING)"overwrite", required_argument, NULL, + OPT_OVERWRITE }, + { (OPTIONSTRING)"reconnect", no_argument, NULL, + OPT_RECONNECT }, + { (OPTIONSTRING)"udp", no_argument, NULL, + OPT_UDP }, + { (OPTIONSTRING)"facebook", no_argument, NULL, + OPT_FACEBOOK_TEST }, + { (OPTIONSTRING)"binary", no_argument, NULL, + OPT_BINARY_PROTOCOL }, + { (OPTIONSTRING)"tps", required_argument, NULL, + OPT_TPS }, + { (OPTIONSTRING)"rep_write", required_argument, NULL, + OPT_REP_WRITE_SRV }, + { (OPTIONSTRING)"verbose", no_argument, NULL, + OPT_VERBOSE }, + { (OPTIONSTRING)"help", no_argument, NULL, + OPT_HELP }, + { (OPTIONSTRING)"version", no_argument, NULL, + OPT_VERSION }, + { 0, 0, 0, 0 }, +}; + +/* Prototypes */ +static void ms_sync_lock_init(void); +static void ms_sync_lock_destroy(void); +static void ms_global_struct_init(void); +static void ms_global_struct_destroy(void); +static void ms_version_command(const char *command_name); +static const char *ms_lookup_help(ms_options_t option); +static int64_t ms_parse_time(void); +static int64_t ms_parse_size(void); +static void ms_options_parse(int argc, char *argv[]); +static int ms_check_para(void); +static void ms_statistic_init(void); +static void ms_stats_init(void); +static void ms_print_statistics(int in_time); +static void ms_print_memslap_stats(struct timeval *start_time, + struct timeval *end_time); +static void ms_monitor_slap_mode(void); + +/** + * output the help information + * + * @param command_name, the string of this process + * @param description, description of this process + * @param long_options, global options array + */ +static __attribute__((noreturn)) void ms_help_command(const char *command_name, const char *description) +{ + char *help_message= NULL; + + printf("%s v%u.%u\n", command_name, 1U, 0U); + printf(" %s\n\n", description); + printf( + "Usage:\n" + " memslap -hV | -s servers [-F config_file] [-t time | -x exe_num] [...]\n\n" + "Options:\n"); + + for (int x= 0; long_options[x].name; x++) + { + printf(" -%c, --%s%c\n", long_options[x].val, long_options[x].name, + long_options[x].has_arg ? '=' : ' '); + + if ((help_message= (char *)ms_lookup_help(long_options[x].val)) != NULL) + { + printf(" %s\n", help_message); + } + } + + printf( + "\nExamples:\n" + " memslap -s 127.0.0.1:11211 -S 5s\n" + " memslap -s 127.0.0.1:11211 -t 2m -v 0.2 -e 0.05 -b\n" + " memslap -s 127.0.0.1:11211 -F config -t 2m -w 40k -S 20s -o 0.2\n" + " memslap -s 127.0.0.1:11211 -F config -t 2m -T 4 -c 128 -d 20 -P 40k\n" + " memslap -s 127.0.0.1:11211 -F config -t 2m -d 50 -a -n 40\n" + " memslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m\n" + " memslap -s 127.0.0.1:11211,127.0.0.1:11212 -F config -t 2m -p 2\n\n"); + + exit(0); +} /* ms_help_command */ + + +/* initialize the global locks */ +static void ms_sync_lock_init() +{ + ms_global.init_lock.count= 0; + pthread_mutex_init(&ms_global.init_lock.lock, NULL); + pthread_cond_init(&ms_global.init_lock.cond, NULL); + + ms_global.warmup_lock.count = 0; + pthread_mutex_init(&ms_global.warmup_lock.lock, NULL); + pthread_cond_init(&ms_global.warmup_lock.cond, NULL); + + ms_global.run_lock.count= 0; + pthread_mutex_init(&ms_global.run_lock.lock, NULL); + pthread_cond_init(&ms_global.run_lock.cond, NULL); + + pthread_mutex_init(&ms_global.quit_mutex, NULL); + pthread_mutex_init(&ms_global.seq_mutex, NULL); +} /* ms_sync_lock_init */ + + +/* destroy the global locks */ +static void ms_sync_lock_destroy() +{ + pthread_mutex_destroy(&ms_global.init_lock.lock); + pthread_cond_destroy(&ms_global.init_lock.cond); + + pthread_mutex_destroy(&ms_global.warmup_lock.lock); + pthread_cond_destroy(&ms_global.warmup_lock.cond); + + pthread_mutex_destroy(&ms_global.run_lock.lock); + pthread_cond_destroy(&ms_global.run_lock.cond); + + pthread_mutex_destroy(&ms_global.quit_mutex); + pthread_mutex_destroy(&ms_global.seq_mutex); + + if (ms_setting.stat_freq > 0) + { + pthread_mutex_destroy(&ms_statistic.stat_mutex); + } +} /* ms_sync_lock_destroy */ + + +/* initialize the global structure */ +static void ms_global_struct_init() +{ + ms_sync_lock_init(); + ms_global.finish_warmup= false; + ms_global.time_out= false; +} + + +/* destroy the global structure */ +static void ms_global_struct_destroy() +{ + ms_sync_lock_destroy(); +} + + +/** + * output the version information + * + * @param command_name, the string of this process + */ +static void ms_version_command(const char *command_name) +{ + printf("%s v%u.%u\n", command_name, 1U, 0U); + exit(0); +} + + +/** + * get the description of the option + * + * @param option, option of command line + * + * @return char*, description of the command option + */ +static const char *ms_lookup_help(ms_options_t option) +{ + switch (option) + { + case OPT_SERVERS: + return + "List one or more servers to connect. Servers count must be less than\n" + " threads count. e.g.: --servers=localhost:1234,localhost:11211"; + + case OPT_VERSION: + return "Display the version of the application and then exit."; + + case OPT_HELP: + return "Display this message and then exit."; + + case OPT_EXECUTE_NUMBER: + return "Number of operations(get and set) to execute for the\n" + " given test. Default 1000000."; + + case OPT_THREAD_NUMBER: + return + "Number of threads to startup, better equal to CPU numbers. Default 8."; + + case OPT_CONCURRENCY: + return "Number of concurrency to simulate with load. Default 128."; + + case OPT_FIXED_LTH: + return "Fixed length of value."; + + case OPT_VERIFY: + return "The proportion of date verification, e.g.: --verify=0.01"; + + case OPT_GETS_DIVISION: + return "Number of keys to multi-get once. Default 1, means single get."; + + case OPT_TIME: + return + "How long the test to run, suffix: s-seconds, m-minutes, h-hours,\n" + " d-days e.g.: --time=2h."; + + case OPT_CONFIG_CMD: + return + "Load the configure file to get command,key and value distribution list."; + + case OPT_WINDOW_SIZE: + return + "Task window size of each concurrency, suffix: K, M e.g.: --win_size=10k.\n" + " Default 10k."; + + case OPT_UDP: + return + "UDP support, default memslap uses TCP, TCP port and UDP port of\n" + " server must be same."; + + case OPT_EXPIRE: + return + "The proportion of objects with expire time, e.g.: --exp_verify=0.01.\n" + " Default no object with expire time"; + + case OPT_OVERWRITE: + return + "The proportion of objects need overwrite, e.g.: --overwrite=0.01.\n" + " Default never overwrite object."; + + case OPT_STAT_FREQ: + return + "Frequency of dumping statistic information. suffix: s-seconds,\n" + " m-minutes, e.g.: --resp_freq=10s."; + + case OPT_SOCK_PER_CONN: + return "Number of TCP socks per concurrency. Default 1."; + + case OPT_RECONNECT: + return + "Reconnect support, when connection is closed it will be reconnected."; + + case OPT_VERBOSE: + return + "Whether it outputs detailed information when verification fails."; + + case OPT_FACEBOOK_TEST: + return + "Whether it enables facebook test feature, set with TCP and multi-get with UDP."; + + case OPT_BINARY_PROTOCOL: + return + "Whether it enables binary protocol. Default with ASCII protocol."; + + case OPT_TPS: + return "Expected throughput, suffix: K, e.g.: --tps=10k."; + + case OPT_REP_WRITE_SRV: + return "The first nth servers can write data, e.g.: --rep_write=2."; + + default: + return "Forgot to document this option :)"; + } /* switch */ +} /* ms_lookup_help */ + + +/* used to parse the time string */ +static int64_t ms_parse_time() +{ + int64_t ret= 0; + char unit= optarg[strlen(optarg) - 1]; + + optarg[strlen(optarg) - 1]= '\0'; + ret= atoi(optarg); + + switch (unit) + { + case 'd': + case 'D': + ret*= 24; + + case 'h': + case 'H': + ret*= 60; + + case 'm': + case 'M': + ret*= 60; + + case 's': + case 'S': + break; + + default: + ret= -1; + break; + } /* switch */ + + return ret; +} /* ms_parse_time */ + + +/* used to parse the size string */ +static int64_t ms_parse_size() +{ + int64_t ret= -1; + char unit= optarg[strlen(optarg) - 1]; + + optarg[strlen(optarg) - 1]= '\0'; + errno= 0; + ret= strtoll(optarg, (char **)NULL, 10); + if (errno != 0) + { + fprintf(stderr, "strtoll(optarg,..): %s\n", strerror(errno)); + exit(1); + } + + switch (unit) + { + case 'k': + case 'K': + ret*= 1024; + break; + + case 'm': + case 'M': + ret*= 1024 * 1024; + break; + + case 'g': + case 'G': + ret*= 1024 * 1024 * 1024; + break; + + default: + ret= -1; + break; + } /* switch */ + + return ret; +} /* ms_parse_size */ + + +/* used to parse the options of command line */ +static void ms_options_parse(int argc, char *argv[]) +{ + int option_index= 0; + int option_rv; + + while ((option_rv= getopt_long(argc, argv, "VhURbaBs:x:T:c:X:v:d:" + "t:S:F:w:e:o:n:P:p:", + long_options, &option_index)) != -1) + { + switch (option_rv) + { + case 0: + break; + + case OPT_VERSION: /* --version or -V */ + ms_version_command(PROGRAM_NAME); + break; + + case OPT_HELP: /* --help or -h */ + ms_help_command(PROGRAM_NAME, PROGRAM_DESCRIPTION); + break; + + case OPT_SERVERS: /* --servers or -s */ + ms_setting.srv_str= strdup(optarg); + break; + + case OPT_CONCURRENCY: /* --concurrency or -c */ + errno= 0; + ms_setting.nconns= (uint32_t)strtoul(optarg, (char **) NULL, 10); + if (ms_setting.nconns <= 0 || errno != 0) + { + fprintf(stderr, "Concurrency must be greater than 0.:-)\n"); + exit(1); + } + break; + + case OPT_EXECUTE_NUMBER: /* --execute_number or -x */ + errno= 0; + ms_setting.exec_num= (int)strtol(optarg, (char **) NULL, 10); + if (ms_setting.exec_num <= 0 || errno != 0) + { + fprintf(stderr, "Execute number must be greater than 0.:-)\n"); + exit(1); + } + break; + + case OPT_THREAD_NUMBER: /* --threads or -T */ + errno= 0; + ms_setting.nthreads= (uint32_t)strtoul(optarg, (char **) NULL, 10); + if (ms_setting.nthreads <= 0 || errno != 0) + { + fprintf(stderr, "Threads number must be greater than 0.:-)\n"); + exit(1); + } + break; + + case OPT_FIXED_LTH: /* --fixed_size or -X */ + errno= 0; + ms_setting.fixed_value_size= (size_t)strtoull(optarg, (char **) NULL, 10); + if ((ms_setting.fixed_value_size <= 0 || errno != 0) + || (ms_setting.fixed_value_size > MAX_VALUE_SIZE)) + { + fprintf(stderr, "Value size must be between 0 and 1M.:-)\n"); + exit(1); + } + break; + + case OPT_VERIFY: /* --verify or -v */ + ms_setting.verify_percent= atof(optarg); + if ((ms_setting.verify_percent <= 0) + || (ms_setting.verify_percent > 1.0)) + { + fprintf(stderr, "Data verification rate must be " + "greater than 0 and less than 1.0. :-)\n"); + exit(1); + } + break; + + case OPT_GETS_DIVISION: /* --division or -d */ + errno= 0; + ms_setting.mult_key_num= (int)strtol(optarg, (char **) NULL, 10); + if (ms_setting.mult_key_num <= 0 || errno != 0) + { + fprintf(stderr, "Multi-get key number must be greater than 0.:-)\n"); + exit(1); + } + break; + + case OPT_TIME: /* --time or -t */ + ms_setting.run_time= (int)ms_parse_time(); + if (ms_setting.run_time == -1) + { + fprintf(stderr, "Please specify the run time. :-)\n" + "'s' for second, 'm' for minute, 'h' for hour, " + "'d' for day. e.g.: --time=24h (means 24 hours).\n"); + exit(1); + } + + if (ms_setting.run_time == 0) + { + fprintf(stderr, "Running time can not be 0. :-)\n"); + exit(1); + } + break; + + case OPT_CONFIG_CMD: /* --cfg_cmd or -F */ + ms_setting.cfg_file= strdup(optarg); + break; + + case OPT_WINDOW_SIZE: /* --win_size or -w */ + ms_setting.win_size= (size_t)ms_parse_size(); + if (ms_setting.win_size == (size_t)-1) + { + fprintf( + stderr, + "Please specify the item window size. :-)\n" + "e.g.: --win_size=10k (means 10k task window size).\n"); + exit(1); + } + break; + + case OPT_UDP: /* --udp or -U*/ + ms_setting.udp= true; + break; + + case OPT_EXPIRE: /* --exp_verify or -e */ + ms_setting.exp_ver_per= atof(optarg); + if ((ms_setting.exp_ver_per <= 0) || (ms_setting.exp_ver_per > 1.0)) + { + fprintf(stderr, "Expire time verification rate must be " + "greater than 0 and less than 1.0. :-)\n"); + exit(1); + } + break; + + case OPT_OVERWRITE: /* --overwrite or -o */ + ms_setting.overwrite_percent= atof(optarg); + if ((ms_setting.overwrite_percent <= 0) + || (ms_setting.overwrite_percent > 1.0)) + { + fprintf(stderr, "Objects overwrite rate must be " + "greater than 0 and less than 1.0. :-)\n"); + exit(1); + } + break; + + case OPT_STAT_FREQ: /* --stat_freq or -S */ + ms_setting.stat_freq= (int)ms_parse_time(); + if (ms_setting.stat_freq == -1) + { + fprintf(stderr, "Please specify the frequency of dumping " + "statistic information. :-)\n" + "'s' for second, 'm' for minute, 'h' for hour, " + "'d' for day. e.g.: --time=24h (means 24 hours).\n"); + exit(1); + } + + if (ms_setting.stat_freq == 0) + { + fprintf(stderr, "The frequency of dumping statistic information " + "can not be 0. :-)\n"); + exit(1); + } + break; + + case OPT_SOCK_PER_CONN: /* --conn_sock or -n */ + errno= 0; + ms_setting.sock_per_conn= (uint32_t)strtoul(optarg, (char **) NULL, 10); + if (ms_setting.sock_per_conn <= 0 || errno != 0) + { + fprintf(stderr, "Number of socks of each concurrency " + "must be greater than 0.:-)\n"); + exit(1); + } + break; + + case OPT_RECONNECT: /* --reconnect or -R */ + ms_setting.reconnect= true; + break; + + case OPT_VERBOSE: /* --verbose or -b */ + ms_setting.verbose= true; + break; + + case OPT_FACEBOOK_TEST: /* --facebook or -a */ + ms_setting.facebook_test= true; + break; + + case OPT_BINARY_PROTOCOL: /* --binary or -B */ + ms_setting.binary_prot_= true; + break; + + case OPT_TPS: /* --tps or -P */ + ms_setting.expected_tps= (int)ms_parse_size(); + if (ms_setting.expected_tps == -1) + { + fprintf(stderr, + "Please specify the item expected throughput. :-)\n" + "e.g.: --tps=10k (means 10k throughput).\n"); + exit(1); + } + break; + + case OPT_REP_WRITE_SRV: /* --rep_write or -p */ + errno= 0; + ms_setting.rep_write_srv= (uint32_t)strtoul(optarg, (char **) NULL, 10); + if (ms_setting.rep_write_srv <= 0 || errno != 0) + { + fprintf(stderr, + "Number of replication writing server must be greater " + "than 0.:-)\n"); + exit(1); + } + break; + + case '?': + /* getopt_long already printed an error message. */ + exit(1); + + default: + abort(); + } /* switch */ + } +} /* ms_options_parse */ + + +static int ms_check_para() +{ + if (ms_setting.srv_str == NULL) + { + char *temp; + + if ((temp= getenv("MEMCACHED_SERVERS"))) + { + ms_setting.srv_str= strdup(temp); + } + else + { + fprintf(stderr, "No Servers provided\n\n"); + return -1; + } + } + + if (ms_setting.nconns % (uint32_t)ms_setting.nthreads != 0) + { + fprintf(stderr, "Concurrency must be the multiples of threads count.\n"); + return -1; + } + + if (ms_setting.win_size % UNIT_ITEMS_COUNT != 0) + { + fprintf(stderr, "Window size must be the multiples of 1024.\n\n"); + return -1; + } + + return EXIT_SUCCESS; +} /* ms_check_para */ + + +/* initialize the statistic structure */ +static void ms_statistic_init() +{ + pthread_mutex_init(&ms_statistic.stat_mutex, NULL); + ms_init_stats(&ms_statistic.get_stat, "Get"); + ms_init_stats(&ms_statistic.set_stat, "Set"); + ms_init_stats(&ms_statistic.total_stat, "Total"); +} /* ms_statistic_init */ + + +/* initialize the global state structure */ +static void ms_stats_init() +{ + memset(&ms_stats, 0, sizeof(ms_stats_t)); + if (ms_setting.stat_freq > 0) + { + ms_statistic_init(); + } +} /* ms_stats_init */ + + +/* use to output the statistic */ +static void ms_print_statistics(int in_time) +{ + int obj_size= (int)(ms_setting.avg_key_size + ms_setting.avg_val_size); + + printf("\033[1;1H\033[2J\n"); + ms_dump_format_stats(&ms_statistic.get_stat, in_time, + ms_setting.stat_freq, obj_size); + ms_dump_format_stats(&ms_statistic.set_stat, in_time, + ms_setting.stat_freq, obj_size); + ms_dump_format_stats(&ms_statistic.total_stat, in_time, + ms_setting.stat_freq, obj_size); +} /* ms_print_statistics */ + + +/* used to print the states of memslap */ +static void ms_print_memslap_stats(struct timeval *start_time, + struct timeval *end_time) +{ + char buf[1024]; + char *pos= buf; + + pos+= snprintf(pos, + sizeof(buf), "cmd_get: %lu\n", + (unsigned long) ms_stats.cmd_get); + pos+= snprintf(pos, + sizeof(buf) - (size_t)(pos -buf), + "cmd_set: %lu\n", + (unsigned long) ms_stats.cmd_set); + pos+= snprintf(pos, + sizeof(buf) - (size_t)(pos -buf), + "get_misses: %lu\n", + (unsigned long) ms_stats.get_misses); + + if (ms_setting.verify_percent > 0) + { + pos+= snprintf(pos, + sizeof(buf) - (size_t)(pos -buf), + "verify_misses: %lu\n", + (unsigned long) ms_stats.vef_miss); + pos+= snprintf(pos, + sizeof(buf) - (size_t)(pos -buf), + "verify_failed: %lu\n", + (unsigned long) ms_stats.vef_failed); + } + + if (ms_setting.exp_ver_per > 0) + { + pos+= snprintf(pos, + sizeof(buf) - (size_t)(pos -buf), + "expired_get: %lu\n", + (unsigned long) ms_stats.exp_get); + pos+= snprintf(pos, + sizeof(buf) - (size_t)(pos -buf), + "unexpired_unget: %lu\n", + (unsigned long) ms_stats.unexp_unget); + } + + pos+= snprintf(pos, + sizeof(buf) - (size_t)(pos -buf), + "written_bytes: %lu\n", + (unsigned long) ms_stats.bytes_written); + pos+= snprintf(pos, + sizeof(buf) - (size_t)(pos -buf), + "read_bytes: %lu\n", + (unsigned long) ms_stats.bytes_read); + pos+= snprintf(pos, + sizeof(buf) - (size_t)(pos -buf), + "object_bytes: %lu\n", + (unsigned long) ms_stats.obj_bytes); + + if (ms_setting.udp || ms_setting.facebook_test) + { + pos+= snprintf(pos, + sizeof(buf) - (size_t)(pos -buf), + "packet_disorder: %lu\n", + (unsigned long) ms_stats.pkt_disorder); + pos+= snprintf(pos, + sizeof(buf) - (size_t)(pos -buf), + "packet_drop: %lu\n", + (unsigned long)ms_stats.pkt_drop); + pos+= snprintf(pos, + sizeof(buf) - (size_t)(pos -buf), + "udp_timeout: %lu\n", + (unsigned long)ms_stats.udp_timeout); + } + + if (ms_setting.stat_freq > 0) + { + ms_dump_stats(&ms_statistic.get_stat); + ms_dump_stats(&ms_statistic.set_stat); + ms_dump_stats(&ms_statistic.total_stat); + } + + int64_t time_diff= ms_time_diff(start_time, end_time); + pos+= snprintf(pos, + sizeof(buf) - (size_t)(pos -buf), + "\nRun time: %.1fs Ops: %llu TPS: %.0Lf Net_rate: %.1fM/s\n", + (double)time_diff / 1000000, + (unsigned long long)(ms_stats.cmd_get + ms_stats.cmd_set), + (ms_stats.cmd_get + + ms_stats.cmd_set) / ((long double)time_diff / 1000000), + (double)( + ms_stats.bytes_written + + ms_stats.bytes_read) / 1024 / 1024 + / ((double)time_diff / 1000000)); + assert(pos <= buf); + + fprintf(stdout, "%s", buf); + fflush(stdout); +} /* ms_print_memslap_stats */ + + +/* the loop of the main thread, wait the work threads to complete */ +static void ms_monitor_slap_mode() +{ + struct timeval start_time, end_time; + + /* Wait all the threads complete initialization. */ + pthread_mutex_lock(&ms_global.init_lock.lock); + while (ms_global.init_lock.count < ms_setting.nthreads) + { + pthread_cond_wait(&ms_global.init_lock.cond, + &ms_global.init_lock.lock); + } + pthread_mutex_unlock(&ms_global.init_lock.lock); + + /* only when there is no set operation it need warm up */ + if (ms_setting.cmd_distr[CMD_SET].cmd_prop < PROP_ERROR) + { + /* Wait all the connects complete warm up. */ + pthread_mutex_lock(&ms_global.warmup_lock.lock); + while (ms_global.warmup_lock.count < ms_setting.nconns) + { + pthread_cond_wait(&ms_global.warmup_lock.cond, &ms_global.warmup_lock.lock); + } + pthread_mutex_unlock(&ms_global.warmup_lock.lock); + } + ms_global.finish_warmup= true; + + /* running in "run time" mode, user specify run time */ + if (ms_setting.run_time > 0) + { + int second= 0; + gettimeofday(&start_time, NULL); + while (1) + { + sleep(1); + second++; + + if ((ms_setting.stat_freq > 0) && (second % ms_setting.stat_freq == 0) + && (ms_stats.active_conns >= ms_setting.nconns) + && (ms_stats.active_conns <= INT_MAX)) + { + ms_print_statistics(second); + } + + if (ms_setting.run_time <= second) + { + ms_global.time_out= true; + break; + } + + /* all connections disconnect */ + if ((second > 5) && (ms_stats.active_conns == 0)) + { + break; + } + } + gettimeofday(&end_time, NULL); + sleep(1); /* wait all threads clean up */ + } + else + { + /* running in "execute number" mode, user specify execute number */ + gettimeofday(&start_time, NULL); + + /* + * We loop until we know that all connects have cleaned up. + */ + pthread_mutex_lock(&ms_global.run_lock.lock); + while (ms_global.run_lock.count < ms_setting.nconns) + { + pthread_cond_wait(&ms_global.run_lock.cond, &ms_global.run_lock.lock); + } + pthread_mutex_unlock(&ms_global.run_lock.lock); + + gettimeofday(&end_time, NULL); + } + + ms_print_memslap_stats(&start_time, &end_time); +} /* ms_monitor_slap_mode */ + + +/* the main function */ +int main(int argc, char *argv[]) +{ + srandom((unsigned int)time(NULL)); + ms_global_struct_init(); + + /* initialization */ + ms_setting_init_pre(); + ms_options_parse(argc, argv); + if (ms_check_para()) + { + ms_help_command(PROGRAM_NAME, PROGRAM_DESCRIPTION); + exit(1); + } + ms_setting_init_post(); + ms_stats_init(); + ms_thread_init(); + + /* waiting work thread complete its task */ + ms_monitor_slap_mode(); + + /* clean up */ + ms_thread_cleanup(); + ms_global_struct_destroy(); + ms_setting_cleanup(); + + return EXIT_SUCCESS; +} /* main */ diff --git a/clients/memcapable.cc b/clients/memcapable.cc new file mode 100644 index 0000000..3e9bfab --- /dev/null +++ b/clients/memcapable.cc @@ -0,0 +1,2252 @@ +/* LibMemcached + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: + * + */ + +/* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */ +#undef NDEBUG + +#include + +#ifdef HAVE_POLL_H +#include +#else +#include "poll/poll.h" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "libmemcached/socket.hpp" +#include "libmemcached/memcached/protocol_binary.h" +#include "libmemcached/byteorder.h" +#include "clients/utilities.h" + +#include + +#ifdef linux +/* /usr/include/netinet/in.h defines macros from ntohs() to _bswap_nn to + * optimize the conversion functions, but the prototypes generate warnings + * from gcc. The conversion methods isn't the bottleneck for my app, so + * just remove the warnings by undef'ing the optimization .. + */ +#undef ntohs +#undef ntohl +#endif + +/* Should we generate coredumps when we enounter an error (-c) */ +static bool do_core= false; +/* connection to the server */ +static memcached_socket_t sock; +/* Should the output from test failures be verbose or quiet? */ +static bool verbose= false; + +/* The number of seconds to wait for an IO-operation */ +static int timeout= 2; + +/* + * Instead of having to cast between the different datatypes we create + * a union of all of the different types of pacages we want to send. + * A lot of the different commands use the same packet layout, so I'll + * just define the different types I need. The typedefs only contain + * the header of the message, so we need some space for keys and body + * To avoid to have to do multiple writes, lets add a chunk of memory + * to use. 1k should be more than enough for header, key and body. + */ +typedef union +{ + protocol_binary_request_no_extras plain; + protocol_binary_request_flush flush; + protocol_binary_request_incr incr; + protocol_binary_request_set set; + char bytes[1024]; +} command; + +typedef union +{ + protocol_binary_response_no_extras plain; + protocol_binary_response_incr incr; + protocol_binary_response_decr decr; + char bytes[1024]; +} response; + +enum test_return +{ + TEST_SKIP, TEST_PASS, TEST_PASS_RECONNECT, TEST_FAIL +}; + +/** + * Try to get an addrinfo struct for a given port on a given host + */ +static struct addrinfo *lookuphost(const char *hostname, const char *port) +{ + struct addrinfo *ai= 0; + struct addrinfo hints; + memset(&hints, 0, sizeof(struct addrinfo)); + hints.ai_family=AF_UNSPEC; + hints.ai_protocol=IPPROTO_TCP; + hints.ai_socktype=SOCK_STREAM; + + int error= getaddrinfo(hostname, port, &hints, &ai); + if (error != 0) + { + if (error != EAI_SYSTEM) + { + fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(error)); + } + else + { + perror("getaddrinfo()"); + } + } + + return ai; +} + +/** + * Set the socket in nonblocking mode + * @return -1 if failure, the socket otherwise + */ +static memcached_socket_t set_noblock(void) +{ +#if defined(_WIN32) + u_long arg = 1; + if (ioctlsocket(sock, FIONBIO, &arg) == SOCKET_ERROR) + { + perror("Failed to set nonblocking io"); + closesocket(sock); + return INVALID_SOCKET; + } +#else + int flags= fcntl(sock, F_GETFL, 0); + if (flags == -1) + { + perror("Failed to get socket flags"); + memcached_close_socket(sock); + return INVALID_SOCKET; + } + + if ((flags & O_NONBLOCK) != O_NONBLOCK) + { + if (fcntl(sock, F_SETFL, flags | O_NONBLOCK) == -1) + { + perror("Failed to set socket to nonblocking mode"); + memcached_close_socket(sock); + return INVALID_SOCKET; + } + } +#endif + return sock; +} + +/** + * Try to open a connection to the server + * @param hostname the name of the server to connect to + * @param port the port number (or service) to connect to + * @return positive integer if success, -1 otherwise + */ +static memcached_socket_t connect_server(const char *hostname, const char *port) +{ + struct addrinfo *ai= lookuphost(hostname, port); + sock= INVALID_SOCKET; + if (ai != NULL) + { + if ((sock= socket(ai->ai_family, ai->ai_socktype, + ai->ai_protocol)) != INVALID_SOCKET) + { + if (connect(sock, ai->ai_addr, ai->ai_addrlen) == SOCKET_ERROR) + { + fprintf(stderr, "Failed to connect socket: %s\n", + strerror(get_socket_errno())); + closesocket(sock); + sock= INVALID_SOCKET; + } + else + { + sock= set_noblock(); + } + } + else + { + fprintf(stderr, "Failed to create socket: %s\n", strerror(get_socket_errno())); + } + + freeaddrinfo(ai); + } + + return sock; +} + +static ssize_t timeout_io_op(memcached_socket_t fd, short direction, void *buf, size_t len) +{ + ssize_t ret; + + if (direction == POLLOUT) + { + ret= send(fd, buf, len, 0); + } + else + { + ret= recv(fd, buf, len, 0); + } + + if (ret == SOCKET_ERROR && get_socket_errno() == EWOULDBLOCK) + { + struct pollfd fds; + memset(&fds, 0, sizeof(struct pollfd)); + fds.events= direction; + fds.fd= fd; + + int err= poll(&fds, 1, timeout * 1000); + if (err == 1) + { + if (direction == POLLOUT) + { + ret= send(fd, buf, len, 0); + } + else + { + ret= recv(fd, buf, len, 0); + } + } + else if (err == 0) + { + errno= ETIMEDOUT; + } + else + { + perror("Failed to poll"); + return -1; + } + } + + return ret; +} + +/** + * Ensure that an expression is true. If it isn't print out a message similar + * to assert() and create a coredump if the user wants that. If not an error + * message is returned. + * + */ +static enum test_return ensure(bool val, const char *expression, const char *file, int line) +{ + if (!val) + { + if (verbose) + { + fprintf(stdout, "\n%s:%d: %s", file, line, expression); + } + + if (do_core) + { + abort(); + } + + return TEST_FAIL; + } + + return TEST_PASS; +} + +#define verify(expression) do { if (ensure(expression, #expression, __FILE__, __LINE__) == TEST_FAIL) return TEST_FAIL; } while (0) +#define execute(expression) do { if (ensure(expression == TEST_PASS, #expression, __FILE__, __LINE__) == TEST_FAIL) return TEST_FAIL; } while (0) + +/** + * Send a chunk of memory over the socket (retry if the call is iterrupted + */ +static enum test_return retry_write(const void* buf, size_t len) +{ + size_t offset= 0; + const char* ptr= static_cast(buf); + + do + { + size_t num_bytes= len - offset; + ssize_t nw= timeout_io_op(sock, POLLOUT, (void*)(ptr + offset), num_bytes); + if (nw == -1) + { + verify(get_socket_errno() == EINTR || get_socket_errno() == EAGAIN); + } + else + { + offset+= (size_t)nw; + } + + } while (offset < len); + + return TEST_PASS; +} + +/** + * Resend a packet to the server (All fields in the command header should + * be in network byte order) + */ +static enum test_return resend_packet(command *cmd) +{ + size_t length= sizeof (protocol_binary_request_no_extras) + + ntohl(cmd->plain.message.header.request.bodylen); + + execute(retry_write(cmd, length)); + return TEST_PASS; +} + +/** + * Send a command to the server. The command header needs to be updated + * to network byte order + */ +static enum test_return send_packet(command *cmd) +{ + /* Fix the byteorder of the header */ + cmd->plain.message.header.request.keylen= + ntohs(cmd->plain.message.header.request.keylen); + cmd->plain.message.header.request.bodylen= + ntohl(cmd->plain.message.header.request.bodylen); + cmd->plain.message.header.request.cas= + memcached_ntohll(cmd->plain.message.header.request.cas); + + execute(resend_packet(cmd)); + return TEST_PASS; +} + +/** + * Read a fixed length chunk of data from the server + */ +static enum test_return retry_read(void *buf, size_t len) +{ + size_t offset= 0; + do + { + ssize_t nr= timeout_io_op(sock, POLLIN, ((char*) buf) + offset, len - offset); + switch (nr) { + case -1 : + fprintf(stderr, "Errno: %d %s\n", get_socket_errno(), strerror(errno)); + verify(get_socket_errno() == EINTR || get_socket_errno() == EAGAIN); + break; + + case 0: + return TEST_FAIL; + + default: + offset+= (size_t)nr; + } + } while (offset < len); + + return TEST_PASS; +} + +/** + * Receive a response from the server and conver the fields in the header + * to local byte order + */ +static enum test_return recv_packet(response *rsp) +{ + execute(retry_read(rsp, sizeof(protocol_binary_response_no_extras))); + + /* Fix the byte order in the packet header */ + rsp->plain.message.header.response.keylen= + ntohs(rsp->plain.message.header.response.keylen); + rsp->plain.message.header.response.status= + ntohs(rsp->plain.message.header.response.status); + rsp->plain.message.header.response.bodylen= + ntohl(rsp->plain.message.header.response.bodylen); + rsp->plain.message.header.response.cas= + memcached_ntohll(rsp->plain.message.header.response.cas); + + size_t bodysz= rsp->plain.message.header.response.bodylen; + if (bodysz > 0) + execute(retry_read(rsp->bytes + sizeof (protocol_binary_response_no_extras), bodysz)); + + return TEST_PASS; +} + +/** + * Create a storage command (add, set, replace etc) + * + * @param cmd destination buffer + * @param cc the storage command to create + * @param key the key to store + * @param keylen the length of the key + * @param dta the data to store with the key + * @param dtalen the length of the data to store with the key + * @param flags the flags to store along with the key + * @param exptime the expiry time for the key + */ +static void storage_command(command *cmd, + uint8_t cc, + const void* key, + size_t keylen, + const void* dta, + size_t dtalen, + uint32_t flags, + uint32_t exptime) +{ + /* all of the storage commands use the same command layout */ + protocol_binary_request_set *request= &cmd->set; + + memset(request, 0, sizeof (*request)); + request->message.header.request.magic= PROTOCOL_BINARY_REQ; + request->message.header.request.opcode= cc; + request->message.header.request.keylen= (uint16_t)keylen; + request->message.header.request.extlen= 8; + request->message.header.request.bodylen= (uint32_t)(keylen + 8 + dtalen); + request->message.header.request.opaque= 0xdeadbeef; + request->message.body.flags= flags; + request->message.body.expiration= exptime; + + off_t key_offset= sizeof (protocol_binary_request_no_extras) + 8; + memcpy(cmd->bytes + key_offset, key, keylen); + if (dta != NULL) + memcpy(cmd->bytes + key_offset + keylen, dta, dtalen); +} + +/** + * Create a basic command to send to the server + * @param cmd destination buffer + * @param cc the command to create + * @param key the key to store + * @param keylen the length of the key + * @param dta the data to store with the key + * @param dtalen the length of the data to store with the key + */ +static void raw_command(command *cmd, + uint8_t cc, + const void* key, + size_t keylen, + const void* dta, + size_t dtalen) +{ + /* all of the storage commands use the same command layout */ + memset(cmd, 0, sizeof (*cmd)); + cmd->plain.message.header.request.magic= PROTOCOL_BINARY_REQ; + cmd->plain.message.header.request.opcode= cc; + cmd->plain.message.header.request.keylen= (uint16_t)keylen; + cmd->plain.message.header.request.bodylen= (uint32_t)(keylen + dtalen); + cmd->plain.message.header.request.opaque= 0xdeadbeef; + + off_t key_offset= sizeof (protocol_binary_request_no_extras); + + if (key != NULL) + memcpy(cmd->bytes + key_offset, key, keylen); + + if (dta != NULL) + memcpy(cmd->bytes + key_offset + keylen, dta, dtalen); +} + +/** + * Create the flush command + * @param cmd destination buffer + * @param cc the command to create (FLUSH/FLUSHQ) + * @param exptime when to flush + * @param use_extra to force using of the extra field? + */ +static void flush_command(command *cmd, + uint8_t cc, uint32_t exptime, bool use_extra) +{ + memset(cmd, 0, sizeof (cmd->flush)); + cmd->flush.message.header.request.magic= PROTOCOL_BINARY_REQ; + cmd->flush.message.header.request.opcode= cc; + cmd->flush.message.header.request.opaque= 0xdeadbeef; + + if (exptime != 0 || use_extra) + { + cmd->flush.message.header.request.extlen= 4; + cmd->flush.message.body.expiration= htonl(exptime); + cmd->flush.message.header.request.bodylen= 4; + } +} + +/** + * Create a incr/decr command + * @param cc the cmd to create (FLUSH/FLUSHQ) + * @param key the key to operate on + * @param keylen the number of bytes in the key + * @param delta the number to add/subtract + * @param initial the initial value if the key doesn't exist + * @param exptime when the key should expire if it isn't set + */ +static void arithmetic_command(command *cmd, + uint8_t cc, + const void* key, + size_t keylen, + uint64_t delta, + uint64_t initial, + uint32_t exptime) +{ + memset(cmd, 0, sizeof (cmd->incr)); + cmd->incr.message.header.request.magic= PROTOCOL_BINARY_REQ; + cmd->incr.message.header.request.opcode= cc; + cmd->incr.message.header.request.keylen= (uint16_t)keylen; + cmd->incr.message.header.request.extlen= 20; + cmd->incr.message.header.request.bodylen= (uint32_t)(keylen + 20); + cmd->incr.message.header.request.opaque= 0xdeadbeef; + cmd->incr.message.body.delta= memcached_htonll(delta); + cmd->incr.message.body.initial= memcached_htonll(initial); + cmd->incr.message.body.expiration= htonl(exptime); + + off_t key_offset= sizeof (protocol_binary_request_no_extras) + 20; + memcpy(cmd->bytes + key_offset, key, keylen); +} + +/** + * Validate the response header from the server + * @param rsp the response to check + * @param cc the expected command + * @param status the expected status + */ +static enum test_return do_validate_response_header(response *rsp, + uint8_t cc, uint16_t status) +{ + verify(rsp->plain.message.header.response.magic == PROTOCOL_BINARY_RES); + verify(rsp->plain.message.header.response.opcode == cc); + verify(rsp->plain.message.header.response.datatype == PROTOCOL_BINARY_RAW_BYTES); + verify(rsp->plain.message.header.response.status == status); + verify(rsp->plain.message.header.response.opaque == 0xdeadbeef); + + if (status == PROTOCOL_BINARY_RESPONSE_SUCCESS) + { + switch (cc) { + case PROTOCOL_BINARY_CMD_ADDQ: + case PROTOCOL_BINARY_CMD_APPENDQ: + case PROTOCOL_BINARY_CMD_DECREMENTQ: + case PROTOCOL_BINARY_CMD_DELETEQ: + case PROTOCOL_BINARY_CMD_FLUSHQ: + case PROTOCOL_BINARY_CMD_INCREMENTQ: + case PROTOCOL_BINARY_CMD_PREPENDQ: + case PROTOCOL_BINARY_CMD_QUITQ: + case PROTOCOL_BINARY_CMD_REPLACEQ: + case PROTOCOL_BINARY_CMD_SETQ: + verify("Quiet command shouldn't return on success" == NULL); + default: + break; + } + + switch (cc) { + case PROTOCOL_BINARY_CMD_ADD: + case PROTOCOL_BINARY_CMD_REPLACE: + case PROTOCOL_BINARY_CMD_SET: + case PROTOCOL_BINARY_CMD_APPEND: + case PROTOCOL_BINARY_CMD_PREPEND: + verify(rsp->plain.message.header.response.keylen == 0); + verify(rsp->plain.message.header.response.extlen == 0); + verify(rsp->plain.message.header.response.bodylen == 0); + verify(rsp->plain.message.header.response.cas != 0); + break; + case PROTOCOL_BINARY_CMD_FLUSH: + case PROTOCOL_BINARY_CMD_NOOP: + case PROTOCOL_BINARY_CMD_QUIT: + case PROTOCOL_BINARY_CMD_DELETE: + verify(rsp->plain.message.header.response.keylen == 0); + verify(rsp->plain.message.header.response.extlen == 0); + verify(rsp->plain.message.header.response.bodylen == 0); + verify(rsp->plain.message.header.response.cas == 0); + break; + + case PROTOCOL_BINARY_CMD_DECREMENT: + case PROTOCOL_BINARY_CMD_INCREMENT: + verify(rsp->plain.message.header.response.keylen == 0); + verify(rsp->plain.message.header.response.extlen == 0); + verify(rsp->plain.message.header.response.bodylen == 8); + verify(rsp->plain.message.header.response.cas != 0); + break; + + case PROTOCOL_BINARY_CMD_STAT: + verify(rsp->plain.message.header.response.extlen == 0); + /* key and value exists in all packets except in the terminating */ + verify(rsp->plain.message.header.response.cas == 0); + break; + + case PROTOCOL_BINARY_CMD_VERSION: + verify(rsp->plain.message.header.response.keylen == 0); + verify(rsp->plain.message.header.response.extlen == 0); + verify(rsp->plain.message.header.response.bodylen != 0); + verify(rsp->plain.message.header.response.cas == 0); + break; + + case PROTOCOL_BINARY_CMD_GET: + case PROTOCOL_BINARY_CMD_GETQ: + verify(rsp->plain.message.header.response.keylen == 0); + verify(rsp->plain.message.header.response.extlen == 4); + verify(rsp->plain.message.header.response.cas != 0); + break; + + case PROTOCOL_BINARY_CMD_GETK: + case PROTOCOL_BINARY_CMD_GETKQ: + verify(rsp->plain.message.header.response.keylen != 0); + verify(rsp->plain.message.header.response.extlen == 4); + verify(rsp->plain.message.header.response.cas != 0); + break; + + default: + /* Undefined command code */ + break; + } + } + else + { + verify(rsp->plain.message.header.response.cas == 0); + verify(rsp->plain.message.header.response.extlen == 0); + if (cc != PROTOCOL_BINARY_CMD_GETK) + { + verify(rsp->plain.message.header.response.keylen == 0); + } + } + + return TEST_PASS; +} + +/* We call verify(validate_response_header), but that macro + * expects a boolean expression, and the function returns + * an enum.... Let's just create a macro to avoid cluttering + * the code with all of the == TEST_PASS ;-) + */ +#define validate_response_header(a,b,c) \ + do_validate_response_header(a,b,c) == TEST_PASS + + +static enum test_return send_binary_noop(void) +{ + command cmd; + raw_command(&cmd, PROTOCOL_BINARY_CMD_NOOP, NULL, 0, NULL, 0); + execute(send_packet(&cmd)); + return TEST_PASS; +} + +static enum test_return receive_binary_noop(void) +{ + response rsp; + execute(recv_packet(&rsp)); + verify(validate_response_header(&rsp, PROTOCOL_BINARY_CMD_NOOP, + PROTOCOL_BINARY_RESPONSE_SUCCESS)); + return TEST_PASS; +} + +static enum test_return test_binary_noop(void) +{ + execute(send_binary_noop()); + execute(receive_binary_noop()); + return TEST_PASS; +} + +static enum test_return test_binary_quit_impl(uint8_t cc) +{ + command cmd; + response rsp; + raw_command(&cmd, cc, NULL, 0, NULL, 0); + + execute(send_packet(&cmd)); + if (cc == PROTOCOL_BINARY_CMD_QUIT) + { + execute(recv_packet(&rsp)); + verify(validate_response_header(&rsp, PROTOCOL_BINARY_CMD_QUIT, + PROTOCOL_BINARY_RESPONSE_SUCCESS)); + } + + /* Socket should be closed now, read should return EXIT_SUCCESS */ + verify(timeout_io_op(sock, POLLIN, rsp.bytes, sizeof(rsp.bytes)) == 0); + + return TEST_PASS_RECONNECT; +} + +static enum test_return test_binary_quit(void) +{ + return test_binary_quit_impl(PROTOCOL_BINARY_CMD_QUIT); +} + +static enum test_return test_binary_quitq(void) +{ + return test_binary_quit_impl(PROTOCOL_BINARY_CMD_QUITQ); +} + +static enum test_return test_binary_set_impl(const char* key, uint8_t cc) +{ + command cmd; + response rsp; + + uint64_t value= 0xdeadbeefdeadcafeULL; + storage_command(&cmd, cc, key, strlen(key), &value, sizeof (value), 0, 0); + + /* set should always work */ + for (int ii= 0; ii < 10; ii++) + { + if (ii == 0) + { + execute(send_packet(&cmd)); + } + else + { + execute(resend_packet(&cmd)); + } + + if (cc == PROTOCOL_BINARY_CMD_SET) + { + execute(recv_packet(&rsp)); + verify(validate_response_header(&rsp, cc, PROTOCOL_BINARY_RESPONSE_SUCCESS)); + } + else + execute(test_binary_noop()); + } + + /* + * We need to get the current CAS id, and at this time we haven't + * verified that we have a working get + */ + if (cc == PROTOCOL_BINARY_CMD_SETQ) + { + cmd.set.message.header.request.opcode= PROTOCOL_BINARY_CMD_SET; + execute(resend_packet(&cmd)); + execute(recv_packet(&rsp)); + verify(validate_response_header(&rsp, PROTOCOL_BINARY_CMD_SET, + PROTOCOL_BINARY_RESPONSE_SUCCESS)); + cmd.set.message.header.request.opcode= PROTOCOL_BINARY_CMD_SETQ; + } + + /* try to set with the correct CAS value */ + cmd.plain.message.header.request.cas= memcached_htonll(rsp.plain.message.header.response.cas); + execute(resend_packet(&cmd)); + if (cc == PROTOCOL_BINARY_CMD_SET) + { + execute(recv_packet(&rsp)); + verify(validate_response_header(&rsp, cc, PROTOCOL_BINARY_RESPONSE_SUCCESS)); + } + else + execute(test_binary_noop()); + + /* try to set with an incorrect CAS value */ + cmd.plain.message.header.request.cas= memcached_htonll(rsp.plain.message.header.response.cas - 1); + execute(resend_packet(&cmd)); + execute(send_binary_noop()); + execute(recv_packet(&rsp)); + verify(validate_response_header(&rsp, cc, PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS)); + execute(receive_binary_noop()); + + return TEST_PASS; +} + +static enum test_return test_binary_set(void) +{ + return test_binary_set_impl("test_binary_set", PROTOCOL_BINARY_CMD_SET); +} + +static enum test_return test_binary_setq(void) +{ + return test_binary_set_impl("test_binary_setq", PROTOCOL_BINARY_CMD_SETQ); +} + +static enum test_return test_binary_add_impl(const char* key, uint8_t cc) +{ + command cmd; + response rsp; + uint64_t value= 0xdeadbeefdeadcafeULL; + storage_command(&cmd, cc, key, strlen(key), &value, sizeof (value), 0, 0); + + /* first add should work, rest of them should fail (even with cas + as wildcard */ + for (int ii=0; ii < 10; ii++) + { + if (ii == 0) + execute(send_packet(&cmd)); + else + execute(resend_packet(&cmd)); + + if (cc == PROTOCOL_BINARY_CMD_ADD || ii > 0) + { + uint16_t expected_result; + if (ii == 0) + expected_result= PROTOCOL_BINARY_RESPONSE_SUCCESS; + else + expected_result= PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS; + + execute(send_binary_noop()); + execute(recv_packet(&rsp)); + execute(receive_binary_noop()); + verify(validate_response_header(&rsp, cc, expected_result)); + } + else + execute(test_binary_noop()); + } + + return TEST_PASS; +} + +static enum test_return test_binary_add(void) +{ + return test_binary_add_impl("test_binary_add", PROTOCOL_BINARY_CMD_ADD); +} + +static enum test_return test_binary_addq(void) +{ + return test_binary_add_impl("test_binary_addq", PROTOCOL_BINARY_CMD_ADDQ); +} + +static enum test_return binary_set_item(const char *key, const char *value) +{ + command cmd; + response rsp; + storage_command(&cmd, PROTOCOL_BINARY_CMD_SET, key, strlen(key), + value, strlen(value), 0, 0); + execute(send_packet(&cmd)); + execute(recv_packet(&rsp)); + verify(validate_response_header(&rsp, PROTOCOL_BINARY_CMD_SET, + PROTOCOL_BINARY_RESPONSE_SUCCESS)); + return TEST_PASS; +} + +static enum test_return test_binary_replace_impl(const char* key, uint8_t cc) +{ + command cmd; + response rsp; + uint64_t value= 0xdeadbeefdeadcafeULL; + storage_command(&cmd, cc, key, strlen(key), &value, sizeof (value), 0, 0); + + /* first replace should fail, successive should succeed (when the + item is added! */ + for (int ii= 0; ii < 10; ii++) + { + if (ii == 0) + { + execute(send_packet(&cmd)); + } + else + { + execute(resend_packet(&cmd)); + } + + if (cc == PROTOCOL_BINARY_CMD_REPLACE || ii == 0) + { + uint16_t expected_result; + if (ii == 0) + { + expected_result=PROTOCOL_BINARY_RESPONSE_KEY_ENOENT; + } + else + { + expected_result=PROTOCOL_BINARY_RESPONSE_SUCCESS; + } + + execute(send_binary_noop()); + execute(recv_packet(&rsp)); + execute(receive_binary_noop()); + verify(validate_response_header(&rsp, cc, expected_result)); + + if (ii == 0) + execute(binary_set_item(key, key)); + } + else + { + execute(test_binary_noop()); + } + } + + /* verify that replace with CAS value works! */ + cmd.plain.message.header.request.cas= memcached_htonll(rsp.plain.message.header.response.cas); + execute(resend_packet(&cmd)); + + if (cc == PROTOCOL_BINARY_CMD_REPLACE) + { + execute(recv_packet(&rsp)); + verify(validate_response_header(&rsp, cc, PROTOCOL_BINARY_RESPONSE_SUCCESS)); + } + else + execute(test_binary_noop()); + + /* try to set with an incorrect CAS value */ + cmd.plain.message.header.request.cas= memcached_htonll(rsp.plain.message.header.response.cas - 1); + execute(resend_packet(&cmd)); + execute(send_binary_noop()); + execute(recv_packet(&rsp)); + execute(receive_binary_noop()); + verify(validate_response_header(&rsp, cc, PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS)); + + return TEST_PASS; +} + +static enum test_return test_binary_replace(void) +{ + return test_binary_replace_impl("test_binary_replace", PROTOCOL_BINARY_CMD_REPLACE); +} + +static enum test_return test_binary_replaceq(void) +{ + return test_binary_replace_impl("test_binary_replaceq", PROTOCOL_BINARY_CMD_REPLACEQ); +} + +static enum test_return test_binary_delete_impl(const char *key, uint8_t cc) +{ + command cmd; + response rsp; + raw_command(&cmd, cc, key, strlen(key), NULL, 0); + + /* The delete shouldn't work the first time, because the item isn't there */ + execute(send_packet(&cmd)); + execute(send_binary_noop()); + execute(recv_packet(&rsp)); + verify(validate_response_header(&rsp, cc, PROTOCOL_BINARY_RESPONSE_KEY_ENOENT)); + execute(receive_binary_noop()); + execute(binary_set_item(key, key)); + + /* The item should be present now, resend*/ + execute(resend_packet(&cmd)); + if (cc == PROTOCOL_BINARY_CMD_DELETE) + { + execute(recv_packet(&rsp)); + verify(validate_response_header(&rsp, cc, PROTOCOL_BINARY_RESPONSE_SUCCESS)); + } + + execute(test_binary_noop()); + + return TEST_PASS; +} + +static enum test_return test_binary_delete(void) +{ + return test_binary_delete_impl("test_binary_delete", PROTOCOL_BINARY_CMD_DELETE); +} + +static enum test_return test_binary_deleteq(void) +{ + return test_binary_delete_impl("test_binary_deleteq", PROTOCOL_BINARY_CMD_DELETEQ); +} + +static enum test_return test_binary_get_impl(const char *key, uint8_t cc) +{ + command cmd; + response rsp; + + raw_command(&cmd, cc, key, strlen(key), NULL, 0); + execute(send_packet(&cmd)); + execute(send_binary_noop()); + + if (cc == PROTOCOL_BINARY_CMD_GET || cc == PROTOCOL_BINARY_CMD_GETK) + { + execute(recv_packet(&rsp)); + verify(validate_response_header(&rsp, cc, PROTOCOL_BINARY_RESPONSE_KEY_ENOENT)); + } + + execute(receive_binary_noop()); + + execute(binary_set_item(key, key)); + execute(resend_packet(&cmd)); + execute(send_binary_noop()); + + execute(recv_packet(&rsp)); + verify(validate_response_header(&rsp, cc, PROTOCOL_BINARY_RESPONSE_SUCCESS)); + execute(receive_binary_noop()); + + return TEST_PASS; +} + +static enum test_return test_binary_get(void) +{ + return test_binary_get_impl("test_binary_get", PROTOCOL_BINARY_CMD_GET); +} + +static enum test_return test_binary_getk(void) +{ + return test_binary_get_impl("test_binary_getk", PROTOCOL_BINARY_CMD_GETK); +} + +static enum test_return test_binary_getq(void) +{ + return test_binary_get_impl("test_binary_getq", PROTOCOL_BINARY_CMD_GETQ); +} + +static enum test_return test_binary_getkq(void) +{ + return test_binary_get_impl("test_binary_getkq", PROTOCOL_BINARY_CMD_GETKQ); +} + +static enum test_return test_binary_incr_impl(const char* key, uint8_t cc) +{ + command cmd; + response rsp; + arithmetic_command(&cmd, cc, key, strlen(key), 1, 0, 0); + + uint64_t ii; + for (ii= 0; ii < 10; ++ii) + { + if (ii == 0) + execute(send_packet(&cmd)); + else + execute(resend_packet(&cmd)); + + if (cc == PROTOCOL_BINARY_CMD_INCREMENT) + { + execute(recv_packet(&rsp)); + verify(validate_response_header(&rsp, cc, PROTOCOL_BINARY_RESPONSE_SUCCESS)); + verify(memcached_ntohll(rsp.incr.message.body.value) == ii); + } + else + execute(test_binary_noop()); + } + + /* @todo add incorrect CAS */ + return TEST_PASS; +} + +static enum test_return test_binary_incr(void) +{ + return test_binary_incr_impl("test_binary_incr", PROTOCOL_BINARY_CMD_INCREMENT); +} + +static enum test_return test_binary_incrq(void) +{ + return test_binary_incr_impl("test_binary_incrq", PROTOCOL_BINARY_CMD_INCREMENTQ); +} + +static enum test_return test_binary_decr_impl(const char* key, uint8_t cc) +{ + command cmd; + response rsp; + arithmetic_command(&cmd, cc, key, strlen(key), 1, 9, 0); + + int ii; + for (ii= 9; ii > -1; --ii) + { + if (ii == 9) + execute(send_packet(&cmd)); + else + execute(resend_packet(&cmd)); + + if (cc == PROTOCOL_BINARY_CMD_DECREMENT) + { + execute(recv_packet(&rsp)); + verify(validate_response_header(&rsp, cc, PROTOCOL_BINARY_RESPONSE_SUCCESS)); + verify(memcached_ntohll(rsp.decr.message.body.value) == (uint64_t)ii); + } + else + execute(test_binary_noop()); + } + + /* decr 0 should not wrap */ + execute(resend_packet(&cmd)); + if (cc == PROTOCOL_BINARY_CMD_DECREMENT) + { + execute(recv_packet(&rsp)); + verify(validate_response_header(&rsp, cc, PROTOCOL_BINARY_RESPONSE_SUCCESS)); + verify(memcached_ntohll(rsp.decr.message.body.value) == 0); + } + else + { + /* @todo get the value and verify! */ + + } + + /* @todo add incorrect cas */ + execute(test_binary_noop()); + return TEST_PASS; +} + +static enum test_return test_binary_decr(void) +{ + return test_binary_decr_impl("test_binary_decr", + PROTOCOL_BINARY_CMD_DECREMENT); +} + +static enum test_return test_binary_decrq(void) +{ + return test_binary_decr_impl("test_binary_decrq", + PROTOCOL_BINARY_CMD_DECREMENTQ); +} + +static enum test_return test_binary_version(void) +{ + command cmd; + response rsp; + raw_command(&cmd, PROTOCOL_BINARY_CMD_VERSION, NULL, 0, NULL, 0); + + execute(send_packet(&cmd)); + execute(recv_packet(&rsp)); + verify(validate_response_header(&rsp, PROTOCOL_BINARY_CMD_VERSION, + PROTOCOL_BINARY_RESPONSE_SUCCESS)); + + return TEST_PASS; +} + +static enum test_return test_binary_flush_impl(const char *key, uint8_t cc) +{ + command cmd; + response rsp; + + for (int ii= 0; ii < 2; ++ii) + { + execute(binary_set_item(key, key)); + flush_command(&cmd, cc, 0, ii == 0); + execute(send_packet(&cmd)); + + if (cc == PROTOCOL_BINARY_CMD_FLUSH) + { + execute(recv_packet(&rsp)); + verify(validate_response_header(&rsp, cc, PROTOCOL_BINARY_RESPONSE_SUCCESS)); + } + else + execute(test_binary_noop()); + + raw_command(&cmd, PROTOCOL_BINARY_CMD_GET, key, strlen(key), NULL, 0); + execute(send_packet(&cmd)); + execute(recv_packet(&rsp)); + verify(validate_response_header(&rsp, PROTOCOL_BINARY_CMD_GET, + PROTOCOL_BINARY_RESPONSE_KEY_ENOENT)); + } + + return TEST_PASS; +} + +static enum test_return test_binary_flush(void) +{ + return test_binary_flush_impl("test_binary_flush", PROTOCOL_BINARY_CMD_FLUSH); +} + +static enum test_return test_binary_flushq(void) +{ + return test_binary_flush_impl("test_binary_flushq", PROTOCOL_BINARY_CMD_FLUSHQ); +} + +static enum test_return test_binary_concat_impl(const char *key, uint8_t cc) +{ + command cmd; + response rsp; + const char *value; + + if (cc == PROTOCOL_BINARY_CMD_APPEND || cc == PROTOCOL_BINARY_CMD_APPENDQ) + { + value="hello"; + } + else + { + value=" world"; + } + + execute(binary_set_item(key, value)); + + if (cc == PROTOCOL_BINARY_CMD_APPEND || cc == PROTOCOL_BINARY_CMD_APPENDQ) + { + value=" world"; + } + else + { + value="hello"; + } + + raw_command(&cmd, cc, key, strlen(key), value, strlen(value)); + execute(send_packet(&cmd)); + if (cc == PROTOCOL_BINARY_CMD_APPEND || cc == PROTOCOL_BINARY_CMD_PREPEND) + { + execute(recv_packet(&rsp)); + verify(validate_response_header(&rsp, cc, PROTOCOL_BINARY_RESPONSE_SUCCESS)); + } + else + { + execute(test_binary_noop()); + } + + raw_command(&cmd, PROTOCOL_BINARY_CMD_GET, key, strlen(key), NULL, 0); + execute(send_packet(&cmd)); + execute(recv_packet(&rsp)); + verify(validate_response_header(&rsp, PROTOCOL_BINARY_CMD_GET, + PROTOCOL_BINARY_RESPONSE_SUCCESS)); + verify(rsp.plain.message.header.response.bodylen - 4 == 11); + verify(memcmp(rsp.bytes + 28, "hello world", 11) == 0); + + return TEST_PASS; +} + +static enum test_return test_binary_append(void) +{ + return test_binary_concat_impl("test_binary_append", PROTOCOL_BINARY_CMD_APPEND); +} + +static enum test_return test_binary_prepend(void) +{ + return test_binary_concat_impl("test_binary_prepend", PROTOCOL_BINARY_CMD_PREPEND); +} + +static enum test_return test_binary_appendq(void) +{ + return test_binary_concat_impl("test_binary_appendq", PROTOCOL_BINARY_CMD_APPENDQ); +} + +static enum test_return test_binary_prependq(void) +{ + return test_binary_concat_impl("test_binary_prependq", PROTOCOL_BINARY_CMD_PREPENDQ); +} + +static enum test_return test_binary_stat(void) +{ + command cmd; + response rsp; + + raw_command(&cmd, PROTOCOL_BINARY_CMD_STAT, NULL, 0, NULL, 0); + execute(send_packet(&cmd)); + + do + { + execute(recv_packet(&rsp)); + verify(validate_response_header(&rsp, PROTOCOL_BINARY_CMD_STAT, + PROTOCOL_BINARY_RESPONSE_SUCCESS)); + } while (rsp.plain.message.header.response.keylen != 0); + + return TEST_PASS; +} + +static enum test_return send_string(const char *cmd) +{ + execute(retry_write(cmd, strlen(cmd))); + return TEST_PASS; +} + +static enum test_return receive_line(char *buffer, size_t size) +{ + size_t offset= 0; + while (offset < size) + { + execute(retry_read(buffer + offset, 1)); + if (buffer[offset] == '\n') + { + if (offset + 1 < size) + { + buffer[offset + 1]= '\0'; + return TEST_PASS; + } + else + return TEST_FAIL; + } + ++offset; + } + + return TEST_FAIL; +} + +static enum test_return receive_response(const char *msg) { + char buffer[80]; + execute(receive_line(buffer, sizeof(buffer))); + if (strcmp(msg, buffer) != 0) { + fprintf(stderr, "[%s]\n", buffer); + } + verify(strcmp(msg, buffer) == 0); + return TEST_PASS; +} + +static enum test_return receive_error_response(void) +{ + char buffer[80]; + execute(receive_line(buffer, sizeof(buffer))); + verify(strncmp(buffer, "ERROR", 5) == 0 || + strncmp(buffer, "CLIENT_ERROR", 12) == 0 || + strncmp(buffer, "SERVER_ERROR", 12) == 0); + return TEST_PASS; +} + +static enum test_return test_ascii_quit(void) +{ + /* Verify that quit handles unknown options */ + execute(send_string("quit foo bar\r\n")); + execute(receive_error_response()); + + /* quit doesn't support noreply */ + execute(send_string("quit noreply\r\n")); + execute(receive_error_response()); + + /* Verify that quit works */ + execute(send_string("quit\r\n")); + + /* Socket should be closed now, read should return EXIT_SUCCESS */ + char buffer[80]; + verify(timeout_io_op(sock, POLLIN, buffer, sizeof(buffer)) == 0); + return TEST_PASS_RECONNECT; + +} + +static enum test_return test_ascii_version(void) +{ + /* Verify that version command handles unknown options */ + execute(send_string("version foo bar\r\n")); + execute(receive_error_response()); + + /* version doesn't support noreply */ + execute(send_string("version noreply\r\n")); + execute(receive_error_response()); + + /* Verify that verify works */ + execute(send_string("version\r\n")); + char buffer[256]; + execute(receive_line(buffer, sizeof(buffer))); + verify(strncmp(buffer, "VERSION ", 8) == 0); + + return TEST_PASS; +} + +static enum test_return test_ascii_verbosity(void) +{ + /* This command does not adhere to the spec! */ + execute(send_string("verbosity foo bar my\r\n")); + execute(receive_error_response()); + + execute(send_string("verbosity noreply\r\n")); + execute(receive_error_response()); + + execute(send_string("verbosity 0 noreply\r\n")); + execute(test_ascii_version()); + + execute(send_string("verbosity\r\n")); + execute(receive_error_response()); + + execute(send_string("verbosity 1\r\n")); + execute(receive_response("OK\r\n")); + + execute(send_string("verbosity 0\r\n")); + execute(receive_response("OK\r\n")); + + return TEST_PASS; +} + + + +static enum test_return test_ascii_set_impl(const char* key, bool noreply) +{ + /* @todo add tests for bogus format! */ + char buffer[1024]; + snprintf(buffer, sizeof(buffer), "set %s 0 0 5%s\r\nvalue\r\n", key, noreply ? " noreply" : ""); + execute(send_string(buffer)); + + if (!noreply) + { + execute(receive_response("STORED\r\n")); + } + + return test_ascii_version(); +} + +static enum test_return test_ascii_set(void) +{ + return test_ascii_set_impl("test_ascii_set", false); +} + +static enum test_return test_ascii_set_noreply(void) +{ + return test_ascii_set_impl("test_ascii_set_noreply", true); +} + +static enum test_return test_ascii_add_impl(const char* key, bool noreply) +{ + /* @todo add tests for bogus format! */ + char buffer[1024]; + snprintf(buffer, sizeof(buffer), "add %s 0 0 5%s\r\nvalue\r\n", key, noreply ? " noreply" : ""); + execute(send_string(buffer)); + + if (!noreply) + { + execute(receive_response("STORED\r\n")); + } + + execute(send_string(buffer)); + + if (!noreply) + { + execute(receive_response("NOT_STORED\r\n")); + } + + return test_ascii_version(); +} + +static enum test_return test_ascii_add(void) +{ + return test_ascii_add_impl("test_ascii_add", false); +} + +static enum test_return test_ascii_add_noreply(void) +{ + return test_ascii_add_impl("test_ascii_add_noreply", true); +} + +static enum test_return ascii_get_unknown_value(char **key, char **value, ssize_t *ndata) +{ + char buffer[1024]; + + execute(receive_line(buffer, sizeof(buffer))); + verify(strncmp(buffer, "VALUE ", 6) == 0); + char *end= strchr(buffer + 6, ' '); + verify(end != NULL); + if (end) + { + *end= '\0'; + } + *key= strdup(buffer + 6); + verify(*key != NULL); + char *ptr= end + 1; + + errno= 0; + unsigned long val= strtoul(ptr, &end, 10); /* flags */ + verify(errno == 0); + verify(ptr != end); + verify(val == 0); + verify(end != NULL); + errno= 0; + *ndata = (ssize_t)strtoul(end, &end, 10); /* size */ + verify(errno == 0); + verify(ptr != end); + verify(end != NULL); + while (end and *end != '\n' and isspace(*end)) + ++end; + verify(end and *end == '\n'); + + *value= static_cast(malloc((size_t)*ndata)); + verify(*value != NULL); + + execute(retry_read(*value, (size_t)*ndata)); + + execute(retry_read(buffer, 2)); + verify(memcmp(buffer, "\r\n", 2) == 0); + + return TEST_PASS; +} + +static enum test_return ascii_get_value(const char *key, const char *value) +{ + + char buffer[1024]; + size_t datasize= strlen(value); + + verify(datasize < sizeof(buffer)); + execute(receive_line(buffer, sizeof(buffer))); + verify(strncmp(buffer, "VALUE ", 6) == 0); + verify(strncmp(buffer + 6, key, strlen(key)) == 0); + char *ptr= buffer + 6 + strlen(key) + 1; + char *end; + + errno= 0; + unsigned long val= strtoul(ptr, &end, 10); /* flags */ + verify(errno == 0); + verify(ptr != end); + verify(val == 0); + verify(end != NULL); + + errno= 0; + val= strtoul(end, &end, 10); /* size */ + verify(errno == 0); + verify(ptr != end); + verify(val == datasize); + verify(end != NULL); + while (end and *end != '\n' and isspace(*end)) + { + ++end; + } + verify(end and *end == '\n'); + + execute(retry_read(buffer, datasize)); + verify(memcmp(buffer, value, datasize) == 0); + + execute(retry_read(buffer, 2)); + verify(memcmp(buffer, "\r\n", 2) == 0); + + return TEST_PASS; +} + +static enum test_return ascii_get_item(const char *key, const char *value, + bool exist) +{ + char buffer[1024]; + size_t datasize= 0; + if (value != NULL) + { + datasize= strlen(value); + } + + verify(datasize < sizeof(buffer)); + snprintf(buffer, sizeof(buffer), "get %s\r\n", key); + execute(send_string(buffer)); + + if (exist) + { + execute(ascii_get_value(key, value)); + } + + execute(retry_read(buffer, 5)); + verify(memcmp(buffer, "END\r\n", 5) == 0); + + return TEST_PASS; +} + +static enum test_return ascii_gets_value(const char *key, const char *value, + unsigned long *cas) +{ + + char buffer[1024]; + size_t datasize= strlen(value); + + verify(datasize < sizeof(buffer)); + execute(receive_line(buffer, sizeof(buffer))); + verify(strncmp(buffer, "VALUE ", 6) == 0); + verify(strncmp(buffer + 6, key, strlen(key)) == 0); + char *ptr= buffer + 6 + strlen(key) + 1; + char *end; + + errno= 0; + unsigned long val= strtoul(ptr, &end, 10); /* flags */ + verify(errno == 0); + verify(ptr != end); + verify(val == 0); + verify(end != NULL); + + errno= 0; + val= strtoul(end, &end, 10); /* size */ + verify(errno == 0); + verify(ptr != end); + verify(val == datasize); + verify(end != NULL); + + errno= 0; + *cas= strtoul(end, &end, 10); /* cas */ + verify(errno == 0); + verify(ptr != end); + verify(val == datasize); + verify(end != NULL); + + while (end and *end != '\n' and isspace(*end)) + { + ++end; + } + verify(end and *end == '\n'); + + execute(retry_read(buffer, datasize)); + verify(memcmp(buffer, value, datasize) == 0); + + execute(retry_read(buffer, 2)); + verify(memcmp(buffer, "\r\n", 2) == 0); + + return TEST_PASS; +} + +static enum test_return ascii_gets_item(const char *key, const char *value, + bool exist, unsigned long *cas) +{ + char buffer[1024]; + size_t datasize= 0; + if (value != NULL) + { + datasize= strlen(value); + } + + verify(datasize < sizeof(buffer)); + snprintf(buffer, sizeof(buffer), "gets %s\r\n", key); + execute(send_string(buffer)); + + if (exist) + execute(ascii_gets_value(key, value, cas)); + + execute(retry_read(buffer, 5)); + verify(memcmp(buffer, "END\r\n", 5) == 0); + + return TEST_PASS; +} + +static enum test_return ascii_set_item(const char *key, const char *value) +{ + char buffer[300]; + size_t len= strlen(value); + snprintf(buffer, sizeof(buffer), "set %s 0 0 %u\r\n", key, (unsigned int)len); + execute(send_string(buffer)); + execute(retry_write(value, len)); + execute(send_string("\r\n")); + execute(receive_response("STORED\r\n")); + return TEST_PASS; +} + +static enum test_return test_ascii_replace_impl(const char* key, bool noreply) +{ + char buffer[1024]; + snprintf(buffer, sizeof(buffer), "replace %s 0 0 5%s\r\nvalue\r\n", key, noreply ? " noreply" : ""); + execute(send_string(buffer)); + + if (noreply) + { + execute(test_ascii_version()); + } + else + { + execute(receive_response("NOT_STORED\r\n")); + } + + execute(ascii_set_item(key, "value")); + execute(ascii_get_item(key, "value", true)); + + + execute(send_string(buffer)); + + if (noreply) + execute(test_ascii_version()); + else + execute(receive_response("STORED\r\n")); + + return test_ascii_version(); +} + +static enum test_return test_ascii_replace(void) +{ + return test_ascii_replace_impl("test_ascii_replace", false); +} + +static enum test_return test_ascii_replace_noreply(void) +{ + return test_ascii_replace_impl("test_ascii_replace_noreply", true); +} + +static enum test_return test_ascii_cas_impl(const char* key, bool noreply) +{ + char buffer[1024]; + unsigned long cas; + + execute(ascii_set_item(key, "value")); + execute(ascii_gets_item(key, "value", true, &cas)); + + snprintf(buffer, sizeof(buffer), "cas %s 0 0 6 %lu%s\r\nvalue2\r\n", key, cas, noreply ? " noreply" : ""); + execute(send_string(buffer)); + + if (noreply) + { + execute(test_ascii_version()); + } + else + { + execute(receive_response("STORED\r\n")); + } + + /* reexecute the same command should fail due to illegal cas */ + execute(send_string(buffer)); + + if (noreply) + { + execute(test_ascii_version()); + } + else + { + execute(receive_response("EXISTS\r\n")); + } + + return test_ascii_version(); +} + +static enum test_return test_ascii_cas(void) +{ + return test_ascii_cas_impl("test_ascii_cas", false); +} + +static enum test_return test_ascii_cas_noreply(void) +{ + return test_ascii_cas_impl("test_ascii_cas_noreply", true); +} + +static enum test_return test_ascii_delete_impl(const char *key, bool noreply) +{ + execute(ascii_set_item(key, "value")); + + execute(send_string("delete\r\n")); + execute(receive_error_response()); + /* BUG: the server accepts delete a b */ + execute(send_string("delete a b c d e\r\n")); + execute(receive_error_response()); + + char buffer[1024]; + snprintf(buffer, sizeof(buffer), "delete %s%s\r\n", key, noreply ? " noreply" : ""); + execute(send_string(buffer)); + + if (noreply) + execute(test_ascii_version()); + else + execute(receive_response("DELETED\r\n")); + + execute(ascii_get_item(key, "value", false)); + execute(send_string(buffer)); + if (noreply) + execute(test_ascii_version()); + else + execute(receive_response("NOT_FOUND\r\n")); + + return TEST_PASS; +} + +static enum test_return test_ascii_delete(void) +{ + return test_ascii_delete_impl("test_ascii_delete", false); +} + +static enum test_return test_ascii_delete_noreply(void) +{ + return test_ascii_delete_impl("test_ascii_delete_noreply", true); +} + +static enum test_return test_ascii_get(void) +{ + execute(ascii_set_item("test_ascii_get", "value")); + + execute(send_string("get\r\n")); + execute(receive_error_response()); + execute(ascii_get_item("test_ascii_get", "value", true)); + execute(ascii_get_item("test_ascii_get_notfound", "value", false)); + + return TEST_PASS; +} + +static enum test_return test_ascii_gets(void) +{ + execute(ascii_set_item("test_ascii_gets", "value")); + + execute(send_string("gets\r\n")); + execute(receive_error_response()); + unsigned long cas; + execute(ascii_gets_item("test_ascii_gets", "value", true, &cas)); + execute(ascii_gets_item("test_ascii_gets_notfound", "value", false, &cas)); + + return TEST_PASS; +} + +static enum test_return test_ascii_mget(void) +{ + const uint32_t nkeys= 5; + const char * const keys[]= { + "test_ascii_mget1", + "test_ascii_mget2", + /* test_ascii_mget_3 does not exist :) */ + "test_ascii_mget4", + "test_ascii_mget5", + "test_ascii_mget6" + }; + + for (uint32_t x= 0; x < nkeys; ++x) + { + execute(ascii_set_item(keys[x], "value")); + } + + /* Ask for a key that doesn't exist as well */ + execute(send_string("get test_ascii_mget1 test_ascii_mget2 test_ascii_mget3 " + "test_ascii_mget4 test_ascii_mget5 " + "test_ascii_mget6\r\n")); + + std::vector returned; + returned.resize(nkeys); + + for (uint32_t x= 0; x < nkeys; ++x) + { + ssize_t nbytes = 0; + char *v= NULL; + execute(ascii_get_unknown_value(&returned[x], &v, &nbytes)); + verify(nbytes == 5); + verify(memcmp(v, "value", 5) == 0); + free(v); + } + + char buffer[5]; + execute(retry_read(buffer, 5)); + verify(memcmp(buffer, "END\r\n", 5) == 0); + + /* verify that we got all the keys we expected */ + for (uint32_t x= 0; x < nkeys; ++x) + { + bool found= false; + for (uint32_t y= 0; y < nkeys; ++y) + { + if (strcmp(keys[x], returned[y]) == 0) + { + found = true; + break; + } + } + verify(found); + } + + for (uint32_t x= 0; x < nkeys; ++x) + { + free(returned[x]); + } + + return TEST_PASS; +} + +static enum test_return test_ascii_incr_impl(const char* key, bool noreply) +{ + char cmd[300]; + snprintf(cmd, sizeof(cmd), "incr %s 1%s\r\n", key, noreply ? " noreply" : ""); + + execute(ascii_set_item(key, "0")); + for (int x= 1; x < 11; ++x) + { + execute(send_string(cmd)); + + if (noreply) + execute(test_ascii_version()); + else + { + char buffer[80]; + execute(receive_line(buffer, sizeof(buffer))); + int val= atoi(buffer); + verify(val == x); + } + } + + execute(ascii_get_item(key, "10", true)); + + return TEST_PASS; +} + +static enum test_return test_ascii_incr(void) +{ + return test_ascii_incr_impl("test_ascii_incr", false); +} + +static enum test_return test_ascii_incr_noreply(void) +{ + return test_ascii_incr_impl("test_ascii_incr_noreply", true); +} + +static enum test_return test_ascii_decr_impl(const char* key, bool noreply) +{ + char cmd[300]; + snprintf(cmd, sizeof(cmd), "decr %s 1%s\r\n", key, noreply ? " noreply" : ""); + + execute(ascii_set_item(key, "9")); + for (int x= 8; x > -1; --x) + { + execute(send_string(cmd)); + + if (noreply) + { + execute(test_ascii_version()); + } + else + { + char buffer[80]; + execute(receive_line(buffer, sizeof(buffer))); + int val= atoi(buffer); + verify(val == x); + } + } + + execute(ascii_get_item(key, "0", true)); + + /* verify that it doesn't wrap */ + execute(send_string(cmd)); + if (noreply) + { + execute(test_ascii_version()); + } + else + { + char buffer[80]; + execute(receive_line(buffer, sizeof(buffer))); + } + execute(ascii_get_item(key, "0", true)); + + return TEST_PASS; +} + +static enum test_return test_ascii_decr(void) +{ + return test_ascii_decr_impl("test_ascii_decr", false); +} + +static enum test_return test_ascii_decr_noreply(void) +{ + return test_ascii_decr_impl("test_ascii_decr_noreply", true); +} + + +static enum test_return test_ascii_flush_impl(const char *key, bool noreply) +{ +#if 0 + /* Verify that the flush_all command handles unknown options */ + /* Bug in the current memcached server! */ + execute(send_string("flush_all foo bar\r\n")); + execute(receive_error_response()); +#endif + + execute(ascii_set_item(key, key)); + execute(ascii_get_item(key, key, true)); + + if (noreply) + { + execute(send_string("flush_all noreply\r\n")); + execute(test_ascii_version()); + } + else + { + execute(send_string("flush_all\r\n")); + execute(receive_response("OK\r\n")); + } + + execute(ascii_get_item(key, key, false)); + + return TEST_PASS; +} + +static enum test_return test_ascii_flush(void) +{ + return test_ascii_flush_impl("test_ascii_flush", false); +} + +static enum test_return test_ascii_flush_noreply(void) +{ + return test_ascii_flush_impl("test_ascii_flush_noreply", true); +} + +static enum test_return test_ascii_concat_impl(const char *key, + bool append, + bool noreply) +{ + const char *value; + + if (append) + value="hello"; + else + value=" world"; + + execute(ascii_set_item(key, value)); + + if (append) + { + value=" world"; + } + else + { + value="hello"; + } + + char cmd[400]; + snprintf(cmd, sizeof(cmd), "%s %s 0 0 %u%s\r\n%s\r\n", + append ? "append" : "prepend", + key, (unsigned int)strlen(value), noreply ? " noreply" : "", + value); + execute(send_string(cmd)); + + if (noreply) + { + execute(test_ascii_version()); + } + else + { + execute(receive_response("STORED\r\n")); + } + + execute(ascii_get_item(key, "hello world", true)); + + snprintf(cmd, sizeof(cmd), "%s %s_notfound 0 0 %u%s\r\n%s\r\n", + append ? "append" : "prepend", + key, (unsigned int)strlen(value), noreply ? " noreply" : "", + value); + execute(send_string(cmd)); + + if (noreply) + { + execute(test_ascii_version()); + } + else + { + execute(receive_response("NOT_STORED\r\n")); + } + + return TEST_PASS; +} + +static enum test_return test_ascii_append(void) +{ + return test_ascii_concat_impl("test_ascii_append", true, false); +} + +static enum test_return test_ascii_prepend(void) +{ + return test_ascii_concat_impl("test_ascii_prepend", false, false); +} + +static enum test_return test_ascii_append_noreply(void) +{ + return test_ascii_concat_impl("test_ascii_append_noreply", true, true); +} + +static enum test_return test_ascii_prepend_noreply(void) +{ + return test_ascii_concat_impl("test_ascii_prepend_noreply", false, true); +} + +static enum test_return test_ascii_stat(void) +{ + execute(send_string("stats noreply\r\n")); + execute(receive_error_response()); + execute(send_string("stats\r\n")); + char buffer[1024]; + do { + execute(receive_line(buffer, sizeof(buffer))); + } while (strcmp(buffer, "END\r\n") != 0); + + return TEST_PASS_RECONNECT; +} + +typedef enum test_return(*TEST_FUNC)(void); + +struct testcase +{ + const char *description; + TEST_FUNC function; +}; + +struct testcase testcases[]= { + { "ascii quit", test_ascii_quit }, + { "ascii version", test_ascii_version }, + { "ascii verbosity", test_ascii_verbosity }, + { "ascii set", test_ascii_set }, + { "ascii set noreply", test_ascii_set_noreply }, + { "ascii get", test_ascii_get }, + { "ascii gets", test_ascii_gets }, + { "ascii mget", test_ascii_mget }, + { "ascii flush", test_ascii_flush }, + { "ascii flush noreply", test_ascii_flush_noreply }, + { "ascii add", test_ascii_add }, + { "ascii add noreply", test_ascii_add_noreply }, + { "ascii replace", test_ascii_replace }, + { "ascii replace noreply", test_ascii_replace_noreply }, + { "ascii cas", test_ascii_cas }, + { "ascii cas noreply", test_ascii_cas_noreply }, + { "ascii delete", test_ascii_delete }, + { "ascii delete noreply", test_ascii_delete_noreply }, + { "ascii incr", test_ascii_incr }, + { "ascii incr noreply", test_ascii_incr_noreply }, + { "ascii decr", test_ascii_decr }, + { "ascii decr noreply", test_ascii_decr_noreply }, + { "ascii append", test_ascii_append }, + { "ascii append noreply", test_ascii_append_noreply }, + { "ascii prepend", test_ascii_prepend }, + { "ascii prepend noreply", test_ascii_prepend_noreply }, + { "ascii stat", test_ascii_stat }, + { "binary noop", test_binary_noop }, + { "binary quit", test_binary_quit }, + { "binary quitq", test_binary_quitq }, + { "binary set", test_binary_set }, + { "binary setq", test_binary_setq }, + { "binary flush", test_binary_flush }, + { "binary flushq", test_binary_flushq }, + { "binary add", test_binary_add }, + { "binary addq", test_binary_addq }, + { "binary replace", test_binary_replace }, + { "binary replaceq", test_binary_replaceq }, + { "binary delete", test_binary_delete }, + { "binary deleteq", test_binary_deleteq }, + { "binary get", test_binary_get }, + { "binary getq", test_binary_getq }, + { "binary getk", test_binary_getk }, + { "binary getkq", test_binary_getkq }, + { "binary incr", test_binary_incr }, + { "binary incrq", test_binary_incrq }, + { "binary decr", test_binary_decr }, + { "binary decrq", test_binary_decrq }, + { "binary version", test_binary_version }, + { "binary append", test_binary_append }, + { "binary appendq", test_binary_appendq }, + { "binary prepend", test_binary_prepend }, + { "binary prependq", test_binary_prependq }, + { "binary stat", test_binary_stat }, + { NULL, NULL} +}; + +const int ascii_tests = 1; +const int binary_tests = 2; + +struct test_type_st +{ + bool ascii; + bool binary; +}; + +int main(int argc, char **argv) +{ + static const char * const status_msg[]= {"[skip]", "[pass]", "[pass]", "[FAIL]"}; + struct test_type_st tests= { true, true }; + int total= 0; + int failed= 0; + const char *hostname= NULL; + const char *port= MEMCACHED_DEFAULT_PORT_STRING; + int cmd; + bool prompt= false; + const char *testname= NULL; + + + + while ((cmd= getopt(argc, argv, "qt:vch:p:PT:?ab")) != EOF) + { + switch (cmd) { + case 'a': + tests.ascii= true; + tests.binary= false; + break; + + case 'b': + tests.ascii= false; + tests.binary= true; + break; + + case 't': + timeout= atoi(optarg); + if (timeout == 0) + { + fprintf(stderr, "Invalid timeout. Please specify a number for -t\n"); + return EXIT_FAILURE; + } + break; + + case 'v': verbose= true; + break; + + case 'c': do_core= true; + break; + + case 'h': hostname= optarg; + break; + + case 'p': port= optarg; + break; + + case 'q': + close_stdio(); + break; + + case 'P': prompt= true; + break; + + case 'T': testname= optarg; + break; + + default: + fprintf(stderr, "Usage: %s [-h hostname] [-p port] [-c] [-v] [-t n] [-P] [-T testname]'\n" + "\t-c\tGenerate coredump if a test fails\n" + "\t-v\tVerbose test output (print out the assertion)\n" + "\t-t n\tSet the timeout for io-operations to n seconds\n" + "\t-P\tPrompt the user before starting a test.\n" + "\t\t\t\"skip\" will skip the test\n" + "\t\t\t\"quit\" will terminate memcapable\n" + "\t\t\tEverything else will start the test\n" + "\t-T n\tJust run the test named n\n" + "\t-a\tOnly test the ascii protocol\n" + "\t-b\tOnly test the binary protocol\n", + argv[0]); + return EXIT_SUCCESS; + } + } + + if (hostname) + { + fprintf(stderr, "No hostname was provided.\n"); + return EXIT_FAILURE; + } + + initialize_sockets(); + sock= connect_server(hostname, port); + if (sock == INVALID_SOCKET) + { + fprintf(stderr, "Failed to connect to <%s:%s>: %s\n", + hostname, port, strerror(get_socket_errno())); + return EXIT_FAILURE; + } + + for (int ii= 0; testcases[ii].description != NULL; ++ii) + { + if (testname != NULL && strcmp(testcases[ii].description, testname) != 0) + { + continue; + } + + if ((testcases[ii].description[0] == 'a' && (tests.ascii) == 0) || + (testcases[ii].description[0] == 'b' && (tests.binary) == 0)) + { + continue; + } + ++total; + fprintf(stdout, "%-40s", testcases[ii].description); + fflush(stdout); + + if (prompt) + { + fprintf(stdout, "\nPress when you are ready? "); + char buffer[80] = {0}; + if (fgets(buffer, sizeof(buffer), stdin) != NULL) { + if (strncmp(buffer, "skip", 4) == 0) + { + fprintf(stdout, "%-40s%s\n", testcases[ii].description, + status_msg[TEST_SKIP]); + fflush(stdout); + continue; + } + if (strncmp(buffer, "quit", 4) == 0) + { + exit(EXIT_SUCCESS); + } + } + + fprintf(stdout, "%-40s", testcases[ii].description); + fflush(stdout); + } + + bool reconnect= false; + enum test_return ret= testcases[ii].function(); + if (ret == TEST_FAIL) + { + reconnect= true; + ++failed; + if (verbose) + { + fprintf(stderr, "\n"); + } + } + else if (ret == TEST_PASS_RECONNECT) + { + reconnect= true; + } + + if (ret == TEST_FAIL) + { + fprintf(stderr, "%s\n", status_msg[ret]); + } + else + { + fprintf(stdout, "%s\n", status_msg[ret]); + } + + if (reconnect) + { + closesocket(sock); + if ((sock= connect_server(hostname, port)) == INVALID_SOCKET) + { + fprintf(stderr, "Failed to connect to <%s:%s>: %s\n", hostname, port, strerror(get_socket_errno())); + fprintf(stderr, "%d of %d tests failed\n", failed, total); + return EXIT_FAILURE; + } + } + } + + closesocket(sock); + if (failed == 0) + { + fprintf(stdout, "All tests passed\n"); + } + else + { + fprintf(stderr, "%d of %d tests failed\n", failed, total); + } + + return (failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE; +} diff --git a/clients/memcat.cc b/clients/memcat.cc new file mode 100644 index 0000000..52b02ac --- /dev/null +++ b/clients/memcat.cc @@ -0,0 +1,265 @@ +/* LibMemcached + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: + * + */ + +#include + +#include +#include +#include +#include +#include +#include + +#include "utilities.h" + +#define PROGRAM_NAME "memcat" +#define PROGRAM_DESCRIPTION "Cat a set of key values to stdout." + + +/* Prototypes */ +void options_parse(int argc, char *argv[]); + +static int opt_binary= 0; +static int opt_verbose= 0; +static int opt_displayflag= 0; +static char *opt_servers= NULL; +static char *opt_hash= NULL; +static char *opt_username; +static char *opt_passwd; +static char *opt_file; + +int main(int argc, char *argv[]) +{ + char *string; + size_t string_length; + uint32_t flags; + memcached_return_t rc; + + int return_code= EXIT_SUCCESS; + + options_parse(argc, argv); + initialize_sockets(); + + if (opt_servers == NULL) + { + char *temp; + + if ((temp= getenv("MEMCACHED_SERVERS"))) + { + opt_servers= strdup(temp); + } + + if (opt_servers == NULL) + { + std::cerr << "No servers provied" << std::endl; + exit(EXIT_FAILURE); + } + } + + memcached_server_st* servers= memcached_servers_parse(opt_servers); + if (servers == NULL or memcached_server_list_count(servers) == 0) + { + std::cerr << "Invalid server list provided:" << opt_servers << std::endl; + return EXIT_FAILURE; + } + + memcached_st* memc= memcached_create(NULL); + process_hash_option(memc, opt_hash); + + memcached_server_push(memc, servers); + memcached_server_list_free(servers); + memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, + (uint64_t)opt_binary); + + if (opt_username and LIBMEMCACHED_WITH_SASL_SUPPORT == 0) + { + memcached_free(memc); + std::cerr << "--username was supplied, but binary was not built with SASL support." << std::endl; + return EXIT_FAILURE; + } + + if (opt_username) + { + memcached_return_t ret; + if (memcached_failed(ret= memcached_set_sasl_auth_data(memc, opt_username, opt_passwd))) + { + std::cerr << memcached_last_error_message(memc) << std::endl; + memcached_free(memc); + return EXIT_FAILURE; + } + } + + while (optind < argc) + { + string= memcached_get(memc, argv[optind], strlen(argv[optind]), + &string_length, &flags, &rc); + if (rc == MEMCACHED_SUCCESS) + { + if (opt_displayflag) + { + if (opt_verbose) + { + std::cout << "key: " << argv[optind] << std::endl << "flags: " << flags << std::endl; + } + } + else + { + if (opt_verbose) + { + std::cout << "key: " << argv[optind] << std::endl << "flags: " << flags << "length: " << string_length << std::endl << "value: "; + } + + if (opt_file) + { + FILE *fp= fopen(opt_file, "w"); + if (fp == NULL) + { + perror("fopen"); + return_code= EXIT_FAILURE; + break; + } + + size_t written= fwrite(string, 1, string_length, fp); + if (written != string_length) + { + std::cerr << "error writing file to file " << opt_file << " wrote " << written << ", should have written" << string_length << std::endl; + return_code= EXIT_FAILURE; + break; + } + + if (fclose(fp)) + { + std::cerr << "error closing " << opt_file << std::endl; + return_code= EXIT_FAILURE; + break; + } + } + else + { + std::cout.write(string, string_length); + std::cout << std::endl; + } + free(string); + } + } + else if (rc != MEMCACHED_NOTFOUND) + { + std::cerr << "error on " << argv[optind] << "(" << memcached_strerror(memc, rc) << ")"; + if (memcached_last_error_errno(memc)) + { + std::cerr << " system error (" << strerror(memcached_last_error_errno(memc)) << ")" << std::endl; + } + std::cerr << std::endl; + + return_code= EXIT_FAILURE; + break; + } + else // Unknown Issue + { + std::cerr << "error on " << argv[optind] << "("<< memcached_strerror(NULL, rc) << ")" << std::endl; + return_code= EXIT_FAILURE; + } + optind++; + } + + memcached_free(memc); + + if (opt_servers) + { + free(opt_servers); + } + if (opt_hash) + { + free(opt_hash); + } + + return return_code; +} + + +void options_parse(int argc, char *argv[]) +{ + int option_index= 0; + + memcached_programs_help_st help_options[]= + { + {0}, + }; + + static struct option long_options[]= + { + {(OPTIONSTRING)"version", no_argument, NULL, OPT_VERSION}, + {(OPTIONSTRING)"help", no_argument, NULL, OPT_HELP}, + {(OPTIONSTRING)"quiet", no_argument, NULL, OPT_QUIET}, + {(OPTIONSTRING)"verbose", no_argument, &opt_verbose, OPT_VERBOSE}, + {(OPTIONSTRING)"debug", no_argument, &opt_verbose, OPT_DEBUG}, + {(OPTIONSTRING)"servers", required_argument, NULL, OPT_SERVERS}, + {(OPTIONSTRING)"flag", no_argument, &opt_displayflag, OPT_FLAG}, + {(OPTIONSTRING)"hash", required_argument, NULL, OPT_HASH}, + {(OPTIONSTRING)"binary", no_argument, NULL, OPT_BINARY}, + {(OPTIONSTRING)"username", required_argument, NULL, OPT_USERNAME}, + {(OPTIONSTRING)"password", required_argument, NULL, OPT_PASSWD}, + {(OPTIONSTRING)"file", required_argument, NULL, OPT_FILE}, + {0, 0, 0, 0}, + }; + + while (1) + { + int option_rv= getopt_long(argc, argv, "Vhvds:", long_options, &option_index); + if (option_rv == -1) break; + switch (option_rv) + { + case 0: + break; + case OPT_BINARY: + opt_binary = 1; + break; + case OPT_VERBOSE: /* --verbose or -v */ + opt_verbose = OPT_VERBOSE; + break; + case OPT_DEBUG: /* --debug or -d */ + opt_verbose = OPT_DEBUG; + break; + case OPT_VERSION: /* --version or -V */ + version_command(PROGRAM_NAME); + break; + case OPT_HELP: /* --help or -h */ + help_command(PROGRAM_NAME, PROGRAM_DESCRIPTION, long_options, help_options); + break; + case OPT_SERVERS: /* --servers or -s */ + opt_servers= strdup(optarg); + break; + case OPT_HASH: + opt_hash= strdup(optarg); + break; + case OPT_USERNAME: + opt_username= optarg; + break; + case OPT_PASSWD: + opt_passwd= optarg; + break; + case OPT_FILE: + opt_file= optarg; + break; + + case OPT_QUIET: + close_stdio(); + break; + + case '?': + /* getopt_long already printed an error message. */ + exit(EXIT_FAILURE); + default: + abort(); + } + } +} diff --git a/clients/memcp.cc b/clients/memcp.cc new file mode 100644 index 0000000..d76faee --- /dev/null +++ b/clients/memcp.cc @@ -0,0 +1,452 @@ +/* LibMemcached + * Copyright (C) 2011-2013 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: + * + */ + +#include "mem_config.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef HAVE_STRINGS_H +#include +#endif +#include +#include +#include +#include +#include + + +#include + +#include "client_options.h" +#include "utilities.h" + +#define PROGRAM_NAME "memcp" +#define PROGRAM_DESCRIPTION "Copy a set of files to a memcached cluster." + +/* Prototypes */ +static void options_parse(int argc, char *argv[]); + +static bool opt_binary= false; +static bool opt_udp= false; +static bool opt_buffer= false; +static int opt_verbose= 0; +static char *opt_servers= NULL; +static char *opt_hash= NULL; +static int opt_method= OPT_SET; +static uint32_t opt_flags= 0; +static time_t opt_expires= 0; +static char *opt_username; +static char *opt_passwd; + +static long strtol_wrapper(const char *nptr, int base, bool *error) +{ + long val; + char *endptr; + + errno= 0; /* To distinguish success/failure after call */ + val= strtol(nptr, &endptr, base); + + /* Check for various possible errors */ + + if ((errno == ERANGE and (val == LONG_MAX or val == LONG_MIN)) + or (errno != 0 && val == 0)) + { + *error= true; + return 0; + } + + if (endptr == nptr) + { + *error= true; + return 0; + } + + *error= false; + return val; +} + +int main(int argc, char *argv[]) +{ + + options_parse(argc, argv); + + if (optind >= argc) + { + fprintf(stderr, "Expected argument after options\n"); + exit(EXIT_FAILURE); + } + + initialize_sockets(); + + memcached_st *memc= memcached_create(NULL); + + if (opt_udp) + { + if (opt_verbose) + { + std::cout << "Enabling UDP" << std::endl; + } + + if (memcached_failed(memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_USE_UDP, opt_udp))) + { + memcached_free(memc); + std::cerr << "Could not enable UDP protocol." << std::endl; + return EXIT_FAILURE; + } + } + + if (opt_buffer) + { + if (opt_verbose) + { + std::cout << "Enabling MEMCACHED_BEHAVIOR_BUFFER_REQUESTS" << std::endl; + } + + if (memcached_failed(memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, opt_buffer))) + { + memcached_free(memc); + std::cerr << "Could not enable MEMCACHED_BEHAVIOR_BUFFER_REQUESTS." << std::endl; + return EXIT_FAILURE; + } + } + + process_hash_option(memc, opt_hash); + + if (opt_servers == NULL) + { + char *temp; + + if ((temp= getenv("MEMCACHED_SERVERS"))) + { + opt_servers= strdup(temp); + } +#if 0 + else if (argc >= 1 and argv[--argc]) + { + opt_servers= strdup(argv[argc]); + } +#endif + + if (opt_servers == NULL) + { + std::cerr << "No Servers provided" << std::endl; + exit(EXIT_FAILURE); + } + } + + memcached_server_st* servers= memcached_servers_parse(opt_servers); + if (servers == NULL or memcached_server_list_count(servers) == 0) + { + std::cerr << "Invalid server list provided:" << opt_servers << std::endl; + return EXIT_FAILURE; + } + + memcached_server_push(memc, servers); + memcached_server_list_free(servers); + memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, opt_binary); + if (opt_username and LIBMEMCACHED_WITH_SASL_SUPPORT == 0) + { + memcached_free(memc); + std::cerr << "--username was supplied, but binary was not built with SASL support." << std::endl; + return EXIT_FAILURE; + } + + if (opt_username) + { + memcached_return_t ret; + if (memcached_failed(ret= memcached_set_sasl_auth_data(memc, opt_username, opt_passwd))) + { + std::cerr << memcached_last_error_message(memc) << std::endl; + memcached_free(memc); + return EXIT_FAILURE; + } + } + + int exit_code= EXIT_SUCCESS; + while (optind < argc) + { + int fd= open(argv[optind], O_RDONLY); + if (fd < 0) + { + if (opt_verbose) + { + std::cerr << "memcp " << argv[optind] << " " << strerror(errno) << std::endl; + optind++; + } + exit_code= EXIT_FAILURE; + continue; + } + + struct stat sbuf; + if (fstat(fd, &sbuf) == -1) + { + std::cerr << "memcp " << argv[optind] << " " << strerror(errno) << std::endl; + optind++; + exit_code= EXIT_FAILURE; + continue; + } + + char *ptr= rindex(argv[optind], '/'); + if (ptr) + { + ptr++; + } + else + { + ptr= argv[optind]; + } + + if (opt_verbose) + { + static const char *opstr[] = { "set", "add", "replace" }; + printf("op: %s\nsource file: %s\nlength: %lu\n" + "key: %s\nflags: %x\nexpires: %lu\n", + opstr[opt_method - OPT_SET], argv[optind], (unsigned long)sbuf.st_size, + ptr, opt_flags, (unsigned long)opt_expires); + } + + // The file may be empty + char *file_buffer_ptr= NULL; + if (sbuf.st_size > 0) + { + if ((file_buffer_ptr= (char *)malloc(sizeof(char) * (size_t)sbuf.st_size)) == NULL) + { + std::cerr << "Error allocating file buffer(" << strerror(errno) << ")" << std::endl; + close(fd); + exit(EXIT_FAILURE); + } + + ssize_t read_length; + if ((read_length= ::read(fd, file_buffer_ptr, (size_t)sbuf.st_size)) == -1) + { + std::cerr << "Error while reading file " << file_buffer_ptr << " (" << strerror(errno) << ")" << std::endl; + close(fd); + free(file_buffer_ptr); + exit(EXIT_FAILURE); + } + + if (read_length != sbuf.st_size) + { + std::cerr << "Failure while reading file. Read length was not equal to stat() length" << std::endl; + close(fd); + free(file_buffer_ptr); + exit(EXIT_FAILURE); + } + } + + memcached_return_t rc; + if (opt_method == OPT_ADD) + { + rc= memcached_add(memc, ptr, strlen(ptr), + file_buffer_ptr, (size_t)sbuf.st_size, + opt_expires, opt_flags); + } + else if (opt_method == OPT_REPLACE) + { + rc= memcached_replace(memc, ptr, strlen(ptr), + file_buffer_ptr, (size_t)sbuf.st_size, + opt_expires, opt_flags); + } + else + { + rc= memcached_set(memc, ptr, strlen(ptr), + file_buffer_ptr, (size_t)sbuf.st_size, + opt_expires, opt_flags); + } + + if (memcached_failed(rc)) + { + std::cerr << "Error occrrured during memcached_set(): " << memcached_last_error_message(memc) << std::endl; + exit_code= EXIT_FAILURE; + } + + ::free(file_buffer_ptr); + ::close(fd); + optind++; + } + + if (opt_verbose) + { + std::cout << "Calling memcached_free()" << std::endl; + } + + memcached_free(memc); + + if (opt_servers) + { + free(opt_servers); + } + + if (opt_hash) + { + free(opt_hash); + } + + return exit_code; +} + +static void options_parse(int argc, char *argv[]) +{ + memcached_programs_help_st help_options[]= + { + {0}, + }; + + static struct option long_options[]= + { + {(OPTIONSTRING)"version", no_argument, NULL, OPT_VERSION}, + {(OPTIONSTRING)"help", no_argument, NULL, OPT_HELP}, + {(OPTIONSTRING)"quiet", no_argument, NULL, OPT_QUIET}, + {(OPTIONSTRING)"udp", no_argument, NULL, OPT_UDP}, + {(OPTIONSTRING)"buffer", no_argument, NULL, OPT_BUFFER}, + {(OPTIONSTRING)"verbose", no_argument, &opt_verbose, OPT_VERBOSE}, + {(OPTIONSTRING)"debug", no_argument, &opt_verbose, OPT_DEBUG}, + {(OPTIONSTRING)"servers", required_argument, NULL, OPT_SERVERS}, + {(OPTIONSTRING)"flag", required_argument, NULL, OPT_FLAG}, + {(OPTIONSTRING)"expire", required_argument, NULL, OPT_EXPIRE}, + {(OPTIONSTRING)"set", no_argument, NULL, OPT_SET}, + {(OPTIONSTRING)"add", no_argument, NULL, OPT_ADD}, + {(OPTIONSTRING)"replace", no_argument, NULL, OPT_REPLACE}, + {(OPTIONSTRING)"hash", required_argument, NULL, OPT_HASH}, + {(OPTIONSTRING)"binary", no_argument, NULL, OPT_BINARY}, + {(OPTIONSTRING)"username", required_argument, NULL, OPT_USERNAME}, + {(OPTIONSTRING)"password", required_argument, NULL, OPT_PASSWD}, + {0, 0, 0, 0}, + }; + + bool opt_version= false; + bool opt_help= false; + int option_index= 0; + + while (1) + { + int option_rv= getopt_long(argc, argv, "Vhvds:", long_options, &option_index); + + if (option_rv == -1) + break; + + switch (option_rv) + { + case 0: + break; + + case OPT_BINARY: + opt_binary= true; + break; + + case OPT_VERBOSE: /* --verbose or -v */ + opt_verbose= OPT_VERBOSE; + break; + + case OPT_DEBUG: /* --debug or -d */ + opt_verbose= OPT_DEBUG; + break; + + case OPT_VERSION: /* --version or -V */ + opt_version= true; + break; + + case OPT_HELP: /* --help or -h */ + opt_help= true; + break; + + case OPT_SERVERS: /* --servers or -s */ + opt_servers= strdup(optarg); + break; + + case OPT_FLAG: /* --flag */ + { + bool strtol_error; + opt_flags= (uint32_t)strtol_wrapper(optarg, 16, &strtol_error); + if (strtol_error == true) + { + fprintf(stderr, "Bad value passed via --flag\n"); + exit(1); + } + } + break; + + case OPT_EXPIRE: /* --expire */ + { + bool strtol_error; + opt_expires= (time_t)strtol_wrapper(optarg, 10, &strtol_error); + if (strtol_error == true) + { + fprintf(stderr, "Bad value passed via --expire\n"); + exit(1); + } + } + break; + + case OPT_SET: + opt_method= OPT_SET; + break; + + case OPT_REPLACE: + opt_method= OPT_REPLACE; + break; + + case OPT_ADD: + opt_method= OPT_ADD; + break; + + case OPT_HASH: + opt_hash= strdup(optarg); + break; + + case OPT_USERNAME: + opt_username= optarg; + break; + + case OPT_PASSWD: + opt_passwd= optarg; + break; + + case OPT_QUIET: + close_stdio(); + break; + + case OPT_UDP: + opt_udp= true; + break; + + case OPT_BUFFER: + opt_buffer= true; + break; + + case '?': + /* getopt_long already printed an error message. */ + exit(1); + default: + abort(); + } + } + + if (opt_version) + { + version_command(PROGRAM_NAME); + exit(EXIT_SUCCESS); + } + + if (opt_help) + { + help_command(PROGRAM_NAME, PROGRAM_DESCRIPTION, long_options, help_options); + exit(EXIT_SUCCESS); + } +} diff --git a/clients/memdump.cc b/clients/memdump.cc new file mode 100644 index 0000000..48c35d3 --- /dev/null +++ b/clients/memdump.cc @@ -0,0 +1,239 @@ +/* LibMemcached + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: + * + */ + +#include "mem_config.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "client_options.h" +#include "utilities.h" + +#define PROGRAM_NAME "memdump" +#define PROGRAM_DESCRIPTION "Dump all values from one or many servers." + +/* Prototypes */ +static void options_parse(int argc, char *argv[]); + +static bool opt_binary=0; +static int opt_verbose= 0; +static char *opt_servers= NULL; +static char *opt_hash= NULL; +static char *opt_username; +static char *opt_passwd; + +/* Print the keys and counter how many were found */ +static memcached_return_t key_printer(const memcached_st *, + const char *key, size_t key_length, + void *) +{ + std::cout.write(key, key_length); + std::cout << std::endl; + + return MEMCACHED_SUCCESS; +} + +int main(int argc, char *argv[]) +{ + memcached_dump_fn callbacks[1]; + + callbacks[0]= &key_printer; + + options_parse(argc, argv); + + if (opt_servers == NULL) + { + char *temp; + + if ((temp= getenv("MEMCACHED_SERVERS"))) + { + opt_servers= strdup(temp); + } + else if (argc >= 1 and argv[--argc]) + { + opt_servers= strdup(argv[argc]); + } + + if (opt_servers == NULL) + { + std::cerr << "No Servers provided" << std::endl; + exit(EXIT_FAILURE); + } + } + + memcached_server_st* servers= memcached_servers_parse(opt_servers); + if (servers == NULL or memcached_server_list_count(servers) == 0) + { + std::cerr << "Invalid server list provided:" << opt_servers << std::endl; + return EXIT_FAILURE; + } + + memcached_st *memc= memcached_create(NULL); + if (memc == NULL) + { + std::cerr << "Could not allocate a memcached_st structure.\n" << std::endl; + return EXIT_FAILURE; + } + process_hash_option(memc, opt_hash); + + memcached_server_push(memc, servers); + memcached_server_list_free(servers); + memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, + (uint64_t)opt_binary); + + if (opt_username and LIBMEMCACHED_WITH_SASL_SUPPORT == 0) + { + memcached_free(memc); + std::cerr << "--username was supplied, but binary was not built with SASL support." << std::endl; + return EXIT_FAILURE; + } + + if (opt_username) + { + memcached_return_t ret; + if (memcached_failed(ret= memcached_set_sasl_auth_data(memc, opt_username, opt_passwd))) + { + std::cerr << memcached_last_error_message(memc) << std::endl; + memcached_free(memc); + return EXIT_FAILURE; + } + } + + memcached_return_t rc= memcached_dump(memc, callbacks, NULL, 1); + + int exit_code= EXIT_SUCCESS; + if (memcached_failed(rc)) + { + if (opt_verbose) + { + std::cerr << "Failed to dump keys: " << memcached_last_error_message(memc) << std::endl; + } + exit_code= EXIT_FAILURE; + } + + memcached_free(memc); + + if (opt_servers) + { + free(opt_servers); + } + if (opt_hash) + { + free(opt_hash); + } + + return exit_code; +} + +static void options_parse(int argc, char *argv[]) +{ + static struct option long_options[]= + { + {(OPTIONSTRING)"version", no_argument, NULL, OPT_VERSION}, + {(OPTIONSTRING)"help", no_argument, NULL, OPT_HELP}, + {(OPTIONSTRING)"quiet", no_argument, NULL, OPT_QUIET}, + {(OPTIONSTRING)"verbose", no_argument, &opt_verbose, OPT_VERBOSE}, + {(OPTIONSTRING)"debug", no_argument, &opt_verbose, OPT_DEBUG}, + {(OPTIONSTRING)"servers", required_argument, NULL, OPT_SERVERS}, + {(OPTIONSTRING)"hash", required_argument, NULL, OPT_HASH}, + {(OPTIONSTRING)"binary", no_argument, NULL, OPT_BINARY}, + {(OPTIONSTRING)"username", required_argument, NULL, OPT_USERNAME}, + {(OPTIONSTRING)"password", required_argument, NULL, OPT_PASSWD}, + {0, 0, 0, 0} + }; + + int option_index= 0; + bool opt_version= false; + bool opt_help= false; + while (1) + { + int option_rv= getopt_long(argc, argv, "Vhvds:", long_options, &option_index); + + if (option_rv == -1) break; + + switch (option_rv) + { + case 0: + break; + + case OPT_BINARY: + opt_binary= true; + break; + + case OPT_VERBOSE: /* --verbose or -v */ + opt_verbose= OPT_VERBOSE; + break; + + case OPT_DEBUG: /* --debug or -d */ + opt_verbose= OPT_DEBUG; + break; + + case OPT_VERSION: /* --version or -V */ + opt_verbose= true; + break; + + case OPT_HELP: /* --help or -h */ + opt_help= true; + break; + + case OPT_SERVERS: /* --servers or -s */ + opt_servers= strdup(optarg); + break; + + case OPT_HASH: + opt_hash= strdup(optarg); + break; + + case OPT_USERNAME: + opt_username= optarg; + break; + + case OPT_PASSWD: + opt_passwd= optarg; + break; + + case OPT_QUIET: + close_stdio(); + break; + + case '?': + /* getopt_long already printed an error message. */ + exit(1); + default: + abort(); + } + } + + if (opt_version) + { + version_command(PROGRAM_NAME); + exit(EXIT_SUCCESS); + } + + if (opt_help) + { + help_command(PROGRAM_NAME, PROGRAM_DESCRIPTION, long_options, NULL); + exit(EXIT_SUCCESS); + } +} diff --git a/clients/memerror.cc b/clients/memerror.cc new file mode 100644 index 0000000..3cee64c --- /dev/null +++ b/clients/memerror.cc @@ -0,0 +1,129 @@ +/* LibMemcached + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: + * + */ +#include "mem_config.h" + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include "utilities.h" + +#define PROGRAM_NAME "memerror" +#define PROGRAM_DESCRIPTION "Translate a memcached errror code into a string." + + +/* Prototypes */ +void options_parse(int argc, char *argv[]); + +int main(int argc, char *argv[]) +{ + options_parse(argc, argv); + + if (argc < 2) + { + return EXIT_FAILURE; + } + + while (optind < argc) + { + errno= 0; + char *nptr; + unsigned long value= strtoul(argv[optind], &nptr, 10); + + if ((errno != 0) or + (nptr == argv[optind] and value == 0) or + (value == ULONG_MAX and errno == ERANGE) or + (value == 0 and errno == EINVAL)) + { + std::cerr << "strtoul() was unable to parse given value" << std::endl; + return EXIT_FAILURE; + } + + if (value < MEMCACHED_MAXIMUM_RETURN) + { + std::cout << memcached_strerror(NULL, (memcached_return_t)value) << std::endl; + } + else + { + std::cerr << memcached_strerror(NULL, MEMCACHED_MAXIMUM_RETURN) << std::endl; + return EXIT_FAILURE; + } + + optind++; + } + + return EXIT_SUCCESS; +} + + +void options_parse(int argc, char *argv[]) +{ + static struct option long_options[]= + { + {(OPTIONSTRING)"version", no_argument, NULL, OPT_VERSION}, + {(OPTIONSTRING)"help", no_argument, NULL, OPT_HELP}, + {0, 0, 0, 0}, + }; + + bool opt_version= false; + bool opt_help= false; + int option_index= 0; + while (1) + { + int option_rv= getopt_long(argc, argv, "Vhvds:", long_options, &option_index); + if (option_rv == -1) + { + break; + } + + switch (option_rv) + { + case 0: + break; + + case OPT_VERSION: /* --version or -V */ + opt_version= true; + break; + + case OPT_HELP: /* --help or -h */ + opt_help= true; + break; + + case '?': + /* getopt_long already printed an error message. */ + exit(EXIT_FAILURE); + + default: + exit(EXIT_FAILURE); + } + } + + if (opt_version) + { + version_command(PROGRAM_NAME); + exit(EXIT_SUCCESS); + } + + if (opt_help) + { + help_command(PROGRAM_NAME, PROGRAM_DESCRIPTION, long_options, NULL); + exit(EXIT_SUCCESS); + } +} diff --git a/clients/memexist.cc b/clients/memexist.cc new file mode 100644 index 0000000..505f538 --- /dev/null +++ b/clients/memexist.cc @@ -0,0 +1,241 @@ +/* LibMemcached + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: + * + */ +#include "mem_config.h" + +#include +#include +#include +#include +#include + +#include +#include "client_options.h" +#include "utilities.h" + +static int opt_binary= 0; +static int opt_verbose= 0; +static char *opt_servers= NULL; +static char *opt_hash= NULL; +static char *opt_username; +static char *opt_passwd; + +#define PROGRAM_NAME "memexist" +#define PROGRAM_DESCRIPTION "Check for the existance of a key within a cluster." + +/* Prototypes */ +static void options_parse(int argc, char *argv[]); + +int main(int argc, char *argv[]) +{ + options_parse(argc, argv); + initialize_sockets(); + + if (opt_servers == NULL) + { + char *temp; + + if ((temp= getenv("MEMCACHED_SERVERS"))) + { + opt_servers= strdup(temp); + } + + if (opt_servers == NULL) + { + std::cerr << "No Servers provided" << std::endl; + exit(EXIT_FAILURE); + } + } + + memcached_server_st* servers= memcached_servers_parse(opt_servers); + if (servers == NULL or memcached_server_list_count(servers) == 0) + { + std::cerr << "Invalid server list provided:" << opt_servers << std::endl; + return EXIT_FAILURE; + } + + memcached_st* memc= memcached_create(NULL); + process_hash_option(memc, opt_hash); + + memcached_server_push(memc, servers); + memcached_server_list_free(servers); + memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, + (uint64_t) opt_binary); + + if (opt_username and LIBMEMCACHED_WITH_SASL_SUPPORT == 0) + { + memcached_free(memc); + std::cerr << "--username was supplied, but binary was not built with SASL support." << std::endl; + return EXIT_FAILURE; + } + + if (opt_username) + { + memcached_return_t ret; + if (memcached_failed(ret= memcached_set_sasl_auth_data(memc, opt_username, opt_passwd))) + { + std::cerr << memcached_last_error_message(memc) << std::endl; + memcached_free(memc); + return EXIT_FAILURE; + } + } + + int return_code= EXIT_SUCCESS; + + while (optind < argc) + { + memcached_return_t rc= memcached_exist(memc, argv[optind], strlen(argv[optind])); + + if (rc == MEMCACHED_NOTFOUND) + { + if (opt_verbose) + { + std::cout << "Could not find key \"" << argv[optind] << "\"" << std::endl; + } + + return_code= EXIT_FAILURE; + } + else if (memcached_failed(rc)) + { + if (opt_verbose) + { + std::cerr << "Fatal error for key \"" << argv[optind] << "\" :" << memcached_last_error_message(memc) << std::endl; + } + + return_code= EXIT_FAILURE; + } + else // success + { + if (opt_verbose) + { + std::cout << "Found key " << argv[optind] << std::endl; + } + } + + optind++; + } + + memcached_free(memc); + + if (opt_servers) + { + free(opt_servers); + } + + if (opt_hash) + { + free(opt_hash); + } + + return return_code; +} + + +static void options_parse(int argc, char *argv[]) +{ + memcached_programs_help_st help_options[]= + { + {0}, + }; + + static struct option long_options[]= + { + {(OPTIONSTRING)"version", no_argument, NULL, OPT_VERSION}, + {(OPTIONSTRING)"help", no_argument, NULL, OPT_HELP}, + {(OPTIONSTRING)"quiet", no_argument, NULL, OPT_QUIET}, + {(OPTIONSTRING)"verbose", no_argument, &opt_verbose, OPT_VERBOSE}, + {(OPTIONSTRING)"debug", no_argument, &opt_verbose, OPT_DEBUG}, + {(OPTIONSTRING)"servers", required_argument, NULL, OPT_SERVERS}, + {(OPTIONSTRING)"hash", required_argument, NULL, OPT_HASH}, + {(OPTIONSTRING)"binary", no_argument, NULL, OPT_BINARY}, + {(OPTIONSTRING)"username", required_argument, NULL, OPT_USERNAME}, + {(OPTIONSTRING)"password", required_argument, NULL, OPT_PASSWD}, + {0, 0, 0, 0}, + }; + + bool opt_version= false; + bool opt_help= false; + int option_index= 0; + + while (1) + { + int option_rv= getopt_long(argc, argv, "Vhvds:", long_options, &option_index); + if (option_rv == -1) + { + break; + } + + switch (option_rv) + { + case 0: + break; + + case OPT_BINARY: + opt_binary = 1; + break; + + case OPT_VERBOSE: /* --verbose or -v */ + opt_verbose = OPT_VERBOSE; + break; + + case OPT_DEBUG: /* --debug or -d */ + opt_verbose = OPT_DEBUG; + break; + + case OPT_VERSION: /* --version or -V */ + opt_version= true; + break; + + case OPT_HELP: /* --help or -h */ + opt_help= true; + break; + + case OPT_SERVERS: /* --servers or -s */ + opt_servers= strdup(optarg); + break; + + case OPT_HASH: + opt_hash= strdup(optarg); + break; + + case OPT_USERNAME: + opt_username= optarg; + break; + + case OPT_PASSWD: + opt_passwd= optarg; + break; + + case OPT_QUIET: + close_stdio(); + break; + + case '?': + /* getopt_long already printed an error message. */ + exit(EXIT_SUCCESS); + + default: + abort(); + } + } + + if (opt_version) + { + version_command(PROGRAM_NAME); + exit(EXIT_SUCCESS); + } + + if (opt_help) + { + help_command(PROGRAM_NAME, PROGRAM_DESCRIPTION, long_options, help_options); + exit(EXIT_SUCCESS); + } +} diff --git a/clients/memflush.cc b/clients/memflush.cc new file mode 100644 index 0000000..8bd0dbf --- /dev/null +++ b/clients/memflush.cc @@ -0,0 +1,198 @@ +/* LibMemcached + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: + * + */ +#include "mem_config.h" + +#include +#include +#include +#include +#include +#include + +#include +#include "client_options.h" +#include "utilities.h" + +static int opt_binary= 0; +static int opt_verbose= 0; +static time_t opt_expire= 0; +static char *opt_servers= NULL; +static char *opt_username; +static char *opt_passwd; + +#define PROGRAM_NAME "memflush" +#define PROGRAM_DESCRIPTION "Erase all data in a server of memcached servers." + +/* Prototypes */ +void options_parse(int argc, char *argv[]); + +int main(int argc, char *argv[]) +{ + options_parse(argc, argv); + + if (opt_servers == false) + { + char *temp; + + if ((temp= getenv("MEMCACHED_SERVERS"))) + { + opt_servers= strdup(temp); + } + + if (opt_servers == false) + { + std::cerr << "No Servers provided" << std::endl; + exit(EXIT_FAILURE); + } + } + + memcached_server_st* servers= memcached_servers_parse(opt_servers); + if (servers == NULL or memcached_server_list_count(servers) == 0) + { + std::cerr << "Invalid server list provided:" << opt_servers << std::endl; + return EXIT_FAILURE; + } + + memcached_st *memc= memcached_create(NULL); + memcached_server_push(memc, servers); + memcached_server_list_free(servers); + memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, + (uint64_t) opt_binary); + + if (opt_username and LIBMEMCACHED_WITH_SASL_SUPPORT == 0) + { + memcached_free(memc); + std::cerr << "--username was supplied, but binary was not built with SASL support." << std::endl; + return EXIT_FAILURE; + } + + if (opt_username) + { + memcached_return_t ret; + if (memcached_failed(ret= memcached_set_sasl_auth_data(memc, opt_username, opt_passwd))) + { + std::cerr << memcached_last_error_message(memc) << std::endl; + memcached_free(memc); + return EXIT_FAILURE; + } + } + + memcached_return_t rc = memcached_flush(memc, opt_expire); + if (rc != MEMCACHED_SUCCESS) + { + std::cerr << memcached_last_error_message(memc) << std::endl; + } + + memcached_free(memc); + + free(opt_servers); + + return EXIT_SUCCESS; +} + + +void options_parse(int argc, char *argv[]) +{ + static struct option long_options[]= + { + {(OPTIONSTRING)"version", no_argument, NULL, OPT_VERSION}, + {(OPTIONSTRING)"help", no_argument, NULL, OPT_HELP}, + {(OPTIONSTRING)"quiet", no_argument, NULL, OPT_QUIET}, + {(OPTIONSTRING)"verbose", no_argument, &opt_verbose, OPT_VERBOSE}, + {(OPTIONSTRING)"debug", no_argument, &opt_verbose, OPT_DEBUG}, + {(OPTIONSTRING)"servers", required_argument, NULL, OPT_SERVERS}, + {(OPTIONSTRING)"expire", required_argument, NULL, OPT_EXPIRE}, + {(OPTIONSTRING)"binary", no_argument, NULL, OPT_BINARY}, + {(OPTIONSTRING)"username", required_argument, NULL, OPT_USERNAME}, + {(OPTIONSTRING)"password", required_argument, NULL, OPT_PASSWD}, + {0, 0, 0, 0}, + }; + + bool opt_version= false; + bool opt_help= false; + int option_index= 0; + while (1) + { + int option_rv= getopt_long(argc, argv, "Vhvds:", long_options, &option_index); + if (option_rv == -1) break; + switch (option_rv) + { + case 0: + break; + + case OPT_BINARY: + opt_binary= true; + break; + + case OPT_VERBOSE: /* --verbose or -v */ + opt_verbose= OPT_VERBOSE; + break; + + case OPT_DEBUG: /* --debug or -d */ + opt_verbose= OPT_DEBUG; + break; + + case OPT_VERSION: /* --version or -V */ + opt_version= true; + break; + + case OPT_HELP: /* --help or -h */ + opt_help= true; + break; + + case OPT_SERVERS: /* --servers or -s */ + opt_servers= strdup(optarg); + break; + + case OPT_EXPIRE: /* --expire */ + errno= 0; + opt_expire= (time_t)strtoll(optarg, (char **)NULL, 10); + if (errno != 0) + { + std::cerr << "Incorrect value passed to --expire: `" << optarg << "`" << std::endl; + exit(EXIT_FAILURE); + } + break; + + case OPT_USERNAME: + opt_username= optarg; + break; + + case OPT_PASSWD: + opt_passwd= optarg; + break; + + case OPT_QUIET: + close_stdio(); + break; + + case '?': + /* getopt_long already printed an error message. */ + exit(EXIT_FAILURE); + + default: + abort(); + } + } + + if (opt_version) + { + version_command(PROGRAM_NAME); + exit(EXIT_SUCCESS); + } + + if (opt_help) + { + help_command(PROGRAM_NAME, PROGRAM_DESCRIPTION, long_options, NULL); + exit(EXIT_SUCCESS); + } +} diff --git a/clients/memparse.cc b/clients/memparse.cc new file mode 100644 index 0000000..fc2cb0c --- /dev/null +++ b/clients/memparse.cc @@ -0,0 +1,70 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +#include +#include +#include + +#include + +int main(int argc, char *argv[]) +{ + + if (argc < 2) + { + std::cerr << "No arguments provided." << std::endl; + return EXIT_FAILURE; + } + + for (int x= 1; x < argc; x++) + { + char buffer[BUFSIZ]; + memcached_return_t rc; + rc= libmemcached_check_configuration(argv[x], strlen(argv[x]), buffer, sizeof(buffer)); + + if (rc != MEMCACHED_SUCCESS) + { + std::cerr << "Failed to parse argument #" << x << " " << argv[x] << std::endl; + std::cerr << buffer << std::endl; + return EXIT_FAILURE; + } + } + + return EXIT_SUCCESS; +} diff --git a/clients/memping.cc b/clients/memping.cc new file mode 100644 index 0000000..180d6a2 --- /dev/null +++ b/clients/memping.cc @@ -0,0 +1,197 @@ +/* LibMemcached + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: + * + */ +#include "mem_config.h" + +#include +#include +#include +#include +#include + +#include +#include +#include "client_options.h" +#include "utilities.h" + +#include + +static bool opt_binary= false; +static int opt_verbose= 0; +static time_t opt_expire= 0; +static char *opt_servers= NULL; +static char *opt_username; +static char *opt_passwd; + +#define PROGRAM_NAME "memping" +#define PROGRAM_DESCRIPTION "Ping a server to see if it is alive" + +/* Prototypes */ +void options_parse(int argc, char *argv[]); + +int main(int argc, char *argv[]) +{ + options_parse(argc, argv); + + if (opt_servers == NULL) + { + char *temp; + + if ((temp= getenv("MEMCACHED_SERVERS"))) + { + opt_servers= strdup(temp); + } + + if (opt_servers == NULL) + { + std::cerr << "No Servers provided" << std::endl; + exit(EXIT_FAILURE); + } + } + + int exit_code= EXIT_SUCCESS; + memcached_server_st *servers= memcached_servers_parse(opt_servers); + if (servers == NULL or memcached_server_list_count(servers) == 0) + { + std::cerr << "Invalid server list provided:" << opt_servers << std::endl; + exit_code= EXIT_FAILURE; + } + else + { + for (uint32_t x= 0; x < memcached_server_list_count(servers); x++) + { + memcached_return_t instance_rc; + const char *hostname= servers[x].hostname; + in_port_t port= servers[x].port; + + if (opt_verbose) + { + std::cout << "Trying to ping " << hostname << ":" << port << std::endl; + } + + if (libmemcached_util_ping2(hostname, port, opt_username, opt_passwd, &instance_rc) == false) + { + std::cerr << "Failed to ping " << hostname << ":" << port << " " << memcached_strerror(NULL, instance_rc) << std::endl; + exit_code= EXIT_FAILURE; + } + } + } + memcached_server_list_free(servers); + + free(opt_servers); + + return exit_code; +} + + +void options_parse(int argc, char *argv[]) +{ + memcached_programs_help_st help_options[]= + { + {0}, + }; + + static struct option long_options[]= + { + {(OPTIONSTRING)"version", no_argument, NULL, OPT_VERSION}, + {(OPTIONSTRING)"help", no_argument, NULL, OPT_HELP}, + {(OPTIONSTRING)"quiet", no_argument, NULL, OPT_QUIET}, + {(OPTIONSTRING)"verbose", no_argument, &opt_verbose, OPT_VERBOSE}, + {(OPTIONSTRING)"debug", no_argument, &opt_verbose, OPT_DEBUG}, + {(OPTIONSTRING)"servers", required_argument, NULL, OPT_SERVERS}, + {(OPTIONSTRING)"expire", required_argument, NULL, OPT_EXPIRE}, + {(OPTIONSTRING)"binary", no_argument, NULL, OPT_BINARY}, + {(OPTIONSTRING)"username", required_argument, NULL, OPT_USERNAME}, + {(OPTIONSTRING)"password", required_argument, NULL, OPT_PASSWD}, + {0, 0, 0, 0}, + }; + + bool opt_version= false; + bool opt_help= false; + int option_index= 0; + while (1) + { + int option_rv= getopt_long(argc, argv, "Vhvds:", long_options, &option_index); + + if (option_rv == -1) break; + + switch (option_rv) + { + case 0: + break; + + case OPT_BINARY: + opt_binary= true; + break; + + case OPT_VERBOSE: /* --verbose or -v */ + opt_verbose = OPT_VERBOSE; + break; + + case OPT_DEBUG: /* --debug or -d */ + opt_verbose = OPT_DEBUG; + break; + + case OPT_VERSION: /* --version or -V */ + version_command(PROGRAM_NAME); + break; + + case OPT_HELP: /* --help or -h */ + help_command(PROGRAM_NAME, PROGRAM_DESCRIPTION, long_options, help_options); + break; + + case OPT_SERVERS: /* --servers or -s */ + opt_servers= strdup(optarg); + break; + + case OPT_EXPIRE: /* --expire */ + errno= 0; + opt_expire= time_t(strtoll(optarg, (char **)NULL, 10)); + if (errno != 0) + { + std::cerr << "Incorrect value passed to --expire: `" << optarg << "`" << std::endl; + exit(EXIT_FAILURE); + } + break; + + case OPT_USERNAME: + opt_username= optarg; + opt_binary= true; + break; + + case OPT_PASSWD: + opt_passwd= optarg; + break; + + case OPT_QUIET: + close_stdio(); + break; + + case '?': + /* getopt_long already printed an error message. */ + exit(1); + default: + abort(); + } + } + + if (opt_version) + { + version_command(PROGRAM_NAME); + exit(EXIT_SUCCESS); + } + + if (opt_help) + { + help_command(PROGRAM_NAME, PROGRAM_DESCRIPTION, long_options, help_options); + exit(EXIT_SUCCESS); + } +} diff --git a/clients/memrm.cc b/clients/memrm.cc new file mode 100644 index 0000000..50ead7a --- /dev/null +++ b/clients/memrm.cc @@ -0,0 +1,257 @@ +/* LibMemcached + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: + * + */ +#include "mem_config.h" + +#include +#include +#include +#include +#include +#include + +#include +#include "client_options.h" +#include "utilities.h" + +static int opt_binary= 0; +static int opt_verbose= 0; +static time_t opt_expire= 0; +static char *opt_servers= NULL; +static char *opt_hash= NULL; +static char *opt_username; +static char *opt_passwd; + +#define PROGRAM_NAME "memrm" +#define PROGRAM_DESCRIPTION "Erase a key or set of keys from a memcached cluster." + +/* Prototypes */ +static void options_parse(int argc, char *argv[]); + +int main(int argc, char *argv[]) +{ + options_parse(argc, argv); + initialize_sockets(); + + if (opt_servers == NULL) + { + char *temp; + + if ((temp= getenv("MEMCACHED_SERVERS"))) + { + opt_servers= strdup(temp); + } + + if (opt_servers == NULL) + { + std::cerr << "No Servers provided" << std::endl; + exit(EXIT_FAILURE); + } + } + + memcached_server_st* servers= memcached_servers_parse(opt_servers); + if (servers == NULL or memcached_server_list_count(servers) == 0) + { + std::cerr << "Invalid server list provided:" << opt_servers << std::endl; + return EXIT_FAILURE; + } + + memcached_st* memc= memcached_create(NULL); + process_hash_option(memc, opt_hash); + + memcached_server_push(memc, servers); + memcached_server_list_free(servers); + memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, + (uint64_t) opt_binary); + + if (opt_username and LIBMEMCACHED_WITH_SASL_SUPPORT == 0) + { + memcached_free(memc); + std::cerr << "--username was supplied, but binary was not built with SASL support." << std::endl; + return EXIT_FAILURE; + } + + if (opt_username) + { + memcached_return_t ret; + if (memcached_failed(ret= memcached_set_sasl_auth_data(memc, opt_username, opt_passwd))) + { + std::cerr << memcached_last_error_message(memc) << std::endl; + memcached_free(memc); + return EXIT_FAILURE; + } + } + + int return_code= EXIT_SUCCESS; + + while (optind < argc) + { + memcached_return_t rc= memcached_delete(memc, argv[optind], strlen(argv[optind]), opt_expire); + + if (rc == MEMCACHED_NOTFOUND) + { + if (opt_verbose) + { + std::cerr << "Could not find key \"" << argv[optind] << "\"" << std::endl; + } + } + else if (memcached_fatal(rc)) + { + if (opt_verbose) + { + std::cerr << "Failed to delete key \"" << argv[optind] << "\" :" << memcached_last_error_message(memc) << std::endl; + } + + return_code= EXIT_FAILURE; + } + else // success + { + if (opt_verbose) + { + std::cout << "Deleted key " << argv[optind]; + if (opt_expire) + { + std::cout << " expires: " << opt_expire << std::endl; + } + std::cout << std::endl; + } + } + + optind++; + } + + memcached_free(memc); + + if (opt_servers) + { + free(opt_servers); + } + + if (opt_hash) + { + free(opt_hash); + } + + return return_code; +} + + +static void options_parse(int argc, char *argv[]) +{ + memcached_programs_help_st help_options[]= + { + {0}, + }; + + static struct option long_options[]= + { + {(OPTIONSTRING)"version", no_argument, NULL, OPT_VERSION}, + {(OPTIONSTRING)"help", no_argument, NULL, OPT_HELP}, + {(OPTIONSTRING)"quiet", no_argument, NULL, OPT_QUIET}, + {(OPTIONSTRING)"verbose", no_argument, &opt_verbose, OPT_VERBOSE}, + {(OPTIONSTRING)"debug", no_argument, &opt_verbose, OPT_DEBUG}, + {(OPTIONSTRING)"servers", required_argument, NULL, OPT_SERVERS}, + {(OPTIONSTRING)"expire", required_argument, NULL, OPT_EXPIRE}, + {(OPTIONSTRING)"hash", required_argument, NULL, OPT_HASH}, + {(OPTIONSTRING)"binary", no_argument, NULL, OPT_BINARY}, + {(OPTIONSTRING)"username", required_argument, NULL, OPT_USERNAME}, + {(OPTIONSTRING)"password", required_argument, NULL, OPT_PASSWD}, + {0, 0, 0, 0}, + }; + + bool opt_version= false; + bool opt_help= false; + int option_index= 0; + + while (1) + { + int option_rv= getopt_long(argc, argv, "Vhvds:", long_options, &option_index); + if (option_rv == -1) + { + break; + } + + switch (option_rv) + { + case 0: + break; + + case OPT_BINARY: + opt_binary = 1; + break; + + case OPT_VERBOSE: /* --verbose or -v */ + opt_verbose = OPT_VERBOSE; + break; + + case OPT_DEBUG: /* --debug or -d */ + opt_verbose = OPT_DEBUG; + break; + + case OPT_VERSION: /* --version or -V */ + opt_version= true; + break; + + case OPT_HELP: /* --help or -h */ + opt_help= true; + break; + + case OPT_SERVERS: /* --servers or -s */ + opt_servers= strdup(optarg); + break; + + case OPT_EXPIRE: /* --expire */ + errno= 0; + opt_expire= (time_t)strtoll(optarg, (char **)NULL, 10); + if (errno != 0) + { + std::cerr << "Incorrect value passed to --expire: `" << optarg << "`" << std::endl; + exit(EXIT_FAILURE); + } + break; + + case OPT_HASH: + opt_hash= strdup(optarg); + break; + + case OPT_USERNAME: + opt_username= optarg; + break; + + case OPT_PASSWD: + opt_passwd= optarg; + break; + + case OPT_QUIET: + close_stdio(); + break; + + case '?': + /* getopt_long already printed an error message. */ + exit(EXIT_SUCCESS); + + default: + abort(); + } + } + + if (opt_version) + { + version_command(PROGRAM_NAME); + exit(EXIT_SUCCESS); + } + + if (opt_help) + { + help_command(PROGRAM_NAME, PROGRAM_DESCRIPTION, long_options, help_options); + exit(EXIT_SUCCESS); + } +} diff --git a/clients/memslap.cc b/clients/memslap.cc new file mode 100644 index 0000000..9bc4f23 --- /dev/null +++ b/clients/memslap.cc @@ -0,0 +1,577 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include "client_options.h" +#include "utilities.h" +#include "generator.h" +#include "execute.h" + +#define DEFAULT_INITIAL_LOAD 10000 +#define DEFAULT_EXECUTE_NUMBER 10000 +#define DEFAULT_CONCURRENCY 1 + +#define VALUE_BYTES 4096 + +#define PROGRAM_NAME "memslap" +#define PROGRAM_DESCRIPTION "Generates a load against a memcached custer of servers." + +/* Global Thread counter */ +volatile unsigned int master_wakeup; +pthread_mutex_t sleeper_mutex; +pthread_cond_t sleep_threshhold; + +/* Types */ +enum test_t { + SET_TEST, + GET_TEST, + MGET_TEST +}; + +struct thread_context_st { + unsigned int key_count; + pairs_st *initial_pairs; + unsigned int initial_number; + pairs_st *execute_pairs; + unsigned int execute_number; + char **keys; + size_t *key_lengths; + test_t test; + memcached_st *memc; + const memcached_st* root; + + thread_context_st(const memcached_st* memc_arg, test_t test_arg) : + key_count(0), + initial_pairs(NULL), + initial_number(0), + execute_pairs(NULL), + execute_number(0), + keys(0), + key_lengths(NULL), + test(test_arg), + memc(NULL), + root(memc_arg) + { + } + + void init() + { + memc= memcached_clone(NULL, root); + } + + ~thread_context_st() + { + if (execute_pairs) + { + pairs_free(execute_pairs); + } + memcached_free(memc); + } +}; + +struct conclusions_st { + long int load_time; + long int read_time; + unsigned int rows_loaded; + unsigned int rows_read; + + conclusions_st() : + load_time(0), + read_time(0), + rows_loaded(0), + rows_read() + { } +}; + +/* Prototypes */ +void options_parse(int argc, char *argv[]); +void conclusions_print(conclusions_st *conclusion); +void scheduler(memcached_server_st *servers, conclusions_st *conclusion); +pairs_st *load_create_data(memcached_st *memc, unsigned int number_of, + unsigned int *actual_loaded); +void flush_all(memcached_st *memc); + +static bool opt_binary= 0; +static int opt_verbose= 0; +static int opt_flush= 0; +static int opt_non_blocking_io= 0; +static int opt_tcp_nodelay= 0; +static unsigned int opt_execute_number= 0; +static unsigned int opt_createial_load= 0; +static unsigned int opt_concurrency= 0; +static int opt_displayflag= 0; +static char *opt_servers= NULL; +static bool opt_udp_io= false; +test_t opt_test= SET_TEST; + +extern "C" { + +static __attribute__((noreturn)) void *run_task(void *p) +{ + thread_context_st *context= (thread_context_st *)p; + + context->init(); + + pthread_mutex_lock(&sleeper_mutex); + while (master_wakeup) + { + pthread_cond_wait(&sleep_threshhold, &sleeper_mutex); + } + pthread_mutex_unlock(&sleeper_mutex); + + /* Do Stuff */ + switch (context->test) + { + case SET_TEST: + assert(context->execute_pairs); + execute_set(context->memc, context->execute_pairs, context->execute_number); + break; + + case GET_TEST: + execute_get(context->memc, context->initial_pairs, context->initial_number); + break; + + case MGET_TEST: + execute_mget(context->memc, (const char*const*)context->keys, context->key_lengths, context->initial_number); + break; + } + + delete context; + + pthread_exit(0); +} + +} + + +int main(int argc, char *argv[]) +{ + conclusions_st conclusion; + + srandom((unsigned int)time(NULL)); + options_parse(argc, argv); + + if (opt_servers == NULL) + { + char *temp; + + if ((temp= getenv("MEMCACHED_SERVERS"))) + { + opt_servers= strdup(temp); + } + + if (opt_servers == NULL) + { + std::cerr << "No Servers provided" << std::endl; + exit(EXIT_FAILURE); + } + } + + memcached_server_st *servers= memcached_servers_parse(opt_servers); + if (servers == NULL or memcached_server_list_count(servers) == 0) + { + std::cerr << "Invalid server list provided:" << opt_servers << std::endl; + return EXIT_FAILURE; + } + + pthread_mutex_init(&sleeper_mutex, NULL); + pthread_cond_init(&sleep_threshhold, NULL); + + int error_code= EXIT_SUCCESS; + try { + scheduler(servers, &conclusion); + } + catch(std::exception& e) + { + std::cerr << "Died with exception: " << e.what() << std::endl; + error_code= EXIT_FAILURE; + } + + free(opt_servers); + + (void)pthread_mutex_destroy(&sleeper_mutex); + (void)pthread_cond_destroy(&sleep_threshhold); + conclusions_print(&conclusion); + memcached_server_list_free(servers); + + return error_code; +} + +void scheduler(memcached_server_st *servers, conclusions_st *conclusion) +{ + unsigned int actual_loaded= 0; /* Fix warning */ + + struct timeval start_time, end_time; + pairs_st *pairs= NULL; + + memcached_st *memc= memcached_create(NULL); + + memcached_server_push(memc, servers); + + /* We need to set udp behavior before adding servers to the client */ + if (opt_udp_io) + { + if (memcached_failed(memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_USE_UDP, opt_udp_io))) + { + std::cerr << "Failed to enable UDP." << std::endl; + memcached_free(memc); + exit(EXIT_FAILURE); + } + } + + memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, + (uint64_t)opt_binary); + + if (opt_flush) + { + flush_all(memc); + } + + if (opt_createial_load) + { + pairs= load_create_data(memc, opt_createial_load, &actual_loaded); + } + + char **keys= static_cast(calloc(actual_loaded, sizeof(char*))); + size_t *key_lengths= static_cast(calloc(actual_loaded, sizeof(size_t))); + + if (keys == NULL or key_lengths == NULL) + { + free(keys); + free(key_lengths); + keys= NULL; + key_lengths= NULL; + } + else + { + for (uint32_t x= 0; x < actual_loaded; ++x) + { + keys[x]= pairs[x].key; + key_lengths[x]= pairs[x].key_length; + } + } + + /* We set this after we have loaded */ + { + if (opt_non_blocking_io) + memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_NO_BLOCK, 1); + + if (opt_tcp_nodelay) + memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_TCP_NODELAY, 1); + } + + pthread_mutex_lock(&sleeper_mutex); + master_wakeup= 1; + pthread_mutex_unlock(&sleeper_mutex); + + pthread_t *threads= new (std::nothrow) pthread_t[opt_concurrency]; + + if (threads == NULL) + { + exit(EXIT_FAILURE); + } + + for (uint32_t x= 0; x < opt_concurrency; x++) + { + thread_context_st *context= new thread_context_st(memc, opt_test); + context->test= opt_test; + + context->initial_pairs= pairs; + context->initial_number= actual_loaded; + context->keys= keys; + context->key_lengths= key_lengths; + + if (opt_test == SET_TEST) + { + context->execute_pairs= pairs_generate(opt_execute_number, VALUE_BYTES); + context->execute_number= opt_execute_number; + } + + /* now you create the thread */ + if (pthread_create(threads +x, NULL, run_task, (void *)context) != 0) + { + fprintf(stderr,"Could not create thread\n"); + exit(1); + } + } + + pthread_mutex_lock(&sleeper_mutex); + master_wakeup= 0; + pthread_mutex_unlock(&sleeper_mutex); + pthread_cond_broadcast(&sleep_threshhold); + gettimeofday(&start_time, NULL); + + for (uint32_t x= 0; x < opt_concurrency; x++) + { + void *retval; + pthread_join(threads[x], &retval); + } + delete [] threads; + + gettimeofday(&end_time, NULL); + + conclusion->load_time= timedif(end_time, start_time); + conclusion->read_time= timedif(end_time, start_time); + free(keys); + free(key_lengths); + pairs_free(pairs); + memcached_free(memc); +} + +void options_parse(int argc, char *argv[]) +{ + memcached_programs_help_st help_options[]= + { + {0}, + }; + + static struct option long_options[]= + { + {(OPTIONSTRING)"concurrency", required_argument, NULL, OPT_SLAP_CONCURRENCY}, + {(OPTIONSTRING)"debug", no_argument, &opt_verbose, OPT_DEBUG}, + {(OPTIONSTRING)"quiet", no_argument, NULL, OPT_QUIET}, + {(OPTIONSTRING)"execute-number", required_argument, NULL, OPT_SLAP_EXECUTE_NUMBER}, + {(OPTIONSTRING)"flag", no_argument, &opt_displayflag, OPT_FLAG}, + {(OPTIONSTRING)"flush", no_argument, &opt_flush, OPT_FLUSH}, + {(OPTIONSTRING)"help", no_argument, NULL, OPT_HELP}, + {(OPTIONSTRING)"initial-load", required_argument, NULL, OPT_SLAP_INITIAL_LOAD}, /* Number to load initially */ + {(OPTIONSTRING)"non-blocking", no_argument, &opt_non_blocking_io, OPT_SLAP_NON_BLOCK}, + {(OPTIONSTRING)"servers", required_argument, NULL, OPT_SERVERS}, + {(OPTIONSTRING)"tcp-nodelay", no_argument, &opt_tcp_nodelay, OPT_SLAP_TCP_NODELAY}, + {(OPTIONSTRING)"test", required_argument, NULL, OPT_SLAP_TEST}, + {(OPTIONSTRING)"verbose", no_argument, &opt_verbose, OPT_VERBOSE}, + {(OPTIONSTRING)"version", no_argument, NULL, OPT_VERSION}, + {(OPTIONSTRING)"binary", no_argument, NULL, OPT_BINARY}, + {(OPTIONSTRING)"udp", no_argument, NULL, OPT_UDP}, + {0, 0, 0, 0}, + }; + + bool opt_help= false; + bool opt_version= false; + int option_index= 0; + while (1) + { + int option_rv= getopt_long(argc, argv, "Vhvds:", long_options, &option_index); + + if (option_rv == -1) break; + + switch (option_rv) + { + case 0: + break; + + case OPT_UDP: + if (opt_test == GET_TEST) + { + fprintf(stderr, "You can not run a get test in UDP mode. UDP mode " + "does not currently support get ops.\n"); + exit(1); + } + opt_udp_io= true; + break; + + case OPT_BINARY: + opt_binary= true; + break; + + case OPT_VERBOSE: /* --verbose or -v */ + opt_verbose= OPT_VERBOSE; + break; + + case OPT_DEBUG: /* --debug or -d */ + opt_verbose= OPT_DEBUG; + break; + + case OPT_VERSION: /* --version or -V */ + opt_version= true; + break; + + case OPT_HELP: /* --help or -h */ + opt_help= true; + break; + + case OPT_SERVERS: /* --servers or -s */ + opt_servers= strdup(optarg); + break; + + case OPT_SLAP_TEST: + if (strcmp(optarg, "get") == 0) + { + if (opt_udp_io == 1) + { + fprintf(stderr, "You can not run a get test in UDP mode. UDP mode " + "does not currently support get ops.\n"); + exit(EXIT_FAILURE); + } + opt_test= GET_TEST ; + } + else if (strcmp(optarg, "set") == 0) + { + opt_test= SET_TEST; + } + else if (strcmp(optarg, "mget") == 0) + { + opt_test= MGET_TEST; + } + else + { + fprintf(stderr, "Your test, %s, is not a known test\n", optarg); + exit(EXIT_FAILURE); + } + break; + + case OPT_SLAP_CONCURRENCY: + errno= 0; + opt_concurrency= (unsigned int)strtoul(optarg, (char **)NULL, 10); + if (errno != 0) + { + fprintf(stderr, "Invalid value for concurrency: %s\n", optarg); + exit(EXIT_FAILURE); + } + break; + + case OPT_SLAP_EXECUTE_NUMBER: + errno= 0; + opt_execute_number= (unsigned int)strtoul(optarg, (char **)NULL, 10); + if (errno != 0) + { + fprintf(stderr, "Invalid value for execute: %s\n", optarg); + exit(EXIT_FAILURE); + } + break; + + case OPT_SLAP_INITIAL_LOAD: + errno= 0; + opt_createial_load= (unsigned int)strtoul(optarg, (char **)NULL, 10); + if (errno != 0) + { + fprintf(stderr, "Invalid value for initial load: %s\n", optarg); + exit(EXIT_FAILURE); + } + break; + + case OPT_QUIET: + close_stdio(); + break; + + + case '?': + /* getopt_long already printed an error message. */ + exit(EXIT_FAILURE); + + default: + abort(); + } + } + + if (opt_version) + { + version_command(PROGRAM_NAME); + exit(EXIT_SUCCESS); + } + + if (opt_help) + { + help_command(PROGRAM_NAME, PROGRAM_DESCRIPTION, long_options, help_options); + exit(EXIT_SUCCESS); + } + + if ((opt_test == GET_TEST or opt_test == MGET_TEST) and opt_createial_load == 0) + opt_createial_load= DEFAULT_INITIAL_LOAD; + + if (opt_execute_number == 0) + opt_execute_number= DEFAULT_EXECUTE_NUMBER; + + if (opt_concurrency == 0) + opt_concurrency= DEFAULT_CONCURRENCY; +} + +void conclusions_print(conclusions_st *conclusion) +{ + printf("\tThreads connecting to servers %u\n", opt_concurrency); +#ifdef NOT_FINISHED + printf("\tLoaded %u rows\n", conclusion->rows_loaded); + printf("\tRead %u rows\n", conclusion->rows_read); +#endif + if (opt_test == SET_TEST) + printf("\tTook %ld.%03ld seconds to load data\n", conclusion->load_time / 1000, + conclusion->load_time % 1000); + else + printf("\tTook %ld.%03ld seconds to read data\n", conclusion->read_time / 1000, + conclusion->read_time % 1000); +} + +void flush_all(memcached_st *memc) +{ + memcached_flush(memc, 0); +} + +pairs_st *load_create_data(memcached_st *memc, unsigned int number_of, + unsigned int *actual_loaded) +{ + memcached_st *memc_clone= memcached_clone(NULL, memc); + /* We always used non-blocking IO for load since it is faster */ + memcached_behavior_set(memc_clone, MEMCACHED_BEHAVIOR_NO_BLOCK, 0); + + pairs_st *pairs= pairs_generate(number_of, VALUE_BYTES); + *actual_loaded= execute_set(memc_clone, pairs, number_of); + + memcached_free(memc_clone); + + return pairs; +} diff --git a/clients/memstat.cc b/clients/memstat.cc new file mode 100644 index 0000000..793aab9 --- /dev/null +++ b/clients/memstat.cc @@ -0,0 +1,465 @@ +/* LibMemcached + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: + * + * Authors: + * Brian Aker + * Toru Maesaka + */ +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "client_options.h" +#include "utilities.h" + +#define PROGRAM_NAME "memstat" +#define PROGRAM_DESCRIPTION "Output the state of a memcached cluster." + +/* Prototypes */ +static void options_parse(int argc, char *argv[]); +static void run_analyzer(memcached_st *memc, memcached_stat_st *memc_stat); +static void print_analysis_report(memcached_st *memc, + memcached_analysis_st *report); + +static bool opt_binary= false; +static bool opt_verbose= false; +static bool opt_server_version= false; +static bool opt_analyze= false; +static char *opt_servers= NULL; +static char *stat_args= NULL; +static char *analyze_mode= NULL; +static char *opt_username; +static char *opt_passwd; + +static struct option long_options[]= +{ + {(OPTIONSTRING)"args", required_argument, NULL, OPT_STAT_ARGS}, + {(OPTIONSTRING)"version", no_argument, NULL, OPT_VERSION}, + {(OPTIONSTRING)"help", no_argument, NULL, OPT_HELP}, + {(OPTIONSTRING)"quiet", no_argument, NULL, OPT_QUIET}, + {(OPTIONSTRING)"verbose", no_argument, NULL, OPT_VERBOSE}, + {(OPTIONSTRING)"binary", no_argument, NULL, OPT_BINARY}, + {(OPTIONSTRING)"debug", no_argument, NULL, OPT_DEBUG}, + {(OPTIONSTRING)"server-version", no_argument, NULL, OPT_SERVER_VERSION}, + {(OPTIONSTRING)"servers", required_argument, NULL, OPT_SERVERS}, + {(OPTIONSTRING)"analyze", optional_argument, NULL, OPT_ANALYZE}, + {(OPTIONSTRING)"username", required_argument, NULL, OPT_USERNAME}, + {(OPTIONSTRING)"password", required_argument, NULL, OPT_PASSWD}, + {0, 0, 0, 0}, +}; + + +static memcached_return_t stat_printer(const memcached_instance_st * instance, + const char *key, size_t key_length, + const char *value, size_t value_length, + void *context) +{ + static const memcached_instance_st * last= NULL; + (void)context; + + if (last != instance) + { + printf("Server: %s (%u)\n", memcached_server_name(instance), + (uint32_t)memcached_server_port(instance)); + last= instance; + } + + printf("\t %.*s: %.*s\n", (int)key_length, key, (int)value_length, value); + + return MEMCACHED_SUCCESS; +} + +static memcached_return_t server_print_callback(const memcached_st *, + const memcached_instance_st * instance, + void *) +{ + std::cerr << memcached_server_name(instance) << ":" << memcached_server_port(instance) << + " " << int(memcached_server_major_version(instance)) << + "." << int(memcached_server_minor_version(instance)) << + "." << int(memcached_server_micro_version(instance)) << std::endl; + + return MEMCACHED_SUCCESS; +} + +int main(int argc, char *argv[]) +{ + options_parse(argc, argv); + initialize_sockets(); + + if (opt_servers == NULL) + { + char *temp; + if ((temp= getenv("MEMCACHED_SERVERS"))) + { + opt_servers= strdup(temp); + } + + if (opt_servers == NULL) + { + std::cerr << "No Servers provided" << std::endl; + return EXIT_FAILURE; + } + } + + memcached_server_st* servers= memcached_servers_parse(opt_servers); + if (servers == NULL or memcached_server_list_count(servers) == 0) + { + std::cerr << "Invalid server list provided:" << opt_servers << std::endl; + return EXIT_FAILURE; + } + + if (opt_servers) + { + free(opt_servers); + } + + memcached_st *memc= memcached_create(NULL); + memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, opt_binary); + + memcached_return_t rc= memcached_server_push(memc, servers); + memcached_server_list_free(servers); + + if (opt_username and LIBMEMCACHED_WITH_SASL_SUPPORT == 0) + { + memcached_free(memc); + std::cerr << "--username was supplied, but binary was not built with SASL support." << std::endl; + return EXIT_FAILURE; + } + + if (opt_username) + { + memcached_return_t ret; + if (memcached_failed(ret= memcached_set_sasl_auth_data(memc, opt_username, opt_passwd))) + { + std::cerr << memcached_last_error_message(memc) << std::endl; + memcached_free(memc); + return EXIT_FAILURE; + } + } + + if (rc != MEMCACHED_SUCCESS and rc != MEMCACHED_SOME_ERRORS) + { + printf("Failure to communicate with servers (%s)\n", + memcached_strerror(memc, rc)); + exit(EXIT_FAILURE); + } + + if (opt_server_version) + { + if (memcached_failed(memcached_version(memc))) + { + std::cerr << "Unable to obtain server version"; + exit(EXIT_FAILURE); + } + + memcached_server_fn callbacks[1]; + callbacks[0]= server_print_callback; + memcached_server_cursor(memc, callbacks, NULL, 1); + } + else if (opt_analyze) + { + memcached_stat_st *memc_stat= memcached_stat(memc, NULL, &rc); + + if (memc_stat == NULL) + { + exit(EXIT_FAILURE); + } + + run_analyzer(memc, memc_stat); + + memcached_stat_free(memc, memc_stat); + } + else + { + rc= memcached_stat_execute(memc, stat_args, stat_printer, NULL); + } + + memcached_free(memc); + + return rc == MEMCACHED_SUCCESS ? EXIT_SUCCESS: EXIT_FAILURE; +} + +static void run_analyzer(memcached_st *memc, memcached_stat_st *memc_stat) +{ + memcached_return_t rc; + + if (analyze_mode == NULL) + { + memcached_analysis_st *report; + report= memcached_analyze(memc, memc_stat, &rc); + if (rc != MEMCACHED_SUCCESS || report == NULL) + { + printf("Failure to analyze servers (%s)\n", + memcached_strerror(memc, rc)); + exit(1); + } + print_analysis_report(memc, report); + free(report); + } + else if (strcmp(analyze_mode, "latency") == 0) + { + uint32_t flags, server_count= memcached_server_count(memc); + uint32_t num_of_tests= 32; + const char *test_key= "libmemcached_test_key"; + + memcached_st **servers= static_cast(malloc(sizeof(memcached_st*) * server_count)); + if (servers == NULL) + { + fprintf(stderr, "Failed to allocate memory\n"); + return; + } + + for (uint32_t x= 0; x < server_count; x++) + { + const memcached_instance_st * instance= + memcached_server_instance_by_position(memc, x); + + if ((servers[x]= memcached_create(NULL)) == NULL) + { + fprintf(stderr, "Failed to memcached_create()\n"); + if (x > 0) + { + memcached_free(servers[0]); + } + x--; + + for (; x > 0; x--) + { + memcached_free(servers[x]); + } + + free(servers); + + return; + } + memcached_server_add(servers[x], + memcached_server_name(instance), + memcached_server_port(instance)); + } + + printf("Network Latency Test:\n\n"); + struct timeval start_time, end_time; + uint32_t slowest_server= 0; + long elapsed_time, slowest_time= 0; + + for (uint32_t x= 0; x < server_count; x++) + { + const memcached_instance_st * instance= + memcached_server_instance_by_position(memc, x); + gettimeofday(&start_time, NULL); + + for (uint32_t y= 0; y < num_of_tests; y++) + { + size_t vlen; + char *val= memcached_get(servers[x], test_key, strlen(test_key), + &vlen, &flags, &rc); + if (rc != MEMCACHED_NOTFOUND and rc != MEMCACHED_SUCCESS) + { + break; + } + free(val); + } + gettimeofday(&end_time, NULL); + + elapsed_time= (long) timedif(end_time, start_time); + elapsed_time /= (long) num_of_tests; + + if (elapsed_time > slowest_time) + { + slowest_server= x; + slowest_time= elapsed_time; + } + + if (rc != MEMCACHED_NOTFOUND && rc != MEMCACHED_SUCCESS) + { + printf("\t %s (%d) => failed to reach the server\n", + memcached_server_name(instance), + memcached_server_port(instance)); + } + else + { + printf("\t %s (%d) => %ld.%ld seconds\n", + memcached_server_name(instance), + memcached_server_port(instance), + elapsed_time / 1000, elapsed_time % 1000); + } + } + + if (server_count > 1 && slowest_time > 0) + { + const memcached_instance_st * slowest= + memcached_server_instance_by_position(memc, slowest_server); + + printf("---\n"); + printf("Slowest Server: %s (%d) => %ld.%ld seconds\n", + memcached_server_name(slowest), + memcached_server_port(slowest), + slowest_time / 1000, slowest_time % 1000); + } + printf("\n"); + + for (uint32_t x= 0; x < server_count; x++) + { + memcached_free(servers[x]); + } + + free(servers); + free(analyze_mode); + } + else + { + fprintf(stderr, "Invalid Analyzer Option provided\n"); + free(analyze_mode); + } +} + +static void print_analysis_report(memcached_st *memc, + memcached_analysis_st *report) + +{ + uint32_t server_count= memcached_server_count(memc); + const memcached_instance_st * most_consumed_server= memcached_server_instance_by_position(memc, report->most_consumed_server); + const memcached_instance_st * least_free_server= memcached_server_instance_by_position(memc, report->least_free_server); + const memcached_instance_st * oldest_server= memcached_server_instance_by_position(memc, report->oldest_server); + + printf("Memcached Cluster Analysis Report\n\n"); + + printf("\tNumber of Servers Analyzed : %u\n", server_count); + printf("\tAverage Item Size (incl/overhead) : %u bytes\n", + report->average_item_size); + + if (server_count == 1) + { + printf("\nFor a detailed report, you must supply multiple servers.\n"); + return; + } + + printf("\n"); + printf("\tNode with most memory consumption : %s:%u (%llu bytes)\n", + memcached_server_name(most_consumed_server), + (uint32_t)memcached_server_port(most_consumed_server), + (unsigned long long)report->most_used_bytes); + printf("\tNode with least free space : %s:%u (%llu bytes remaining)\n", + memcached_server_name(least_free_server), + (uint32_t)memcached_server_port(least_free_server), + (unsigned long long)report->least_remaining_bytes); + printf("\tNode with longest uptime : %s:%u (%us)\n", + memcached_server_name(oldest_server), + (uint32_t)memcached_server_port(oldest_server), + report->longest_uptime); + printf("\tPool-wide Hit Ratio : %1.f%%\n", report->pool_hit_ratio); + printf("\n"); +} + +static void options_parse(int argc, char *argv[]) +{ + memcached_programs_help_st help_options[]= + { + {0}, + }; + + int option_index= 0; + + bool opt_version= false; + bool opt_help= false; + while (1) + { + int option_rv= getopt_long(argc, argv, "Vhvds:a", long_options, &option_index); + + if (option_rv == -1) + break; + + switch (option_rv) + { + case 0: + break; + + case OPT_VERBOSE: /* --verbose or -v */ + opt_verbose= true; + break; + + case OPT_DEBUG: /* --debug or -d */ + opt_verbose= true; + break; + + case OPT_BINARY: + opt_binary= true; + break; + + case OPT_SERVER_VERSION: + opt_server_version= true; + break; + + case OPT_VERSION: /* --version or -V */ + opt_version= true; + break; + + case OPT_HELP: /* --help or -h */ + opt_help= true; + break; + + case OPT_SERVERS: /* --servers or -s */ + opt_servers= strdup(optarg); + break; + + case OPT_STAT_ARGS: + stat_args= strdup(optarg); + break; + + case OPT_ANALYZE: /* --analyze or -a */ + opt_analyze= OPT_ANALYZE; + analyze_mode= (optarg) ? strdup(optarg) : NULL; + break; + + case OPT_QUIET: + close_stdio(); + break; + + case OPT_USERNAME: + opt_username= optarg; + opt_binary= true; + break; + + case OPT_PASSWD: + opt_passwd= optarg; + break; + + case '?': + /* getopt_long already printed an error message. */ + exit(1); + default: + abort(); + } + } + + if (opt_version) + { + version_command(PROGRAM_NAME); + exit(EXIT_SUCCESS); + } + + if (opt_help) + { + help_command(PROGRAM_NAME, PROGRAM_DESCRIPTION, long_options, help_options); + exit(EXIT_SUCCESS); + } +} diff --git a/clients/memtouch.cc b/clients/memtouch.cc new file mode 100644 index 0000000..09e0c92 --- /dev/null +++ b/clients/memtouch.cc @@ -0,0 +1,256 @@ +/* LibMemcached + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: + * + */ + +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include "utilities.h" + +#define PROGRAM_NAME "memtouch" +#define PROGRAM_DESCRIPTION "Update the expiration value of an already existing value in the server" + + +/* Prototypes */ +void options_parse(int argc, char *argv[]); + +static int opt_binary= 0; +static int opt_verbose= 0; +static char *opt_servers= NULL; +static char *opt_hash= NULL; +static char *opt_username; +static char *opt_passwd; + +time_t expiration= 0; + +int main(int argc, char *argv[]) +{ + int return_code= EXIT_SUCCESS; + + options_parse(argc, argv); + initialize_sockets(); + + if (opt_servers == NULL) + { + char *temp; + + if ((temp= getenv("MEMCACHED_SERVERS"))) + { + opt_servers= strdup(temp); + } + + if (opt_servers == NULL) + { + std::cerr << "No Servers provided" << std::endl; + exit(EXIT_FAILURE); + } + } + + memcached_server_st* servers= memcached_servers_parse(opt_servers); + if (servers == NULL or memcached_server_list_count(servers) == 0) + { + std::cerr << "Invalid server list provided:" << opt_servers << std::endl; + return EXIT_FAILURE; + } + + memcached_st *memc= memcached_create(NULL); + process_hash_option(memc, opt_hash); + + memcached_server_push(memc, servers); + memcached_server_list_free(servers); + memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, + (uint64_t)opt_binary); + + if (opt_username and LIBMEMCACHED_WITH_SASL_SUPPORT == 0) + { + memcached_free(memc); + std::cerr << "--username was supplied, but binary was not built with SASL support." << std::endl; + return EXIT_FAILURE; + } + + if (opt_username) + { + memcached_return_t ret; + if (memcached_failed(ret= memcached_set_sasl_auth_data(memc, opt_username, opt_passwd))) + { + std::cerr << memcached_last_error_message(memc) << std::endl; + memcached_free(memc); + return EXIT_FAILURE; + } + } + + while (optind < argc) + { + memcached_return_t rc= memcached_touch(memc, argv[optind], strlen(argv[optind]), expiration); + if (rc == MEMCACHED_NOTFOUND) + { + if (opt_verbose) + { + std::cout << "Could not find key \"" << argv[optind] << "\"" << std::endl; + } + + return_code= EXIT_FAILURE; + } + else if (memcached_failed(rc)) + { + if (opt_verbose) + { + std::cerr << "Fatal error for key \"" << argv[optind] << "\" :" << memcached_last_error_message(memc) << std::endl; + } + + return_code= EXIT_FAILURE; + } + else // success + { + if (opt_verbose) + { + std::cout << "Found key " << argv[optind] << std::endl; + } + } + + optind++; + } + + memcached_free(memc); + + if (opt_servers) + { + free(opt_servers); + } + + if (opt_hash) + { + free(opt_hash); + } + + return return_code; +} + + +void options_parse(int argc, char *argv[]) +{ + memcached_programs_help_st help_options[]= + { + {0}, + }; + + static struct option long_options[]= + { + {(OPTIONSTRING)"version", no_argument, NULL, OPT_VERSION}, + {(OPTIONSTRING)"help", no_argument, NULL, OPT_HELP}, + {(OPTIONSTRING)"quiet", no_argument, NULL, OPT_QUIET}, + {(OPTIONSTRING)"verbose", no_argument, &opt_verbose, OPT_VERBOSE}, + {(OPTIONSTRING)"debug", no_argument, &opt_verbose, OPT_DEBUG}, + {(OPTIONSTRING)"servers", required_argument, NULL, OPT_SERVERS}, + {(OPTIONSTRING)"hash", required_argument, NULL, OPT_HASH}, + {(OPTIONSTRING)"binary", no_argument, NULL, OPT_BINARY}, + {(OPTIONSTRING)"username", required_argument, NULL, OPT_USERNAME}, + {(OPTIONSTRING)"password", required_argument, NULL, OPT_PASSWD}, + {(OPTIONSTRING)"expire", required_argument, NULL, OPT_EXPIRE}, + {0, 0, 0, 0}, + }; + + bool opt_version= false; + bool opt_help= false; + int option_index= 0; + + while (1) + { + int option_rv= getopt_long(argc, argv, "Vhvds:", long_options, &option_index); + if (option_rv == -1) + { + break; + } + + switch (option_rv) + { + case 0: + break; + + case OPT_BINARY: + opt_binary = true; + break; + + case OPT_VERBOSE: /* --verbose or -v */ + opt_verbose = OPT_VERBOSE; + break; + + case OPT_DEBUG: /* --debug or -d */ + opt_verbose = OPT_DEBUG; + break; + + case OPT_VERSION: /* --version or -V */ + opt_version= true; + break; + + case OPT_HELP: /* --help or -h */ + opt_help= true; + break; + + case OPT_SERVERS: /* --servers or -s */ + opt_servers= strdup(optarg); + break; + + case OPT_HASH: + opt_hash= strdup(optarg); + break; + + case OPT_USERNAME: + opt_username= optarg; + break; + + case OPT_PASSWD: + opt_passwd= optarg; + break; + + case OPT_EXPIRE: + errno= 0; + expiration= time_t(strtoul(optarg, (char **)NULL, 10)); + if (errno != 0) + { + fprintf(stderr, "Invalid value for --expire: %s\n", optarg); + exit(EXIT_FAILURE); + } + break; + + case OPT_QUIET: + close_stdio(); + break; + + case '?': + /* getopt_long already printed an error message. */ + exit(EXIT_FAILURE); + + default: + abort(); + } + } + + if (opt_version) + { + version_command(PROGRAM_NAME); + exit(EXIT_SUCCESS); + } + + if (opt_help) + { + help_command(PROGRAM_NAME, PROGRAM_DESCRIPTION, long_options, help_options); + exit(EXIT_SUCCESS); + } +} diff --git a/clients/ms_atomic.h b/clients/ms_atomic.h new file mode 100644 index 0000000..0b05bce --- /dev/null +++ b/clients/ms_atomic.h @@ -0,0 +1,69 @@ +/* LibMemcached + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: + * + */ + +#ifndef CLIENTS_MS_ATOMIC_H +#define CLIENTS_MS_ATOMIC_H + +#if defined(__SUNPRO_C) +# define _KERNEL +# include +# if SIZEOF_SIZE_T == 8 +# define atomic_add_size(X, Y) atomic_add_64((X), (Y)) +# define atomic_add_size_nv(X, Y) atomic_add_64((X), (Y)) +# define atomic_dec_size(X, Y) atomic_add_64((X), (Y)) +# define atomic_dec_size_nv(X, Y) atomic_add_64((X), (Y)) +# else +# define atomic_add_size(X, Y) atomic_add_32((X), (Y)) +# define atomic_add_size_nv(X, Y) atomic_add_32((X), (Y)) +# define atomic_dec_size(X, Y) atomic_add_32((X), (Y)) +# define atomic_dec_size_nv(X, Y) atomic_add_32((X), (Y)) +# endif +# undef _KERNEL +#elif HAVE_GCC_ATOMIC_BUILTINS +# define atomic_add_8(X, Y) __sync_fetch_and_add((X), (Y)) +# define atomic_add_16(X, Y) __sync_fetch_and_add((X), (Y)) +# define atomic_add_32(X, Y) __sync_fetch_and_add((X), (Y)) +# define atomic_add_size(X, Y) __sync_fetch_and_add((X), (Y)) +# define atomic_dec_8(X) __sync_fetch_and_sub((X), 1) +# define atomic_dec_16(X) __sync_fetch_and_sub((X), 1) +# define atomic_dec_32(X) __sync_fetch_and_sub((X), 1) +# define atomic_dec_size(X) __sync_fetch_and_sub((X), 1) +/* The same as above, but these return the new value instead of void */ +# define atomic_add_8_nv(X, Y) __sync_fetch_and_add((X), (Y)) +# define atomic_add_16_nv(X, Y) __sync_fetch_and_add((X), (Y)) +# define atomic_add_32_nv(X, Y) __sync_fetch_and_add((X), (Y)) +# define atomic_add_size_nv(X, Y) __sync_fetch_and_add((X), (Y)) +# define atomic_dec_8_nv(X) __sync_fetch_and_sub((X), 1) +# define atomic_dec_16_nv(X) __sync_fetch_and_sub((X), 1) +# define atomic_dec_32_nv(X) __sync_fetch_and_sub((X), 1) +# define atomic_dec_size_nv(X) __sync_fetch_and_sub((X), 1) +#else +#warning "Atomic operators not found so memslap will not work correctly" +# define atomic_add_8(X, Y) +# define atomic_add_16(X, Y) +# define atomic_add_32(X, Y) +# define atomic_add_size(X, Y) +# define atomic_dec_8(X) +# define atomic_dec_16(X) +# define atomic_dec_32(X) +# define atomic_dec_size(X) +/* The same as above, but these return the new value instead of void */ +# define atomic_add_8_nv(X, Y) +# define atomic_add_16_nv(X, Y) +# define atomic_add_32_nv(X, Y) +# define atomic_add_size_nv(X, Y) +# define atomic_dec_8_nv(X) +# define atomic_dec_16_nv(X) +# define atomic_dec_32_nv(X) +# define atomic_dec_size_nv(X) +#endif /* defined(__SUNPRO_C) */ + +#endif /* CLIENTS_MS_ATOMIC_H */ diff --git a/clients/ms_conn.c b/clients/ms_conn.c new file mode 100644 index 0000000..2afc9fa --- /dev/null +++ b/clients/ms_conn.c @@ -0,0 +1,3423 @@ +/* + * File: ms_conn.c + * Author: Mingqiang Zhuang + * + * Created on February 10, 2009 + * + * (c) Copyright 2009, Schooner Information Technology, Inc. + * http://www.schoonerinfotech.com/ + * + */ + +#include "mem_config.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(HAVE_SYS_TIME_H) +# include +#endif + +#if defined(HAVE_TIME_H) +# include +#endif + +#include "ms_setting.h" +#include "ms_thread.h" +#include "ms_atomic.h" + +#ifdef linux +/* /usr/include/netinet/in.h defines macros from ntohs() to _bswap_nn to + * optimize the conversion functions, but the prototypes generate warnings + * from gcc. The conversion methods isn't the bottleneck for my app, so + * just remove the warnings by undef'ing the optimization .. + */ +#undef ntohs +#undef ntohl +#undef htons +#undef htonl +#endif + +/* for network write */ +#define TRANSMIT_COMPLETE 0 +#define TRANSMIT_INCOMPLETE 1 +#define TRANSMIT_SOFT_ERROR 2 +#define TRANSMIT_HARD_ERROR 3 + +/* for generating key */ +#define KEY_PREFIX_BASE 0x1010101010101010 /* not include ' ' '\r' '\n' '\0' */ +#define KEY_PREFIX_MASK 0x1010101010101010 + +/* For parse the value length return by server */ +#define KEY_TOKEN 1 +#define VALUELEN_TOKEN 3 + +/* global increasing counter, to ensure the key prefix unique */ +static uint64_t key_prefix_seq= KEY_PREFIX_BASE; + +/* global increasing counter, generating request id for UDP */ +static volatile uint32_t udp_request_id= 0; + +extern pthread_key_t ms_thread_key; + +/* generate upd request id */ +static uint32_t ms_get_udp_request_id(void); + + +/* connect initialize */ +static void ms_task_init(ms_conn_t *c); +static int ms_conn_udp_init(ms_conn_t *c, const bool is_udp); +static int ms_conn_sock_init(ms_conn_t *c); +static int ms_conn_event_init(ms_conn_t *c); +static int ms_conn_init(ms_conn_t *c, + const int init_state, + const int read_buffer_size, + const bool is_udp); +static void ms_warmup_num_init(ms_conn_t *c); +static int ms_item_win_init(ms_conn_t *c); + + +/* connection close */ +void ms_conn_free(ms_conn_t *c); +static void ms_conn_close(ms_conn_t *c); + + +/* create network connection */ +static int ms_new_socket(struct addrinfo *ai); +static void ms_maximize_sndbuf(const int sfd); +static int ms_network_connect(ms_conn_t *c, + char *srv_host_name, + const int srv_port, + const bool is_udp, + int *ret_sfd); +static int ms_reconn(ms_conn_t *c); + + +/* read and parse */ +static int ms_tokenize_command(char *command, + token_t *tokens, + const int max_tokens); +static int ms_ascii_process_line(ms_conn_t *c, char *command); +static int ms_try_read_line(ms_conn_t *c); +static int ms_sort_udp_packet(ms_conn_t *c, char *buf, int rbytes); +static int ms_udp_read(ms_conn_t *c, char *buf, int len); +static int ms_try_read_network(ms_conn_t *c); +static void ms_verify_value(ms_conn_t *c, + ms_mlget_task_item_t *mlget_item, + char *value, + int vlen); +static void ms_ascii_complete_nread(ms_conn_t *c); +static void ms_bin_complete_nread(ms_conn_t *c); +static void ms_complete_nread(ms_conn_t *c); + + +/* send functions */ +static int ms_add_msghdr(ms_conn_t *c); +static int ms_ensure_iov_space(ms_conn_t *c); +static int ms_add_iov(ms_conn_t *c, const void *buf, int len); +static int ms_build_udp_headers(ms_conn_t *c); +static int ms_transmit(ms_conn_t *c); + + +/* status adjustment */ +static void ms_conn_shrink(ms_conn_t *c); +static void ms_conn_set_state(ms_conn_t *c, int state); +static bool ms_update_event(ms_conn_t *c, const int new_flags); +static uint32_t ms_get_rep_sock_index(ms_conn_t *c, int cmd); +static uint32_t ms_get_next_sock_index(ms_conn_t *c); +static int ms_update_conn_sock_event(ms_conn_t *c); +static bool ms_need_yield(ms_conn_t *c); +static void ms_update_start_time(ms_conn_t *c); + + +/* main loop */ +static void ms_drive_machine(ms_conn_t *c); +void ms_event_handler(const int fd, const short which, void *arg); + + +/* ascii protocol */ +static int ms_build_ascii_write_buf_set(ms_conn_t *c, ms_task_item_t *item); +static int ms_build_ascii_write_buf_get(ms_conn_t *c, ms_task_item_t *item); +static int ms_build_ascii_write_buf_mlget(ms_conn_t *c); + + +/* binary protocol */ +static int ms_bin_process_response(ms_conn_t *c); +static void ms_add_bin_header(ms_conn_t *c, + uint8_t opcode, + uint8_t hdr_len, + uint16_t key_len, + uint32_t body_len); +static void ms_add_key_to_iov(ms_conn_t *c, ms_task_item_t *item); +static int ms_build_bin_write_buf_set(ms_conn_t *c, ms_task_item_t *item); +static int ms_build_bin_write_buf_get(ms_conn_t *c, ms_task_item_t *item); +static int ms_build_bin_write_buf_mlget(ms_conn_t *c); + + +/** + * each key has two parts, prefix and suffix. The suffix is a + * string random get form the character table. The prefix is a + * uint64_t variable. And the prefix must be unique. we use the + * prefix to identify a key. And the prefix can't include + * character ' ' '\r' '\n' '\0'. + * + * @return uint64_t + */ +uint64_t ms_get_key_prefix(void) +{ + uint64_t key_prefix; + + pthread_mutex_lock(&ms_global.seq_mutex); + key_prefix_seq|= KEY_PREFIX_MASK; + key_prefix= key_prefix_seq; + key_prefix_seq++; + pthread_mutex_unlock(&ms_global.seq_mutex); + + return key_prefix; +} /* ms_get_key_prefix */ + + +/** + * get an unique udp request id + * + * @return an unique UDP request id + */ +static uint32_t ms_get_udp_request_id(void) +{ + return atomic_add_32_nv(&udp_request_id, 1); +} + + +/** + * initialize current task structure + * + * @param c, pointer of the concurrency + */ +static void ms_task_init(ms_conn_t *c) +{ + c->curr_task.cmd= CMD_NULL; + c->curr_task.item= 0; + c->curr_task.verify= false; + c->curr_task.finish_verify= true; + c->curr_task.get_miss= true; + + c->curr_task.get_opt= 0; + c->curr_task.set_opt= 0; + c->curr_task.cycle_undo_get= 0; + c->curr_task.cycle_undo_set= 0; + c->curr_task.verified_get= 0; + c->curr_task.overwrite_set= 0; +} /* ms_task_init */ + + +/** + * initialize udp for the connection structure + * + * @param c, pointer of the concurrency + * @param is_udp, whether it's udp + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +static int ms_conn_udp_init(ms_conn_t *c, const bool is_udp) +{ + c->hdrbuf= 0; + c->rudpbuf= 0; + c->udppkt= 0; + + c->rudpsize= UDP_DATA_BUFFER_SIZE; + c->hdrsize= 0; + + c->rudpbytes= 0; + c->packets= 0; + c->recvpkt= 0; + c->pktcurr= 0; + c->ordcurr= 0; + + c->udp= is_udp; + + if (c->udp || (! c->udp && ms_setting.facebook_test)) + { + c->rudpbuf= (char *)malloc((size_t)c->rudpsize); + c->udppkt= (ms_udppkt_t *)malloc(MAX_UDP_PACKET * sizeof(ms_udppkt_t)); + + if ((c->rudpbuf == NULL) || (c->udppkt == NULL)) + { + if (c->rudpbuf != NULL) + free(c->rudpbuf); + if (c->udppkt != NULL) + free(c->udppkt); + fprintf(stderr, "malloc()\n"); + return -1; + } + memset(c->udppkt, 0, MAX_UDP_PACKET * sizeof(ms_udppkt_t)); + } + + return EXIT_SUCCESS; +} /* ms_conn_udp_init */ + + +/** + * initialize the connection structure + * + * @param c, pointer of the concurrency + * @param init_state, (conn_read, conn_write, conn_closing) + * @param read_buffer_size + * @param is_udp, whether it's udp + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +static int ms_conn_init(ms_conn_t *c, + const int init_state, + const int read_buffer_size, + const bool is_udp) +{ + assert(c != NULL); + + c->rbuf= c->wbuf= 0; + c->iov= 0; + c->msglist= 0; + + c->rsize= read_buffer_size; + c->wsize= WRITE_BUFFER_SIZE; + c->iovsize= IOV_LIST_INITIAL; + c->msgsize= MSG_LIST_INITIAL; + + /* for replication, each connection need connect all the server */ + if (ms_setting.rep_write_srv > 0) + { + c->total_sfds= ms_setting.srv_cnt * ms_setting.sock_per_conn; + } + else + { + c->total_sfds= ms_setting.sock_per_conn; + } + c->alive_sfds= 0; + + c->rbuf= (char *)malloc((size_t)c->rsize); + c->wbuf= (char *)malloc((size_t)c->wsize); + c->iov= (struct iovec *)malloc(sizeof(struct iovec) * (size_t)c->iovsize); + c->msglist= (struct msghdr *)malloc( + sizeof(struct msghdr) * (size_t)c->msgsize); + if (ms_setting.mult_key_num > 1) + { + c->mlget_task.mlget_item= (ms_mlget_task_item_t *) + malloc( + sizeof(ms_mlget_task_item_t) * (size_t)ms_setting.mult_key_num); + } + c->tcpsfd= (int *)malloc((size_t)c->total_sfds * sizeof(int)); + + if ((c->rbuf == NULL) || (c->wbuf == NULL) || (c->iov == NULL) + || (c->msglist == NULL) || (c->tcpsfd == NULL) + || ((ms_setting.mult_key_num > 1) + && (c->mlget_task.mlget_item == NULL))) + { + if (c->rbuf != NULL) + free(c->rbuf); + if (c->wbuf != NULL) + free(c->wbuf); + if (c->iov != NULL) + free(c->iov); + if (c->msglist != NULL) + free(c->msglist); + if (c->mlget_task.mlget_item != NULL) + free(c->mlget_task.mlget_item); + if (c->tcpsfd != NULL) + free(c->tcpsfd); + fprintf(stderr, "malloc()\n"); + return -1; + } + + c->state= init_state; + c->rvbytes= 0; + c->rbytes= 0; + c->rcurr= c->rbuf; + c->wcurr= c->wbuf; + c->iovused= 0; + c->msgcurr= 0; + c->msgused= 0; + c->cur_idx= c->total_sfds; /* default index is a invalid value */ + + c->ctnwrite= false; + c->readval= false; + c->change_sfd= false; + + c->precmd.cmd= c->currcmd.cmd= CMD_NULL; + c->precmd.isfinish= true; /* default the previous command finished */ + c->currcmd.isfinish= false; + c->precmd.retstat= c->currcmd.retstat= MCD_FAILURE; + c->precmd.key_prefix= c->currcmd.key_prefix= 0; + + c->mlget_task.mlget_num= 0; + c->mlget_task.value_index= -1; /* default invalid value */ + + if (ms_setting.binary_prot_) + { + c->protocol= binary_prot; + } + else + { + c->protocol= ascii_prot; + } + + /* initialize udp */ + if (ms_conn_udp_init(c, is_udp) != 0) + { + return -1; + } + + /* initialize task */ + ms_task_init(c); + + if (! (ms_setting.facebook_test && is_udp)) + { + atomic_add_32(&ms_stats.active_conns, 1); + } + + return EXIT_SUCCESS; +} /* ms_conn_init */ + + +/** + * when doing 100% get operation, it could preset some objects + * to warmup the server. this function is used to initialize the + * number of the objects to preset. + * + * @param c, pointer of the concurrency + */ +static void ms_warmup_num_init(ms_conn_t *c) +{ + /* no set operation, preset all the items in the window */ + if (ms_setting.cmd_distr[CMD_SET].cmd_prop < PROP_ERROR) + { + c->warmup_num= c->win_size; + c->remain_warmup_num= c->warmup_num; + } + else + { + c->warmup_num= 0; + c->remain_warmup_num= c->warmup_num; + } +} /* ms_warmup_num_init */ + + +/** + * each connection has an item window, this function initialize + * the window. The window is used to generate task. + * + * @param c, pointer of the concurrency + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +static int ms_item_win_init(ms_conn_t *c) +{ + ms_thread_t *ms_thread= pthread_getspecific(ms_thread_key); + int exp_cnt= 0; + + c->win_size= (int)ms_setting.win_size; + c->set_cursor= 0; + c->exec_num= ms_thread->thread_ctx->exec_num_perconn; + c->remain_exec_num= c->exec_num; + + c->item_win= (ms_task_item_t *)malloc( + sizeof(ms_task_item_t) * (size_t)c->win_size); + if (c->item_win == NULL) + { + fprintf(stderr, "Can't allocate task item array for conn.\n"); + return -1; + } + memset(c->item_win, 0, sizeof(ms_task_item_t) * (size_t)c->win_size); + + for (int i= 0; i < c->win_size; i++) + { + c->item_win[i].key_size= (int)ms_setting.distr[i].key_size; + c->item_win[i].key_prefix= ms_get_key_prefix(); + c->item_win[i].key_suffix_offset= ms_setting.distr[i].key_offset; + c->item_win[i].value_size= (int)ms_setting.distr[i].value_size; + c->item_win[i].value_offset= INVALID_OFFSET; /* default in invalid offset */ + c->item_win[i].client_time= 0; + + /* set expire time base on the proportion */ + if (exp_cnt < ms_setting.exp_ver_per * i) + { + c->item_win[i].exp_time= FIXED_EXPIRE_TIME; + exp_cnt++; + } + else + { + c->item_win[i].exp_time= 0; + } + } + + ms_warmup_num_init(c); + + return EXIT_SUCCESS; +} /* ms_item_win_init */ + + +/** + * each connection structure can include one or more sock + * handlers. this function create these socks and connect the + * server(s). + * + * @param c, pointer of the concurrency + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +static int ms_conn_sock_init(ms_conn_t *c) +{ + ms_thread_t *ms_thread= pthread_getspecific(ms_thread_key); + uint32_t i; + int ret_sfd; + uint32_t srv_idx= 0; + + assert(c != NULL); + assert(c->tcpsfd != NULL); + + for (i= 0; i < c->total_sfds; i++) + { + ret_sfd= 0; + if (ms_setting.rep_write_srv > 0) + { + /* for replication, each connection need connect all the server */ + srv_idx= i % ms_setting.srv_cnt; + } + else + { + /* all the connections in a thread connects the same server */ + srv_idx= ms_thread->thread_ctx->srv_idx; + } + + if (ms_network_connect(c, ms_setting.servers[srv_idx].srv_host_name, + ms_setting.servers[srv_idx].srv_port, + ms_setting.udp, &ret_sfd) != 0) + { + break; + } + + if (i == 0) + { + c->sfd= ret_sfd; + } + + if (! ms_setting.udp) + { + c->tcpsfd[i]= ret_sfd; + } + + c->alive_sfds++; + } + + /* initialize udp sock handler if necessary */ + if (ms_setting.facebook_test) + { + ret_sfd= 0; + if (ms_network_connect(c, ms_setting.servers[srv_idx].srv_host_name, + ms_setting.servers[srv_idx].srv_port, + true, &ret_sfd) != 0) + { + c->udpsfd= 0; + } + else + { + c->udpsfd= ret_sfd; + } + } + + if ((i != c->total_sfds) || (ms_setting.facebook_test && (c->udpsfd == 0))) + { + if (ms_setting.udp) + { + close(c->sfd); + } + else + { + for (uint32_t j= 0; j < i; j++) + { + close(c->tcpsfd[j]); + } + } + + if (c->udpsfd != 0) + { + close(c->udpsfd); + } + + return -1; + } + + return EXIT_SUCCESS; +} /* ms_conn_sock_init */ + + +/** + * each connection is managed by libevent, this function + * initialize the event of the connection structure. + * + * @param c, pointer of the concurrency + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +static int ms_conn_event_init(ms_conn_t *c) +{ + ms_thread_t *ms_thread= pthread_getspecific(ms_thread_key); + short event_flags= EV_WRITE | EV_PERSIST; + + event_set(&c->event, c->sfd, event_flags, ms_event_handler, (void *)c); + event_base_set(ms_thread->base, &c->event); + c->ev_flags= event_flags; + + if (event_add(&c->event, NULL) == -1) + { + return -1; + } + + return EXIT_SUCCESS; +} /* ms_conn_event_init */ + + +/** + * setup a connection, each connection structure of each + * thread must call this function to initialize. + * + * @param c, pointer of the concurrency + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +int ms_setup_conn(ms_conn_t *c) +{ + if (ms_item_win_init(c) != 0) + { + return -1; + } + + if (ms_conn_init(c, conn_write, DATA_BUFFER_SIZE, ms_setting.udp) != 0) + { + return -1; + } + + if (ms_conn_sock_init(c) != 0) + { + return -1; + } + + if (ms_conn_event_init(c) != 0) + { + return -1; + } + + return EXIT_SUCCESS; +} /* ms_setup_conn */ + + +/** + * Frees a connection. + * + * @param c, pointer of the concurrency + */ +void ms_conn_free(ms_conn_t *c) +{ + ms_thread_t *ms_thread= pthread_getspecific(ms_thread_key); + if (c != NULL) + { + if (c->hdrbuf != NULL) + free(c->hdrbuf); + if (c->msglist != NULL) + free(c->msglist); + if (c->rbuf != NULL) + free(c->rbuf); + if (c->wbuf != NULL) + free(c->wbuf); + if (c->iov != NULL) + free(c->iov); + if (c->mlget_task.mlget_item != NULL) + free(c->mlget_task.mlget_item); + if (c->rudpbuf != NULL) + free(c->rudpbuf); + if (c->udppkt != NULL) + free(c->udppkt); + if (c->item_win != NULL) + free(c->item_win); + if (c->tcpsfd != NULL) + free(c->tcpsfd); + + if (--ms_thread->nactive_conn == 0) + { + free(ms_thread->conn); + } + } +} /* ms_conn_free */ + + +/** + * close a connection + * + * @param c, pointer of the concurrency + */ +static void ms_conn_close(ms_conn_t *c) +{ + ms_thread_t *ms_thread= pthread_getspecific(ms_thread_key); + assert(c != NULL); + + /* delete the event, the socket and the connection */ + event_del(&c->event); + + for (uint32_t i= 0; i < c->total_sfds; i++) + { + if (c->tcpsfd[i] > 0) + { + close(c->tcpsfd[i]); + } + } + c->sfd= 0; + + if (ms_setting.facebook_test) + { + close(c->udpsfd); + } + + atomic_dec_32(&ms_stats.active_conns); + + ms_conn_free(c); + + if (ms_setting.run_time == 0) + { + pthread_mutex_lock(&ms_global.run_lock.lock); + ms_global.run_lock.count++; + pthread_cond_signal(&ms_global.run_lock.cond); + pthread_mutex_unlock(&ms_global.run_lock.lock); + } + + if (ms_thread->nactive_conn == 0) + { + pthread_exit(NULL); + } +} /* ms_conn_close */ + + +/** + * create a new sock + * + * @param ai, server address information + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +static int ms_new_socket(struct addrinfo *ai) +{ + int sfd; + + if ((sfd= socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol)) == -1) + { + fprintf(stderr, "socket() error: %s.\n", strerror(errno)); + return -1; + } + + return sfd; +} /* ms_new_socket */ + + +/** + * Sets a socket's send buffer size to the maximum allowed by the system. + * + * @param sfd, file descriptor of socket + */ +static void ms_maximize_sndbuf(const int sfd) +{ + socklen_t intsize= sizeof(int); + unsigned int last_good= 0; + unsigned int min, max, avg; + unsigned int old_size; + + /* Start with the default size. */ + if (getsockopt(sfd, SOL_SOCKET, SO_SNDBUF, &old_size, &intsize) != 0) + { + fprintf(stderr, "getsockopt(SO_SNDBUF)\n"); + return; + } + + /* Binary-search for the real maximum. */ + min= old_size; + max= MAX_SENDBUF_SIZE; + + while (min <= max) + { + avg= ((unsigned int)(min + max)) / 2; + if (setsockopt(sfd, SOL_SOCKET, SO_SNDBUF, (void *)&avg, intsize) == 0) + { + last_good= avg; + min= avg + 1; + } + else + { + max= avg - 1; + } + } + (void)last_good; +} /* ms_maximize_sndbuf */ + + +/** + * socket connects the server + * + * @param c, pointer of the concurrency + * @param srv_host_name, the host name of the server + * @param srv_port, port of server + * @param is_udp, whether it's udp + * @param ret_sfd, the connected socket file descriptor + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +static int ms_network_connect(ms_conn_t *c, + char *srv_host_name, + const int srv_port, + const bool is_udp, + int *ret_sfd) +{ + int sfd; + struct linger ling= + { + 0, 0 + }; + struct addrinfo *ai; + struct addrinfo *next; + struct addrinfo hints; + char port_buf[NI_MAXSERV]; + int error; + int success= 0; + + int flags= 1; + + /* + * the memset call clears nonstandard fields in some impementations + * that otherwise mess things up. + */ + memset(&hints, 0, sizeof(hints)); +#ifdef AI_ADDRCONFIG + hints.ai_flags= AI_PASSIVE | AI_ADDRCONFIG; +#else + hints.ai_flags= AI_PASSIVE; +#endif /* AI_ADDRCONFIG */ + if (is_udp) + { + hints.ai_protocol= IPPROTO_UDP; + hints.ai_socktype= SOCK_DGRAM; + hints.ai_family= AF_INET; /* This left here because of issues with OSX 10.5 */ + } + else + { + hints.ai_family= AF_UNSPEC; + hints.ai_protocol= IPPROTO_TCP; + hints.ai_socktype= SOCK_STREAM; + } + + snprintf(port_buf, NI_MAXSERV, "%d", srv_port); + error= getaddrinfo(srv_host_name, port_buf, &hints, &ai); + if (error != 0) + { + if (error != EAI_SYSTEM) + fprintf(stderr, "getaddrinfo(): %s.\n", gai_strerror(error)); + else + perror("getaddrinfo()\n"); + + return -1; + } + + for (next= ai; next; next= next->ai_next) + { + if ((sfd= ms_new_socket(next)) == -1) + { + freeaddrinfo(ai); + return -1; + } + + setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, (void *)&flags, sizeof(flags)); + if (is_udp) + { + ms_maximize_sndbuf(sfd); + } + else + { + setsockopt(sfd, SOL_SOCKET, SO_KEEPALIVE, (void *)&flags, + sizeof(flags)); + setsockopt(sfd, SOL_SOCKET, SO_LINGER, (void *)&ling, sizeof(ling)); + setsockopt(sfd, IPPROTO_TCP, TCP_NODELAY, (void *)&flags, + sizeof(flags)); + } + + if (is_udp) + { + c->srv_recv_addr_size= sizeof(struct sockaddr); + memcpy(&c->srv_recv_addr, next->ai_addr, c->srv_recv_addr_size); + } + else + { + if (connect(sfd, next->ai_addr, next->ai_addrlen) == -1) + { + close(sfd); + freeaddrinfo(ai); + return -1; + } + } + + if (((flags= fcntl(sfd, F_GETFL, 0)) < 0) + || (fcntl(sfd, F_SETFL, flags | O_NONBLOCK) < 0)) + { + fprintf(stderr, "setting O_NONBLOCK\n"); + close(sfd); + freeaddrinfo(ai); + return -1; + } + + if (ret_sfd != NULL) + { + *ret_sfd= sfd; + } + + success++; + } + + freeaddrinfo(ai); + + /* Return zero if we detected no errors in starting up connections */ + return success == 0; +} /* ms_network_connect */ + + +/** + * reconnect a disconnected sock + * + * @param c, pointer of the concurrency + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +static int ms_reconn(ms_conn_t *c) +{ + ms_thread_t *ms_thread= pthread_getspecific(ms_thread_key); + uint32_t srv_idx= 0; + uint32_t srv_conn_cnt= 0; + + if (ms_setting.rep_write_srv > 0) + { + srv_idx= c->cur_idx % ms_setting.srv_cnt; + srv_conn_cnt= ms_setting.sock_per_conn * ms_setting.nconns; + } + else + { + srv_idx= ms_thread->thread_ctx->srv_idx; + srv_conn_cnt= ms_setting.nconns / ms_setting.srv_cnt; + } + + /* close the old socket handler */ + close(c->sfd); + c->tcpsfd[c->cur_idx]= 0; + + if (atomic_add_32_nv(&ms_setting.servers[srv_idx].disconn_cnt, 1) + % srv_conn_cnt == 0) + { + gettimeofday(&ms_setting.servers[srv_idx].disconn_time, NULL); + fprintf(stderr, "Server %s:%d disconnect\n", + ms_setting.servers[srv_idx].srv_host_name, + ms_setting.servers[srv_idx].srv_port); + } + + if (ms_setting.rep_write_srv > 0) + { + uint32_t i= 0; + + for (i= 0; i < c->total_sfds; i++) + { + if (c->tcpsfd[i] != 0) + { + break; + } + } + + /* all socks disconnect */ + if (i == c->total_sfds) + { + return -1; + } + } + else + { + do + { + /* reconnect success, break the loop */ + if (ms_network_connect(c, ms_setting.servers[srv_idx].srv_host_name, + ms_setting.servers[srv_idx].srv_port, + ms_setting.udp, &c->sfd) == 0) + { + c->tcpsfd[c->cur_idx]= c->sfd; + if (atomic_add_32_nv(&ms_setting.servers[srv_idx].reconn_cnt, 1) + % (uint32_t)srv_conn_cnt == 0) + { + gettimeofday(&ms_setting.servers[srv_idx].reconn_time, NULL); + int reconn_time= + (int)(ms_setting.servers[srv_idx].reconn_time.tv_sec + - ms_setting.servers[srv_idx].disconn_time + .tv_sec); + fprintf(stderr, "Server %s:%d reconnect after %ds\n", + ms_setting.servers[srv_idx].srv_host_name, + ms_setting.servers[srv_idx].srv_port, reconn_time); + } + break; + } + + if (ms_setting.rep_write_srv == 0 && c->total_sfds > 0) + { + /* wait a second and reconnect */ + sleep(1); + } + } + while (ms_setting.rep_write_srv == 0 && c->total_sfds > 0); + } + + if ((c->total_sfds > 1) && (c->tcpsfd[c->cur_idx] == 0)) + { + c->sfd= 0; + c->alive_sfds--; + } + + return EXIT_SUCCESS; +} /* ms_reconn */ + + +/** + * reconnect several disconnected socks in the connection + * structure, the ever-1-second timer of the thread will check + * whether some socks in the connections disconnect. if + * disconnect, reconnect the sock. + * + * @param c, pointer of the concurrency + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +int ms_reconn_socks(ms_conn_t *c) +{ + ms_thread_t *ms_thread= pthread_getspecific(ms_thread_key); + uint32_t srv_idx= 0; + int ret_sfd= 0; + uint32_t srv_conn_cnt= 0; + struct timeval cur_time; + + assert(c != NULL); + + if ((c->total_sfds == 1) || (c->total_sfds == c->alive_sfds)) + { + return EXIT_SUCCESS; + } + + for (uint32_t i= 0; i < c->total_sfds; i++) + { + if (c->tcpsfd[i] == 0) + { + gettimeofday(&cur_time, NULL); + + /** + * For failover test of replication, reconnect the socks after + * it disconnects more than 5 seconds, Otherwise memslap will + * block at connect() function and the work threads can't work + * in this interval. + */ + if (cur_time.tv_sec + - ms_setting.servers[srv_idx].disconn_time.tv_sec < 5) + { + break; + } + + if (ms_setting.rep_write_srv > 0) + { + srv_idx= i % ms_setting.srv_cnt; + srv_conn_cnt= ms_setting.sock_per_conn * ms_setting.nconns; + } + else + { + srv_idx= ms_thread->thread_ctx->srv_idx; + srv_conn_cnt= ms_setting.nconns / ms_setting.srv_cnt; + } + + if (ms_network_connect(c, ms_setting.servers[srv_idx].srv_host_name, + ms_setting.servers[srv_idx].srv_port, + ms_setting.udp, &ret_sfd) == 0) + { + c->tcpsfd[i]= ret_sfd; + c->alive_sfds++; + + if (atomic_add_32_nv(&ms_setting.servers[srv_idx].reconn_cnt, 1) + % (uint32_t)srv_conn_cnt == 0) + { + gettimeofday(&ms_setting.servers[srv_idx].reconn_time, NULL); + int reconn_time= + (int)(ms_setting.servers[srv_idx].reconn_time.tv_sec + - ms_setting.servers[srv_idx].disconn_time + .tv_sec); + fprintf(stderr, "Server %s:%d reconnect after %ds\n", + ms_setting.servers[srv_idx].srv_host_name, + ms_setting.servers[srv_idx].srv_port, reconn_time); + } + } + } + } + + return EXIT_SUCCESS; +} /* ms_reconn_socks */ + + +/** + * Tokenize the command string by replacing whitespace with '\0' and update + * the token array tokens with pointer to start of each token and length. + * Returns total number of tokens. The last valid token is the terminal + * token (value points to the first unprocessed character of the string and + * length zero). + * + * Usage example: + * + * while(ms_tokenize_command(command, ncommand, tokens, max_tokens) > 0) { + * for(int ix = 0; tokens[ix].length != 0; ix++) { + * ... + * } + * ncommand = tokens[ix].value - command; + * command = tokens[ix].value; + * } + * + * @param command, the command string to token + * @param tokens, array to store tokens + * @param max_tokens, maximum tokens number + * + * @return int, the number of tokens + */ +static int ms_tokenize_command(char *command, + token_t *tokens, + const int max_tokens) +{ + char *s, *e; + int ntokens= 0; + + assert(command != NULL && tokens != NULL && max_tokens > 1); + + for (s= e= command; ntokens < max_tokens - 1; ++e) + { + if (*e == ' ') + { + if (s != e) + { + tokens[ntokens].value= s; + tokens[ntokens].length= (size_t)(e - s); + ntokens++; + *e= '\0'; + } + s= e + 1; + } + else if (*e == '\0') + { + if (s != e) + { + tokens[ntokens].value= s; + tokens[ntokens].length= (size_t)(e - s); + ntokens++; + } + + break; /* string end */ + } + } + + return ntokens; +} /* ms_tokenize_command */ + + +/** + * parse the response of server. + * + * @param c, pointer of the concurrency + * @param command, the string responded by server + * + * @return int, if the command completed return EXIT_SUCCESS, else return + * -1 + */ +static int ms_ascii_process_line(ms_conn_t *c, char *command) +{ + int ret= 0; + int64_t value_len; + char *buffer= command; + + assert(c != NULL); + + /** + * for command get, we store the returned value into local buffer + * then continue in ms_complete_nread(). + */ + + switch (buffer[0]) + { + case 'V': /* VALUE || VERSION */ + if (buffer[1] == 'A') /* VALUE */ + { + token_t tokens[MAX_TOKENS]; + ms_tokenize_command(command, tokens, MAX_TOKENS); + errno= 0; + value_len= strtol(tokens[VALUELEN_TOKEN].value, NULL, 10); + if (errno != 0) + { + printf("<%d ERROR %s\n", c->sfd, strerror(errno)); + } + c->currcmd.key_prefix= *(uint64_t *)tokens[KEY_TOKEN].value; + + /* + * We read the \r\n into the string since not doing so is more + * cycles then the waster of memory to do so. + * + * We are null terminating through, which will most likely make + * some people lazy about using the return length. + */ + c->rvbytes= (int)(value_len + 2); + c->readval= true; + ret= -1; + } + + break; + + case 'O': /* OK */ + c->currcmd.retstat= MCD_SUCCESS; + + case 'S': /* STORED STATS SERVER_ERROR */ + if (buffer[2] == 'A') /* STORED STATS */ + { /* STATS*/ + c->currcmd.retstat= MCD_STAT; + } + else if (buffer[1] == 'E') + { + /* SERVER_ERROR */ + printf("<%d %s\n", c->sfd, buffer); + + c->currcmd.retstat= MCD_SERVER_ERROR; + } + else if (buffer[1] == 'T') + { + /* STORED */ + c->currcmd.retstat= MCD_STORED; + } + else + { + c->currcmd.retstat= MCD_UNKNOWN_READ_FAILURE; + } + break; + + case 'D': /* DELETED DATA */ + if (buffer[1] == 'E') + { + c->currcmd.retstat= MCD_DELETED; + } + else + { + c->currcmd.retstat= MCD_UNKNOWN_READ_FAILURE; + } + + break; + + case 'N': /* NOT_FOUND NOT_STORED*/ + if (buffer[4] == 'F') + { + c->currcmd.retstat= MCD_NOTFOUND; + } + else if (buffer[4] == 'S') + { + printf("<%d %s\n", c->sfd, buffer); + c->currcmd.retstat= MCD_NOTSTORED; + } + else + { + c->currcmd.retstat= MCD_UNKNOWN_READ_FAILURE; + } + break; + + case 'E': /* PROTOCOL ERROR or END */ + if (buffer[1] == 'N') + { + /* END */ + c->currcmd.retstat= MCD_END; + } + else if (buffer[1] == 'R') + { + printf("<%d ERROR\n", c->sfd); + c->currcmd.retstat= MCD_PROTOCOL_ERROR; + } + else if (buffer[1] == 'X') + { + c->currcmd.retstat= MCD_DATA_EXISTS; + printf("<%d %s\n", c->sfd, buffer); + } + else + { + c->currcmd.retstat= MCD_UNKNOWN_READ_FAILURE; + } + break; + + case 'C': /* CLIENT ERROR */ + printf("<%d %s\n", c->sfd, buffer); + c->currcmd.retstat= MCD_CLIENT_ERROR; + break; + + default: + c->currcmd.retstat= MCD_UNKNOWN_READ_FAILURE; + break; + } /* switch */ + + return ret; +} /* ms_ascii_process_line */ + + +/** + * after one operation completes, reset the concurrency + * + * @param c, pointer of the concurrency + * @param timeout, whether it's timeout + */ +void ms_reset_conn(ms_conn_t *c, bool timeout) +{ + assert(c != NULL); + + if (c->udp) + { + if ((c->packets > 0) && (c->packets < MAX_UDP_PACKET)) + { + memset(c->udppkt, 0, sizeof(ms_udppkt_t) * (size_t)c->packets); + } + + c->packets= 0; + c->recvpkt= 0; + c->pktcurr= 0; + c->ordcurr= 0; + c->rudpbytes= 0; + } + c->currcmd.isfinish= true; + c->ctnwrite= false; + c->rbytes= 0; + c->rcurr= c->rbuf; + c->msgcurr = 0; + c->msgused = 0; + c->iovused = 0; + ms_conn_set_state(c, conn_write); + memcpy(&c->precmd, &c->currcmd, sizeof(ms_cmdstat_t)); /* replicate command state */ + + if (timeout) + { + ms_drive_machine(c); + } +} /* ms_reset_conn */ + + +/** + * if we have a complete line in the buffer, process it. + * + * @param c, pointer of the concurrency + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +static int ms_try_read_line(ms_conn_t *c) +{ + if (c->protocol == binary_prot) + { + /* Do we have the complete packet header? */ + if ((uint64_t)c->rbytes < sizeof(c->binary_header)) + { + /* need more data! */ + return EXIT_SUCCESS; + } + else + { +#ifdef NEED_ALIGN + if (((long)(c->rcurr)) % 8 != 0) + { + /* must realign input buffer */ + memmove(c->rbuf, c->rcurr, c->rbytes); + c->rcurr= c->rbuf; + if (settings.verbose) + { + fprintf(stderr, "%d: Realign input buffer.\n", c->sfd); + } + } +#endif + protocol_binary_response_header *rsp; + rsp= (protocol_binary_response_header *)c->rcurr; + + c->binary_header= *rsp; + c->binary_header.response.extlen= rsp->response.extlen; + c->binary_header.response.keylen= ntohs(rsp->response.keylen); + c->binary_header.response.bodylen= ntohl(rsp->response.bodylen); + c->binary_header.response.status= ntohs(rsp->response.status); + + if (c->binary_header.response.magic != PROTOCOL_BINARY_RES) + { + fprintf(stderr, "Invalid magic: %x\n", + c->binary_header.response.magic); + ms_conn_set_state(c, conn_closing); + return EXIT_SUCCESS; + } + + /* process this complete response */ + if (ms_bin_process_response(c) == 0) + { + /* current operation completed */ + ms_reset_conn(c, false); + return -1; + } + else + { + c->rbytes-= (int32_t)sizeof(c->binary_header); + c->rcurr+= sizeof(c->binary_header); + } + } + } + else + { + char *el, *cont; + + assert(c != NULL); + assert(c->rcurr <= (c->rbuf + c->rsize)); + + if (c->rbytes == 0) + return EXIT_SUCCESS; + + el= memchr(c->rcurr, '\n', (size_t)c->rbytes); + if (! el) + return EXIT_SUCCESS; + + cont= el + 1; + if (((el - c->rcurr) > 1) && (*(el - 1) == '\r')) + { + el--; + } + *el= '\0'; + + assert(cont <= (c->rcurr + c->rbytes)); + + /* process this complete line */ + if (ms_ascii_process_line(c, c->rcurr) == 0) + { + /* current operation completed */ + ms_reset_conn(c, false); + return -1; + } + else + { + /* current operation didn't complete */ + c->rbytes-= (int32_t)(cont - c->rcurr); + c->rcurr= cont; + } + + assert(c->rcurr <= (c->rbuf + c->rsize)); + } + + return -1; +} /* ms_try_read_line */ + + +/** + * because the packet of UDP can't ensure the order, the + * function is used to sort the received udp packet. + * + * @param c, pointer of the concurrency + * @param buf, the buffer to store the ordered packages data + * @param rbytes, the maximum capacity of the buffer + * + * @return int, if success, return the copy bytes, else return + * -1 + */ +static int ms_sort_udp_packet(ms_conn_t *c, char *buf, int rbytes) +{ + int len= 0; + int wbytes= 0; + uint16_t req_id= 0; + uint16_t seq_num= 0; + uint16_t packets= 0; + unsigned char *header= NULL; + + /* no enough data */ + assert(c != NULL); + assert(buf != NULL); + assert(c->rudpbytes >= UDP_HEADER_SIZE); + + /* calculate received packets count */ + if (c->rudpbytes % UDP_MAX_PAYLOAD_SIZE >= UDP_HEADER_SIZE) + { + /* the last packet has some data */ + c->recvpkt= c->rudpbytes / UDP_MAX_PAYLOAD_SIZE + 1; + } + else + { + c->recvpkt= c->rudpbytes / UDP_MAX_PAYLOAD_SIZE; + } + + /* get the total packets count if necessary */ + if (c->packets == 0) + { + c->packets= HEADER_TO_PACKETS((unsigned char *)c->rudpbuf); + } + + /* build the ordered packet array */ + for (int i= c->pktcurr; i < c->recvpkt; i++) + { + header= (unsigned char *)c->rudpbuf + i * UDP_MAX_PAYLOAD_SIZE; + req_id= (uint16_t)HEADER_TO_REQID(header); + assert(req_id == c->request_id % (1 << 16)); + + packets= (uint16_t)HEADER_TO_PACKETS(header); + assert(c->packets == HEADER_TO_PACKETS(header)); + + seq_num= (uint16_t)HEADER_TO_SEQNUM(header); + c->udppkt[seq_num].header= header; + c->udppkt[seq_num].data= (char *)header + UDP_HEADER_SIZE; + + if (i == c->recvpkt - 1) + { + /* last received packet */ + if (c->rudpbytes % UDP_MAX_PAYLOAD_SIZE == 0) + { + c->udppkt[seq_num].rbytes= UDP_MAX_PAYLOAD_SIZE - UDP_HEADER_SIZE; + c->pktcurr++; + } + else + { + c->udppkt[seq_num].rbytes= c->rudpbytes % UDP_MAX_PAYLOAD_SIZE + - UDP_HEADER_SIZE; + } + } + else + { + c->udppkt[seq_num].rbytes= UDP_MAX_PAYLOAD_SIZE - UDP_HEADER_SIZE; + c->pktcurr++; + } + } + + for (int i= c->ordcurr; i < c->recvpkt; i++) + { + /* there is some data to copy */ + if ((c->udppkt[i].data != NULL) + && (c->udppkt[i].copybytes < c->udppkt[i].rbytes)) + { + header= c->udppkt[i].header; + len= c->udppkt[i].rbytes - c->udppkt[i].copybytes; + if (len > rbytes - wbytes) + { + len= rbytes - wbytes; + } + + assert(len <= rbytes - wbytes); + assert(i == HEADER_TO_SEQNUM(header)); + + memcpy(buf + wbytes, c->udppkt[i].data + c->udppkt[i].copybytes, + (size_t)len); + wbytes+= len; + c->udppkt[i].copybytes+= len; + + if ((c->udppkt[i].copybytes == c->udppkt[i].rbytes) + && (c->udppkt[i].rbytes == UDP_MAX_PAYLOAD_SIZE - UDP_HEADER_SIZE)) + { + /* finish copying all the data of this packet, next */ + c->ordcurr++; + } + + /* last received packet, and finish copying all the data */ + if ((c->recvpkt == c->packets) && (i == c->recvpkt - 1) + && (c->udppkt[i].copybytes == c->udppkt[i].rbytes)) + { + break; + } + + /* no space to copy data */ + if (wbytes >= rbytes) + { + break; + } + + /* it doesn't finish reading all the data of the packet from network */ + if ((i != c->recvpkt - 1) + && (c->udppkt[i].rbytes < UDP_MAX_PAYLOAD_SIZE - UDP_HEADER_SIZE)) + { + break; + } + } + else + { + /* no data to copy */ + break; + } + } + (void)packets; + + return wbytes == 0 ? -1 : wbytes; +} /* ms_sort_udp_packet */ + + +/** + * encapsulate upd read like tcp read + * + * @param c, pointer of the concurrency + * @param buf, read buffer + * @param len, length to read + * + * @return int, if success, return the read bytes, else return + * -1 + */ +static int ms_udp_read(ms_conn_t *c, char *buf, int len) +{ + int res= 0; + int avail= 0; + int rbytes= 0; + int copybytes= 0; + + assert(c->udp); + + while (1) + { + if (c->rudpbytes + UDP_MAX_PAYLOAD_SIZE > c->rudpsize) + { + char *new_rbuf= realloc(c->rudpbuf, (size_t)c->rudpsize * 2); + if (! new_rbuf) + { + fprintf(stderr, "Couldn't realloc input buffer.\n"); + c->rudpbytes= 0; /* ignore what we read */ + return -1; + } + c->rudpbuf= new_rbuf; + c->rudpsize*= 2; + } + + avail= c->rudpsize - c->rudpbytes; + /* UDP each time read a packet, 1400 bytes */ + res= (int)read(c->sfd, c->rudpbuf + c->rudpbytes, (size_t)avail); + + if (res > 0) + { + atomic_add_size(&ms_stats.bytes_read, res); + c->rudpbytes+= res; + rbytes+= res; + if (res == avail) + { + continue; + } + else + { + break; + } + } + + if (res == 0) + { + /* "connection" closed */ + return res; + } + + if (res == -1) + { + /* no data to read */ + return res; + } + } + + /* copy data to read buffer */ + if (rbytes > 0) + { + copybytes= ms_sort_udp_packet(c, buf, len); + } + + if (copybytes == -1) + { + atomic_add_size(&ms_stats.pkt_disorder, 1); + } + + return copybytes; +} /* ms_udp_read */ + + +/* + * read from network as much as we can, handle buffer overflow and connection + * close. + * before reading, move the remaining incomplete fragment of a command + * (if any) to the beginning of the buffer. + * return EXIT_SUCCESS if there's nothing to read on the first read. + */ + +/** + * read from network as much as we can, handle buffer overflow and connection + * close. before reading, move the remaining incomplete fragment of a command + * (if any) to the beginning of the buffer. + * + * @param c, pointer of the concurrency + * + * @return int, + * return EXIT_SUCCESS if there's nothing to read on the first read. + * return EXIT_FAILURE if get data + * return -1 if error happens + */ +static int ms_try_read_network(ms_conn_t *c) +{ + int gotdata= 0; + int res; + int64_t avail; + + assert(c != NULL); + + if ((c->rcurr != c->rbuf) + && (! c->readval || (c->rvbytes > c->rsize - (c->rcurr - c->rbuf)) + || (c->readval && (c->rcurr - c->rbuf > c->rbytes)))) + { + if (c->rbytes != 0) /* otherwise there's nothing to copy */ + memmove(c->rbuf, c->rcurr, (size_t)c->rbytes); + c->rcurr= c->rbuf; + } + + while (1) + { + if (c->rbytes >= c->rsize) + { + char *new_rbuf= realloc(c->rbuf, (size_t)c->rsize * 2); + if (! new_rbuf) + { + fprintf(stderr, "Couldn't realloc input buffer.\n"); + c->rbytes= 0; /* ignore what we read */ + return -1; + } + c->rcurr= c->rbuf= new_rbuf; + c->rsize*= 2; + } + + avail= c->rsize - c->rbytes - (c->rcurr - c->rbuf); + if (avail == 0) + { + break; + } + + if (c->udp) + { + res= (int32_t)ms_udp_read(c, c->rcurr + c->rbytes, (int32_t)avail); + } + else + { + res= (int)read(c->sfd, c->rcurr + c->rbytes, (size_t)avail); + } + + if (res > 0) + { + if (! c->udp) + { + atomic_add_size(&ms_stats.bytes_read, res); + } + gotdata= 1; + c->rbytes+= res; + if (res == avail) + { + continue; + } + else + { + break; + } + } + if (res == 0) + { + /* connection closed */ + ms_conn_set_state(c, conn_closing); + return -1; + } + if (res == -1) + { + if ((errno == EAGAIN) || (errno == EWOULDBLOCK)) + break; + /* Should close on unhandled errors. */ + ms_conn_set_state(c, conn_closing); + return -1; + } + } + + return gotdata; +} /* ms_try_read_network */ + + +/** + * after get the object from server, verify the value if + * necessary. + * + * @param c, pointer of the concurrency + * @param mlget_item, pointer of mulit-get task item structure + * @param value, received value string + * @param vlen, received value string length + */ +static void ms_verify_value(ms_conn_t *c, + ms_mlget_task_item_t *mlget_item, + char *value, + int vlen) +{ + if (c->curr_task.verify) + { + assert(c->curr_task.item->value_offset != INVALID_OFFSET); + char *orignval= &ms_setting.char_block[c->curr_task.item->value_offset]; + char *orignkey= + &ms_setting.char_block[c->curr_task.item->key_suffix_offset]; + + /* verify expire time if necessary */ + if (c->curr_task.item->exp_time > 0) + { + struct timeval curr_time; + gettimeofday(&curr_time, NULL); + + /* object expired but get it now */ + if (curr_time.tv_sec - c->curr_task.item->client_time + > c->curr_task.item->exp_time + EXPIRE_TIME_ERROR) + { + atomic_add_size(&ms_stats.exp_get, 1); + + if (ms_setting.verbose) + { + char set_time[64]; + char cur_time[64]; + strftime(set_time, 64, "%Y-%m-%d %H:%M:%S", + localtime(&c->curr_task.item->client_time)); + strftime(cur_time, 64, "%Y-%m-%d %H:%M:%S", + localtime(&curr_time.tv_sec)); + fprintf(stderr, + "\n<%d expire time verification failed, " + "object expired but get it now\n" + "\tkey len: %d\n" + "\tkey: %" PRIx64 " %.*s\n" + "\tset time: %s current time: %s " + "diff time: %d expire time: %d\n" + "\texpected data: \n" + "\treceived data len: %d\n" + "\treceived data: %.*s\n", + c->sfd, + c->curr_task.item->key_size, + c->curr_task.item->key_prefix, + c->curr_task.item->key_size - (int)KEY_PREFIX_SIZE, + orignkey, + set_time, + cur_time, + (int)(curr_time.tv_sec - c->curr_task.item->client_time), + c->curr_task.item->exp_time, + vlen, + vlen, + value); + fflush(stderr); + } + } + } + else + { + if ((c->curr_task.item->value_size != vlen) + || (memcmp(orignval, value, (size_t)vlen) != 0)) + { + atomic_add_size(&ms_stats.vef_failed, 1); + + if (ms_setting.verbose) + { + fprintf(stderr, + "\n<%d data verification failed\n" + "\tkey len: %d\n" + "\tkey: %" PRIx64" %.*s\n" + "\texpected data len: %d\n" + "\texpected data: %.*s\n" + "\treceived data len: %d\n" + "\treceived data: %.*s\n", + c->sfd, + c->curr_task.item->key_size, + c->curr_task.item->key_prefix, + c->curr_task.item->key_size - (int)KEY_PREFIX_SIZE, + orignkey, + c->curr_task.item->value_size, + c->curr_task.item->value_size, + orignval, + vlen, + vlen, + value); + fflush(stderr); + } + } + } + + c->curr_task.finish_verify= true; + + if (mlget_item != NULL) + { + mlget_item->finish_verify= true; + } + } +} /* ms_verify_value */ + + +/** + * For ASCII protocol, after store the data into the local + * buffer, run this function to handle the data. + * + * @param c, pointer of the concurrency + */ +static void ms_ascii_complete_nread(ms_conn_t *c) +{ + assert(c != NULL); + assert(c->rbytes >= c->rvbytes); + assert(c->protocol == ascii_prot); + if (c->rvbytes > 2) + { + assert( + c->rcurr[c->rvbytes - 1] == '\n' && c->rcurr[c->rvbytes - 2] == '\r'); + } + + /* multi-get */ + ms_mlget_task_item_t *mlget_item= NULL; + if (((ms_setting.mult_key_num > 1) + && (c->mlget_task.mlget_num >= ms_setting.mult_key_num)) + || ((c->remain_exec_num == 0) && (c->mlget_task.mlget_num > 0))) + { + c->mlget_task.value_index++; + mlget_item= &c->mlget_task.mlget_item[c->mlget_task.value_index]; + + if (mlget_item->item->key_prefix == c->currcmd.key_prefix) + { + c->curr_task.item= mlget_item->item; + c->curr_task.verify= mlget_item->verify; + c->curr_task.finish_verify= mlget_item->finish_verify; + mlget_item->get_miss= false; + } + else + { + /* Try to find the task item in multi-get task array */ + for (int i= 0; i < c->mlget_task.mlget_num; i++) + { + mlget_item= &c->mlget_task.mlget_item[i]; + if (mlget_item->item->key_prefix == c->currcmd.key_prefix) + { + c->curr_task.item= mlget_item->item; + c->curr_task.verify= mlget_item->verify; + c->curr_task.finish_verify= mlget_item->finish_verify; + mlget_item->get_miss= false; + + break; + } + } + } + } + + ms_verify_value(c, mlget_item, c->rcurr, c->rvbytes - 2); + + c->curr_task.get_miss= false; + c->rbytes-= c->rvbytes; + c->rcurr= c->rcurr + c->rvbytes; + assert(c->rcurr <= (c->rbuf + c->rsize)); + c->readval= false; + c->rvbytes= 0; +} /* ms_ascii_complete_nread */ + + +/** + * For binary protocol, after store the data into the local + * buffer, run this function to handle the data. + * + * @param c, pointer of the concurrency + */ +static void ms_bin_complete_nread(ms_conn_t *c) +{ + assert(c != NULL); + assert(c->rbytes >= c->rvbytes); + assert(c->protocol == binary_prot); + + int extlen= c->binary_header.response.extlen; + int keylen= c->binary_header.response.keylen; + uint8_t opcode= c->binary_header.response.opcode; + + /* not get command or not include value, just return */ + if (((opcode != PROTOCOL_BINARY_CMD_GET) + && (opcode != PROTOCOL_BINARY_CMD_GETQ)) + || (c->rvbytes <= extlen + keylen)) + { + /* get miss */ + if (c->binary_header.response.opcode == PROTOCOL_BINARY_CMD_GET) + { + c->currcmd.retstat= MCD_END; + c->curr_task.get_miss= true; + } + + c->readval= false; + c->rvbytes= 0; + ms_reset_conn(c, false); + return; + } + + /* multi-get */ + ms_mlget_task_item_t *mlget_item= NULL; + if (((ms_setting.mult_key_num > 1) + && (c->mlget_task.mlget_num >= ms_setting.mult_key_num)) + || ((c->remain_exec_num == 0) && (c->mlget_task.mlget_num > 0))) + { + c->mlget_task.value_index++; + mlget_item= &c->mlget_task.mlget_item[c->mlget_task.value_index]; + + c->curr_task.item= mlget_item->item; + c->curr_task.verify= mlget_item->verify; + c->curr_task.finish_verify= mlget_item->finish_verify; + mlget_item->get_miss= false; + } + + ms_verify_value(c, + mlget_item, + c->rcurr + extlen + keylen, + c->rvbytes - extlen - keylen); + + c->currcmd.retstat= MCD_END; + c->curr_task.get_miss= false; + c->rbytes-= c->rvbytes; + c->rcurr= c->rcurr + c->rvbytes; + assert(c->rcurr <= (c->rbuf + c->rsize)); + c->readval= false; + c->rvbytes= 0; + + if (ms_setting.mult_key_num > 1) + { + /* multi-get have check all the item */ + if (c->mlget_task.value_index == c->mlget_task.mlget_num - 1) + { + ms_reset_conn(c, false); + } + } + else + { + /* single get */ + ms_reset_conn(c, false); + } +} /* ms_bin_complete_nread */ + + +/** + * we get here after reading the value of get commands. + * + * @param c, pointer of the concurrency + */ +static void ms_complete_nread(ms_conn_t *c) +{ + assert(c != NULL); + assert(c->rbytes >= c->rvbytes); + assert(c->protocol == ascii_prot + || c->protocol == binary_prot); + + if (c->protocol == binary_prot) + { + ms_bin_complete_nread(c); + } + else + { + ms_ascii_complete_nread(c); + } +} /* ms_complete_nread */ + + +/** + * Adds a message header to a connection. + * + * @param c, pointer of the concurrency + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +static int ms_add_msghdr(ms_conn_t *c) +{ + struct msghdr *msg; + + assert(c != NULL); + + if (c->msgsize == c->msgused) + { + msg= + realloc(c->msglist, (size_t)c->msgsize * 2 * sizeof(struct msghdr)); + if (! msg) + return -1; + + c->msglist= msg; + c->msgsize*= 2; + } + + msg= c->msglist + c->msgused; + + /** + * this wipes msg_iovlen, msg_control, msg_controllen, and + * msg_flags, the last 3 of which aren't defined on solaris: + */ + memset(msg, 0, sizeof(struct msghdr)); + + msg->msg_iov= &c->iov[c->iovused]; + + if (c->udp && (c->srv_recv_addr_size > 0)) + { + msg->msg_name= &c->srv_recv_addr; + msg->msg_namelen= c->srv_recv_addr_size; + } + + c->msgbytes= 0; + c->msgused++; + + if (c->udp) + { + /* Leave room for the UDP header, which we'll fill in later. */ + return ms_add_iov(c, NULL, UDP_HEADER_SIZE); + } + + return EXIT_SUCCESS; +} /* ms_add_msghdr */ + + +/** + * Ensures that there is room for another structure iovec in a connection's + * iov list. + * + * @param c, pointer of the concurrency + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +static int ms_ensure_iov_space(ms_conn_t *c) +{ + assert(c != NULL); + + if (c->iovused >= c->iovsize) + { + int i, iovnum; + struct iovec *new_iov= (struct iovec *)realloc(c->iov, + ((size_t)c->iovsize + * 2) + * sizeof(struct iovec)); + if (! new_iov) + return -1; + + c->iov= new_iov; + c->iovsize*= 2; + + /* Point all the msghdr structures at the new list. */ + for (i= 0, iovnum= 0; i < c->msgused; i++) + { + c->msglist[i].msg_iov= &c->iov[iovnum]; + iovnum+= (int)c->msglist[i].msg_iovlen; + } + } + + return EXIT_SUCCESS; +} /* ms_ensure_iov_space */ + + +/** + * Adds data to the list of pending data that will be written out to a + * connection. + * + * @param c, pointer of the concurrency + * @param buf, the buffer includes data to send + * @param len, the data length in the buffer + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +static int ms_add_iov(ms_conn_t *c, const void *buf, int len) +{ + struct msghdr *m; + int leftover; + bool limit_to_mtu; + + assert(c != NULL); + + do + { + m= &c->msglist[c->msgused - 1]; + + /* + * Limit UDP packets, to UDP_MAX_PAYLOAD_SIZE bytes. + */ + limit_to_mtu= c->udp; + +#ifdef IOV_MAX + /* We may need to start a new msghdr if this one is full. */ + if ((m->msg_iovlen == IOV_MAX) + || (limit_to_mtu && (c->msgbytes >= UDP_MAX_SEND_PAYLOAD_SIZE))) + { + ms_add_msghdr(c); + m= &c->msglist[c->msgused - 1]; + } +#endif + + if (ms_ensure_iov_space(c) != 0) + return -1; + + /* If the fragment is too big to fit in the datagram, split it up */ + if (limit_to_mtu && (len + c->msgbytes > UDP_MAX_SEND_PAYLOAD_SIZE)) + { + leftover= len + c->msgbytes - UDP_MAX_SEND_PAYLOAD_SIZE; + len-= leftover; + } + else + { + leftover= 0; + } + + m= &c->msglist[c->msgused - 1]; + m->msg_iov[m->msg_iovlen].iov_base= (void *)buf; + m->msg_iov[m->msg_iovlen].iov_len= (size_t)len; + + c->msgbytes+= len; + c->iovused++; + m->msg_iovlen++; + + buf= ((char *)buf) + len; + len= leftover; + } + while (leftover > 0); + + return EXIT_SUCCESS; +} /* ms_add_iov */ + + +/** + * Constructs a set of UDP headers and attaches them to the outgoing messages. + * + * @param c, pointer of the concurrency + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +static int ms_build_udp_headers(ms_conn_t *c) +{ + int i; + unsigned char *hdr; + + assert(c != NULL); + + c->request_id= ms_get_udp_request_id(); + + if (c->msgused > c->hdrsize) + { + void *new_hdrbuf; + if (c->hdrbuf) + new_hdrbuf= realloc(c->hdrbuf, + (size_t)c->msgused * 2 * UDP_HEADER_SIZE); + else + new_hdrbuf= malloc((size_t)c->msgused * 2 * UDP_HEADER_SIZE); + if (! new_hdrbuf) + return -1; + + c->hdrbuf= (unsigned char *)new_hdrbuf; + c->hdrsize= c->msgused * 2; + } + + /* If this is a multi-packet request, drop it. */ + if (c->udp && (c->msgused > 1)) + { + fprintf(stderr, "multi-packet request for UDP not supported.\n"); + return -1; + } + + hdr= c->hdrbuf; + for (i= 0; i < c->msgused; i++) + { + c->msglist[i].msg_iov[0].iov_base= (void *)hdr; + c->msglist[i].msg_iov[0].iov_len= UDP_HEADER_SIZE; + *hdr++= (unsigned char)(c->request_id / 256); + *hdr++= (unsigned char)(c->request_id % 256); + *hdr++= (unsigned char)(i / 256); + *hdr++= (unsigned char)(i % 256); + *hdr++= (unsigned char)(c->msgused / 256); + *hdr++= (unsigned char)(c->msgused % 256); + *hdr++= (unsigned char)1; /* support facebook memcached */ + *hdr++= (unsigned char)0; + assert(hdr == + ((unsigned char *)c->msglist[i].msg_iov[0].iov_base + + UDP_HEADER_SIZE)); + } + + return EXIT_SUCCESS; +} /* ms_build_udp_headers */ + + +/** + * Transmit the next chunk of data from our list of msgbuf structures. + * + * @param c, pointer of the concurrency + * + * @return TRANSMIT_COMPLETE All done writing. + * TRANSMIT_INCOMPLETE More data remaining to write. + * TRANSMIT_SOFT_ERROR Can't write any more right now. + * TRANSMIT_HARD_ERROR Can't write (c->state is set to conn_closing) + */ +static int ms_transmit(ms_conn_t *c) +{ + assert(c != NULL); + + if ((c->msgcurr < c->msgused) + && (c->msglist[c->msgcurr].msg_iovlen == 0)) + { + /* Finished writing the current msg; advance to the next. */ + c->msgcurr++; + } + + if (c->msgcurr < c->msgused) + { + ssize_t res; + struct msghdr *m= &c->msglist[c->msgcurr]; + + res= sendmsg(c->sfd, m, 0); + if (res > 0) + { + atomic_add_size(&ms_stats.bytes_written, res); + + /* We've written some of the data. Remove the completed + * iovec entries from the list of pending writes. */ + while (m->msg_iovlen > 0 && res >= (ssize_t)m->msg_iov->iov_len) + { + res-= (ssize_t)m->msg_iov->iov_len; + m->msg_iovlen--; + m->msg_iov++; + } + + /* Might have written just part of the last iovec entry; + * adjust it so the next write will do the rest. */ + if (res > 0) + { + m->msg_iov->iov_base= (void *)((unsigned char *)m->msg_iov->iov_base + res); + m->msg_iov->iov_len-= (size_t)res; + } + return TRANSMIT_INCOMPLETE; + } + if ((res == -1) && ((errno == EAGAIN) || (errno == EWOULDBLOCK))) + { + if (! ms_update_event(c, EV_WRITE | EV_PERSIST)) + { + fprintf(stderr, "Couldn't update event.\n"); + ms_conn_set_state(c, conn_closing); + return TRANSMIT_HARD_ERROR; + } + return TRANSMIT_SOFT_ERROR; + } + + /* if res==0 or res==-1 and error is not EAGAIN or EWOULDBLOCK, + * we have a real error, on which we close the connection */ + fprintf(stderr, "Failed to write, and not due to blocking.\n"); + + ms_conn_set_state(c, conn_closing); + return TRANSMIT_HARD_ERROR; + } + else + { + return TRANSMIT_COMPLETE; + } +} /* ms_transmit */ + + +/** + * Shrinks a connection's buffers if they're too big. This prevents + * periodic large "mget" response from server chewing lots of client + * memory. + * + * This should only be called in between requests since it can wipe output + * buffers! + * + * @param c, pointer of the concurrency + */ +static void ms_conn_shrink(ms_conn_t *c) +{ + assert(c != NULL); + + if (c->udp) + return; + + if ((c->rsize > READ_BUFFER_HIGHWAT) && (c->rbytes < DATA_BUFFER_SIZE)) + { + char *newbuf; + + if (c->rcurr != c->rbuf) + memmove(c->rbuf, c->rcurr, (size_t)c->rbytes); + + newbuf= (char *)realloc((void *)c->rbuf, DATA_BUFFER_SIZE); + + if (newbuf) + { + c->rbuf= newbuf; + c->rsize= DATA_BUFFER_SIZE; + } + c->rcurr= c->rbuf; + } + + if (c->udp && (c->rudpsize > UDP_DATA_BUFFER_HIGHWAT) + && (c->rudpbytes + UDP_MAX_PAYLOAD_SIZE < UDP_DATA_BUFFER_SIZE)) + { + char *new_rbuf= (char *)realloc(c->rudpbuf, (size_t)c->rudpsize * 2); + if (! new_rbuf) + { + c->rudpbuf= new_rbuf; + c->rudpsize= UDP_DATA_BUFFER_SIZE; + } + /* TODO check error condition? */ + } + + if (c->msgsize > MSG_LIST_HIGHWAT) + { + struct msghdr *newbuf= (struct msghdr *)realloc( + (void *)c->msglist, + MSG_LIST_INITIAL + * sizeof(c->msglist[0])); + if (newbuf) + { + c->msglist= newbuf; + c->msgsize= MSG_LIST_INITIAL; + } + /* TODO check error condition? */ + } + + if (c->iovsize > IOV_LIST_HIGHWAT) + { + struct iovec *newbuf= (struct iovec *)realloc((void *)c->iov, + IOV_LIST_INITIAL + * sizeof(c->iov[0])); + if (newbuf) + { + c->iov= newbuf; + c->iovsize= IOV_LIST_INITIAL; + } + /* TODO check return value */ + } +} /* ms_conn_shrink */ + + +/** + * Sets a connection's current state in the state machine. Any special + * processing that needs to happen on certain state transitions can + * happen here. + * + * @param c, pointer of the concurrency + * @param state, connection state + */ +static void ms_conn_set_state(ms_conn_t *c, int state) +{ + assert(c != NULL); + + if (state != c->state) + { + if (state == conn_read) + { + ms_conn_shrink(c); + } + c->state= state; + } +} /* ms_conn_set_state */ + + +/** + * update the event if socks change state. for example: when + * change the listen scoket read event to sock write event, or + * change socket handler, we could call this function. + * + * @param c, pointer of the concurrency + * @param new_flags, new event flags + * + * @return bool, if success, return true, else return false + */ +static bool ms_update_event(ms_conn_t *c, const int new_flags) +{ + assert(c != NULL); + + struct event_base *base= c->event.ev_base; + if ((c->ev_flags == new_flags) && (ms_setting.rep_write_srv == 0) + && (! ms_setting.facebook_test || (c->total_sfds == 1))) + { + return true; + } + + if (event_del(&c->event) == -1) + { + /* try to delete the event again */ + if (event_del(&c->event) == -1) + { + return false; + } + } + + event_set(&c->event, + c->sfd, + (short)new_flags, + ms_event_handler, + (void *)c); + event_base_set(base, &c->event); + c->ev_flags= (short)new_flags; + + if (event_add(&c->event, NULL) == -1) + { + return false; + } + + return true; +} /* ms_update_event */ + + +/** + * If user want to get the expected throughput, we could limit + * the performance of memslap. we could give up some work and + * just wait a short time. The function is used to check this + * case. + * + * @param c, pointer of the concurrency + * + * @return bool, if success, return true, else return false + */ +static bool ms_need_yield(ms_conn_t *c) +{ + ms_thread_t *ms_thread= pthread_getspecific(ms_thread_key); + int64_t tps= 0; + int64_t time_diff= 0; + struct timeval curr_time; + ms_task_t *task= &c->curr_task; + + if (ms_setting.expected_tps > 0) + { + gettimeofday(&curr_time, NULL); + time_diff= ms_time_diff(&ms_thread->startup_time, &curr_time); + tps= (int64_t)(((task->get_opt + task->set_opt) / (uint64_t)time_diff) * 1000000); + + /* current throughput is greater than expected throughput */ + if (tps > ms_thread->thread_ctx->tps_perconn) + { + return true; + } + } + + return false; +} /* ms_need_yield */ + + +/** + * used to update the start time of each operation + * + * @param c, pointer of the concurrency + */ +static void ms_update_start_time(ms_conn_t *c) +{ + ms_task_item_t *item= c->curr_task.item; + + if ((ms_setting.stat_freq > 0) || c->udp + || ((c->currcmd.cmd == CMD_SET) && (item->exp_time > 0))) + { + gettimeofday(&c->start_time, NULL); + if ((c->currcmd.cmd == CMD_SET) && (item->exp_time > 0)) + { + /* record the current time */ + item->client_time= c->start_time.tv_sec; + } + } +} /* ms_update_start_time */ + + +/** + * run the state machine + * + * @param c, pointer of the concurrency + */ +static void ms_drive_machine(ms_conn_t *c) +{ + bool stop= false; + + assert(c != NULL); + + while (! stop) + { + switch (c->state) + { + case conn_read: + if (c->readval) + { + if (c->rbytes >= c->rvbytes) + { + ms_complete_nread(c); + break; + } + } + else + { + if (ms_try_read_line(c) != 0) + { + break; + } + } + + if (ms_try_read_network(c) != 0) + { + break; + } + + /* doesn't read all the response data, wait event wake up */ + if (! c->currcmd.isfinish) + { + if (! ms_update_event(c, EV_READ | EV_PERSIST)) + { + fprintf(stderr, "Couldn't update event.\n"); + ms_conn_set_state(c, conn_closing); + break; + } + stop= true; + break; + } + + /* we have no command line and no data to read from network, next write */ + ms_conn_set_state(c, conn_write); + memcpy(&c->precmd, &c->currcmd, sizeof(ms_cmdstat_t)); /* replicate command state */ + + break; + + case conn_write: + if (! c->ctnwrite && ms_need_yield(c)) + { + usleep(10); + + if (! ms_update_event(c, EV_WRITE | EV_PERSIST)) + { + fprintf(stderr, "Couldn't update event.\n"); + ms_conn_set_state(c, conn_closing); + break; + } + stop= true; + break; + } + + if (! c->ctnwrite && (ms_exec_task(c) != 0)) + { + ms_conn_set_state(c, conn_closing); + break; + } + + /* record the start time before starting to send data if necessary */ + if (! c->ctnwrite || (c->change_sfd && c->ctnwrite)) + { + if (c->change_sfd) + { + c->change_sfd= false; + } + ms_update_start_time(c); + } + + /* change sfd if necessary */ + if (c->change_sfd) + { + c->ctnwrite= true; + stop= true; + break; + } + + /* execute task until nothing need be written to network */ + if (! c->ctnwrite && (c->msgcurr == c->msgused)) + { + if (! ms_update_event(c, EV_WRITE | EV_PERSIST)) + { + fprintf(stderr, "Couldn't update event.\n"); + ms_conn_set_state(c, conn_closing); + break; + } + stop= true; + break; + } + + switch (ms_transmit(c)) + { + case TRANSMIT_COMPLETE: + /* we have no data to write to network, next wait repose */ + if (! ms_update_event(c, EV_READ | EV_PERSIST)) + { + fprintf(stderr, "Couldn't update event.\n"); + ms_conn_set_state(c, conn_closing); + c->ctnwrite= false; + break; + } + ms_conn_set_state(c, conn_read); + c->ctnwrite= false; + stop= true; + break; + + case TRANSMIT_INCOMPLETE: + c->ctnwrite= true; + break; /* Continue in state machine. */ + + case TRANSMIT_HARD_ERROR: + c->ctnwrite= false; + break; + + case TRANSMIT_SOFT_ERROR: + c->ctnwrite= true; + stop= true; + break; + + default: + break; + } /* switch */ + + break; + + case conn_closing: + /* recovery mode, need reconnect if connection close */ + if (ms_setting.reconnect && (! ms_global.time_out + || ((ms_setting.run_time == 0) + && (c->remain_exec_num > 0)))) + { + if (ms_reconn(c) != 0) + { + ms_conn_close(c); + stop= true; + break; + } + + ms_reset_conn(c, false); + + if (c->total_sfds == 1) + { + if (! ms_update_event(c, EV_WRITE | EV_PERSIST)) + { + fprintf(stderr, "Couldn't update event.\n"); + ms_conn_set_state(c, conn_closing); + break; + } + } + + break; + } + else + { + ms_conn_close(c); + stop= true; + break; + } + + default: + assert(0); + } /* switch */ + } +} /* ms_drive_machine */ + + +/** + * the event handler of each thread + * + * @param fd, the file descriptor of socket + * @param which, event flag + * @param arg, argument + */ +void ms_event_handler(const int fd, const short which, void *arg) +{ + ms_conn_t *c= (ms_conn_t *)arg; + + assert(c != NULL); + + c->which= which; + + /* sanity */ + if (fd != c->sfd) + { + fprintf(stderr, + "Catastrophic: event fd: %d doesn't match conn fd: %d\n", + fd, + c->sfd); + ms_conn_close(c); + exit(1); + } + assert(fd == c->sfd); + + ms_drive_machine(c); + + /* wait for next event */ +} /* ms_event_handler */ + + +/** + * get the next socket descriptor index to run for replication + * + * @param c, pointer of the concurrency + * @param cmd, command(get or set ) + * + * @return int, if success, return the index, else return EXIT_SUCCESS + */ +static uint32_t ms_get_rep_sock_index(ms_conn_t *c, int cmd) +{ + uint32_t sock_index= 0; + uint32_t i= 0; + + if (c->total_sfds == 1) + { + return EXIT_SUCCESS; + } + + if (ms_setting.rep_write_srv == 0) + { + return sock_index; + } + + do + { + if (cmd == CMD_SET) + { + for (i= 0; i < ms_setting.rep_write_srv; i++) + { + if (c->tcpsfd[i] > 0) + { + break; + } + } + + if (i == ms_setting.rep_write_srv) + { + /* random get one replication server to read */ + sock_index= (uint32_t)random() % c->total_sfds; + } + else + { + /* random get one replication writing server to write */ + sock_index= (uint32_t)random() % ms_setting.rep_write_srv; + } + } + else if (cmd == CMD_GET) + { + /* random get one replication server to read */ + sock_index= (uint32_t)random() % c->total_sfds; + } + } + while (c->tcpsfd[sock_index] == 0); + + return sock_index; +} /* ms_get_rep_sock_index */ + + +/** + * get the next socket descriptor index to run + * + * @param c, pointer of the concurrency + * + * @return int, return the index + */ +static uint32_t ms_get_next_sock_index(ms_conn_t *c) +{ + uint32_t sock_index= 0; + + do + { + sock_index= (++c->cur_idx == c->total_sfds) ? 0 : c->cur_idx; + } + while (c->tcpsfd[sock_index] == 0); + + return sock_index; +} /* ms_get_next_sock_index */ + + +/** + * update socket event of the connections + * + * @param c, pointer of the concurrency + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +static int ms_update_conn_sock_event(ms_conn_t *c) +{ + assert(c != NULL); + + switch (c->currcmd.cmd) + { + case CMD_SET: + if (ms_setting.facebook_test && c->udp) + { + c->sfd= c->tcpsfd[0]; + c->udp= false; + c->change_sfd= true; + } + break; + + case CMD_GET: + if (ms_setting.facebook_test && ! c->udp) + { + c->sfd= c->udpsfd; + c->udp= true; + c->change_sfd= true; + } + break; + + default: + break; + } /* switch */ + + if (! c->udp && (c->total_sfds > 1)) + { + if (c->cur_idx != c->total_sfds) + { + if (ms_setting.rep_write_srv == 0) + { + c->cur_idx= ms_get_next_sock_index(c); + } + else + { + c->cur_idx= ms_get_rep_sock_index(c, c->currcmd.cmd); + } + } + else + { + /* must select the first sock of the connection at the beginning */ + c->cur_idx= 0; + } + + c->sfd= c->tcpsfd[c->cur_idx]; + assert(c->sfd != 0); + c->change_sfd= true; + } + + if (c->change_sfd) + { + if (! ms_update_event(c, EV_WRITE | EV_PERSIST)) + { + fprintf(stderr, "Couldn't update event.\n"); + ms_conn_set_state(c, conn_closing); + return -1; + } + } + + return EXIT_SUCCESS; +} /* ms_update_conn_sock_event */ + + +/** + * for ASCII protocol, this function build the set command + * string and send the command. + * + * @param c, pointer of the concurrency + * @param item, pointer of task item which includes the object + * information + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +static int ms_build_ascii_write_buf_set(ms_conn_t *c, ms_task_item_t *item) +{ + int value_offset; + int write_len; + char *buffer= c->wbuf; + + write_len= snprintf(buffer, + c->wsize, + " %u %d %d\r\n", + 0, + item->exp_time, + item->value_size); + + if (write_len > c->wsize || write_len < 0) + { + /* ought to be always enough. just fail for simplicity */ + fprintf(stderr, "output command line too long.\n"); + return -1; + } + + if (item->value_offset == INVALID_OFFSET) + { + value_offset= item->key_suffix_offset; + } + else + { + value_offset= item->value_offset; + } + + if ((ms_add_iov(c, "set ", 4) != 0) + || (ms_add_iov(c, (char *)&item->key_prefix, + (int)KEY_PREFIX_SIZE) != 0) + || (ms_add_iov(c, &ms_setting.char_block[item->key_suffix_offset], + item->key_size - (int)KEY_PREFIX_SIZE) != 0) + || (ms_add_iov(c, buffer, write_len) != 0) + || (ms_add_iov(c, &ms_setting.char_block[value_offset], + item->value_size) != 0) + || (ms_add_iov(c, "\r\n", 2) != 0) + || (c->udp && (ms_build_udp_headers(c) != 0))) + { + return -1; + } + + return EXIT_SUCCESS; +} /* ms_build_ascii_write_buf_set */ + + +/** + * used to send set command to server + * + * @param c, pointer of the concurrency + * @param item, pointer of task item which includes the object + * information + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +int ms_mcd_set(ms_conn_t *c, ms_task_item_t *item) +{ + assert(c != NULL); + + c->currcmd.cmd= CMD_SET; + c->currcmd.isfinish= false; + c->currcmd.retstat= MCD_FAILURE; + + if (ms_update_conn_sock_event(c) != 0) + { + return -1; + } + + c->msgcurr= 0; + c->msgused= 0; + c->iovused= 0; + if (ms_add_msghdr(c) != 0) + { + fprintf(stderr, "Out of memory preparing request."); + return -1; + } + + /* binary protocol */ + if (c->protocol == binary_prot) + { + if (ms_build_bin_write_buf_set(c, item) != 0) + { + return -1; + } + } + else + { + if (ms_build_ascii_write_buf_set(c, item) != 0) + { + return -1; + } + } + + atomic_add_size(&ms_stats.obj_bytes, + item->key_size + item->value_size); + atomic_add_size(&ms_stats.cmd_set, 1); + + return EXIT_SUCCESS; +} /* ms_mcd_set */ + + +/** + * for ASCII protocol, this function build the get command + * string and send the command. + * + * @param c, pointer of the concurrency + * @param item, pointer of task item which includes the object + * information + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +static int ms_build_ascii_write_buf_get(ms_conn_t *c, ms_task_item_t *item) +{ + if ((ms_add_iov(c, "get ", 4) != 0) + || (ms_add_iov(c, (char *)&item->key_prefix, + (int)KEY_PREFIX_SIZE) != 0) + || (ms_add_iov(c, &ms_setting.char_block[item->key_suffix_offset], + item->key_size - (int)KEY_PREFIX_SIZE) != 0) + || (ms_add_iov(c, "\r\n", 2) != 0) + || (c->udp && (ms_build_udp_headers(c) != 0))) + { + return -1; + } + + return EXIT_SUCCESS; +} /* ms_build_ascii_write_buf_get */ + + +/** + * used to send the get command to server + * + * @param c, pointer of the concurrency + * @param item, pointer of task item which includes the object + * information + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +int ms_mcd_get(ms_conn_t *c, ms_task_item_t *item) +{ + assert(c != NULL); + + c->currcmd.cmd= CMD_GET; + c->currcmd.isfinish= false; + c->currcmd.retstat= MCD_FAILURE; + + if (ms_update_conn_sock_event(c) != 0) + { + return -1; + } + + c->msgcurr= 0; + c->msgused= 0; + c->iovused= 0; + if (ms_add_msghdr(c) != 0) + { + fprintf(stderr, "Out of memory preparing request."); + return -1; + } + + /* binary protocol */ + if (c->protocol == binary_prot) + { + if (ms_build_bin_write_buf_get(c, item) != 0) + { + return -1; + } + } + else + { + if (ms_build_ascii_write_buf_get(c, item) != 0) + { + return -1; + } + } + + atomic_add_size(&ms_stats.cmd_get, 1); + + return EXIT_SUCCESS; +} /* ms_mcd_get */ + + +/** + * for ASCII protocol, this function build the multi-get command + * string and send the command. + * + * @param c, pointer of the concurrency + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +static int ms_build_ascii_write_buf_mlget(ms_conn_t *c) +{ + ms_task_item_t *item; + + if (ms_add_iov(c, "get", 3) != 0) + { + return -1; + } + + for (int i= 0; i < c->mlget_task.mlget_num; i++) + { + item= c->mlget_task.mlget_item[i].item; + assert(item != NULL); + if ((ms_add_iov(c, " ", 1) != 0) + || (ms_add_iov(c, (char *)&item->key_prefix, + (int)KEY_PREFIX_SIZE) != 0) + || (ms_add_iov(c, &ms_setting.char_block[item->key_suffix_offset], + item->key_size - (int)KEY_PREFIX_SIZE) != 0)) + { + return -1; + } + } + + if ((ms_add_iov(c, "\r\n", 2) != 0) + || (c->udp && (ms_build_udp_headers(c) != 0))) + { + return -1; + } + + return EXIT_SUCCESS; +} /* ms_build_ascii_write_buf_mlget */ + + +/** + * used to send the multi-get command to server + * + * @param c, pointer of the concurrency + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +int ms_mcd_mlget(ms_conn_t *c) +{ + ms_task_item_t *item; + + assert(c != NULL); + assert(c->mlget_task.mlget_num >= 1); + + c->currcmd.cmd= CMD_GET; + c->currcmd.isfinish= false; + c->currcmd.retstat= MCD_FAILURE; + + if (ms_update_conn_sock_event(c) != 0) + { + return -1; + } + + c->msgcurr= 0; + c->msgused= 0; + c->iovused= 0; + if (ms_add_msghdr(c) != 0) + { + fprintf(stderr, "Out of memory preparing request."); + return -1; + } + + /* binary protocol */ + if (c->protocol == binary_prot) + { + if (ms_build_bin_write_buf_mlget(c) != 0) + { + return -1; + } + } + else + { + if (ms_build_ascii_write_buf_mlget(c) != 0) + { + return -1; + } + } + + /* decrease operation time of each item */ + for (int i= 0; i < c->mlget_task.mlget_num; i++) + { + item= c->mlget_task.mlget_item[i].item; + atomic_add_size(&ms_stats.cmd_get, 1); + } + + (void)item; + + return EXIT_SUCCESS; +} /* ms_mcd_mlget */ + + +/** + * binary protocol support + */ + +/** + * for binary protocol, parse the response of server + * + * @param c, pointer of the concurrency + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +static int ms_bin_process_response(ms_conn_t *c) +{ + const char *errstr= NULL; + + assert(c != NULL); + + uint32_t bodylen= c->binary_header.response.bodylen; + uint8_t opcode= c->binary_header.response.opcode; + uint16_t status= c->binary_header.response.status; + + if (bodylen > 0) + { + c->rvbytes= (int32_t)bodylen; + c->readval= true; + return EXIT_FAILURE; + } + else + { + switch (status) + { + case PROTOCOL_BINARY_RESPONSE_SUCCESS: + if (opcode == PROTOCOL_BINARY_CMD_SET) + { + c->currcmd.retstat= MCD_STORED; + } + else if (opcode == PROTOCOL_BINARY_CMD_DELETE) + { + c->currcmd.retstat= MCD_DELETED; + } + else if (opcode == PROTOCOL_BINARY_CMD_GET) + { + c->currcmd.retstat= MCD_END; + } + break; + + case PROTOCOL_BINARY_RESPONSE_ENOMEM: + errstr= "Out of memory"; + c->currcmd.retstat= MCD_SERVER_ERROR; + break; + + case PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND: + errstr= "Unknown command"; + c->currcmd.retstat= MCD_UNKNOWN_READ_FAILURE; + break; + + case PROTOCOL_BINARY_RESPONSE_KEY_ENOENT: + errstr= "Not found"; + c->currcmd.retstat= MCD_NOTFOUND; + break; + + case PROTOCOL_BINARY_RESPONSE_EINVAL: + errstr= "Invalid arguments"; + c->currcmd.retstat= MCD_PROTOCOL_ERROR; + break; + + case PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS: + errstr= "Data exists for key."; + break; + + case PROTOCOL_BINARY_RESPONSE_E2BIG: + errstr= "Too large."; + c->currcmd.retstat= MCD_SERVER_ERROR; + break; + + case PROTOCOL_BINARY_RESPONSE_NOT_STORED: + errstr= "Not stored."; + c->currcmd.retstat= MCD_NOTSTORED; + break; + + default: + errstr= "Unknown error"; + c->currcmd.retstat= MCD_UNKNOWN_READ_FAILURE; + break; + } /* switch */ + + if (errstr != NULL) + { + fprintf(stderr, "%s\n", errstr); + } + } + + return EXIT_SUCCESS; +} /* ms_bin_process_response */ + + +/* build binary header and add the header to the buffer to send */ + +/** + * build binary header and add the header to the buffer to send + * + * @param c, pointer of the concurrency + * @param opcode, operation code + * @param hdr_len, length of header + * @param key_len, length of key + * @param body_len. length of body + */ +static void ms_add_bin_header(ms_conn_t *c, + uint8_t opcode, + uint8_t hdr_len, + uint16_t key_len, + uint32_t body_len) +{ + protocol_binary_request_header *header; + + assert(c != NULL); + + header= (protocol_binary_request_header *)c->wcurr; + + header->request.magic= (uint8_t)PROTOCOL_BINARY_REQ; + header->request.opcode= (uint8_t)opcode; + header->request.keylen= htons(key_len); + + header->request.extlen= (uint8_t)hdr_len; + header->request.datatype= (uint8_t)PROTOCOL_BINARY_RAW_BYTES; + header->request.vbucket= 0; + + header->request.bodylen= htonl(body_len); + header->request.opaque= 0; + header->request.cas= 0; + + ms_add_iov(c, c->wcurr, sizeof(header->request)); +} /* ms_add_bin_header */ + + +/** + * add the key to the socket write buffer array + * + * @param c, pointer of the concurrency + * @param item, pointer of task item which includes the object + * information + */ +static void ms_add_key_to_iov(ms_conn_t *c, ms_task_item_t *item) +{ + ms_add_iov(c, (char *)&item->key_prefix, (int)KEY_PREFIX_SIZE); + ms_add_iov(c, &ms_setting.char_block[item->key_suffix_offset], + item->key_size - (int)KEY_PREFIX_SIZE); +} + + +/** + * for binary protocol, this function build the set command + * and add the command to send buffer array. + * + * @param c, pointer of the concurrency + * @param item, pointer of task item which includes the object + * information + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +static int ms_build_bin_write_buf_set(ms_conn_t *c, ms_task_item_t *item) +{ + assert(c->wbuf == c->wcurr); + + int value_offset; + protocol_binary_request_set *rep= (protocol_binary_request_set *)c->wcurr; + uint16_t keylen= (uint16_t)item->key_size; + uint32_t bodylen= (uint32_t)sizeof(rep->message.body) + + (uint32_t)keylen + (uint32_t)item->value_size; + + ms_add_bin_header(c, + PROTOCOL_BINARY_CMD_SET, + sizeof(rep->message.body), + keylen, + bodylen); + rep->message.body.flags= 0; + rep->message.body.expiration= htonl((uint32_t)item->exp_time); + ms_add_iov(c, &rep->message.body, sizeof(rep->message.body)); + ms_add_key_to_iov(c, item); + + if (item->value_offset == INVALID_OFFSET) + { + value_offset= item->key_suffix_offset; + } + else + { + value_offset= item->value_offset; + } + ms_add_iov(c, &ms_setting.char_block[value_offset], item->value_size); + + return EXIT_SUCCESS; +} /* ms_build_bin_write_buf_set */ + + +/** + * for binary protocol, this function build the get command and + * add the command to send buffer array. + * + * @param c, pointer of the concurrency + * @param item, pointer of task item which includes the object + * information + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +static int ms_build_bin_write_buf_get(ms_conn_t *c, ms_task_item_t *item) +{ + assert(c->wbuf == c->wcurr); + + ms_add_bin_header(c, PROTOCOL_BINARY_CMD_GET, 0, (uint16_t)item->key_size, + (uint32_t)item->key_size); + ms_add_key_to_iov(c, item); + + return EXIT_SUCCESS; +} /* ms_build_bin_write_buf_get */ + + +/** + * for binary protocol, this function build the multi-get + * command and add the command to send buffer array. + * + * @param c, pointer of the concurrency + * @param item, pointer of task item which includes the object + * information + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +static int ms_build_bin_write_buf_mlget(ms_conn_t *c) +{ + ms_task_item_t *item; + + assert(c->wbuf == c->wcurr); + + for (int i= 0; i < c->mlget_task.mlget_num; i++) + { + item= c->mlget_task.mlget_item[i].item; + assert(item != NULL); + + ms_add_bin_header(c, + PROTOCOL_BINARY_CMD_GET, + 0, + (uint16_t)item->key_size, + (uint32_t)item->key_size); + ms_add_key_to_iov(c, item); + c->wcurr+= sizeof(protocol_binary_request_get); + } + + c->wcurr= c->wbuf; + + return EXIT_SUCCESS; +} /* ms_build_bin_write_buf_mlget */ diff --git a/clients/ms_conn.h b/clients/ms_conn.h new file mode 100644 index 0000000..b915888 --- /dev/null +++ b/clients/ms_conn.h @@ -0,0 +1,241 @@ +/* + * File: ms_conn.h + * Author: Mingqiang Zhuang + * + * Created on February 10, 2009 + * + * (c) Copyright 2009, Schooner Information Technology, Inc. + * http://www.schoonerinfotech.com/ + * + */ +#ifndef MS_CONN_H +#define MS_CONN_H + +#include +#include +#include +#include + +#include "ms_task.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define DATA_BUFFER_SIZE (1024 * 1024 + 2048) /* read buffer, 1M + 2k, enough for the max value(1M) */ +#define WRITE_BUFFER_SIZE (32 * 1024) /* write buffer, 32k */ +#define UDP_DATA_BUFFER_SIZE (1 * 1024 * 1024) /* read buffer for UDP, 1M */ +#define UDP_MAX_PAYLOAD_SIZE 1400 /* server limit UDP payload size */ +#define UDP_MAX_SEND_PAYLOAD_SIZE 1400 /* mtu size is 1500 */ +#define UDP_HEADER_SIZE 8 /* UDP header size */ +#define MAX_SENDBUF_SIZE (256 * 1024 * 1024) /* Maximum socket buffer size */ +#define SOCK_WAIT_TIMEOUT 30 /* maximum waiting time of UDP, 30s */ +#define MAX_UDP_PACKET (1 << 16) /* maximum UDP packets, 65536 */ + +/* Initial size of the sendmsg() scatter/gather array. */ +#define IOV_LIST_INITIAL 400 + +/* Initial number of sendmsg() argument structures to allocate. */ +#define MSG_LIST_INITIAL 10 + +/* High water marks for buffer shrinking */ +#define READ_BUFFER_HIGHWAT (2 * DATA_BUFFER_SIZE) +#define UDP_DATA_BUFFER_HIGHWAT (4 * UDP_DATA_BUFFER_SIZE) +#define IOV_LIST_HIGHWAT 600 +#define MSG_LIST_HIGHWAT 100 + +/* parse udp header */ +#define HEADER_TO_REQID(ptr) ((uint16_t)*ptr * 256 \ + + (uint16_t)*(ptr + 1)) +#define HEADER_TO_SEQNUM(ptr) ((uint16_t)*(ptr \ + + 2) * 256 \ + + (uint16_t)*(ptr + 3)) +#define HEADER_TO_PACKETS(ptr) ((uint16_t)*(ptr \ + + 4) * 256 \ + + (uint16_t)*(ptr + 5)) + +/* states of connection */ +enum conn_states +{ + conn_read, /* reading in a command line */ + conn_write, /* writing out a simple response */ + conn_closing /* closing this connection */ +}; + +/* returned states of memcached command */ +enum mcd_ret +{ + MCD_SUCCESS, /* command success */ + MCD_FAILURE, /* command failure */ + MCD_UNKNOWN_READ_FAILURE, /* unknown read failure */ + MCD_PROTOCOL_ERROR, /* protocol error */ + MCD_CLIENT_ERROR, /* client error, wrong command */ + MCD_SERVER_ERROR, /* server error, server run command failed */ + MCD_DATA_EXISTS, /* object is existent in server */ + MCD_NOTSTORED, /* server doesn't set the object successfully */ + MCD_STORED, /* server set the object successfully */ + MCD_NOTFOUND, /* server not find the object */ + MCD_END, /* end of the response of get command */ + MCD_DELETED, /* server delete the object successfully */ + MCD_STAT /* response of stats command */ +}; + +/* used to store the current or previous running command state */ +typedef struct cmdstat +{ + int cmd; /* command name */ + int retstat; /* return state of this command */ + bool isfinish; /* if it read all the response data */ + uint64_t key_prefix; /* key prefix */ +} ms_cmdstat_t; + +/* udp packet structure */ +typedef struct udppkt +{ + uint8_t *header; /* udp header of the packet */ + char *data; /* udp data of the packet */ + int rbytes; /* number of data in the packet */ + int copybytes; /* number of copied data in the packet */ +} ms_udppkt_t; + +/* three protocols supported */ +enum protocol +{ + ascii_prot = 3, /* ASCII protocol */ + binary_prot /* binary protocol */ +}; + +/** + * concurrency structure + * + * Each thread has a libevent to manage the events of network. + * Each thread has one or more self-governed concurrencies; + * each concurrency has one or more socket connections. This + * concurrency structure includes all the private variables of + * the concurrency. + */ +typedef struct conn +{ + uint32_t conn_idx; /* connection index in the thread */ + int sfd; /* current tcp sock handler of the connection structure */ + int udpsfd; /* current udp sock handler of the connection structure*/ + int state; /* state of the connection */ + struct event event; /* event for libevent */ + short ev_flags; /* event flag for libevent */ + short which; /* which events were just triggered */ + bool change_sfd; /* whether change sfd */ + + int *tcpsfd; /* TCP sock array */ + uint32_t total_sfds; /* how many socks in the tcpsfd array */ + uint32_t alive_sfds; /* alive socks */ + uint32_t cur_idx; /* current sock index in tcpsfd array */ + + ms_cmdstat_t precmd; /* previous command state */ + ms_cmdstat_t currcmd; /* current command state */ + + char *rbuf; /* buffer to read commands into */ + char *rcurr; /* but if we parsed some already, this is where we stopped */ + int rsize; /* total allocated size of rbuf */ + int rbytes; /* how much data, starting from rcur, do we have unparsed */ + + bool readval; /* read value state, read known data size */ + int rvbytes; /* total value size need to read */ + + char *wbuf; /* buffer to write commands out */ + char *wcurr; /* for multi-get, where we stopped */ + int wsize; /* total allocated size of wbuf */ + bool ctnwrite; /* continue to write */ + + /* data for the mwrite state */ + struct iovec *iov; + int iovsize; /* number of elements allocated in iov[] */ + int iovused; /* number of elements used in iov[] */ + + struct msghdr *msglist; + int msgsize; /* number of elements allocated in msglist[] */ + int msgused; /* number of elements used in msglist[] */ + int msgcurr; /* element in msglist[] being transmitted now */ + int msgbytes; /* number of bytes in current msg */ + + /* data for UDP clients */ + bool udp; /* is this is a UDP "connection" */ + uint32_t request_id; /* UDP request ID of current operation, if this is a UDP "connection" */ + uint8_t *hdrbuf; /* udp packet headers */ + int hdrsize; /* number of headers' worth of space is allocated */ + struct sockaddr srv_recv_addr; /* Sent the most recent request to which server */ + socklen_t srv_recv_addr_size; + + /* udp read buffer */ + char *rudpbuf; /* buffer to read commands into for udp */ + int rudpsize; /* total allocated size of rudpbuf */ + int rudpbytes; /* how much data, starting from rudpbuf */ + + /* order udp packet */ + ms_udppkt_t *udppkt; /* the offset of udp packet in rudpbuf */ + int packets; /* number of total packets need to read */ + int recvpkt; /* number of received packets */ + int pktcurr; /* current packet in rudpbuf being ordered */ + int ordcurr; /* current ordered packet */ + + ms_task_item_t *item_win; /* task sequence */ + int win_size; /* current task window size */ + uint64_t set_cursor; /* current set item index in the item window */ + ms_task_t curr_task; /* current running task */ + ms_mlget_task_t mlget_task; /* multi-get task */ + + int warmup_num; /* to run how many warm up operations*/ + int remain_warmup_num; /* left how many warm up operations to run */ + int64_t exec_num; /* to run how many task operations */ + int64_t remain_exec_num; /* how many remained task operations to run */ + + /* response time statistic and time out control */ + struct timeval start_time; /* start time of current operation(s) */ + struct timeval end_time; /* end time of current operation(s) */ + + /* Binary protocol stuff */ + protocol_binary_response_header binary_header; /* local temporary binary header */ + enum protocol protocol; /* which protocol this connection speaks */ +} ms_conn_t; + +/* used to generate the key prefix */ +uint64_t ms_get_key_prefix(void); + + +/** + * setup a connection, each connection structure of each + * thread must call this function to initialize. + */ +int ms_setup_conn(ms_conn_t *c); + + +/* after one operation completes, reset the connection */ +void ms_reset_conn(ms_conn_t *c, bool timeout); + + +/** + * reconnect several disconnected socks in the connection + * structure, the ever-1-second timer of the thread will check + * whether some socks in the connections disconnect. if + * disconnect, reconnect the sock. + */ +int ms_reconn_socks(ms_conn_t *c); + + +/* used to send set command to server */ +int ms_mcd_set(ms_conn_t *c, ms_task_item_t *item); + + +/* used to send the get command to server */ +int ms_mcd_get(ms_conn_t *c, ms_task_item_t *item); + + +/* used to send the multi-get command to server */ +int ms_mcd_mlget(ms_conn_t *c); + + +#ifdef __cplusplus +} +#endif + +#endif /* end of MS_CONN_H */ diff --git a/clients/ms_memslap.h b/clients/ms_memslap.h new file mode 100644 index 0000000..1c1b29e --- /dev/null +++ b/clients/ms_memslap.h @@ -0,0 +1,132 @@ +/* + * File: ms_memslap.h + * Author: Mingqiang Zhuang + * + * Created on February 10, 2009 + * + * (c) Copyright 2009, Schooner Information Technology, Inc. + * http://www.schoonerinfotech.com/ + * + */ +#ifndef MS_MEMSLAP_H +#define MS_MEMSLAP_H + +#include +#include +#include +#include +#include +#include +#include +#include +#if !defined(__cplusplus) +# include +#endif +#include + +#include "ms_stats.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* command line option */ +typedef enum +{ + OPT_VERSION= 'V', + OPT_HELP= 'h', + OPT_UDP= 'U', + OPT_SERVERS= 's', + OPT_EXECUTE_NUMBER= 'x', + OPT_THREAD_NUMBER= 'T', + OPT_CONCURRENCY= 'c', + OPT_FIXED_LTH= 'X', + OPT_VERIFY= 'v', + OPT_GETS_DIVISION= 'd', + OPT_TIME= 't', + OPT_CONFIG_CMD= 'F', + OPT_WINDOW_SIZE= 'w', + OPT_EXPIRE= 'e', + OPT_STAT_FREQ= 'S', + OPT_RECONNECT= 'R', + OPT_VERBOSE= 'b', + OPT_FACEBOOK_TEST= 'a', + OPT_SOCK_PER_CONN= 'n', + OPT_BINARY_PROTOCOL= 'B', + OPT_OVERWRITE= 'o', + OPT_TPS= 'P', + OPT_REP_WRITE_SRV= 'p' +} ms_options_t; + +/* global statistic of response time */ +typedef struct statistic +{ + pthread_mutex_t stat_mutex; /* synchronize the following members */ + + ms_stat_t get_stat; /* statistics of get command */ + ms_stat_t set_stat; /* statistics of set command */ + ms_stat_t total_stat; /* statistics of both get and set commands */ +} ms_statistic_t; + +/* global status statistic structure */ +typedef struct stats +{ + volatile uint32_t active_conns; /* active connections */ + size_t bytes_read; /* read bytes */ + size_t bytes_written; /* written bytes */ + size_t obj_bytes; /* object bytes */ + size_t pre_cmd_get; /* previous total get command count */ + size_t pre_cmd_set; /* previous total set command count */ + size_t cmd_get; /* current total get command count */ + size_t cmd_set; /* current total set command count */ + size_t get_misses; /* total objects of get miss */ + size_t vef_miss; /* total objects of verification miss */ + size_t vef_failed; /* total objects of verification failed */ + size_t unexp_unget; /* total objects which is unexpired but not get */ + size_t exp_get; /* total objects which is expired but get */ + volatile size_t pkt_disorder; /* disorder packages of UDP */ + size_t pkt_drop; /* packages dropped of UDP */ + size_t udp_timeout; /* how many times timeout of UDP happens */ +} ms_stats_t; + +/* lock adapter */ +typedef struct sync_lock +{ + uint32_t count; + pthread_mutex_t lock; + pthread_cond_t cond; +} ms_sync_lock_t; + +/* global variable structure */ +typedef struct global +{ + /* synchronize lock */ + ms_sync_lock_t init_lock; + ms_sync_lock_t warmup_lock; + ms_sync_lock_t run_lock; + + /* mutex for outputing error log synchronously when memslap crashes */ + pthread_mutex_t quit_mutex; + + /* mutex for generating key prefix */ + pthread_mutex_t seq_mutex; + + /* global synchronous flags for slap mode */ + bool finish_warmup; + bool time_out; +} ms_global_t; + +/* global structure */ +ms_global_t ms_global; + +/* global stats information structure */ +ms_stats_t ms_stats; + +/* global statistic structure */ +ms_statistic_t ms_statistic; + +#ifdef __cplusplus +} +#endif + +#endif /* end of MS_MEMSLAP_H */ diff --git a/clients/ms_setting.c b/clients/ms_setting.c new file mode 100644 index 0000000..eafe459 --- /dev/null +++ b/clients/ms_setting.c @@ -0,0 +1,1068 @@ +/* + * File: ms_setting.c + * Author: Mingqiang Zhuang + * + * Created on February 10, 2009 + * + * (c) Copyright 2009, Schooner Information Technology, Inc. + * http://www.schoonerinfotech.com/ + * + */ + +#include "mem_config.h" + +#include + +#include +#include +#include +#include +#include +#include +#include + + + +#include "ms_setting.h" +#include "ms_conn.h" + +#define MAX_EXEC_NUM 0x4000000000000000 /* 1 << 62 */ +#define ADDR_ALIGN(addr) ((addr + 15) & ~(16 - 1)) /* 16 bytes aligned */ +#define RAND_CHAR_SIZE (10 * 1024 * 1024) /* 10M character table */ +#define RESERVED_RAND_CHAR_SIZE (2 * 1024 * 1024) /* reserved 2M to avoid pointer sloping over */ + +#define DEFAULT_CONFIG_NAME ".memslap.cnf" + +#define DEFAULT_THREADS_NUM 1 /* default start one thread */ +#define DEFAULT_CONNS_NUM 16 /* default each thread with 16 connections */ +#define DEFAULT_EXE_NUM 0 /* default execute number is 0 */ +#define DEFAULT_VERIFY_RATE 0.0 /* default it doesn't do data verification */ +#define DEFAULT_OVERWRITE_RATE 0.0 /* default it doesn't do overwrite */ +#define DEFAULT_DIV 1 /* default it runs single get */ +#define DEFAULT_RUN_TIME 600 /* default run time 10 minutes */ +#define DEFAULT_WINDOW_SIZE (10 * UNIT_ITEMS_COUNT) /* default window size is 10k */ +#define DEFAULT_SOCK_PER_CONN 1 /* default socks per connection is 1 */ + +/* Use this for string generation */ +#define CHAR_COUNT 64 /* number of characters used to generate character table */ +const char ALPHANUMBERICS[]= + "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-"; + +ms_setting_st ms_setting; /* store the settings specified by user */ + + +/* read setting from configuration file */ +static void ms_get_serverlist(char *str); +static uint32_t ms_get_cpu_count(void); +ms_conf_type_t ms_get_conf_type(char *line); +static int ms_is_line_data(char *line); +static int ms_read_is_data(char *line, ssize_t nread); +static void ms_no_config_file(void); +static void ms_parse_cfg_file(char *cfg_file); + + +/* initialize setting structure */ +static void ms_init_random_block(void); +static void ms_calc_avg_size(void); +static int ms_shuffle_distr(ms_distr_t *distr, int length); +static void ms_build_distr(void); +static void ms_print_setting(void); +static void ms_setting_slapmode_init_pre(void); +static void ms_setting_slapmode_init_post(void); + +#if !defined(HAVE_GETLINE) +#include +static ssize_t getline (char **line, size_t *line_size, FILE *fp) +{ + char delim= '\n'; + ssize_t result= 0; + size_t cur_len= 0; + + if (line == NULL || line_size == NULL || fp == NULL) + { + errno = EINVAL; + return -1; + } + + if (*line == NULL || *line_size == 0) + { + char *new_line; + *line_size = 120; + new_line= (char *) realloc (*line, *line_size); + if (new_line == NULL) + { + result= -1; + return result; + } + *line= new_line; + } + + for (;;) + { + int i= getc(fp); + if (i == EOF) + { + result = -1; + break; + } + + /* Make enough space for len+1 (for final NUL) bytes. */ + if (cur_len + 1 >= *line_size) + { + size_t needed_max= + SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX; + size_t needed= (2 * (*line_size)) + 1; + char *new_line; + + if (needed_max < needed) + needed= needed_max; + if (cur_len + 1 >= needed) + { + result= -1; + errno= EOVERFLOW; + return result; + } + + new_line= (char *)realloc(*line, needed); + if (new_line == NULL) + { + result= -1; + return result; + } + + *line= new_line; + *line_size= needed; + } + + (*line)[cur_len]= (char)i; + cur_len++; + + if (i == delim) + break; + } + (*line)[cur_len] = '\0'; + if (cur_len != 0) + return (ssize_t)cur_len; + return result; +} +#endif + +/** + * parse the server list string, and build the servers + * information structure array. this function is used to parse + * the command line options specified by user. + * + * @param str, the string of server list + */ +static void ms_get_serverlist(char *str) +{ + ms_mcd_server_t *srvs= NULL; + + /** + * Servers list format is like this. For example: + * "localhost:11108, localhost:11109" + */ + memcached_server_st *server_pool; + server_pool = memcached_servers_parse(str); + + for (uint32_t loop= 0; loop < memcached_server_list_count(server_pool); loop++) + { + assert(ms_setting.srv_cnt < ms_setting.total_srv_cnt); + strcpy(ms_setting.servers[ms_setting.srv_cnt].srv_host_name, server_pool[loop].hostname); + ms_setting.servers[ms_setting.srv_cnt].srv_port= server_pool[loop].port; + ms_setting.servers[ms_setting.srv_cnt].disconn_cnt= 0; + ms_setting.servers[ms_setting.srv_cnt].reconn_cnt= 0; + ms_setting.srv_cnt++; + + if (ms_setting.srv_cnt >= ms_setting.total_srv_cnt) + { + srvs= (ms_mcd_server_t *)realloc( ms_setting.servers, + (size_t)ms_setting.total_srv_cnt * sizeof(ms_mcd_server_t) * 2); + if (srvs == NULL) + { + fprintf(stderr, "Can't reallocate servers structure.\n"); + exit(1); + } + ms_setting.servers= srvs; + ms_setting.total_srv_cnt*= 2; + } + } + + memcached_server_free(server_pool); +} /* ms_get_serverlist */ + + +/** + * used to get the CPU count of the current system + * + * @return return the cpu count if get, else return EXIT_FAILURE + */ +static uint32_t ms_get_cpu_count() +{ +#ifdef HAVE__SC_NPROCESSORS_ONLN + return sysconf(_SC_NPROCESSORS_CONF); + +#else +# ifdef HAVE_CPU_SET_T + int cpu_count= 0; + cpu_set_t cpu_set; + + sched_getaffinity(0, sizeof(cpu_set_t), &cpu_set); + + for (int i= 0; i < (sizeof(cpu_set_t) * 8); i++) + { + if (CPU_ISSET(i, &cpu_set)) + { + cpu_count++; + } + } + + return cpu_count; + +# endif +#endif + + /* the system with one cpu at least */ + return EXIT_FAILURE; +} /* ms_get_cpu_count */ + + +/** + * used to get the configure type based on the type string read + * from the configuration file. + * + * @param line, string of one line + * + * @return ms_conf_type_t + */ +ms_conf_type_t ms_get_conf_type(char *line) +{ + if (! memcmp(line, "key", strlen("key"))) + { + return CONF_KEY; + } + else if (! memcmp(line, "value", strlen("value"))) + { + return CONF_VALUE; + } + else if (! memcmp(line, "cmd", strlen("cmd"))) + { + return CONF_CMD; + } + else + { + return CONF_NULL; + } +} /* ms_get_conf_type */ + + +/** + * judge whether the line is a line with useful data. used to + * parse the configuration file. + * + * @param line, string of one line + * + * @return if success, return EXIT_FAILURE, else return EXIT_SUCCESS + */ +static int ms_is_line_data(char *line) +{ + assert(line != NULL); + + char *begin_ptr= line; + + while (isspace(*begin_ptr)) + { + begin_ptr++; + } + if ((begin_ptr[0] == '\0') || (begin_ptr[0] == '#')) + return EXIT_SUCCESS; + + return EXIT_FAILURE; +} /* ms_is_line_data */ + + +/** + * function to bypass blank line and comments + * + * @param line, string of one line + * @param nread, length of the line + * + * @return if it's EOF or not line data, return EXIT_SUCCESS, else return EXIT_FAILURE + */ +static int ms_read_is_data(char *line, ssize_t nread) +{ + if ((nread == EOF) || ! ms_is_line_data(line)) + return EXIT_SUCCESS; + + return EXIT_FAILURE; +} /* ms_read_is_data */ + + +/** + * if no configuration file, use this function to create the default + * configuration file. + */ +static void ms_no_config_file() +{ + char userpath[PATH_MAX]; + struct passwd *usr= NULL; + FILE *fd; + + usr= getpwuid(getuid()); + + snprintf(userpath, PATH_MAX, "%s/%s", usr->pw_dir, DEFAULT_CONFIG_NAME); + + if (access (userpath, F_OK | R_OK) == 0) + goto exit; + + fd= fopen(userpath, "w+"); + + if (fd == NULL) + { + fprintf(stderr, "Could not create default configure file %s\n", userpath); + perror(strerror(errno)); + exit(1); + } + fprintf(fd, "%s", DEFAULT_CONGIF_STR); + fclose(fd); + +exit: + ms_setting.cfg_file= strdup(userpath); +} /* ms_no_config_file */ + + +/** + * parse the configuration file + * + * @param cfg_file, the configuration file name + */ +static void ms_parse_cfg_file(char *cfg_file) +{ + FILE *f; + size_t start_len, end_len; + double proportion; + char *line= NULL; + size_t read_len; + ssize_t nread; + int cmd_type; + ms_conf_type_t conf_type; + int end_of_file= 0; + ms_key_distr_t *key_distr= NULL; + ms_value_distr_t *val_distr= NULL; + + if (cfg_file == NULL) + { + ms_no_config_file(); + cfg_file= ms_setting.cfg_file; + } + + /*read key value configure file*/ + if ((f= fopen(cfg_file, "r")) == NULL) + { + fprintf(stderr, "Can not open file: '%s'.\n", cfg_file); + exit(1); + } + + while (1) + { + if ((((nread= getline(&line, &read_len, f)) == 1) + || ! ms_read_is_data(line, nread)) && (nread != EOF)) /* bypass blank line */ + continue; + + if (nread == EOF) + { + fprintf(stderr, "Bad configuration file, no configuration find.\n"); + exit(1); + } + conf_type= ms_get_conf_type(line); + break; + } + + while (! end_of_file) + { + switch (conf_type) + { + case CONF_KEY: + while (1) + { + if ((((nread= getline(&line, &read_len, f)) == 1) + || ! ms_read_is_data(line, nread)) && (nread != EOF)) /* bypass blank line */ + continue; + + if (nread != EOF) + { + if (sscanf(line, "%zu %zu %lf ", &start_len, + &end_len, &proportion) != 3) + { + conf_type= ms_get_conf_type(line); + break; + } + ms_setting.key_distr[ms_setting.key_rng_cnt].start_len= start_len; + ms_setting.key_distr[ms_setting.key_rng_cnt].end_len= end_len; + ms_setting.key_distr[ms_setting.key_rng_cnt].key_prop= proportion; + ms_setting.key_rng_cnt++; + + if (ms_setting.key_rng_cnt >= ms_setting.total_key_rng_cnt) + { + key_distr= (ms_key_distr_t *)realloc( + ms_setting.key_distr, + (size_t)ms_setting. + total_key_rng_cnt * sizeof(ms_key_distr_t) * 2); + if (key_distr == NULL) + { + fprintf(stderr, + "Can't reallocate key distribution structure.\n"); + exit(1); + } + ms_setting.key_distr= key_distr; + ms_setting.total_key_rng_cnt*= 2; + } + continue; + } + end_of_file= 1; + break; + } + break; + + case CONF_VALUE: + while (1) + { + if ((((nread= getline(&line, &read_len, f)) == 1) + || ! ms_read_is_data(line, nread)) && (nread != EOF)) /* bypass blank line */ + continue; + + if (nread != EOF) + { + if (sscanf(line, "%zu %zu %lf", &start_len, &end_len, + &proportion) != 3) + { + conf_type= ms_get_conf_type(line); + break; + } + ms_setting.value_distr[ms_setting.val_rng_cnt].start_len= + start_len; + ms_setting.value_distr[ms_setting.val_rng_cnt].end_len= end_len; + ms_setting.value_distr[ms_setting.val_rng_cnt].value_prop= + proportion; + ms_setting.val_rng_cnt++; + + if (ms_setting.val_rng_cnt >= ms_setting.total_val_rng_cnt) + { + val_distr= (ms_value_distr_t *)realloc( + ms_setting.value_distr, + (size_t)ms_setting. + total_val_rng_cnt * sizeof(ms_value_distr_t) * 2); + if (val_distr == NULL) + { + fprintf(stderr, + "Can't reallocate key distribution structure.\n"); + exit(1); + } + ms_setting.value_distr= val_distr; + ms_setting.total_val_rng_cnt*= 2; + } + continue; + } + end_of_file= 1; + break; + } + break; + + case CONF_CMD: + while (1) + { + if ((((nread= getline(&line, &read_len, f)) == 1) + || ! ms_read_is_data(line, nread)) && (nread != EOF)) /* bypass blank line */ + continue; + + if (nread != EOF) + { + if (sscanf(line, "%d %lf", &cmd_type, &proportion) != 2) + { + conf_type= ms_get_conf_type(line); + break; + } + if (cmd_type >= CMD_NULL) + { + continue; + } + ms_setting.cmd_distr[ms_setting.cmd_used_count].cmd_type= + cmd_type; + ms_setting.cmd_distr[ms_setting.cmd_used_count].cmd_prop= + proportion; + ms_setting.cmd_used_count++; + continue; + } + end_of_file= 1; + break; + } + + case CONF_NULL: + while (1) + { + if ((((nread= getline(&line, &read_len, f)) == 1) + || ! ms_read_is_data(line, nread)) && (nread != EOF)) /* bypass blank line */ + continue; + + if (nread != EOF) + { + if ((conf_type= ms_get_conf_type(line)) != CONF_NULL) + { + break; + } + continue; + } + end_of_file= 1; + break; + } + break; + + default: + assert(0); + break; + } /* switch */ + } + + fclose(f); + + if (line != NULL) + { + free(line); + } +} /* ms_parse_cfg_file */ + + +/* calculate the average size of key and value */ +static void ms_calc_avg_size() +{ + double avg_val_size= 0.0; + double avg_key_size= 0.0; + double val_pro= 0.0; + double key_pro= 0.0; + double averge_len= 0.0; + size_t start_len= 0; + size_t end_len= 0; + + for (int j= 0; j < ms_setting.val_rng_cnt; j++) + { + val_pro= ms_setting.value_distr[j].value_prop; + start_len= ms_setting.value_distr[j].start_len; + end_len= ms_setting.value_distr[j].end_len; + + averge_len= val_pro * ((double)(start_len + end_len)) / 2; + avg_val_size+= averge_len; + } + + for (int j= 0; j < ms_setting.key_rng_cnt; j++) + { + key_pro= ms_setting.key_distr[j].key_prop; + start_len= ms_setting.key_distr[j].start_len; + end_len= ms_setting.key_distr[j].end_len; + + averge_len= key_pro * ((double)(start_len + end_len)) / 2; + avg_key_size+= averge_len; + } + + ms_setting.avg_val_size= (size_t)avg_val_size; + ms_setting.avg_key_size= (size_t)avg_key_size; +} /* ms_calc_avg_size */ + + +/** + * used to shuffle key and value distribution array to ensure + * (key, value) pair with different set. + * + * @param distr, pointer of distribution structure array + * @param length, length of the array + * + * @return always return EXIT_SUCCESS + */ +static int ms_shuffle_distr(ms_distr_t *distr, int length) +{ + int i, j; + int tmp_offset; + size_t tmp_size; + int64_t rnd; + + for (i= 0; i < length; i++) + { + rnd= random(); + j= (int)(rnd % (length - i)) + i; + + switch (rnd % 3) + { + case 0: + tmp_size= distr[j].key_size; + distr[j].key_size= distr[i].key_size; + distr[i].key_size= tmp_size; + break; + + case 1: + tmp_offset= distr[j].key_offset; + distr[j].key_offset= distr[i].key_offset; + distr[i].key_offset= tmp_offset; + break; + + case 2: + tmp_size= distr[j].value_size; + distr[j].value_size= distr[i].value_size; + distr[i].value_size= tmp_size; + break; + + default: + break; + } /* switch */ + } + + return EXIT_SUCCESS; +} /* ms_shuffle_distr */ + + +/** + * according to the key and value distribution, to build the + * (key, value) pair distribution. the (key, value) pair + * distribution array is global, each connection set or get + * object keeping this distribution, for the final result, we + * can reach the expected key and value distribution. + */ +static void ms_build_distr() +{ + int offset= 0; + int end= 0; + int key_cnt= 0; + int value_cnt= 0; + size_t average_len= 0; + size_t diff_len= 0; + size_t start_len= 0; + size_t end_len= 0; + int rnd= 0; + ms_distr_t *distr= NULL; + int units= (int)ms_setting.win_size / UNIT_ITEMS_COUNT; + + /* calculate average value size and key size */ + ms_calc_avg_size(); + + ms_setting.char_blk_size= RAND_CHAR_SIZE; + int key_scope_size= + (int)((ms_setting.char_blk_size - RESERVED_RAND_CHAR_SIZE) + / UNIT_ITEMS_COUNT); + + ms_setting.distr= (ms_distr_t *)malloc( + sizeof(ms_distr_t) * ms_setting.win_size); + if (ms_setting.distr == NULL) + { + fprintf(stderr, "Can't allocate distribution array."); + exit(1); + } + + /** + * character block is divided by how many different key + * size, each different key size has the same size character + * range. + */ + for (int m= 0; m < units; m++) + { + for (int i= 0; i < UNIT_ITEMS_COUNT; i++) + { + ms_setting.distr[m * UNIT_ITEMS_COUNT + i].key_offset= + ADDR_ALIGN(key_scope_size * i); + } + } + + /* initialize key size distribution */ + for (int m= 0; m < units; m++) + { + for (int j= 0; j < ms_setting.key_rng_cnt; j++) + { + key_cnt= (int)(UNIT_ITEMS_COUNT * ms_setting.key_distr[j].key_prop); + start_len= ms_setting.key_distr[j].start_len; + end_len= ms_setting.key_distr[j].end_len; + if ((start_len < MIN_KEY_SIZE) || (end_len < MIN_KEY_SIZE)) + { + fprintf(stderr, "key length must be greater than 16 bytes.\n"); + exit(1); + } + + if (! ms_setting.binary_prot_ + && ((start_len > MAX_KEY_SIZE) || (end_len > MAX_KEY_SIZE))) + { + fprintf(stderr, "key length must be less than 250 bytes.\n"); + exit(1); + } + + average_len= (start_len + end_len) / 2; + diff_len= (end_len - start_len) / 2; + for (int k= 0; k < key_cnt; k++) + { + if (offset >= (m + 1) * UNIT_ITEMS_COUNT) + { + break; + } + rnd= (int)random(); + if (k % 2 == 0) + { + ms_setting.distr[offset].key_size= + (diff_len == 0) ? average_len : + average_len + (size_t)rnd + % diff_len; + } + else + { + ms_setting.distr[offset].key_size= + (diff_len == 0) ? average_len : + average_len - (size_t)rnd + % diff_len; + } + offset++; + } + } + + if (offset < (m + 1) * UNIT_ITEMS_COUNT) + { + end= (m + 1) * UNIT_ITEMS_COUNT - offset; + for (int i= 0; i < end; i++) + { + ms_setting.distr[offset].key_size= ms_setting.avg_key_size; + offset++; + } + } + } + offset= 0; + + /* initialize value distribution */ + if (ms_setting.fixed_value_size != 0) + { + for (int i= 0; i < units * UNIT_ITEMS_COUNT; i++) + { + ms_setting.distr[i].value_size= ms_setting.fixed_value_size; + } + } + else + { + for (int m= 0; m < units; m++) + { + for (int j= 0; j < ms_setting.val_rng_cnt; j++) + { + value_cnt= + (int)(UNIT_ITEMS_COUNT * ms_setting.value_distr[j].value_prop); + start_len= ms_setting.value_distr[j].start_len; + end_len= ms_setting.value_distr[j].end_len; + if ((start_len <= 0) || (end_len <= 0)) + { + fprintf(stderr, "value length must be greater than 0 bytes.\n"); + exit(1); + } + + if ((start_len > MAX_VALUE_SIZE) || (end_len > MAX_VALUE_SIZE)) + { + fprintf(stderr, "key length must be less than or equal to 1M.\n"); + exit(1); + } + + average_len= (start_len + end_len) / 2; + diff_len= (end_len - start_len) / 2; + for (int k= 0; k < value_cnt; k++) + { + if (offset >= (m + 1) * UNIT_ITEMS_COUNT) + { + break; + } + rnd= (int)random(); + if (k % 2 == 0) + { + ms_setting.distr[offset].value_size= + (diff_len == 0) ? average_len : + average_len + + (size_t)rnd % diff_len; + } + else + { + ms_setting.distr[offset].value_size= + (diff_len == 0) ? average_len : + average_len + - (size_t)rnd % diff_len; + } + offset++; + } + } + + if (offset < (m + 1) * UNIT_ITEMS_COUNT) + { + end= (m + 1) * UNIT_ITEMS_COUNT - offset; + for (int i= 0; i < end; i++) + { + ms_setting.distr[offset++].value_size= ms_setting.avg_val_size; + } + } + } + } + + /* shuffle distribution */ + for (int i= 0; i < units; i++) + { + distr= &ms_setting.distr[i * UNIT_ITEMS_COUNT]; + for (int j= 0; j < 4; j++) + { + ms_shuffle_distr(distr, UNIT_ITEMS_COUNT); + } + } +} /* ms_build_distr */ + + +/** + * used to initialize the global character block. The character + * block is used to generate the suffix of the key and value. we + * only store a pointer in the character block for each key + * suffix or value string. It can save much memory to store key + * or value string. + */ +static void ms_init_random_block() +{ + char *ptr= NULL; + + assert(ms_setting.char_blk_size > 0); + + ms_setting.char_block= (char *)malloc(ms_setting.char_blk_size); + if (ms_setting.char_block == NULL) + { + fprintf(stderr, "Can't allocate global char block."); + exit(1); + } + ptr= ms_setting.char_block; + + for (int i= 0; (size_t)i < ms_setting.char_blk_size; i++) + { + *(ptr++)= ALPHANUMBERICS[random() % CHAR_COUNT]; + } +} /* ms_init_random_block */ + + +/** + * after initialization, call this function to output the main + * configuration user specified. + */ +static void ms_print_setting() +{ + fprintf(stdout, "servers : %s\n", ms_setting.srv_str); + fprintf(stdout, "threads count: %d\n", ms_setting.nthreads); + fprintf(stdout, "concurrency: %d\n", ms_setting.nconns); + if (ms_setting.run_time > 0) + { + fprintf(stdout, "run time: %ds\n", ms_setting.run_time); + } + else + { + fprintf(stdout, "execute number: %" PRId64 "\n", ms_setting.exec_num); + } + fprintf(stdout, "windows size: %" PRId64 "k\n", + (int64_t)(ms_setting.win_size / 1024)); + fprintf(stdout, "set proportion: set_prop=%.2f\n", + ms_setting.cmd_distr[CMD_SET].cmd_prop); + fprintf(stdout, "get proportion: get_prop=%.2f\n", + ms_setting.cmd_distr[CMD_GET].cmd_prop); + fflush(stdout); +} /* ms_print_setting */ + + +/** + * previous part of slap mode initialization of setting structure + */ +static void ms_setting_slapmode_init_pre() +{ + ms_setting.exec_num= DEFAULT_EXE_NUM; + ms_setting.verify_percent= DEFAULT_VERIFY_RATE; + ms_setting.exp_ver_per= DEFAULT_VERIFY_RATE; + ms_setting.overwrite_percent= DEFAULT_OVERWRITE_RATE; + ms_setting.mult_key_num= DEFAULT_DIV; + ms_setting.fixed_value_size= 0; + ms_setting.win_size= DEFAULT_WINDOW_SIZE; + ms_setting.udp= false; + ms_setting.reconnect= false; + ms_setting.verbose= false; + ms_setting.facebook_test= false; + ms_setting.binary_prot_= false; + ms_setting.stat_freq= 0; + ms_setting.srv_str= NULL; + ms_setting.cfg_file= NULL; + ms_setting.sock_per_conn= DEFAULT_SOCK_PER_CONN; + ms_setting.expected_tps= 0; + ms_setting.rep_write_srv= 0; +} /* ms_setting_slapmode_init_pre */ + + +/** + * previous part of initialization of setting structure + */ +void ms_setting_init_pre() +{ + memset(&ms_setting, 0, sizeof(ms_setting)); + + /* common initialize */ + ms_setting.ncpu= ms_get_cpu_count(); + ms_setting.nthreads= DEFAULT_THREADS_NUM; + ms_setting.nconns= DEFAULT_CONNS_NUM; + ms_setting.run_time= DEFAULT_RUN_TIME; + ms_setting.total_srv_cnt= MCD_SRVS_NUM_INIT; + ms_setting.servers= (ms_mcd_server_t *)malloc( + (size_t)ms_setting.total_srv_cnt + * sizeof(ms_mcd_server_t)); + if (ms_setting.servers == NULL) + { + fprintf(stderr, "Can't allocate servers structure.\n"); + exit(1); + } + + ms_setting_slapmode_init_pre(); +} /* ms_setting_init_pre */ + + +/** + * post part of slap mode initialization of setting structure + */ +static void ms_setting_slapmode_init_post() +{ + ms_setting.total_key_rng_cnt= KEY_RANGE_COUNT_INIT; + ms_setting.key_distr= + (ms_key_distr_t *)malloc((size_t)ms_setting.total_key_rng_cnt * sizeof(ms_key_distr_t)); + + if (ms_setting.key_distr == NULL) + { + fprintf(stderr, "Can't allocate key distribution structure.\n"); + exit(1); + } + + ms_setting.total_val_rng_cnt= VALUE_RANGE_COUNT_INIT; + + ms_setting.value_distr= + (ms_value_distr_t *)malloc((size_t)ms_setting.total_val_rng_cnt * sizeof( ms_value_distr_t)); + + if (ms_setting.value_distr == NULL) + { + fprintf(stderr, "Can't allocate value distribution structure.\n"); + exit(1); + } + + ms_parse_cfg_file(ms_setting.cfg_file); + + /* run time mode */ + if ((ms_setting.exec_num == 0) && (ms_setting.run_time != 0)) + { + ms_setting.exec_num= (int64_t)MAX_EXEC_NUM; + } + else + { + /* execute number mode */ + ms_setting.run_time= 0; + } + + if (ms_setting.rep_write_srv > 0) + { + /* for replication test, need enable reconnect feature */ + ms_setting.reconnect= true; + } + + if (ms_setting.facebook_test && (ms_setting.mult_key_num < 2)) + { + fprintf(stderr, "facebook test must work with multi-get, " + "please specify multi-get key number " + "with '--division' option.\n"); + exit(1); + } + + if (ms_setting.facebook_test && ms_setting.udp) + { + fprintf(stderr, "facebook test couldn't work with UDP.\n"); + exit(1); + } + + if (ms_setting.udp && (ms_setting.sock_per_conn > 1)) + { + fprintf(stderr, "UDP doesn't support multi-socks " + "in one connection structure.\n"); + exit(1); + } + + if ((ms_setting.rep_write_srv > 0) && (ms_setting.srv_cnt < 2)) + { + fprintf(stderr, "Please specify 2 servers at least for replication\n"); + exit(1); + } + + if ((ms_setting.rep_write_srv > 0) + && (ms_setting.srv_cnt < ms_setting.rep_write_srv)) + { + fprintf(stderr, "Servers to do replication writing " + "is larger than the total servers\n"); + exit(1); + } + + if (ms_setting.udp && (ms_setting.rep_write_srv > 0)) + { + fprintf(stderr, "UDP doesn't support replication.\n"); + exit(1); + } + + if (ms_setting.facebook_test && (ms_setting.rep_write_srv > 0)) + { + fprintf(stderr, "facebook test couldn't work with replication.\n"); + exit(1); + } + + ms_build_distr(); + + /* initialize global character block */ + ms_init_random_block(); + ms_print_setting(); +} /* ms_setting_slapmode_init_post */ + + +/** + * post part of initialization of setting structure + */ +void ms_setting_init_post() +{ + ms_get_serverlist(ms_setting.srv_str); + ms_setting_slapmode_init_post(); +} + + +/** + * clean up the global setting structure + */ +void ms_setting_cleanup() +{ + if (ms_setting.distr != NULL) + { + free(ms_setting.distr); + } + + if (ms_setting.char_block != NULL) + { + free(ms_setting.char_block); + } + + if (ms_setting.srv_str != NULL) + { + free(ms_setting.srv_str); + } + + if (ms_setting.cfg_file != NULL) + { + free(ms_setting.cfg_file); + } + + if (ms_setting.servers != NULL) + { + free(ms_setting.servers); + } + + if (ms_setting.key_distr != NULL) + { + free(ms_setting.key_distr); + } + + if (ms_setting.value_distr != NULL) + { + free(ms_setting.value_distr); + } +} /* ms_setting_cleanup */ diff --git a/clients/ms_setting.h b/clients/ms_setting.h new file mode 100644 index 0000000..4bab2b9 --- /dev/null +++ b/clients/ms_setting.h @@ -0,0 +1,181 @@ +/* + * File: ms_setting.h + * Author: Mingqiang Zhuang + * + * Created on February 10, 2009 + * + * (c) Copyright 2009, Schooner Information Technology, Inc. + * http://www.schoonerinfotech.com/ + * + */ +#ifndef MS_SETTING_H +#define MS_SETTING_H + +#include "ms_memslap.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define MCD_SRVS_NUM_INIT 8 +#define MCD_HOST_LENGTH 64 +#define KEY_RANGE_COUNT_INIT 8 +#define VALUE_RANGE_COUNT_INIT 8 +#define PROP_ERROR 0.001 + +#define MIN_KEY_SIZE 16 +#define MAX_KEY_SIZE 250 +#define MAX_VALUE_SIZE (1024 * 1024) + +/* the content of the configuration file for memslap running without configuration file */ +#define DEFAULT_CONGIF_STR \ + "key\n" \ + "64 64 1\n" \ + "value\n" \ + "1024 1024 1\n" \ + "cmd\n" \ + "0 0.1\n" \ + "1 0.9" + +/* Used to parse the value length return by server and path string */ +typedef struct token_s +{ + char *value; + size_t length; +} token_t; + +#define MAX_TOKENS 10 + +/* server information */ +typedef struct mcd_server +{ + char srv_host_name[MCD_HOST_LENGTH]; /* host name of server */ + int srv_port; /* server port */ + + /* for calculating how long the server disconnects */ + volatile uint32_t disconn_cnt; /* number of disconnections count */ + volatile uint32_t reconn_cnt; /* number of reconnections count */ + struct timeval disconn_time; /* start time of disconnection */ + struct timeval reconn_time; /* end time of reconnection */ +} ms_mcd_server_t; + +/* information of an item distribution including key and value */ +typedef struct distr +{ + size_t key_size; /* size of key */ + int key_offset; /* offset of one key in character block */ + size_t value_size; /* size of value */ +} ms_distr_t; + +/* information of key distribution */ +typedef struct key_distr +{ + size_t start_len; /* start of the key length range */ + size_t end_len; /* end of the key length range */ + double key_prop; /* key proportion */ +} ms_key_distr_t; + +/* information of value distribution */ +typedef struct value_distr +{ + size_t start_len; /* start of the value length range */ + size_t end_len; /* end of the value length range */ + double value_prop; /* value proportion */ +} ms_value_distr_t; + +/* memcached command types */ +typedef enum cmd_type +{ + CMD_SET, + CMD_GET, + CMD_NULL +} ms_cmd_type_t; + +/* types in the configuration file */ +typedef enum conf_type +{ + CONF_KEY, + CONF_VALUE, + CONF_CMD, + CONF_NULL +} ms_conf_type_t; + +/* information of command distribution */ +typedef struct cmd_distr +{ + ms_cmd_type_t cmd_type; /* command type */ + double cmd_prop; /* proportion of the command */ +} ms_cmd_distr_t; + +/* global setting structure */ +typedef struct setting +{ + uint32_t ncpu; /* cpu count of this system */ + uint32_t nthreads; /* total thread count, must equal or less than cpu cores */ + uint32_t nconns; /* total conn count, must multiply by total thread count */ + int64_t exec_num; /* total execute number */ + int run_time; /* total run time */ + + uint32_t char_blk_size; /* global character block size */ + char *char_block; /* global character block with random character */ + ms_distr_t *distr; /* distribution from configure file */ + + char *srv_str; /* string includes servers information */ + char *cfg_file; /* configure file name */ + + ms_mcd_server_t *servers; /* servers array */ + uint32_t total_srv_cnt; /* total servers count of the servers array */ + uint32_t srv_cnt; /* servers count */ + + ms_key_distr_t *key_distr; /* array of key distribution */ + int total_key_rng_cnt; /* total key range count of the array */ + int key_rng_cnt; /* actual key range count */ + + ms_value_distr_t *value_distr; /* array of value distribution */ + int total_val_rng_cnt; /* total value range count of the array */ + int val_rng_cnt; /* actual value range count */ + + ms_cmd_distr_t cmd_distr[CMD_NULL]; /* total we have CMD_NULL commands */ + int cmd_used_count; /* supported command count */ + + size_t fixed_value_size; /* fixed value size */ + size_t avg_val_size; /* average value size */ + size_t avg_key_size; /* average value size */ + + double verify_percent; /* percent of data verification */ + double exp_ver_per; /* percent of data verification with expire time */ + double overwrite_percent; /* percent of overwrite */ + int mult_key_num; /* number of keys used by multi-get once */ + size_t win_size; /* item window size per connection */ + bool udp; /* whether or not use UDP */ + int stat_freq; /* statistic frequency second */ + bool reconnect; /* whether it reconnect when connection close */ + bool verbose; /* whether it outputs detailed information when verification */ + bool facebook_test; /* facebook test, TCP set and multi-get with UDP */ + uint32_t sock_per_conn; /* number of socks per connection structure */ + bool binary_prot_; /* whether it use binary protocol */ + int expected_tps; /* expected throughput */ + uint32_t rep_write_srv; /* which servers are used to do replication writing */ +} ms_setting_st; + +extern ms_setting_st ms_setting; + +/* previous part of initialization of setting structure */ +void ms_setting_init_pre(void); + + +/* post part of initialization of setting structure */ +void ms_setting_init_post(void); + + +/* clean up the global setting structure */ +void ms_setting_cleanup(void); + + +#define UNUSED_ARGUMENT(x) (void)x + +#ifdef __cplusplus +} +#endif + +#endif /* end of MS_SETTING_H */ diff --git a/clients/ms_sigsegv.c b/clients/ms_sigsegv.c new file mode 100644 index 0000000..303381f --- /dev/null +++ b/clients/ms_sigsegv.c @@ -0,0 +1,128 @@ +/* + * File: ms_sigsegv.c + * Author: Mingqiang Zhuang + * + * Created on March 15, 2009 + * + * (c) Copyright 2009, Schooner Information Technology, Inc. + * http://www.schoonerinfotech.com/ + * + * Rewrite of stack dump: + * Copyright (C) 2009 Sun Microsystems + * Author Trond Norbye + */ + +#include "mem_config.h" + +#include +#include +#include +#include +#include + +#include "ms_memslap.h" +#include "ms_setting.h" + +/* prototypes */ +int ms_setup_sigsegv(void); +int ms_setup_sigpipe(void); +int ms_setup_sigint(void); + + +/* signal seg reaches, this function will run */ +static void ms_signal_segv(int signum, siginfo_t *info, void *ptr) +{ + UNUSED_ARGUMENT(signum); + UNUSED_ARGUMENT(info); + UNUSED_ARGUMENT(ptr); + + pthread_mutex_lock(&ms_global.quit_mutex); + fprintf(stderr, "Segmentation fault occurred.\nStack trace:\n"); +#if 0 + pandora_print_callstack(stderr); +#endif + fprintf(stderr, "End of stack trace\n"); + pthread_mutex_unlock(&ms_global.quit_mutex); + abort(); +} + +/* signal int reaches, this function will run */ +static void ms_signal_int(int signum, siginfo_t *info, void *ptr) +{ + UNUSED_ARGUMENT(signum); + UNUSED_ARGUMENT(info); + UNUSED_ARGUMENT(ptr); + + pthread_mutex_lock(&ms_global.quit_mutex); + fprintf(stderr, "SIGINT handled.\n"); + pthread_mutex_unlock(&ms_global.quit_mutex); + exit(1); +} /* ms_signal_int */ + + +/** + * redirect signal seg + * + * @return if success, return EXIT_SUCCESS, else return -1 + */ +int ms_setup_sigsegv(void) +{ + struct sigaction action; + + memset(&action, 0, sizeof(action)); + action.sa_sigaction= ms_signal_segv; + action.sa_flags= SA_SIGINFO; + if (sigaction(SIGSEGV, &action, NULL) < 0) + { + perror("sigaction"); + return EXIT_SUCCESS; + } + + return -1; +} /* ms_setup_sigsegv */ + + +/** + * redirect signal pipe + * + * @return if success, return EXIT_SUCCESS, else return -1 + */ +int ms_setup_sigpipe(void) +{ + /* ignore the SIGPIPE signal */ + signal(SIGPIPE, SIG_IGN); + + return -1; +} /* ms_setup_sigpipe */ + + +/** + * redirect signal int + * + * @return if success, return EXIT_SUCCESS, else return -1 + */ +int ms_setup_sigint(void) +{ + struct sigaction action_3; + + memset(&action_3, 0, sizeof(action_3)); + action_3.sa_sigaction= ms_signal_int; + action_3.sa_flags= SA_SIGINFO; + if (sigaction(SIGINT, &action_3, NULL) < 0) + { + perror("sigaction"); + return EXIT_SUCCESS; + } + + return -1; +} /* ms_setup_sigint */ + + +#ifndef SIGSEGV_NO_AUTO_INIT +static void __attribute((constructor)) ms_init(void) +{ + ms_setup_sigsegv(); + ms_setup_sigpipe(); + ms_setup_sigint(); +} +#endif diff --git a/clients/ms_sigsegv.h b/clients/ms_sigsegv.h new file mode 100644 index 0000000..7990ff6 --- /dev/null +++ b/clients/ms_sigsegv.h @@ -0,0 +1,34 @@ +/* + * File: ms_sigsegv.h + * Author: Mingqiang Zhuang + * + * Created on March 15, 2009 + * + * (c) Copyright 2009, Schooner Information Technology, Inc. + * http://www.schoonerinfotech.com/ + * + */ +#ifndef MS_SIGSEGV_H +#define MS_SIGSEGV_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* redirect signal seg */ +int ms_setup_sigsegv(void); + + +/* redirect signal pipe */ +int ms_setup_sigpipe(void); + + +/* redirect signal int */ +int ms_setup_sigint(void); + + +#ifdef __cplusplus +} +#endif + +#endif /* end of MS_SIGSEGV_H */ diff --git a/clients/ms_stats.c b/clients/ms_stats.c new file mode 100644 index 0000000..086fb3e --- /dev/null +++ b/clients/ms_stats.c @@ -0,0 +1,303 @@ +/* + * File: ms_stats.h + * Author: Mingqiang Zhuang + * + * Created on March 25, 2009 + * + * (c) Copyright 2009, Schooner Information Technology, Inc. + * http://www.schoonerinfotech.com/ + * + */ + +#include "mem_config.h" + +#include +#include "ms_stats.h" + +#define array_size(x) (sizeof(x) / sizeof((x)[0])) + +static int ms_local_log2(uint64_t value); +static uint64_t ms_get_events(ms_stat_t *stat); + + +/** + * get the index of local log2 array + * + * @param value + * + * @return return the index of local log2 array + */ +static int ms_local_log2(uint64_t value) +{ + int result= 0; + + while (result <= 63 && ((uint64_t)1 << result) < value) + { + result++; + } + + return result; +} /* ms_local_log2 */ + + +/** + * initialize statistic structure + * + * @param stat, pointer of the statistic structure + * @param name, name of the statistic + */ +void ms_init_stats(ms_stat_t *stat, const char *name) +{ + memset(stat, 0, sizeof(*stat)); + + stat->name= (char *)name; + stat->min_time= (uint64_t)-1; + stat->max_time= 0; + stat->period_min_time= (uint64_t)-1; + stat->period_max_time= 0; + stat->log_product= 0; + stat->total_time= 0; + stat->pre_total_time= 0; + stat->squares= 0; + stat->pre_squares= 0; + stat->pre_events= 0; + stat->pre_log_product= 0; + stat->get_miss= 0; + stat->pre_get_miss= 0; +} /* ms_init_stats */ + + +/** + * record one event + * + * @param stat, pointer of the statistic structure + * @param total_time, response time of the command + * @param get_miss, whether it gets miss + */ +void ms_record_event(ms_stat_t *stat, uint64_t total_time, int get_miss) +{ + stat->total_time+= total_time; + + if (total_time < stat->min_time) + { + stat->min_time= total_time; + } + + if (total_time > stat->max_time) + { + stat->max_time= total_time; + } + + if (total_time < stat->period_min_time) + { + stat->period_min_time= total_time; + } + + if (total_time > stat->period_max_time) + { + stat->period_max_time= total_time; + } + + if (get_miss) + { + stat->get_miss++; + } + + stat->dist[ms_local_log2(total_time)]++; + stat->squares+= (double)(total_time * total_time); + + if (total_time != 0) + { + stat->log_product+= log((double)total_time); + } +} /* ms_record_event */ + + +/** + * get the events count + * + * @param stat, pointer of the statistic structure + * + * @return total events recorded + */ +static uint64_t ms_get_events(ms_stat_t *stat) +{ + uint64_t events= 0; + + for (uint32_t i= 0; i < array_size(stat->dist); i++) + { + events+= stat->dist[i]; + } + + return events; +} /* ms_get_events */ + + +/** + * dump the statistics + * + * @param stat, pointer of the statistic structure + */ +void ms_dump_stats(ms_stat_t *stat) +{ + uint64_t events= 0; + int max_non_zero= 0; + int min_non_zero= 0; + double average= 0; + + for (uint32_t i= 0; i < array_size(stat->dist); i++) + { + events+= stat->dist[i]; + if (stat->dist[i] != 0) + { + max_non_zero= (int)i; + } + } + + if (events == 0) + { + return; + } + average= (double)(stat->total_time / events); + + printf("%s Statistics (%lld events)\n", stat->name, (long long)events); + printf(" Min: %8lld\n", (long long)stat->min_time); + printf(" Max: %8lld\n", (long long)stat->max_time); + printf(" Avg: %8lld\n", (long long)(stat->total_time / events)); + printf(" Geo: %8.2lf\n", exp(stat->log_product / (double)events)); + + if (events > 1) + { + printf(" Std: %8.2lf\n", + sqrt((stat->squares - (double)events * average + * average) / ((double)events - 1))); + } + printf(" Log2 Dist:"); + + for (int i= 0; i <= max_non_zero - 4; i+= 4) + { + if ((stat->dist[i + 0] != 0) + || (stat->dist[i + 1] != 0) + || (stat->dist[i + 2] != 0) + || (stat->dist[i + 3] != 0)) + { + min_non_zero= i; + break; + } + } + + for (int i= min_non_zero; i <= max_non_zero; i++) + { + if ((i % 4) == 0) + { + printf("\n %2d:", (int)i); + } + printf(" %6" PRIu64 , stat->dist[i]); + } + + printf("\n\n"); +} /* ms_dump_stats */ + + +/** + * dump the format statistics + * + * @param stat, pointer of the statistic structure + * @param run_time, the total run time + * @param freq, statistic frequency + * @param obj_size, average object size + */ +void ms_dump_format_stats(ms_stat_t *stat, + int run_time, + int freq, + int obj_size) +{ + uint64_t events= 0; + double global_average= 0; + uint64_t global_tps= 0; + double global_rate= 0; + double global_std= 0; + double global_log= 0; + + double period_average= 0; + uint64_t period_tps= 0; + double period_rate= 0; + double period_std= 0; + double period_log= 0; + + if ((events= ms_get_events(stat)) == 0) + { + return; + } + + global_average= (double)(stat->total_time / events); + global_tps= events / (uint64_t)run_time; + global_rate= (double)events * obj_size / 1024 / 1024 / run_time; + global_std= sqrt((stat->squares - (double)events * global_average + * global_average) / (double)(events - 1)); + global_log= exp(stat->log_product / (double)events); + + uint64_t diff_time= stat->total_time - stat->pre_total_time; + uint64_t diff_events= events - stat->pre_events; + if (diff_events >= 1) + { + period_average= (double)(diff_time / diff_events); + period_tps= diff_events / (uint64_t)freq; + period_rate= (double)diff_events * obj_size / 1024 / 1024 / freq; + double diff_squares= (double)stat->squares - (double)stat->pre_squares; + period_std= sqrt((diff_squares - (double)diff_events * period_average + * period_average) / (double)(diff_events - 1)); + double diff_log_product= stat->log_product - stat->pre_log_product; + period_log= exp(diff_log_product / (double)diff_events); + } + + printf("%s Statistics\n", stat->name); + printf("%-8s %-8s %-12s %-12s %-10s %-10s %-8s %-10s %-10s %-10s %-10s\n", + "Type", + "Time(s)", + "Ops", + "TPS(ops/s)", + "Net(M/s)", + "Get_miss", + "Min(us)", + "Max(us)", + "Avg(us)", + "Std_dev", + "Geo_dist"); + + printf( + "%-8s %-8d %-12llu %-12lld %-10.1f %-10lld %-8lld %-10lld %-10lld %-10.2f %.2f\n", + "Period", + freq, + (long long)diff_events, + (long long)period_tps, + global_rate, + (long long)(stat->get_miss - stat->pre_get_miss), + (long long)stat->period_min_time, + (long long)stat->period_max_time, + (long long)period_average, + period_std, + period_log); + + printf( + "%-8s %-8d %-12llu %-12lld %-10.1f %-10lld %-8lld %-10lld %-10lld %-10.2f %.2f\n\n", + "Global", + run_time, + (long long)events, + (long long)global_tps, + period_rate, + (long long)stat->get_miss, + (long long)stat->min_time, + (long long)stat->max_time, + (long long)global_average, + global_std, + global_log); + + stat->pre_events= events; + stat->pre_squares= (uint64_t)stat->squares; + stat->pre_total_time= stat->total_time; + stat->pre_log_product= stat->log_product; + stat->period_min_time= (uint64_t)-1; + stat->period_max_time= 0; + stat->pre_get_miss= stat->get_miss; +} /* ms_dump_format_stats */ diff --git a/clients/ms_stats.h b/clients/ms_stats.h new file mode 100644 index 0000000..5ac88b3 --- /dev/null +++ b/clients/ms_stats.h @@ -0,0 +1,69 @@ +/* + * File: ms_stats.h + * Author: Mingqiang Zhuang + * + * Created on March 25, 2009 + * + * (c) Copyright 2009, Schooner Information Technology, Inc. + * http://www.schoonerinfotech.com/ + * + */ +#ifndef MS_STAT_H +#define MS_STAT_H + +#include +#include +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* statistic structure of response time */ +typedef struct +{ + char *name; + uint64_t total_time; + uint64_t min_time; + uint64_t max_time; + uint64_t get_miss; + uint64_t dist[65]; + double squares; + double log_product; + + uint64_t period_min_time; + uint64_t period_max_time; + uint64_t pre_get_miss; + uint64_t pre_events; + uint64_t pre_total_time; + uint64_t pre_squares; + double pre_log_product; +} ms_stat_t; + +/* initialize statistic */ +void ms_init_stats(ms_stat_t *stat, const char *name); + + +/* record one event */ +void ms_record_event(ms_stat_t *stat, uint64_t time, int get_miss); + + +/* dump the statistics */ +void ms_dump_stats(ms_stat_t *stat); + + +/* dump the format statistics */ +void ms_dump_format_stats(ms_stat_t *stat, + int run_time, + int freq, + int obj_size); + + +#ifdef __cplusplus +} +#endif + +#endif /* MS_STAT_H */ diff --git a/clients/ms_task.c b/clients/ms_task.c new file mode 100644 index 0000000..f2cb865 --- /dev/null +++ b/clients/ms_task.c @@ -0,0 +1,1110 @@ +/* + * File: ms_task.c + * Author: Mingqiang Zhuang + * + * Created on February 10, 2009 + * + * (c) Copyright 2009, Schooner Information Technology, Inc. + * http://www.schoonerinfotech.com/ + * + */ + +#include "mem_config.h" + +#if defined(HAVE_SYS_TIME_H) +# include +#endif + +#if defined(HAVE_TIME_H) +# include +#endif + +#include "ms_thread.h" +#include "ms_setting.h" +#include "ms_atomic.h" + +/* command distribution adjustment cycle */ +#define CMD_DISTR_ADJUST_CYCLE 1000 +#define DISADJUST_FACTOR 0.03 /** + * In one adjustment cycle, if undo set or get + * operations proportion is more than 3% , means + * there are too many new item or need more new + * item in the window. This factor shows it. + */ + +/* get item from task window */ +static ms_task_item_t *ms_get_cur_opt_item(ms_conn_t *c); +static ms_task_item_t *ms_get_next_get_item(ms_conn_t *c); +static ms_task_item_t *ms_get_next_set_item(ms_conn_t *c); +static ms_task_item_t *ms_get_random_overwrite_item(ms_conn_t *c); + + +/* select next operation to do */ +static void ms_select_opt(ms_conn_t *c, ms_task_t *task); + + +/* set and get speed estimate for controlling and adjustment */ +static bool ms_is_set_too_fast(ms_task_t *task); +static bool ms_is_get_too_fast(ms_task_t *task); +static void ms_kick_out_item(ms_task_item_t *item); + + +/* miss rate adjustment */ +static bool ms_need_overwrite_item(ms_task_t *task); +static bool ms_adjust_opt(ms_conn_t *c, ms_task_t *task); + + +/* deal with data verification initialization */ +static void ms_task_data_verify_init(ms_task_t *task); +static void ms_task_expire_verify_init(ms_task_t *task); + + +/* select a new task to do */ +static ms_task_t *ms_get_task(ms_conn_t *c, bool warmup); + + +/* run the selected task */ +static void ms_update_set_result(ms_conn_t *c, ms_task_item_t *item); +static void ms_update_stat_result(ms_conn_t *c); +static void ms_update_multi_get_result(ms_conn_t *c); +static void ms_update_single_get_result(ms_conn_t *c, ms_task_item_t *item); +static void ms_update_task_result(ms_conn_t *c); +static void ms_single_getset_task_sch(ms_conn_t *c); +static void ms_multi_getset_task_sch(ms_conn_t *c); +static void ms_send_signal(ms_sync_lock_t *sync_lock); +static void ms_warmup_server(ms_conn_t *c); +static int ms_run_getset_task(ms_conn_t *c); + + +/** + * used to get the current operation item(object) + * + * @param c, pointer of the concurrency + * + * @return ms_task_item_t*, current operating item + */ +static ms_task_item_t *ms_get_cur_opt_item(ms_conn_t *c) +{ + return c->curr_task.item; +} + + +/** + * used to get the next item to do get operation + * + * @param c, pointer of the concurrency + * + * @return ms_task_item_t*, the pointer of the next item to do + * get operation + */ +static ms_task_item_t *ms_get_next_get_item(ms_conn_t *c) +{ + ms_task_item_t *item= NULL; + + if (c->set_cursor <= 0) + { + /* the first item in the window */ + item= &c->item_win[0]; + } + else if (c->set_cursor > 0 && c->set_cursor < (uint32_t)c->win_size) + { + /* random get one item set before */ + item= &c->item_win[random() % (int64_t)c->set_cursor]; + } + else + { + /* random get one item from the window */ + item= &c->item_win[random() % c->win_size]; + } + + return item; +} /* ms_get_next_get_item */ + + +/** + * used to get the next item to do set operation + * + * @param c, pointer of the concurrency + * + * @return ms_task_item_t*, the pointer of the next item to do + * set operation + */ +static ms_task_item_t *ms_get_next_set_item(ms_conn_t *c) +{ + /** + * when a set command successes, the cursor will plus 1. If set + * fails, the cursor doesn't change. it isn't necessary to + * increase the cursor here. + */ + return &c->item_win[(int64_t)c->set_cursor % c->win_size]; +} + + +/** + * If we need do overwrite, we could select a item set before. + * This function is used to get a item set before to do + * overwrite. + * + * @param c, pointer of the concurrency + * + * @return ms_task_item_t*, the pointer of the previous item of + * set operation + */ +static ms_task_item_t *ms_get_random_overwrite_item(ms_conn_t *c) +{ + return ms_get_next_get_item(c); +} /* ms_get_random_overwrite_item */ + +/** + * According to the proportion of operations(get or set), select + * an operation to do. + * + * @param c, pointer of the concurrency + * @param task, pointer of current task in the concurrency + */ +static void ms_select_opt(ms_conn_t *c, ms_task_t *task) +{ + double get_prop= ms_setting.cmd_distr[CMD_GET].cmd_prop; + double set_prop= ms_setting.cmd_distr[CMD_SET].cmd_prop; + + /* update cycle operation number if necessary */ + if ((task->cycle_undo_get == 0) || (task->cycle_undo_set == 0)) + { + task->cycle_undo_get+= (int)(CMD_DISTR_ADJUST_CYCLE * get_prop); + task->cycle_undo_set+= (int)(CMD_DISTR_ADJUST_CYCLE * set_prop); + } + + /** + * According to operation distribution to choose doing which + * operation. If it can't set new object to sever, just change + * to do get operation. + */ + if ((set_prop > PROP_ERROR) + && ((double)task->get_opt * set_prop >= (double)task->set_opt + * get_prop)) + { + task->cmd= CMD_SET; + task->item= ms_get_next_set_item(c); + } + else + { + task->cmd= CMD_GET; + task->item= ms_get_next_get_item(c); + } +} /* ms_select_opt */ + + +/** + * used to judge whether the number of get operations done is + * more than expected number of get operations to do right now. + * + * @param task, pointer of current task in the concurrency + * + * @return bool, if get too fast, return true, else return false + */ +static bool ms_is_get_too_fast(ms_task_t *task) +{ + double get_prop= ms_setting.cmd_distr[CMD_GET].cmd_prop; + double set_prop= ms_setting.cmd_distr[CMD_SET].cmd_prop; + + /* no get operation */ + if (get_prop < PROP_ERROR) + { + return false; + } + + int max_undo_set= (int)(set_prop / get_prop * (1.0 + DISADJUST_FACTOR)) + * task->cycle_undo_get; + + if (((double)task->get_opt * set_prop > (double)task->set_opt * get_prop) + && (task->cycle_undo_set > max_undo_set)) + { + return true; + } + + return false; +} /* ms_is_get_too_fast */ + + +/** + * used to judge whether the number of set operations done is + * more than expected number of set operations to do right now. + * + * @param task, pointer of current task in the concurrency + * + * @return bool, if set too fast, return true, else return false + */ +static bool ms_is_set_too_fast(ms_task_t *task) +{ + double get_prop= ms_setting.cmd_distr[CMD_GET].cmd_prop; + double set_prop= ms_setting.cmd_distr[CMD_SET].cmd_prop; + + /* no set operation */ + if (set_prop < PROP_ERROR) + { + return false; + } + + /* If it does set operation too fast, skip some */ + int max_undo_get= (int)((get_prop / set_prop * (1.0 + DISADJUST_FACTOR)) + * (double)task->cycle_undo_set); + + if (((double)task->get_opt * set_prop < (double)task->set_opt * get_prop) + && (task->cycle_undo_get > max_undo_get)) + { + return true; + } + + return false; +} /* ms_is_set_too_fast */ + + +/** + * kick out the old item in the window, and add a new item to + * overwrite the old item. When we don't want to do overwrite + * object, and the current item to do set operation is an old + * item, we could kick out the old item and add a new item. Then + * we can ensure we set new object every time. + * + * @param item, pointer of task item which includes the object + * information + */ +static void ms_kick_out_item(ms_task_item_t *item) +{ + /* allocate a new item */ + item->key_prefix= ms_get_key_prefix(); + + item->key_suffix_offset++; + item->value_offset= INVALID_OFFSET; /* new item use invalid value offset */ + item->client_time= 0; +} /* ms_kick_out_item */ + + +/** + * used to judge whether we need overwrite object based on the + * options user specified + * + * @param task, pointer of current task in the concurrency + * + * @return bool, if need overwrite, return true, else return + * false + */ +static bool ms_need_overwrite_item(ms_task_t *task) +{ + ms_task_item_t *item= task->item; + + assert(item != NULL); + assert(task->cmd == CMD_SET); + + /** + * according to data overwrite percent to determine if do data + * overwrite. + */ + if (task->overwrite_set < (double)task->set_opt + * ms_setting.overwrite_percent) + { + return true; + } + + return false; +} /* ms_need_overwirte_item */ + + +/** + * used to adjust operation. the function must be called after + * select operation. the function change get operation to set + * operation, or set operation to get operation based on the + * current case. + * + * @param c, pointer of the concurrency + * @param task, pointer of current task in the concurrency + * + * @return bool, if success, return true, else return false + */ +static bool ms_adjust_opt(ms_conn_t *c, ms_task_t *task) +{ + ms_task_item_t *item= task->item; + + assert(item != NULL); + + if (task->cmd == CMD_SET) + { + /* If did set operation too fast, skip some */ + if (ms_is_set_too_fast(task)) + { + /* get the item instead */ + if (item->value_offset != INVALID_OFFSET) + { + task->cmd= CMD_GET; + return true; + } + } + + /* If the current item is not a new item, kick it out */ + if (item->value_offset != INVALID_OFFSET) + { + if (ms_need_overwrite_item(task)) + { + /* overwrite */ + task->overwrite_set++; + } + else + { + /* kick out the current item to do set operation */ + ms_kick_out_item(item); + } + } + else /* it's a new item */ + { + /* need overwrite */ + if (ms_need_overwrite_item(task)) + { + /** + * overwrite not use the item with current set cursor, revert + * set cursor. + */ + c->set_cursor--; + + item= ms_get_random_overwrite_item(c); + if (item->value_offset != INVALID_OFFSET) + { + task->item= item; + task->overwrite_set++; + } + else /* item is a new item */ + { + /* select the item to run, and cancel overwrite */ + task->item= item; + } + } + } + task->cmd= CMD_SET; + return true; + } + else + { + if (item->value_offset == INVALID_OFFSET) + { + task->cmd= CMD_SET; + return true; + } + + /** + * If It does get operation too fast, it will change the + * operation to set. + */ + if (ms_is_get_too_fast(task)) + { + /* don't kick out the first item in the window */ + if (! ms_is_set_too_fast(task)) + { + ms_kick_out_item(item); + task->cmd= CMD_SET; + return true; + } + else + { + return false; + } + } + + assert(item->value_offset != INVALID_OFFSET); + + task->cmd= CMD_GET; + return true; + } +} /* ms_adjust_opt */ + + +/** + * used to initialize the task which need verify data. + * + * @param task, pointer of current task in the concurrency + */ +static void ms_task_data_verify_init(ms_task_t *task) +{ + ms_task_item_t *item= task->item; + + assert(item != NULL); + assert(task->cmd == CMD_GET); + + /** + * according to data verification percent to determine if do + * data verification. + */ + if (task->verified_get < (double)task->get_opt + * ms_setting.verify_percent) + { + /** + * currently it doesn't do verify, just increase the counter, + * and do verification next proper get command + */ + if ((task->item->value_offset != INVALID_OFFSET) + && (item->exp_time == 0)) + { + task->verify= true; + task->finish_verify= false; + task->verified_get++; + } + } +} /* ms_task_data_verify_init */ + + +/** + * used to initialize the task which need verify expire time. + * + * @param task, pointer of current task in the concurrency + */ +static void ms_task_expire_verify_init(ms_task_t *task) +{ + ms_task_item_t *item= task->item; + + assert(item != NULL); + assert(task->cmd == CMD_GET); + assert(item->exp_time > 0); + + task->verify= true; + task->finish_verify= false; +} /* ms_task_expire_verify_init */ + + +/** + * used to get one task, the function initializes the task + * structure. + * + * @param c, pointer of the concurrency + * @param warmup, whether it need warmup + * + * @return ms_task_t*, pointer of current task in the + * concurrency + */ +static ms_task_t *ms_get_task(ms_conn_t *c, bool warmup) +{ + ms_task_t *task= &c->curr_task; + + while (1) + { + task->verify= false; + task->finish_verify= true; + task->get_miss= true; + + if (warmup) + { + task->cmd= CMD_SET; + task->item= ms_get_next_set_item(c); + + return task; + } + + /* according to operation distribution to choose doing which operation */ + ms_select_opt(c, task); + + if (! ms_adjust_opt(c, task)) + { + continue; + } + + if ((ms_setting.verify_percent > 0) && (task->cmd == CMD_GET)) + { + ms_task_data_verify_init(task); + } + + if ((ms_setting.exp_ver_per > 0) && (task->cmd == CMD_GET) + && (task->item->exp_time > 0)) + { + ms_task_expire_verify_init(task); + } + + break; + } + + /** + * Only update get and delete counter, set counter will be + * updated after set operation successes. + */ + if (task->cmd == CMD_GET) + { + task->get_opt++; + task->cycle_undo_get--; + } + + return task; +} /* ms_get_task */ + + +/** + * send a signal to the main monitor thread + * + * @param sync_lock, pointer of the lock + */ +static void ms_send_signal(ms_sync_lock_t *sync_lock) +{ + pthread_mutex_lock(&sync_lock->lock); + sync_lock->count++; + pthread_cond_signal(&sync_lock->cond); + pthread_mutex_unlock(&sync_lock->lock); +} /* ms_send_signal */ + + +/** + * If user only want to do get operation, but there is no object + * in server , so we use this function to warmup the server, and + * set some objects to server. It runs at the beginning of task. + * + * @param c, pointer of the concurrency + */ +static void ms_warmup_server(ms_conn_t *c) +{ + ms_task_t *task; + ms_task_item_t *item; + + /** + * Extra one loop to get the last command returned state. + * Normally it gets the previous command returned state. + */ + if ((c->remain_warmup_num >= 0) + && (c->remain_warmup_num != c->warmup_num)) + { + item= ms_get_cur_opt_item(c); + /* only update the set command result state for data verification */ + if ((c->precmd.cmd == CMD_SET) && (c->precmd.retstat == MCD_STORED)) + { + item->value_offset= item->key_suffix_offset; + /* set success, update counter */ + c->set_cursor++; + } + else if (c->precmd.cmd == CMD_SET && c->precmd.retstat != MCD_STORED) + { + printf("key: %" PRIx64 " didn't set success\n", item->key_prefix); + } + } + + /* the last time don't run a task */ + if (c->remain_warmup_num-- > 0) + { + /* operate next task item */ + task= ms_get_task(c, true); + item= task->item; + ms_mcd_set(c, item); + } + + /** + * finish warming up server, wait all connects initialize + * complete. Then all connects can start do task at the same + * time. + */ + if (c->remain_warmup_num == -1) + { + ms_send_signal(&ms_global.warmup_lock); + c->remain_warmup_num--; /* never run the if branch */ + } +} /* ms_warmup_server */ + + +/** + * dispatch single get and set task + * + * @param c, pointer of the concurrency + */ +static void ms_single_getset_task_sch(ms_conn_t *c) +{ + ms_task_t *task; + ms_task_item_t *item; + + /* the last time don't run a task */ + if (c->remain_exec_num-- > 0) + { + task= ms_get_task(c, false); + item= task->item; + if (task->cmd == CMD_SET) + { + ms_mcd_set(c, item); + } + else if (task->cmd == CMD_GET) + { + assert(task->cmd == CMD_GET); + ms_mcd_get(c, item); + } + } +} /* ms_single_getset_task_sch */ + + +/** + * dispatch multi-get and set task + * + * @param c, pointer of the concurrency + */ +static void ms_multi_getset_task_sch(ms_conn_t *c) +{ + ms_task_t *task; + ms_mlget_task_item_t *mlget_item; + + while (1) + { + if (c->remain_exec_num-- > 0) + { + task= ms_get_task(c, false); + if (task->cmd == CMD_SET) /* just do it */ + { + ms_mcd_set(c, task->item); + break; + } + else + { + assert(task->cmd == CMD_GET); + mlget_item= &c->mlget_task.mlget_item[c->mlget_task.mlget_num]; + mlget_item->item= task->item; + mlget_item->verify= task->verify; + mlget_item->finish_verify= task->finish_verify; + mlget_item->get_miss= task->get_miss; + c->mlget_task.mlget_num++; + + /* enough multi-get task items can be done */ + if ((c->mlget_task.mlget_num >= ms_setting.mult_key_num) + || ((c->remain_exec_num == 0) && (c->mlget_task.mlget_num > 0))) + { + ms_mcd_mlget(c); + break; + } + } + } + else + { + if ((c->remain_exec_num <= 0) && (c->mlget_task.mlget_num > 0)) + { + ms_mcd_mlget(c); + } + break; + } + } +} /* ms_multi_getset_task_sch */ + + +/** + * calculate the difference value of two time points + * + * @param start_time, the start time + * @param end_time, the end time + * + * @return uint64_t, the difference value between start_time and end_time in us + */ +int64_t ms_time_diff(struct timeval *start_time, struct timeval *end_time) +{ + int64_t endtime= end_time->tv_sec * 1000000 + end_time->tv_usec; + int64_t starttime= start_time->tv_sec * 1000000 + start_time->tv_usec; + + assert(endtime >= starttime); + + return endtime - starttime; +} /* ms_time_diff */ + + +/** + * after get the response from server for multi-get, the + * function update the state of the task and do data verify if + * necessary. + * + * @param c, pointer of the concurrency + */ +static void ms_update_multi_get_result(ms_conn_t *c) +{ + ms_mlget_task_item_t *mlget_item; + ms_task_item_t *item; + char *orignval= NULL; + char *orignkey= NULL; + + if (c == NULL) + { + return; + } + assert(c != NULL); + + for (int i= 0; i < c->mlget_task.mlget_num; i++) + { + mlget_item= &c->mlget_task.mlget_item[i]; + item= mlget_item->item; + orignval= &ms_setting.char_block[item->value_offset]; + orignkey= &ms_setting.char_block[item->key_suffix_offset]; + + /* update get miss counter */ + if (mlget_item->get_miss) + { + atomic_add_size(&ms_stats.get_misses, 1); + } + + /* get nothing from server for this task item */ + if (mlget_item->verify && ! mlget_item->finish_verify) + { + /* verify expire time if necessary */ + if (item->exp_time > 0) + { + struct timeval curr_time; + gettimeofday(&curr_time, NULL); + + /* object doesn't expire but can't get it now */ + if (curr_time.tv_sec - item->client_time + < item->exp_time - EXPIRE_TIME_ERROR) + { + atomic_add_size(&ms_stats.unexp_unget, 1); + + if (ms_setting.verbose) + { + char set_time[64]; + char cur_time[64]; + strftime(set_time, 64, "%Y-%m-%d %H:%M:%S", + localtime(&item->client_time)); + strftime(cur_time, 64, "%Y-%m-%d %H:%M:%S", + localtime(&curr_time.tv_sec)); + fprintf(stderr, + "\n\t<%d expire time verification failed, object " + "doesn't expire but can't get it now\n" + "\tkey len: %d\n" + "\tkey: %" PRIx64 " %.*s\n" + "\tset time: %s current time: %s " + "diff time: %d expire time: %d\n" + "\texpected data len: %d\n" + "\texpected data: %.*s\n" + "\treceived data: \n", + c->sfd, + item->key_size, + item->key_prefix, + item->key_size - (int)KEY_PREFIX_SIZE, + orignkey, + set_time, + cur_time, + (int)(curr_time.tv_sec - item->client_time), + item->exp_time, + item->value_size, + item->value_size, + orignval); + fflush(stderr); + } + } + } + else + { + atomic_add_size(&ms_stats.vef_miss, 1); + + if (ms_setting.verbose) + { + fprintf(stderr, "\n<%d data verification failed\n" + "\tkey len: %d\n" + "\tkey: %" PRIx64 " %.*s\n" + "\texpected data len: %d\n" + "\texpected data: %.*s\n" + "\treceived data: \n", + c->sfd, item->key_size, item->key_prefix, + item->key_size - (int)KEY_PREFIX_SIZE, + orignkey, item->value_size, item->value_size, orignval); + fflush(stderr); + } + } + } + } + c->mlget_task.mlget_num= 0; + c->mlget_task.value_index= INVALID_OFFSET; +} /* ms_update_multi_get_result */ + + +/** + * after get the response from server for single get, the + * function update the state of the task and do data verify if + * necessary. + * + * @param c, pointer of the concurrency + * @param item, pointer of task item which includes the object + * information + */ +static void ms_update_single_get_result(ms_conn_t *c, ms_task_item_t *item) +{ + char *orignval= NULL; + char *orignkey= NULL; + + if ((c == NULL) || (item == NULL)) + { + return; + } + assert(c != NULL); + assert(item != NULL); + + orignval= &ms_setting.char_block[item->value_offset]; + orignkey= &ms_setting.char_block[item->key_suffix_offset]; + + /* update get miss counter */ + if ((c->precmd.cmd == CMD_GET) && c->curr_task.get_miss) + { + atomic_add_size(&ms_stats.get_misses, 1); + } + + /* get nothing from server for this task item */ + if ((c->precmd.cmd == CMD_GET) && c->curr_task.verify + && ! c->curr_task.finish_verify) + { + /* verify expire time if necessary */ + if (item->exp_time > 0) + { + struct timeval curr_time; + gettimeofday(&curr_time, NULL); + + /* object doesn't expire but can't get it now */ + if (curr_time.tv_sec - item->client_time + < item->exp_time - EXPIRE_TIME_ERROR) + { + atomic_add_size(&ms_stats.unexp_unget, 1); + + if (ms_setting.verbose) + { + char set_time[64]; + char cur_time[64]; + strftime(set_time, 64, "%Y-%m-%d %H:%M:%S", + localtime(&item->client_time)); + strftime(cur_time, 64, "%Y-%m-%d %H:%M:%S", + localtime(&curr_time.tv_sec)); + fprintf(stderr, + "\n\t<%d expire time verification failed, object " + "doesn't expire but can't get it now\n" + "\tkey len: %d\n" + "\tkey: %" PRIx64 " %.*s\n" + "\tset time: %s current time: %s " + "diff time: %d expire time: %d\n" + "\texpected data len: %d\n" + "\texpected data: %.*s\n" + "\treceived data: \n", + c->sfd, + item->key_size, + item->key_prefix, + item->key_size - (int)KEY_PREFIX_SIZE, + orignkey, + set_time, + cur_time, + (int)(curr_time.tv_sec - item->client_time), + item->exp_time, + item->value_size, + item->value_size, + orignval); + fflush(stderr); + } + } + } + else + { + atomic_add_size(&ms_stats.vef_miss, 1); + + if (ms_setting.verbose) + { + fprintf(stderr, "\n<%d data verification failed\n" + "\tkey len: %d\n" + "\tkey: %" PRIx64 " %.*s\n" + "\texpected data len: %d\n" + "\texpected data: %.*s\n" + "\treceived data: \n", + c->sfd, item->key_size, item->key_prefix, + item->key_size - (int)KEY_PREFIX_SIZE, + orignkey, item->value_size, item->value_size, orignval); + fflush(stderr); + } + } + } +} /* ms_update_single_get_result */ + + +/** + * after get the response from server for set the function + * update the state of the task and do data verify if necessary. + * + * @param c, pointer of the concurrency + * @param item, pointer of task item which includes the object + * information + */ +static void ms_update_set_result(ms_conn_t *c, ms_task_item_t *item) +{ + if ((c == NULL) || (item == NULL)) + { + return; + } + assert(c != NULL); + assert(item != NULL); + + if (c->precmd.cmd == CMD_SET) + { + switch (c->precmd.retstat) + { + case MCD_STORED: + if (item->value_offset == INVALID_OFFSET) + { + /* first set with the same offset of key suffix */ + item->value_offset= item->key_suffix_offset; + } + else + { + /* not first set, just increase the value offset */ + item->value_offset+= 1; + } + + /* set successes, update counter */ + c->set_cursor++; + c->curr_task.set_opt++; + c->curr_task.cycle_undo_set--; + break; + + case MCD_SERVER_ERROR: + default: + break; + } /* switch */ + } +} /* ms_update_set_result */ + + +/** + * update the response time result + * + * @param c, pointer of the concurrency + */ +static void ms_update_stat_result(ms_conn_t *c) +{ + bool get_miss= false; + + if (c == NULL) + { + return; + } + assert(c != NULL); + + gettimeofday(&c->end_time, NULL); + uint64_t time_diff= (uint64_t)ms_time_diff(&c->start_time, &c->end_time); + + pthread_mutex_lock(&ms_statistic.stat_mutex); + + switch (c->precmd.cmd) + { + case CMD_SET: + ms_record_event(&ms_statistic.set_stat, time_diff, false); + break; + + case CMD_GET: + if (c->curr_task.get_miss) + { + get_miss= true; + } + ms_record_event(&ms_statistic.get_stat, time_diff, get_miss); + break; + + default: + break; + } /* switch */ + + ms_record_event(&ms_statistic.total_stat, time_diff, get_miss); + pthread_mutex_unlock(&ms_statistic.stat_mutex); +} /* ms_update_stat_result */ + + +/** + * after get response from server for the current operation, and + * before doing the next operation, update the state of the + * current operation. + * + * @param c, pointer of the concurrency + */ +static void ms_update_task_result(ms_conn_t *c) +{ + ms_task_item_t *item; + + if (c == NULL) + { + return; + } + assert(c != NULL); + + item= ms_get_cur_opt_item(c); + if (item == NULL) + { + return; + } + assert(item != NULL); + + ms_update_set_result(c, item); + + if ((ms_setting.stat_freq > 0) + && ((c->precmd.cmd == CMD_SET) || (c->precmd.cmd == CMD_GET))) + { + ms_update_stat_result(c); + } + + /* update multi-get task item */ + if (((ms_setting.mult_key_num > 1) + && (c->mlget_task.mlget_num >= ms_setting.mult_key_num)) + || ((c->remain_exec_num == 0) && (c->mlget_task.mlget_num > 0))) + { + ms_update_multi_get_result(c); + } + else + { + ms_update_single_get_result(c, item); + } +} /* ms_update_task_result */ + + +/** + * run get and set operation + * + * @param c, pointer of the concurrency + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +static int ms_run_getset_task(ms_conn_t *c) +{ + /** + * extra one loop to get the last command return state. get the + * last command return state. + */ + if ((c->remain_exec_num >= 0) + && (c->remain_exec_num != c->exec_num)) + { + ms_update_task_result(c); + } + + /* multi-get */ + if (ms_setting.mult_key_num > 1) + { + /* operate next task item */ + ms_multi_getset_task_sch(c); + } + else + { + /* operate next task item */ + ms_single_getset_task_sch(c); + } + + /* no task to do, exit */ + if ((c->remain_exec_num == -1) || ms_global.time_out) + { + return -1; + } + + return EXIT_SUCCESS; +} /* ms_run_getset_task */ + + +/** + * the state machine call the function to execute task. + * + * @param c, pointer of the concurrency + * + * @return int, if success, return EXIT_SUCCESS, else return -1 + */ +int ms_exec_task(struct conn *c) +{ + if (! ms_global.finish_warmup) + { + ms_warmup_server(c); + } + else + { + if (ms_run_getset_task(c) != 0) + { + return -1; + } + } + + return EXIT_SUCCESS; +} /* ms_exec_task */ diff --git a/clients/ms_task.h b/clients/ms_task.h new file mode 100644 index 0000000..c4917d1 --- /dev/null +++ b/clients/ms_task.h @@ -0,0 +1,94 @@ +/* + * File: ms_task.h + * Author: Mingqiang Zhuang + * + * Created on February 10, 2009 + * + * (c) Copyright 2009, Schooner Information Technology, Inc. + * http://www.schoonerinfotech.com/ + * + */ +#ifndef MS_TASK_H +#define MS_TASK_H + +#include +#include +#if !defined(__cplusplus) +# include +#endif +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define UNIT_ITEMS_COUNT 1024 /* each window unit has 1024 items */ +#define KEY_PREFIX_SIZE (sizeof(uint64_t)) /* key prefix length: 8 bytes */ +#define INVALID_OFFSET (-1) /* invalid offset in the character table */ +#define FIXED_EXPIRE_TIME 60 /* default expire time is 60s */ +#define EXPIRE_TIME_ERROR 5 /* default expire time error is 5s */ + +/* information of a task item(object) */ +typedef struct task_item +{ + uint64_t key_prefix; /* prefix of the key, 8 bytes, binary */ + int key_size; /* key size */ + int key_suffix_offset; /* suffix offset in the global character table */ + + int value_size; /* data size */ + int value_offset; /* data offset in the global character table */ + + time_t client_time; /* the current client time */ + int exp_time; /* expire time */ +} ms_task_item_t; + +/* task item for multi-get */ +typedef struct mlget_task_item +{ + ms_task_item_t *item; /* task item */ + bool verify; /* whether verify data or not */ + bool finish_verify; /* whether finish data verify or not */ + bool get_miss; /* whether get miss or not */ +} ms_mlget_task_item_t; + +/* information of multi-get task */ +typedef struct mlget_task +{ + ms_mlget_task_item_t *mlget_item; /* multi-get task array */ + int mlget_num; /* how many tasks in mlget_task array */ + int value_index; /* the nth value received by the connect, for multi-get */ +} ms_mlget_task_t; + +/* structure used to store the state of the running task */ +typedef struct task +{ + int cmd; /* command name */ + bool verify; /* whether verify data or not */ + bool finish_verify; /* whether finish data verify or not */ + bool get_miss; /* whether get miss or not */ + ms_task_item_t *item; /* task item */ + + /* counter for command distribution adjustment */ + uint64_t get_opt; /* number of total get operations */ + uint64_t set_opt; /* number of total set operations, no including warmup set count */ + int cycle_undo_get; /* number of undo get in an adjustment cycle */ + int cycle_undo_set; /* number of undo set in an adjustment cycle */ + uint64_t verified_get; /* number of total verified get operations */ + uint64_t overwrite_set; /* number of total overwrite set operations */ +} ms_task_t; + +struct conn; + +/* the state machine call the function to execute task.*/ +int ms_exec_task(struct conn *c); + + +/* calculate the difference value of two time points */ +int64_t ms_time_diff(struct timeval *start_time, struct timeval *end_time); + + +#ifdef __cplusplus +} +#endif + +#endif /* end of MS_TASK_H */ diff --git a/clients/ms_thread.c b/clients/ms_thread.c new file mode 100644 index 0000000..264cca7 --- /dev/null +++ b/clients/ms_thread.c @@ -0,0 +1,349 @@ +/* + * File: ms_thread.c + * Author: Mingqiang Zhuang + * + * Created on February 10, 2009 + * + * (c) Copyright 2009, Schooner Information Technology, Inc. + * http://www.schoonerinfotech.com/ + * + */ + +#include "mem_config.h" + +#if defined(HAVE_SYS_TIME_H) +# include +#endif + +#if defined(HAVE_TIME_H) +# include +#endif + +#include "ms_thread.h" +#include "ms_setting.h" +#include "ms_atomic.h" + +/* global variable */ +pthread_key_t ms_thread_key; + +/* array of thread context structure, each thread has a thread context structure */ +static ms_thread_ctx_t *ms_thread_ctx; + +/* functions */ +static void ms_set_current_time(void); +static void ms_check_sock_timeout(void); +static void ms_clock_handler(const int fd, const short which, void *arg); +static uint32_t ms_set_thread_cpu_affinity(uint32_t cpu); +static int ms_setup_thread(ms_thread_ctx_t *thread_ctx); +static void *ms_worker_libevent(void *arg); +static void ms_create_worker(void *(*func)(void *), void *arg); + + +/** + * time-sensitive callers can call it by hand with this, + * outside the normal ever-1-second timer + */ +static void ms_set_current_time() +{ + struct timeval timer; + ms_thread_t *ms_thread= pthread_getspecific(ms_thread_key); + + gettimeofday(&timer, NULL); + ms_thread->curr_time= (rel_time_t)timer.tv_sec; +} /* ms_set_current_time */ + + +/** + * used to check whether UDP of command are waiting timeout + * by the ever-1-second timer + */ +static void ms_check_sock_timeout(void) +{ + ms_thread_t *ms_thread= pthread_getspecific(ms_thread_key); + ms_conn_t *c= NULL; + int time_diff= 0; + + for (uint32_t i= 0; i < ms_thread->thread_ctx->nconns; i++) + { + c= &ms_thread->conn[i]; + + if (c->udp) + { + time_diff= (int)(ms_thread->curr_time - (rel_time_t)c->start_time.tv_sec); + + /* wait time out */ + if (time_diff > SOCK_WAIT_TIMEOUT) + { + /* calculate dropped packets count */ + if (c->recvpkt > 0) + { + atomic_add_size(&ms_stats.pkt_drop, c->packets - c->recvpkt); + } + + atomic_add_size(&ms_stats.udp_timeout, 1); + ms_reset_conn(c, true); + } + } + } +} /* ms_check_sock_timeout */ + + +/* if disconnect, the ever-1-second timer will call this function to reconnect */ +static void ms_reconn_thread_socks(void) +{ + ms_thread_t *ms_thread= pthread_getspecific(ms_thread_key); + for (uint32_t i= 0; i < ms_thread->thread_ctx->nconns; i++) + { + ms_reconn_socks(&ms_thread->conn[i]); + } +} /* ms_reconn_thread_socks */ + + +/** + * the handler of the ever-1-second timer + * + * @param fd, the descriptors of the socket + * @param which, event flags + * @param arg, argument + */ +static void ms_clock_handler(const int fd, const short which, void *arg) +{ + ms_thread_t *ms_thread= pthread_getspecific(ms_thread_key); + struct timeval t= + { + .tv_sec= 1, .tv_usec= 0 + }; + + UNUSED_ARGUMENT(fd); + UNUSED_ARGUMENT(which); + UNUSED_ARGUMENT(arg); + + ms_set_current_time(); + + if (ms_thread->initialized) + { + /* only delete the event if it's actually there. */ + evtimer_del(&ms_thread->clock_event); + ms_check_sock_timeout(); + } + else + { + ms_thread->initialized= true; + } + + ms_reconn_thread_socks(); + + evtimer_set(&ms_thread->clock_event, ms_clock_handler, 0); + event_base_set(ms_thread->base, &ms_thread->clock_event); + evtimer_add(&ms_thread->clock_event, &t); +} /* ms_clock_handler */ + + +/** + * used to bind thread to CPU if the system supports + * + * @param cpu, cpu index + * + * @return if success, return EXIT_SUCCESS, else return -1 + */ +static uint32_t ms_set_thread_cpu_affinity(uint32_t cpu) +{ + uint32_t ret= 0; + +#ifdef HAVE_CPU_SET_T + cpu_set_t cpu_set; + CPU_ZERO(&cpu_set); + CPU_SET(cpu, &cpu_set); + + if (sched_setaffinity(0, sizeof(cpu_set_t), &cpu_set) == -1) + { + fprintf(stderr, "WARNING: Could not set CPU Affinity, continuing...\n"); + ret= 1; + } +#else + UNUSED_ARGUMENT(cpu); +#endif + + return ret; +} /* ms_set_thread_cpu_affinity */ + + +/** + * Set up a thread's information. + * + * @param thread_ctx, pointer of the thread context structure + * + * @return if success, return EXIT_SUCCESS, else return -1 + */ +static int ms_setup_thread(ms_thread_ctx_t *thread_ctx) +{ + + ms_thread_t *ms_thread= (ms_thread_t *)calloc(sizeof(*ms_thread), 1); + pthread_setspecific(ms_thread_key, (void *)ms_thread); + + ms_thread->thread_ctx= thread_ctx; + ms_thread->nactive_conn= thread_ctx->nconns; + ms_thread->initialized= false; + static volatile uint32_t cnt= 0; + + gettimeofday(&ms_thread->startup_time, NULL); + + ms_thread->base= event_init(); + if (ms_thread->base == NULL) + { + if (atomic_add_32_nv(&cnt, 1) == 0) + { + fprintf(stderr, "Can't allocate event base.\n"); + } + + return -1; + } + + ms_thread->conn= + (ms_conn_t *)malloc((size_t)thread_ctx->nconns * sizeof(ms_conn_t)); + if (ms_thread->conn == NULL) + { + if (atomic_add_32_nv(&cnt, 1) == 0) + { + fprintf( + stderr, + "Can't allocate concurrency structure for thread descriptors."); + } + + return -1; + } + memset(ms_thread->conn, 0, (size_t)thread_ctx->nconns * sizeof(ms_conn_t)); + + for (uint32_t i= 0; i < thread_ctx->nconns; i++) + { + ms_thread->conn[i].conn_idx= i; + if (ms_setup_conn(&ms_thread->conn[i]) != 0) + { + /* only output this error once */ + if (atomic_add_32_nv(&cnt, 1) == 0) + { + fprintf(stderr, "Initializing connection failed.\n"); + } + + return -1; + } + } + + return EXIT_SUCCESS; +} /* ms_setup_thread */ + + +/** + * Worker thread: main event loop + * + * @param arg, the pointer of argument + * + * @return void* + */ +static void *ms_worker_libevent(void *arg) +{ + ms_thread_t *ms_thread= NULL; + ms_thread_ctx_t *thread_ctx= (ms_thread_ctx_t *)arg; + + /** + * If system has more than one cpu and supports set cpu + * affinity, try to bind each thread to a cpu core; + */ + if (ms_setting.ncpu > 1) + { + ms_set_thread_cpu_affinity(thread_ctx->thd_idx % ms_setting.ncpu); + } + + if (ms_setup_thread(thread_ctx) != 0) + { + exit(1); + } + + /* each thread with a timer */ + ms_clock_handler(0, 0, 0); + + pthread_mutex_lock(&ms_global.init_lock.lock); + ms_global.init_lock.count++; + pthread_cond_signal(&ms_global.init_lock.cond); + pthread_mutex_unlock(&ms_global.init_lock.lock); + + ms_thread= pthread_getspecific(ms_thread_key); + event_base_loop(ms_thread->base, 0); + + return NULL; +} /* ms_worker_libevent */ + + +/** + * Creates a worker thread. + * + * @param func, the callback function + * @param arg, the argument to pass to the callback function + */ +static void ms_create_worker(void *(*func)(void *), void *arg) +{ + pthread_t thread; + pthread_attr_t attr; + int ret; + + pthread_attr_init(&attr); + + if ((ret= pthread_create(&thread, &attr, func, arg)) != 0) + { + fprintf(stderr, "Can't create thread: %s.\n", strerror(ret)); + exit(1); + } +} /* ms_create_worker */ + + +/* initialize threads */ +void ms_thread_init() +{ + ms_thread_ctx= + (ms_thread_ctx_t *)malloc( + sizeof(ms_thread_ctx_t) * (size_t)ms_setting.nthreads); + if (ms_thread_ctx == NULL) + { + fprintf(stderr, "Can't allocate thread descriptors."); + exit(1); + } + + for (uint32_t i= 0; i < ms_setting.nthreads; i++) + { + ms_thread_ctx[i].thd_idx= i; + ms_thread_ctx[i].nconns= ms_setting.nconns / ms_setting.nthreads; + + /** + * If only one server, all the connections in all threads + * connects the same server. For support multi-servers, simple + * distribute thread to server. + */ + ms_thread_ctx[i].srv_idx= i % ms_setting.srv_cnt; + ms_thread_ctx[i].tps_perconn= ms_setting.expected_tps + / (int)ms_setting.nconns; + ms_thread_ctx[i].exec_num_perconn= ms_setting.exec_num + / ms_setting.nconns; + } + + if (pthread_key_create(&ms_thread_key, NULL)) + { + fprintf(stderr, "Can't create pthread keys. Major malfunction!\n"); + exit(1); + } + /* Create threads after we've done all the epoll setup. */ + for (uint32_t i= 0; i < ms_setting.nthreads; i++) + { + ms_create_worker(ms_worker_libevent, (void *)&ms_thread_ctx[i]); + } +} /* ms_thread_init */ + + +/* cleanup some resource of threads when all the threads exit */ +void ms_thread_cleanup() +{ + if (ms_thread_ctx != NULL) + { + free(ms_thread_ctx); + } + pthread_key_delete(ms_thread_key); +} /* ms_thread_cleanup */ diff --git a/clients/ms_thread.h b/clients/ms_thread.h new file mode 100644 index 0000000..8cb98bd --- /dev/null +++ b/clients/ms_thread.h @@ -0,0 +1,78 @@ +/* + * File: ms_thread.h + * Author: Mingqiang Zhuang + * + * Created on February 10, 2009 + * + * (c) Copyright 2009, Schooner Information Technology, Inc. + * http://www.schoonerinfotech.com/ + * + */ + +/** + * Asynchronous memslap has the similar implementation of + * multi-threads with memcached. Asynchronous memslap creates + * one or more self-governed threads; each thread is bound with + * one CPU core if the system supports setting CPU core + * affinity. And every thread has private variables. There is + * less communication or some shared resources among all the + * threads. It can improve the performance because there are + * fewer locks and competition. In addition, each thread has a + * libevent to manage the events of network. Each thread has one + * or more self-governed concurrencies; each concurrency has one + * or more socket connections. All the concurrencies don't + * communicate with each other even though they are in the same + * thread. + */ +#ifndef MS_THREAD_H +#define MS_THREAD_H + +#include +#include "ms_conn.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** Time relative to server start. Smaller than time_t on 64-bit systems. */ +typedef unsigned int rel_time_t; + +/* Used to store the context of each thread */ +typedef struct thread_ctx +{ + uint32_t thd_idx; /* the thread index */ + uint32_t nconns; /* how many connections included by the thread */ + uint32_t srv_idx; /* index of the thread */ + int tps_perconn; /* expected throughput per connection */ + int64_t exec_num_perconn; /* execute number per connection */ +} ms_thread_ctx_t; + +/* Used to store the private variables of each thread */ +typedef struct thread +{ + ms_conn_t *conn; /* conn array to store all the conn in the thread */ + uint32_t nactive_conn; /* how many connects are active */ + + ms_thread_ctx_t *thread_ctx; /* thread context from the caller */ + struct event_base *base; /* libevent handler created by this thread */ + + rel_time_t curr_time; /* current time */ + struct event clock_event; /* clock event to time each one second */ + bool initialized; /* whether clock_event has been initialized */ + + struct timeval startup_time; /* start time of the thread */ +} ms_thread_t; + +/* initialize threads */ +void ms_thread_init(void); + + +/* cleanup some resource of threads when all the threads exit */ +void ms_thread_cleanup(void); + + +#ifdef __cplusplus +} +#endif + +#endif /* end of MS_THREAD_H */ diff --git a/clients/utilities.cc b/clients/utilities.cc new file mode 100644 index 0000000..268b790 --- /dev/null +++ b/clients/utilities.cc @@ -0,0 +1,197 @@ +/* LibMemcached + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: + * + */ +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +long int timedif(struct timeval a, struct timeval b) +{ + long us, s; + + us = (int)(a.tv_usec - b.tv_usec); + us /= 1000; + s = (int)(a.tv_sec - b.tv_sec); + s *= 1000; + return s + us; +} + +void version_command(const char *command_name) +{ + printf("%s v%u.%u\n", command_name, 1U, 0U); + exit(EXIT_SUCCESS); +} + +void close_stdio(void) +{ + int fd; + if ((fd = open("/dev/null", O_RDWR, 0)) < 0) + { + return; + } + else + { + if (dup2(fd, STDIN_FILENO) < 0) + { + return; + } + + if (dup2(fd, STDOUT_FILENO) < 0) + { + return; + } + + if (dup2(fd, STDERR_FILENO) < 0) + { + return; + } + + if (fd > STDERR_FILENO) + { + close(fd); + } + } +} + + +static const char *lookup_help(memcached_options option) +{ + switch (option) + { + case OPT_SERVERS: return("List which servers you wish to connect to."); + case OPT_VERSION: return("Display the version of the application and then exit."); + case OPT_HELP: return("Display this message and then exit."); + case OPT_VERBOSE: return("Give more details on the progression of the application."); + case OPT_QUIET: return("stderr and stdin will be closed at application startup."); + case OPT_DEBUG: return("Provide output only useful for debugging."); + case OPT_FLAG: return("Provide flag information for storage operation."); + case OPT_EXPIRE: return("Set the expire option for the object."); + case OPT_SET: return("Use set command with memcached when storing."); + case OPT_REPLACE: return("Use replace command with memcached when storing."); + case OPT_ADD: return("Use add command with memcached when storing."); + case OPT_SLAP_EXECUTE_NUMBER: return("Number of times to execute the given test."); + case OPT_SLAP_INITIAL_LOAD: return("Number of key pairs to load before executing tests."); + case OPT_SLAP_TEST: return("Test to run (currently \"get\" or \"set\")."); + case OPT_SLAP_CONCURRENCY: return("Number of users to simulate with load."); + case OPT_SLAP_NON_BLOCK: return("Set TCP up to use non-blocking IO."); + case OPT_SLAP_TCP_NODELAY: return("Set TCP socket up to use nodelay."); + case OPT_FLUSH: return("Flush servers before running tests."); + case OPT_HASH: return("Select hash type."); + case OPT_BINARY: return("Switch to binary protocol."); + case OPT_ANALYZE: return("Analyze the provided servers."); + case OPT_UDP: return("Use UDP protocol when communicating with server."); + case OPT_BUFFER: return("Enable request buffering."); + case OPT_USERNAME: return "Username to use for SASL authentication"; + case OPT_PASSWD: return "Password to use for SASL authentication"; + case OPT_FILE: return "Path to file in which to save result"; + case OPT_STAT_ARGS: return "Argument for statistics"; + case OPT_SERVER_VERSION: return "Memcached daemon software version"; + default: + break; + }; + + assert(0); + return "forgot to document this function :)"; +} + +void help_command(const char *command_name, const char *description, + const struct option *long_options, + memcached_programs_help_st *options) +{ + unsigned int x; + (void)options; + + printf("%s v%u.%u\n\n", command_name, 1U, 0U); + printf("\t%s\n\n", description); + printf("Current options. A '=' means the option takes a value.\n\n"); + + for (x= 0; long_options[x].name; x++) + { + const char *help_message; + + printf("\t --%s%c\n", long_options[x].name, + long_options[x].has_arg ? '=' : ' '); + if ((help_message= lookup_help(memcached_options(long_options[x].val)))) + printf("\t\t%s\n", help_message); + } + + printf("\n"); + exit(EXIT_SUCCESS); +} + +void process_hash_option(memcached_st *memc, char *opt_hash) +{ + uint64_t set; + memcached_return_t rc; + + if (opt_hash == NULL) + { + return; + } + + set= MEMCACHED_HASH_DEFAULT; /* Just here to solve warning */ + if (!strcasecmp(opt_hash, "CRC")) + { + set= MEMCACHED_HASH_CRC; + } + else if (!strcasecmp(opt_hash, "FNV1_64")) + { + set= MEMCACHED_HASH_FNV1_64; + } + else if (!strcasecmp(opt_hash, "FNV1A_64")) + { + set= MEMCACHED_HASH_FNV1A_64; + } + else if (!strcasecmp(opt_hash, "FNV1_32")) + { + set= MEMCACHED_HASH_FNV1_32; + } + else if (!strcasecmp(opt_hash, "FNV1A_32")) + { + set= MEMCACHED_HASH_FNV1A_32; + } + else + { + fprintf(stderr, "hash: type not recognized %s\n", opt_hash); + exit(EXIT_FAILURE); + } + + rc= memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, set); + if (rc != MEMCACHED_SUCCESS) + { + fprintf(stderr, "hash: memcache error %s\n", memcached_strerror(memc, rc)); + exit(EXIT_FAILURE); + } +} + +void initialize_sockets(void) +{ + /* Define the function for all platforms to avoid #ifdefs in each program */ +#if defined(_WIN32) + WSADATA wsaData; + if (WSAStartup(MAKEWORD(2,0), &wsaData) != 0) + { + fprintf(stderr, "Socket Initialization Error. Program aborted\n"); + exit(EXIT_FAILURE); + } +#endif // #if defined(_WIN32) +} diff --git a/clients/utilities.h b/clients/utilities.h new file mode 100644 index 0000000..a9f199d --- /dev/null +++ b/clients/utilities.h @@ -0,0 +1,62 @@ +/* LibMemcached + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: + * + */ + +#pragma once + +#include +#include +#include "clients/client_options.h" + +#if defined(HAVE_SYS_TIME_H) +# include +#endif + +#if defined(HAVE_TIME_H) +# include +#endif + + +#ifdef __sun + /* For some odd reason the option struct on solaris defines the argument + * as char* and not const char* + */ +#define OPTIONSTRING char* +#else +#define OPTIONSTRING const char* +#endif + +typedef struct memcached_programs_help_st memcached_programs_help_st; + +struct memcached_programs_help_st +{ + char *not_used_yet; +}; + +#ifdef __cplusplus +extern "C" { +#endif + +char *strdup_cleanup(const char *str); +void cleanup(void); +long int timedif(struct timeval a, struct timeval b); +void version_command(const char *command_name) __attribute__ ((noreturn)); +void help_command(const char *command_name, const char *description, + const struct option *long_options, + memcached_programs_help_st *options) __attribute__ ((noreturn)); +void process_hash_option(memcached_st *memc, char *opt_hash); +bool initialize_sasl(memcached_st *memc, char *user, char *password); +void shutdown_sasl(void); +void initialize_sockets(void); +void close_stdio(void); + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/configure b/configure new file mode 100755 index 0000000..c4c72cc --- /dev/null +++ b/configure @@ -0,0 +1,39495 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.69 for libmemcached 1.0.18. +# +# 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://libmemcached.org/ about your system, including +$0: any error possibly output before this message. Then +$0: install a modern shell, or manually run the script +$0: 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='libmemcached' +PACKAGE_TARNAME='libmemcached' +PACKAGE_VERSION='1.0.18' +PACKAGE_STRING='libmemcached 1.0.18' +PACKAGE_BUGREPORT='http://libmemcached.org/' +PACKAGE_URL='' + +# 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_unique_file="libmemcached/memcached.cc" +ac_header_list= +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS +HAVE_VISIBILITY +CFLAG_VISIBILITY +CXX_VERSION +CXX_VERSION_VENDOR +CC_VERSION +CC_VERSION_VENDOR +DTRACE_NEEDS_OBJECTS_FALSE +DTRACE_NEEDS_OBJECTS_TRUE +HAVE_DTRACE_FALSE +HAVE_DTRACE_TRUE +DTRACEFLAGS +DTRACE +SHARED_ENABLED_FALSE +SHARED_ENABLED_TRUE +LIBMEMCACHED_WITH_SASL_SUPPORT +HAVE_SASL_FALSE +HAVE_SASL_TRUE +SASL_LIB +LIBSASL_LDFLAGS +LIBSASL_CPPFLAGS +PTHREAD_CFLAGS +PTHREAD_LIBS +PTHREAD_CC +ax_pthread_config +HAVE_LIBUUID_FALSE +HAVE_LIBUUID_TRUE +LIBUUID_LIB +BUILD_WIN32_WRAPPERS_FALSE +BUILD_WIN32_WRAPPERS_TRUE +BUILD_POLL_FALSE +BUILD_POLL_TRUE +RT_LIB +HAVE_LIBEVENT_FALSE +HAVE_LIBEVENT_TRUE +LIBEVENT_LIB +BUILD_CACHE_FALSE +BUILD_CACHE_TRUE +LIBOBJS +ALLOCA +LCOV_GENHTML +LCOV +SPHINXBUILD +MEMCACHED_BINARY +RPM +RPMDEV_SETUPTREE +RPMBUILD +YACC +WINE +VALGRIND +PERL +LEX +DPKG_GENSYMBOLS +DEPRECATED +BUILD_MEMASLAP_FALSE +BUILD_MEMASLAP_TRUE +INCLUDE_MURMUR_SRC_FALSE +INCLUDE_MURMUR_SRC_TRUE +INCLUDE_HSIEH_SRC_FALSE +INCLUDE_HSIEH_SRC_TRUE +BUILD_BYTEORDER_FALSE +BUILD_BYTEORDER_TRUE +BUILDING_GEARMAN_FALSE +BUILDING_GEARMAN_TRUE +HAVE_LIBDRIZZLE_FALSE +HAVE_LIBDRIZZLE_TRUE +HAVE_LIBMEMCACHED_FALSE +HAVE_LIBMEMCACHED_TRUE +BUILDING_LIBMEMCACHED_FALSE +BUILDING_LIBMEMCACHED_TRUE +LIBGEARMAN_LDFLAGS +LIBGEARMAN_CPPFLAGS +GEARMAND_BINARY +HAVE_LIBMYSQL_FALSE +HAVE_LIBMYSQL_TRUE +MYSQL_LDFLAGS +MYSQL_CFLAGS +MYSQL_INCLUDE +MYSQL_VERSION +MYSQL_CONFIG +MYSQLD +LIBTEST_VERSION +BUILD_LIBMEMCACHED_PROTOCOL_FALSE +BUILD_LIBMEMCACHED_PROTOCOL_TRUE +HOST_FREEBSD_FALSE +HOST_FREEBSD_TRUE +HOST_LINUX_FALSE +HOST_LINUX_TRUE +HOST_OSX_FALSE +HOST_OSX_TRUE +BUILD_WIN32_FALSE +BUILD_WIN32_TRUE +IS_VCS_CHECKOUT_FALSE +IS_VCS_CHECKOUT_TRUE +DEBUG_FALSE +DEBUG_TRUE +MCHECK +INC_AMINCLUDE +AMINCLUDE +MCHECK_LDFLAGS +MCHECK_CPPFLAGS +lt_cv_dlopen_libs +LIBM +CXXCPP +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +MANIFEST_TOOL +RANLIB +ac_ct_AR +AR +DLLTOOL +OBJDUMP +LN_S +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +SED +LIBTOOL +HASHKIT_LIBRARY_VERSION +RPM_RELEASE +LIBHASHKIT_VERSION_HEX +LIBHASHKIT_VERSION_STRING +LIBMEMCACHED_VERSION_HEX +LIBMEMCACHED_VERSION_STRING +MEMCACHED_LIBRARY_VERSION +MEMCACHED_PROTOCAL_LIBRARY_VERSION +MEMCACHED_UTIL_LIBRARY_VERSION +AUTOHEADER_FILE +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V +am__fastdepCXX_FALSE +am__fastdepCXX_TRUE +CXXDEPMODE +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +am__nodep +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +EGREP +GREP +CPP +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +ac_ct_CXX +CXXFLAGS +CXX +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +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 +enable_dependency_tracking +enable_silent_rules +enable_shared +enable_static +with_pic +enable_fast_install +with_gnu_ld +with_sysroot +enable_libtool_lock +enable_debug +enable_assert +enable_libmemcachedprotocol +with_mysql +with_gearmand +enable_hsieh_hash +enable_murmur_hash +enable_fnv64_hash +enable_memaslap +enable_deprecated +with_memcached +with_sphinx_build +with_lcov +with_genhtml +enable_sasl +enable_dtrace +with_sanitize +enable_jobserver +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CXX +CXXFLAGS +CCC +CPP +CXXCPP +MCHECK_CPPFLAGS +MCHECK_LDFLAGS +MYSQL_CONFIG +GEARMAND_BINARY +LIBGEARMAN_CPPFLAGS +LIBGEARMAN_LDFLAGS +MEMCACHED_BINARY +SPHINXBUILD +LCOV +LCOV_GENHTML +LIBSASL_CPPFLAGS +LIBSASL_LDFLAGS' + + +# 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 libmemcached 1.0.18 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/libmemcached] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of libmemcached 1.0.18:";; + 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-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") + --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-debug Add debug code/turns off optimizations (yes|no) + [default=no] + --enable-assert Enable assert, this will be overridden by + --enable-debug (yes|no) [default=no] + --enable-libmemcachedprotocol + Enable libmemcachedprotocol + --enable-hsieh_hash build with support for hsieh hashing. [default=off] + --disable-murmur_hash build with support for murmur hashing. [default=on] + --disable-fnv64_hash build with support for fnv64 hashing. [default=on] + --enable-memaslap build with memaslap tool. [default=off] + --enable-deprecated Enable deprecated interface [default=off] + --disable-sasl Build with sasl support [default=on] + --enable-dtrace Build with support for the DTRACE. [default=no] + --enable-jobserver[=no/yes/#] default=yes + Enable up to # make jobs + yes: enable one more than CPU count + + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use + both] + --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-mysql=[ARG] use MySQL client library [default=yes], optionally + specify path to mysql_config + --with-gearmand=[PATH] + absolute path to gearmand executable + --with-memcached=[PATH] + absolute path to memcached executable + --with-sphinx-build=[PATH] + absolute path to sphinx-build executable + --with-lcov=[PATH] absolute path to lcov executable + --with-genhtml=[PATH] absolute path to genhtml executable + --with-sanitize Enable sanitize flag for compiler if it supports + them [default=no] + +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 + CXXCPP C++ preprocessor + MCHECK_CPPFLAGS + C preprocessor flags for MCHECK headers + MCHECK_LDFLAGS + linker flags for MCHECK libraries + MYSQL_CONFIG + Full path to mysql_config program + GEARMAND_BINARY + Absolute path to gearmand executable + LIBGEARMAN_CPPFLAGS + C preprocessor flags for LIBGEARMAN headers + LIBGEARMAN_LDFLAGS + linker flags for LIBGEARMAN libraries + MEMCACHED_BINARY + Absolute path to memcached executable + SPHINXBUILD Absolute path to sphinx-build executable + LCOV Absolute path to lcov executable + LCOV_GENHTML + Absolute path to genhtml executable + LIBSASL_CPPFLAGS + C preprocessor flags for LIBSASL headers + LIBSASL_LDFLAGS + linker flags for LIBSASL libraries + +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 +libmemcached configure 1.0.18 +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_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_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://libmemcached.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_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_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_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_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 + +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. +ac_fn_c_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_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_decl + +# ac_fn_c_find_intX_t LINENO BITS VAR +# ----------------------------------- +# Finds a signed integer type with width BITS, setting cache variable VAR +# accordingly. +ac_fn_c_find_intX_t () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5 +$as_echo_n "checking for int$2_t... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + # Order is important - never check a type that is potentially smaller + # than half of the expected target width. + for ac_type in int$2_t 'int' 'long int' \ + 'long long int' 'short int' 'signed char'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default + enum { N = $2 / 2 - 1 }; +int +main () +{ +static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default + enum { N = $2 / 2 - 1 }; +int +main () +{ +static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1) + < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + case $ac_type in #( + int$2_t) : + eval "$3=yes" ;; #( + *) : + eval "$3=\$ac_type" ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if eval test \"x\$"$3"\" = x"no"; then : + +else + break +fi + done +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_find_intX_t + +# ac_fn_c_find_uintX_t LINENO BITS VAR +# ------------------------------------ +# Finds an unsigned integer type with width BITS, setting cache variable VAR +# accordingly. +ac_fn_c_find_uintX_t () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 +$as_echo_n "checking for uint$2_t... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + # Order is important - never check a type that is potentially smaller + # than half of the expected target width. + for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \ + 'unsigned long long int' 'unsigned short int' 'unsigned char'; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + case $ac_type in #( + uint$2_t) : + eval "$3=yes" ;; #( + *) : + eval "$3=\$ac_type" ;; +esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if eval test \"x\$"$3"\" = x"no"; then : + +else + break +fi + done +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_find_uintX_t + +# ac_fn_cxx_try_run LINENO +# ------------------------ +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_cxx_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_cxx_try_run +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 libmemcached $as_me 1.0.18, 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 + +as_fn_append ac_header_list " arpa/inet.h" +as_fn_append ac_header_list " errno.h" +as_fn_append ac_header_list " execinfo.h" +as_fn_append ac_header_list " fcntl.h" +as_fn_append ac_header_list " features.h" +as_fn_append ac_header_list " fnmatch.h" +as_fn_append ac_header_list " inttypes.h" +as_fn_append ac_header_list " libintl.h" +as_fn_append ac_header_list " limits.h" +as_fn_append ac_header_list " mach/mach.h" +as_fn_append ac_header_list " malloc.h" +as_fn_append ac_header_list " math.h" +as_fn_append ac_header_list " netdb.h" +as_fn_append ac_header_list " netinet/in.h" +as_fn_append ac_header_list " netinet/tcp.h" +as_fn_append ac_header_list " poll.h" +as_fn_append ac_header_list " pthread.h" +as_fn_append ac_header_list " spawn.h" +as_fn_append ac_header_list " stdarg.h" +as_fn_append ac_header_list " stddef.h" +as_fn_append ac_header_list " stdio.h" +as_fn_append ac_header_list " stdlib.h" +as_fn_append ac_header_list " sys/socket.h" +as_fn_append ac_header_list " sys/sysctl.h" +as_fn_append ac_header_list " sys/time.h" +as_fn_append ac_header_list " sys/types.h" +as_fn_append ac_header_list " sys/un.h" +as_fn_append ac_header_list " sys/wait.h" +as_fn_append ac_header_list " syslog.h" +as_fn_append ac_header_list " time.h" +as_fn_append ac_header_list " unistd.h" +as_fn_append ac_header_list " winsock2.h" +as_fn_append ac_header_list " ws2tcpip.h" +# 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 + + + +# Setup the compilers early on +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 -n "$ac_tool_prefix"; then + for ac_prog in cc gcc clang + 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 cc gcc clang +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 + + +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 + +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 c++ g++ clang++ + 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 c++ g++ clang++ +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 + + +ac_aux_dir= +for ac_dir in build-aux "$srcdir"/build-aux; 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-aux \"$srcdir\"/build-aux" "$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. + + + + +# 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 + + +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_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 +{ $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 + + +{ $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 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 + + + + ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" +if test "x$ac_cv_header_minix_config_h" = xyes; then : + MINIX=yes +else + MINIX= +fi + + + if test "$MINIX" = yes; then + +$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h + + +$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h + + +$as_echo "#define _MINIX 1" >>confdefs.h + + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 +$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } +if ${ac_cv_safe_to_define___extensions__+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +# define __EXTENSIONS__ 1 + $ac_includes_default +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_safe_to_define___extensions__=yes +else + ac_cv_safe_to_define___extensions__=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 +$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } + test $ac_cv_safe_to_define___extensions__ = yes && + $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h + + $as_echo "#define _ALL_SOURCE 1" >>confdefs.h + + $as_echo "#define _GNU_SOURCE 1" >>confdefs.h + + $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h + + $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h + + + +am__api_version='1.13' + +# 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' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + 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 + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P 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. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +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 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='libmemcached' + VERSION='1.0.18' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar plaintar pax cpio none' + +# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5 +$as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; } + if test $am_uid -le $am_max_uid; 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; } + _am_tools=none + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5 +$as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; } + if test $am_gid -le $am_max_gid; 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; } + _am_tools=none + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 +$as_echo_n "checking how to create a ustar tar archive... " >&6; } + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_ustar-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + { echo "$as_me:$LINENO: $_am_tar --version" >&5 + ($_am_tar --version) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && break + done + am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x ustar -w "$$tardir"' + am__tar_='pax -L -x ustar -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H ustar -L' + am__tar_='find "$tardir" -print | cpio -o -H ustar -L' + am__untar='cpio -i -H ustar -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_ustar}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 + (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + rm -rf conftest.dir + if test -s conftest.tar; then + { echo "$as_me:$LINENO: $am__untar &5 + ($am__untar &5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 + (cat conftest.dir/file) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break + fi + done + rm -rf conftest.dir + + if ${am_cv_prog_tar_ustar+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_prog_tar_ustar=$_am_tool +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 +$as_echo "$am_cv_prog_tar_ustar" >&6; } + + + + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + +depcc="$CXX" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CXX_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + + + +ac_config_headers="$ac_config_headers mem_config.h:mem_config.in" +AUTOHEADER_FILE=mem_config.h + + + +#shared library versioning +MEMCACHED_UTIL_LIBRARY_VERSION=2:0:0 +MEMCACHED_PROTOCAL_LIBRARY_VERSION=0:0:0 +MEMCACHED_LIBRARY_VERSION=11:0:0 +# | | | +# +------+ | +---+ +# | | | +# current:revision:age +# | | | +# | | +- increment if interfaces have been added +# | | set to zero if interfaces have been removed or changed +# | +- increment if source code has changed +# | set to zero if current is incremented +# +- increment if interfaces have been added, removed or changed + + + + + + string_version_LIBMEMCACHED=`echo $VERSION | sed 's|\-a-z0-9*$||' | awk -F. '{printf "%d.%d.%d", $1, $2, $3}'` + hex_version_LIBMEMCACHED=`echo $VERSION | sed 's|\-a-z0-9*$||' | awk -F. '{printf "0x%0.2d%0.3d%0.3d", $1, $2, $3}'` + + LIBMEMCACHED_VERSION_STRING="$string_version_LIBMEMCACHED" + + LIBMEMCACHED_VERSION_HEX="$hex_version_LIBMEMCACHED" + + + + string_version_LIBHASHKIT=`echo 1.0.0 | sed 's|\-a-z0-9*$||' | awk -F. '{printf "%d.%d.%d", $1, $2, $3}'` + hex_version_LIBHASHKIT=`echo 1.0.0 | sed 's|\-a-z0-9*$||' | awk -F. '{printf "0x%0.2d%0.3d%0.3d", $1, $2, $3}'` + + LIBHASHKIT_VERSION_STRING="$string_version_LIBHASHKIT" + + LIBHASHKIT_VERSION_HEX="$hex_version_LIBHASHKIT" + + +RPM_RELEASE=1 + + + +HASHKIT_LIBRARY_VERSION=2:0:0 + + +ac_config_files="$ac_config_files libhashkit/hashkitcon.h" + +ac_config_files="$ac_config_files libhashkit-1.0/configure.h" + + + + +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.2' +macro_revision='1.3337' + + + + + + + + + + + + + +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 "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; 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 "$with_gnu_ld" = yes; 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 + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + 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 "$lt_cv_path_NM" != "no"; 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 /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + 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; } + +{ $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 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; + ;; + + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) + # 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"; 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 $i != 17 # 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"} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } + + +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 "$GCC" != yes; then + reload_cmds=false + fi + ;; + darwin*) + if test "$GCC" = yes; 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 +# which 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. + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && 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 + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +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) + 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*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; 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 + ;; +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 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 "$ac_status" -eq 0; 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 "$ac_status" -ne 0; 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 "x$lt_cv_ar_at_file" = xno; 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 + 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# 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 "$host_cpu" = ia64; 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 + +# 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 -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$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 -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" + +# 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 + # and D for any global 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};"\ +" \$ 0!~/External *\|/{next};"\ +" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ +" {if(hide[section]) next};"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print 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 con'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* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$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 "$pipe_works" = yes; 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 "$GCC" = yes; 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; } + + + + + +# Check whether --enable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then : + enableval=$enable_libtool_lock; +fi + +test "x$enable_libtool_lock" != xno && 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 which ABI we are using. + 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 which ABI we are using. + 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 "$lt_cv_prog_gnu_ld" = yes; 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* + ;; + +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ +s390*-*linux*|s390*-*tpf*|sparc*-*linux*) + # Find out which ABI we are using. + 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*) + LD="${LD-ld} -m elf_i386" + ;; + 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 x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +*-*solaris*) + # Find out which ABI we are using. + 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*) + 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 "x$lt_cv_path_mainfest_tool" != xyes; 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 $_lt_result -eq 0; 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 $_lt_result -eq 0 && $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 "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; 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 "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + 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=yes + + + + + 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 + + +test -z "$pic_mode" && pic_mode=default + + + + + + + + # 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 + + + + + + + + + + + +# 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 "X${COLLECT_NAMES+set}" != Xset; 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 + +for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` + + +# 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 "$GCC" = yes; 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" + # 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 x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; 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 "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + 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' + ;; + + 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 "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + 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' + ;; + + 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) + 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' + ;; + 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 which 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" + # 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 x"$lt_cv_prog_compiler_pic_works" = xyes; 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 x"$lt_cv_prog_compiler_static_works" = xyes; 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 "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; 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 "$hard_links" = no; 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 "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + interix*) + # we just hope/assume this is gcc and not c89 (= MSVC++) + with_gnu_ld=yes + ;; + openbsd*) + 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 "$with_gnu_ld" = yes; 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 "$lt_use_gnu_ld_interface" = yes; 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 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 "$host_cpu" != ia64; 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 (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; 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 + ;; + + 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 "$host_os" = linux-dietlibc; 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 "$tmp_diet" = no + 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' ;; + 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 "x$supports_anon_versioning" = xyes; 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 + 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 "x$supports_anon_versioning" = xyes; 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 can not +*** 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 "$ld_shlibs" = no; 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 "$GCC" = yes && 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 "$host_cpu" = ia64; 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 AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". + 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) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + 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 + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + ;; + 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,' + + if test "$GCC" = yes; 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 "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; 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 "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + 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_use_runtimelinking" = yes; 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 "${lt_cv_aix_libpath+set}" = 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 "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; 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 "${lt_cv_aix_libpath+set}" = 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 "$with_gnu_ld" = yes; 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 + # This is similar to how AIX traditionally builds its shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + 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~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $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 "$lt_cv_ld_force_load" = "yes"; 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*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; 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 "$GCC" = yes; 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 $output_objdir/$soname = $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 $output_objdir/$soname = $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 "$GCC" = yes && test "$with_gnu_ld" = no; 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 "$with_gnu_ld" = no; 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 "$GCC" = yes && test "$with_gnu_ld" = no; 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 x"$lt_cv_prog_compiler__b" = xyes; 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 "$with_gnu_ld" = no; 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 "$GCC" = yes; 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 "$lt_cv_irix_exported_symbol" = yes; 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 + ;; + + 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*) + 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__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; 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 + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + else + ld_shlibs=no + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; 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 "$GCC" = yes; 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 "$GCC" = yes; 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 "$GCC" = yes; 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 "x$host_vendor" = xsequent; 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 "$GCC" = yes; 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 can NOT 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 "$GCC" = yes; 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 x$host_vendor = xsni; 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 "$ld_shlibs" = no && 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 "$enable_shared" = yes && test "$GCC" = yes; 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 "$GCC" = yes; 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` + 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" + else + 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 "$host_cpu" = ia64; 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 + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # 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}' + else + # 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' + fi + 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%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + 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} $libname${shared_ext}' + 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 + ;; + +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' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +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=yes + 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 "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + 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 "$lt_cv_prog_gnu_ld" = yes; 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 + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-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 + + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + + # Append ld.so.conf contents 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="$sys_lib_dlsearch_path_spec $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*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + 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 + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +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 "$with_gnu_ld" = yes; 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=freebsd-elf + 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 "$with_gnu_ld" = yes; 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 "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $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 "X$hardcode_automatic" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct" != no && + # 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 "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; 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 "$hardcode_action" = relink || + test "$inherit_rpath" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + + + + + + + if test "x$enable_dlopen" != xyes; 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 + + ;; + + *) + 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 "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && 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 "$cross_compiling" = yes; 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 -fvisbility=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 "x$lt_cv_dlopen_self" = xyes; 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 "$cross_compiling" = yes; 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 -fvisbility=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 which 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 "$can_build_shared" = "no" && 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 "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + + aix[4-9]*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + 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 "$enable_shared" = yes || 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 "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; 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 "$_lt_caught_CXX_error" != yes; 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 + for cc_temp in $compiler""; do + case $cc_temp in + compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; + distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; + \-*) ;; + *) break;; + esac +done +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` + + + if test -n "$compiler"; then + # We don't want -fno-exception when compiling C++ code, so set the + # no_builtin_flag separately + if test "$GXX" = yes; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' + else + lt_prog_compiler_no_builtin_flag_CXX= + fi + + if test "$GXX" = yes; 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 "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + +ac_prog=ld +if test "$GCC" = yes; 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 "$with_gnu_ld" = yes; 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 "$with_gnu_ld" = yes; 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 "$host_cpu" = ia64; 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 + # need to do runtime linking. + 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 + ;; + 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,' + + if test "$GXX" = yes; 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 "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi + else + # not using gcc + if test "$host_cpu" = ia64; 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 "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + 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_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty + # executable. + if test "${lt_cv_aix_libpath+set}" = 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 "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; 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 "${lt_cv_aix_libpath+set}" = 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 "$with_gnu_ld" = yes; 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 + # This is similar to how AIX traditionally builds its shared + # libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + 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~linknames=' + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $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 (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; 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 "$lt_cv_ld_force_load" = "yes"; 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*) _lt_dar_can_shared=yes ;; + *) _lt_dar_can_shared=$GCC ;; + esac + if test "$_lt_dar_can_shared" = "yes"; 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 "$lt_cv_apple_cc_single_mod" != "yes"; 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 + + ;; + + 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 + ;; + + gnu*) + ;; + + 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 $output_objdir/$soname = $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 "$GXX" = yes; 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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + + hpux10*|hpux11*) + if test $with_gnu_ld = no; 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 "$GXX" = yes; then + if test $with_gnu_ld = no; 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 "$GXX" = yes; then + if test "$with_gnu_ld" = no; 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) + 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 "x$supports_anon_versioning" = xyes; 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 + ;; + + openbsd2*) + # C++ shared libraries are fairly broken + ld_shlibs_CXX=no + ;; + + openbsd*) + 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__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; 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 "$GXX" = yes && test "$with_gnu_ld" = no; 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 "$GXX" = yes && test "$with_gnu_ld" = no; 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 $LDFLAGS $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 -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 $LDFLAGS $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 -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 can NOT 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 "$ld_shlibs_CXX" = no && 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 $p = "-L" || + test $p = "-R"; 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 "$pre_test_object_deps_done" = no; 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 "$pre_test_object_deps_done" = no; 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= + ;; + +linux*) + case `$CC -V 2>&1 | sed 5q` in + *Sun\ C*) + # Sun C++ 5.9 + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; + +solaris*) + case $cc_basename in + CC* | sunCC*) + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + # Adding this requires a known-good setup of shared libraries for + # Sun compiler versions before 5.6, else PIC objects from an old + # archive will be linked into the output, leading to subtle bugs. + if test "$solaris_use_stlport4" != yes; then + postdeps_CXX='-library=Cstd -library=Crun' + fi + ;; + esac + ;; +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 "$GXX" = yes; 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 "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi + ;; + + 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' + ;; + 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 "$host_cpu" = ia64; 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 "$host_cpu" != ia64; 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) + 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 which 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" + # 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 x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; 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 x"$lt_cv_prog_compiler_static_works_CXX" = xyes; 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 "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; 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 "$hard_links" = no; 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 AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". + 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) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | 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 "$ld_shlibs_CXX" = no && 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 "$enable_shared" = yes && test "$GCC" = yes; 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 "$host_cpu" = ia64; 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 + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # 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}' + else + # 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' + fi + 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%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + 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} $libname${shared_ext}' + 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 + ;; + +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' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +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=yes + 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 "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + 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 "$lt_cv_prog_gnu_ld" = yes; 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 + ;; + +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-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 + + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + + # Append ld.so.conf contents 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="$sys_lib_dlsearch_path_spec $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*) + version_type=sunos + sys_lib_dlsearch_path_spec="/usr/lib" + need_lib_prefix=no + # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. + case $host_os in + openbsd3.3 | openbsd3.3.*) need_version=yes ;; + *) need_version=no ;; + esac + 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 + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext_cmds=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +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 "$with_gnu_ld" = yes; 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=freebsd-elf + 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 "$with_gnu_ld" = yes; 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 "$dynamic_linker" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then + sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" +fi +if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then + sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { $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 "X$hardcode_automatic_CXX" = "Xyes" ; then + + # We can hardcode non-existent directories. + if test "$hardcode_direct_CXX" != no && + # 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 "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; 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 "$hardcode_action_CXX" = relink || + test "$inherit_rpath_CXX" = yes; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; 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 "$_lt_caught_CXX_error" != yes + +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: + + + +LIBM= +case $host in +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5 +$as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; } +if ${ac_cv_lib_mw__mwvalidcheckl+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmw $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 _mwvalidcheckl (); +int +main () +{ +return _mwvalidcheckl (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mw__mwvalidcheckl=yes +else + ac_cv_lib_mw__mwvalidcheckl=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_mw__mwvalidcheckl" >&5 +$as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; } +if test "x$ac_cv_lib_mw__mwvalidcheckl" = xyes; then : + LIBM="-lmw" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 +$as_echo_n "checking for cos in -lm... " >&6; } +if ${ac_cv_lib_m_cos+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $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 cos (); +int +main () +{ +return cos (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_cos=yes +else + ac_cv_lib_m_cos=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_m_cos" >&5 +$as_echo "$ac_cv_lib_m_cos" >&6; } +if test "x$ac_cv_lib_m_cos" = xyes; then : + LIBM="$LIBM -lm" +fi + + ;; +*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 +$as_echo_n "checking for cos in -lm... " >&6; } +if ${ac_cv_lib_m_cos+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $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 cos (); +int +main () +{ +return cos (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_cos=yes +else + ac_cv_lib_m_cos=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_m_cos" >&5 +$as_echo "$ac_cv_lib_m_cos" >&6; } +if test "x$ac_cv_lib_m_cos" = xyes; then : + LIBM="-lm" +fi + + ;; +esac + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 +$as_echo_n "checking for $CC option to accept ISO C99... " >&6; } +if ${ac_cv_prog_cc_c99+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +#include + +// Check varargs macros. These examples are taken from C99 6.10.3.5. +#define debug(...) fprintf (stderr, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} + +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + your preprocessor is broken; +#endif +#if BIG_OK +#else + your preprocessor is broken; +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; + +struct incomplete_array +{ + int datasize; + double data[]; +}; + +struct named_init { + int number; + const wchar_t *name; + double average; +}; + +typedef const char *ccp; + +static inline int +test_restrict (ccp restrict text) +{ + // See if C++-style comments work. + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\0'; ++i) + continue; + return 0; +} + +// Check varargs and va_copy. +static void +test_varargs (const char *format, ...) +{ + va_list args; + va_start (args, format); + va_list args_copy; + va_copy (args_copy, args); + + const char *str; + int number; + float fnumber; + + while (*format) + { + switch (*format++) + { + case 's': // string + str = va_arg (args_copy, const char *); + break; + case 'd': // int + number = va_arg (args_copy, int); + break; + case 'f': // float + fnumber = va_arg (args_copy, double); + break; + default: + break; + } + } + va_end (args_copy); + va_end (args); +} + +int +main () +{ + + // Check bool. + _Bool success = false; + + // Check restrict. + if (test_restrict ("String literal") == 0) + success = true; + char *restrict newvar = "Another string"; + + // Check varargs. + test_varargs ("s, d' f .", "string", 65, 34.234); + test_varargs_macros (); + + // Check flexible array members. + struct incomplete_array *ia = + malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); + ia->datasize = 10; + for (int i = 0; i < ia->datasize; ++i) + ia->data[i] = i * 1.234; + + // Check named initializers. + struct named_init ni = { + .number = 34, + .name = L"Test wide string", + .average = 543.34343, + }; + + ni.number = 58; + + int dynamic_array[ni.number]; + dynamic_array[ni.number - 1] = 543; + + // work around unused variable warnings + return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' + || dynamic_array[ni.number - 1] != 543); + + ; + return 0; +} +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c99" 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_c99" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +$as_echo "$ac_cv_prog_cc_c99" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c99" != xno; then : + +fi + + +if test "x${ac_cv_prog_cc_c99}" == "xno"; then : + as_fn_error $? "No c99 compatible compiler found" "$LINENO" 5 +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 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -std=c++0x" >&5 +$as_echo_n "checking whether C++ compiler accepts -std=c++0x... " >&6; } +if ${ax_cv_check_cxxflags___std_cpp0x+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -std=c++0x" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ax_cv_check_cxxflags___std_cpp0x=yes +else + ax_cv_check_cxxflags___std_cpp0x=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cxxflags___std_cpp0x" >&5 +$as_echo "$ax_cv_check_cxxflags___std_cpp0x" >&6; } +if test x"$ax_cv_check_cxxflags___std_cpp0x" = xyes; then : + + CXX="$CXX -std=c++0x" +else + : +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 + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts " >&5 +$as_echo_n "checking whether the linker accepts ... " >&6; } +if ${ax_cv_check_ldflags__+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS " + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_check_ldflags__=yes +else + ax_cv_check_ldflags__=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags__" >&5 +$as_echo "$ax_cv_check_ldflags__" >&6; } +if test x"$ax_cv_check_ldflags__" = xyes; then : + : +else + : +fi + +if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains "; } >&5 + (: CFLAGS already contains ) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \""; } >&5 + (: CFLAGS="$CFLAGS ") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS " + ;; + esac +else + CFLAGS="" +fi + + +AX_DOLLAR="\$" +AX_SRB="\\135" +AX_SLB="\\133" +AX_BS="\\\\" +AX_DQ="\"" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: adding automake macro support" >&5 +$as_echo "$as_me: adding automake macro support" >&6;} +AMINCLUDE="aminclude.am" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $AMINCLUDE" >&5 +$as_echo "$as_me: creating $AMINCLUDE" >&6;} +AMINCLUDE_TIME=`date` + + +printf " +# generated automatically by configure from AX_AUTOMAKE_MACROS +# on $AMINCLUDE_TIME + +" > "$AMINCLUDE" + + +INC_AMINCLUDE="include \$(top_builddir)/$AMINCLUDE" + + + # Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then : + enableval=$enable_debug; ax_enable_debug=yes + +$as_echo "#define DEBUG 1" >>confdefs.h + + + + + if ${ax_cv_have_MCHECK+:} false; then : + $as_echo_n "(cached) " >&6 +else + + + CCASFLAGS__ax_save_flags=$CCASFLAGS + + + + CFLAGS__ax_save_flags=$CFLAGS + + + + CPPFLAGS__ax_save_flags=$CPPFLAGS + + + + CXXFLAGS__ax_save_flags=$CXXFLAGS + + + + ERLCFLAGS__ax_save_flags=$ERLCFLAGS + + + + FCFLAGS__ax_save_flags=$FCFLAGS + + + + FCLIBS__ax_save_flags=$FCLIBS + + + + FFLAGS__ax_save_flags=$FFLAGS + + + + FLIBS__ax_save_flags=$FLIBS + + + + GCJFLAGS__ax_save_flags=$GCJFLAGS + + + + JAVACFLAGS__ax_save_flags=$JAVACFLAGS + + + + LDFLAGS__ax_save_flags=$LDFLAGS + + + + LIBS__ax_save_flags=$LIBS + + + + OBJCFLAGS__ax_save_flags=$OBJCFLAGS + + + + OBJCXXFLAGS__ax_save_flags=$OBJCXXFLAGS + + + + UPCFLAGS__ax_save_flags=$UPCFLAGS + + + + VALAFLAGS__ax_save_flags=$VALAFLAGS + + + + + if test "x$MCHECK_CPPFLAGS" != "x"; then : + CPPFLAGS="$CPPFLAGS $MCHECK_CPPFLAGS" +fi + + if test "x$MCHECK_LDFLAGS" != "x"; then : + LDFLAGS="$LDFLAGS $MCHECK_LDFLAGS" +fi + + ac_fn_c_check_header_mongrel "$LINENO" "mcheck.h" "ac_cv_header_mcheck_h" "$ac_includes_default" +if test "x$ac_cv_header_mcheck_h" = xyes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5 +$as_echo_n "checking for main in -lmcheck... " >&6; } +if ${ac_cv_lib_mcheck_main+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmcheck $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mcheck_main=yes +else + ac_cv_lib_mcheck_main=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_mcheck_main" >&5 +$as_echo "$ac_cv_lib_mcheck_main" >&6; } +if test "x$ac_cv_lib_mcheck_main" = xyes; then : + ax_cv_have_MCHECK=yes +else + ax_cv_have_MCHECK=no +fi + + +else + ax_cv_have_MCHECK=no +fi + + + + + CCASFLAGS=$CCASFLAGS__ax_save_flags + + + CFLAGS=$CFLAGS__ax_save_flags + + + CPPFLAGS=$CPPFLAGS__ax_save_flags + + + CXXFLAGS=$CXXFLAGS__ax_save_flags + + + ERLCFLAGS=$ERLCFLAGS__ax_save_flags + + + FCFLAGS=$FCFLAGS__ax_save_flags + + + FCLIBS=$FCLIBS__ax_save_flags + + + FFLAGS=$FFLAGS__ax_save_flags + + + FLIBS=$FLIBS__ax_save_flags + + + GCJFLAGS=$GCJFLAGS__ax_save_flags + + + JAVACFLAGS=$JAVACFLAGS__ax_save_flags + + + LDFLAGS=$LDFLAGS__ax_save_flags + + + LIBS=$LIBS__ax_save_flags + + + OBJCFLAGS=$OBJCFLAGS__ax_save_flags + + + OBJCXXFLAGS=$OBJCXXFLAGS__ax_save_flags + + + UPCFLAGS=$UPCFLAGS__ax_save_flags + + + VALAFLAGS=$VALAFLAGS__ax_save_flags + + + + +fi + + + if test "$ax_cv_have_MCHECK" = "yes"; then : + +$as_echo "#define HAVE_MCHECK 1" >>confdefs.h + + + +for flag in -lmcheck; do + as_CACHEVAR=`$as_echo "ax_cv_check_ldflags__$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts $flag" >&5 +$as_echo_n "checking whether the linker accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${LDFLAGS+:} false; then : + case " $LDFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS already contains \$flag"; } >&5 + (: LDFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS \$flag\""; } >&5 + (: LDFLAGS="$LDFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + LDFLAGS="$LDFLAGS $flag" + ;; + esac +else + LDFLAGS="$flag" +fi + +else + : +fi + +done + +else + : +fi + + + + + +printf "--debug\n" >> "$AMINCLUDE" + + + + + + +printf "-D_GLIBCXX_DEBUG\n" >> "$AMINCLUDE" + + +else + ax_enable_debug=no + + +$as_echo "#define DEBUG 0" >>confdefs.h + +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for debug" >&5 +$as_echo_n "checking for debug... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_enable_debug" >&5 +$as_echo "$ax_enable_debug" >&6; } + if test "x${ax_enable_debug}" = "xyes"; then + DEBUG_TRUE= + DEBUG_FALSE='#' +else + DEBUG_TRUE='#' + DEBUG_FALSE= +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vcs system" >&5 +$as_echo_n "checking for vcs system... " >&6; } +if ${ac_cv_vcs_system+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_vcs_system="none" + if test -d ".bzr"; then : + ac_cv_vcs_system="bazaar" +fi + if test -d ".svn"; then : + ac_cv_vcs_system="svn" +fi + if test -d ".hg"; then : + ac_cv_vcs_system="mercurial" +fi + if test -d ".git"; then : + ac_cv_vcs_system="git" +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_vcs_system" >&5 +$as_echo "$ac_cv_vcs_system" >&6; } + +cat >>confdefs.h <<_ACEOF +#define VCS_SYSTEM "$ac_cv_vcs_system" +_ACEOF + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vcs checkout" >&5 +$as_echo_n "checking for vcs checkout... " >&6; } +if ${ac_cv_vcs_checkout+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$ac_cv_vcs_system" != "xnone"; then : + ac_cv_vcs_checkout=yes +else + ac_cv_vcs_checkout=no +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_vcs_checkout" >&5 +$as_echo "$ac_cv_vcs_checkout" >&6; } + + if test "x$ac_cv_vcs_checkout" = "xyes"; then + IS_VCS_CHECKOUT_TRUE= + IS_VCS_CHECKOUT_FALSE='#' +else + IS_VCS_CHECKOUT_TRUE='#' + IS_VCS_CHECKOUT_FALSE= +fi + + if test "x$ac_cv_vcs_checkout" = "xyes"; then : + +$as_echo "#define VCS_CHECKOUT 1" >>confdefs.h + +else + +$as_echo "#define VCS_CHECKOUT 0" >>confdefs.h + +fi + + + + # Check whether --enable-assert was given. +if test "${enable_assert+set}" = set; then : + enableval=$enable_assert; ax_enable_assert=yes +else + ax_enable_assert=no +fi + + + if test "$ax_enable_assert" = "yes" -o "$ax_enable_debug" = "yes" -o "$ac_cv_vcs_checkout" = "yes" ; then : + ax_enable_assert="yes" +else + ax_enable_assert="no" + +$as_echo "#define NDEBUG 1" >>confdefs.h + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assert" >&5 +$as_echo_n "checking for assert... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_enable_assert" >&5 +$as_echo "$ax_enable_assert" >&6; } + + + + + +cat >>confdefs.h <<_ACEOF +#define HOST_VENDOR "$host_vendor" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HOST_OS "$host_os" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define HOST_CPU "$host_cpu" +_ACEOF + + + case $host_os in #( + *mingw*) : + HOST_WINDOWS="true" + +$as_echo "#define HOST_OS_WINDOWS 1" >>confdefs.h + + +$as_echo "#define EAI_SYSTEM 11" >>confdefs.h + + ;; #( + *freebsd*) : + +$as_echo "#define HOST_OS_FREEBSD 1" >>confdefs.h + + +$as_echo "#define __APPLE_CC__ 1" >>confdefs.h + ;; #( + *solaris*) : + +$as_echo "#define HOST_OS_SOLARIS 1" >>confdefs.h + ;; #( + *darwin*) : + HOST_OSX="true" ;; #( + *linux*) : + HOST_LINUX="true" + +$as_echo "#define HOST_OS_LINUX 1" >>confdefs.h + ;; #( + *) : + ;; +esac + + if test "x${HOST_WINDOWS}" = "xtrue"; then + BUILD_WIN32_TRUE= + BUILD_WIN32_FALSE='#' +else + BUILD_WIN32_TRUE='#' + BUILD_WIN32_FALSE= +fi + + if test "x${HOST_OSX}" = "xtrue"; then + HOST_OSX_TRUE= + HOST_OSX_FALSE='#' +else + HOST_OSX_TRUE='#' + HOST_OSX_FALSE= +fi + + if test "x${HOST_LINUX}" = "xtrue"; then + HOST_LINUX_TRUE= + HOST_LINUX_FALSE='#' +else + HOST_LINUX_TRUE='#' + HOST_LINUX_FALSE= +fi + + if test "x${HOST_OS_FREEBSD}" = "xtrue"; then + HOST_FREEBSD_TRUE= + HOST_FREEBSD_FALSE='#' +else + HOST_FREEBSD_TRUE='#' + HOST_FREEBSD_FALSE= +fi + + +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=0;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + + + +# Check whether --enable-libmemcachedprotocol was given. +if test "${enable_libmemcachedprotocol+set}" = set; then : + enableval=$enable_libmemcachedprotocol; ax_enable_libmemcachedprotocol=yes +else + ax_enable_libmemcachedprotocol=no +fi + + + if test "$ax_enable_libmemcachedprotocol" = "yes"; then + BUILD_LIBMEMCACHED_PROTOCOL_TRUE= + BUILD_LIBMEMCACHED_PROTOCOL_FALSE='#' +else + BUILD_LIBMEMCACHED_PROTOCOL_TRUE='#' + BUILD_LIBMEMCACHED_PROTOCOL_FALSE= +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmemcachedprotocol" >&5 +$as_echo_n "checking for libmemcachedprotocol... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_enable_libmemcachedprotocol" >&5 +$as_echo "$ax_enable_libmemcachedprotocol" >&6; } + + +# Adding support for libtest + +LIBTEST_VERSION=1.0 + +ac_config_files="$ac_config_files libtest/version.h" + + +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_lib_mysql.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_LIB_MYSQL([MINIMUM-VERSION]) +# +# DESCRIPTION +# +# This macro provides tests of availability of MySQL client library of +# particular version or newer. +# +# AX_LIB_MYSQL macro takes only one argument which is optional. If there +# is no required version passed, then macro does not run version test. +# +# The --with-mysql option takes one of three possible values: +# +# no - do not check for MySQL client library +# +# yes - do check for MySQL library in standard locations (mysql_config +# should be in the PATH) +# +# path - complete path to mysql_config utility, use this option if +# mysql_config can't be found in the PATH +# +# This macro calls: +# +# AC_SUBST(MYSQL_INCLUDE) +# AC_SUBST(MYSQL_CFLAGS) +# AC_SUBST(MYSQL_LDFLAGS) +# AC_SUBST(MYSQL_VERSION) +# +# And sets: +# +# HAVE_MYSQL +# +# LICENSE +# +# Copyright (c) 2008 Mateusz Loskot +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 13 + + + +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_prog_mysqld.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_PROG_MYSQLD +# +# DESCRIPTION +# +# Check for the program 'mysqld' let script continue if exists & works +# pops up error message if not. +# +# Besides checking existence, this macro also set these environment +# variables upon completion: +# +# MYSQLD = which mysqld +# +# LICENSE +# +# Copyright (c) 2008 Gleen Salmon +# +# This program 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 the License, or (at your +# option) any later version. +# +# This program 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 . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 6 + +# This is what autoupdate's m4 run will expand. It fires +# the warning (with _au_warn_XXX), outputs it into the +# updated configure.ac (with AC_DIAGNOSE), and then outputs +# the replacement expansion. + + +# This is an auxiliary macro that is also run when +# autoupdate runs m4. It simply calls m4_warning, but +# we need a wrapper so that each warning is emitted only +# once. We break the quoting in m4_warning's argument in +# order to expand this macro's arguments, not AU_DEFUN's. + + +# Finally, this is the expansion that is picked up by +# autoconf. It tells the user to run autoupdate, and +# then outputs the replacement expansion. We do not care +# about autoupdate's warning because that contains +# information on what to do *after* running autoupdate. + + + + +#serial 1 + + + + + + +# Extract the first word of "mysqld$EXEEXT", so it can be a program name with args. +set dummy mysqld$EXEEXT; 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_MYSQLD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MYSQLD in + [\\/]* | ?:[\\/]*) + ac_cv_path_MYSQLD="$MYSQLD" # 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_MYSQLD="$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_MYSQLD" && ac_cv_path_MYSQLD="nocommand" + ;; +esac +fi +MYSQLD=$ac_cv_path_MYSQLD +if test -n "$MYSQLD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQLD" >&5 +$as_echo "$MYSQLD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test "$MYSQLD" = nocommand; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: mysqld not found in $PATH" >&5 +$as_echo "$as_me: WARNING: mysqld not found in $PATH" >&2;} +fi; + + + + + +# Check whether --with-mysql was given. +if test "${with_mysql+set}" = set; then : + withval=$with_mysql; + if test "$withval" = "no"; then + want_mysql="no" + elif test "$withval" = "yes"; then + want_mysql="yes" + else + want_mysql="yes" + MYSQL_CONFIG="$withval" + fi + +else + want_mysql="yes" + +fi + + + + MYSQL_INCLUDE="" + MYSQL_CFLAGS="" + MYSQL_LDFLAGS="" + MYSQL_VERSION="" + + + if test "$want_mysql" = "yes"; then + + if test -z "$MYSQL_CONFIG" ; then + for ac_prog in mysql_config mysql_config5 +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_MYSQL_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MYSQL_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_MYSQL_CONFIG="$MYSQL_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_MYSQL_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 +MYSQL_CONFIG=$ac_cv_path_MYSQL_CONFIG +if test -n "$MYSQL_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQL_CONFIG" >&5 +$as_echo "$MYSQL_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$MYSQL_CONFIG" && break +done +test -n "$MYSQL_CONFIG" || MYSQL_CONFIG="no" + + fi + + if test "$MYSQL_CONFIG" != "no"; then + MYSQL_INCLUDE="`$MYSQL_CONFIG --include`" + MYSQL_CFLAGS="`$MYSQL_CONFIG --cflags`" + MYSQL_LDFLAGS="`$MYSQL_CONFIG --libs`" + + MYSQL_VERSION=`$MYSQL_CONFIG --version` + + found_mysql="yes" + else + found_mysql="no" + fi + fi + + + + mysql_version_req=5.0 + + if test "$found_mysql" = "yes" -a -n "$mysql_version_req"; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MySQL version is >= $mysql_version_req" >&5 +$as_echo_n "checking if MySQL version is >= $mysql_version_req... " >&6; } + + mysql_version_req_major=`expr $mysql_version_req : '\([0-9]*\)'` + mysql_version_req_minor=`expr $mysql_version_req : '[0-9]*\.\([0-9]*\)'` + mysql_version_req_micro=`expr $mysql_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'` + if test "x$mysql_version_req_micro" = "x"; then + mysql_version_req_micro="0" + fi + + mysql_version_req_number=`expr $mysql_version_req_major \* 1000000 \ + \+ $mysql_version_req_minor \* 1000 \ + \+ $mysql_version_req_micro` + + mysql_version_major=`expr $MYSQL_VERSION : '\([0-9]*\)'` + mysql_version_minor=`expr $MYSQL_VERSION : '[0-9]*\.\([0-9]*\)'` + mysql_version_micro=`expr $MYSQL_VERSION : '[0-9]*\.[0-9]*\.\([0-9]*\)'` + if test "x$mysql_version_micro" = "x"; then + mysql_version_micro="0" + fi + + mysql_version_number=`expr $mysql_version_major \* 1000000 \ + \+ $mysql_version_minor \* 1000 \ + \+ $mysql_version_micro` + + mysql_version_check=`expr $mysql_version_number \>\= $mysql_version_req_number` + if test "$mysql_version_check" = "1"; 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 + fi + + if test "$found_mysql" = "yes" ; then + +$as_echo "#define HAVE_MYSQL 1" >>confdefs.h + + fi + + + + + + + if test "x${found_mysql}" = "xyes"; then + HAVE_LIBMYSQL_TRUE= + HAVE_LIBMYSQL_FALSE='#' +else + HAVE_LIBMYSQL_TRUE='#' + HAVE_LIBMYSQL_FALSE= +fi + + if test "x${found_mysql}" = "xyes"; then : + + +$as_echo "#define HAVE_LIBMYSQL_BUILD 1" >>confdefs.h + + +else + + +$as_echo "#define HAVE_LIBMYSQL_BUILD 0" >>confdefs.h + + +fi + + if test -f "$ac_cv_path_MYSQLD"; then : + + +$as_echo "#define HAVE_MYSQLD_BUILD 1" >>confdefs.h + + +cat >>confdefs.h <<_ACEOF +#define MYSQLD_BINARY "$ac_cv_path_MYSQLD" +_ACEOF + + +else + + +$as_echo "#define HAVE_MYSQLD_BUILD 0" >>confdefs.h + + +$as_echo "#define MYSQLD_BINARY 0" >>confdefs.h + + +fi + + +ac_config_files="$ac_config_files libtest/yatlcon.h" + + + + + + + + + + + + + + if test -z "$GEARMAND_BINARY"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gearmand executable path has been provided" >&5 +$as_echo_n "checking whether gearmand executable path has been provided... " >&6; } + +# Check whether --with-gearmand was given. +if test "${with_gearmand+set}" = set; then : + withval=$with_gearmand; + if test "$withval" != yes && test "$withval" != no; then : + + GEARMAND_BINARY="$withval" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GEARMAND_BINARY" >&5 +$as_echo "$GEARMAND_BINARY" >&6; } + +else + + GEARMAND_BINARY="" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + if test "$withval" != no; then : + + # Extract the first word of "gearmand", so it can be a program name with args. +set dummy gearmand; 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_GEARMAND_BINARY+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GEARMAND_BINARY in + [\\/]* | ?:[\\/]*) + ac_cv_path_GEARMAND_BINARY="$GEARMAND_BINARY" # 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_GEARMAND_BINARY="$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 +GEARMAND_BINARY=$ac_cv_path_GEARMAND_BINARY +if test -n "$GEARMAND_BINARY"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GEARMAND_BINARY" >&5 +$as_echo "$GEARMAND_BINARY" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +fi + +fi + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + # Extract the first word of "gearmand", so it can be a program name with args. +set dummy gearmand; 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_GEARMAND_BINARY+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GEARMAND_BINARY in + [\\/]* | ?:[\\/]*) + ac_cv_path_GEARMAND_BINARY="$GEARMAND_BINARY" # 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_GEARMAND_BINARY="$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 +GEARMAND_BINARY=$ac_cv_path_GEARMAND_BINARY +if test -n "$GEARMAND_BINARY"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GEARMAND_BINARY" >&5 +$as_echo "$GEARMAND_BINARY" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +fi + + +fi + + + + + + + if test -f "$ac_cv_path_GEARMAND_BINARY"; then : + +$as_echo "#define HAVE_GEARMAND_BINARY 1" >>confdefs.h + + +cat >>confdefs.h <<_ACEOF +#define GEARMAND_BINARY "$ac_cv_path_GEARMAND_BINARY" +_ACEOF + +else + +$as_echo "#define HAVE_GEARMAND_BINARY 0" >>confdefs.h + + +$as_echo "#define GEARMAND_BINARY 0" >>confdefs.h + +fi + + + + + if ${ax_cv_have_LIBGEARMAN+:} false; then : + $as_echo_n "(cached) " >&6 +else + + + CCASFLAGS__ax_save_flags=$CCASFLAGS + + + + CFLAGS__ax_save_flags=$CFLAGS + + + + CPPFLAGS__ax_save_flags=$CPPFLAGS + + + + CXXFLAGS__ax_save_flags=$CXXFLAGS + + + + ERLCFLAGS__ax_save_flags=$ERLCFLAGS + + + + FCFLAGS__ax_save_flags=$FCFLAGS + + + + FCLIBS__ax_save_flags=$FCLIBS + + + + FFLAGS__ax_save_flags=$FFLAGS + + + + FLIBS__ax_save_flags=$FLIBS + + + + GCJFLAGS__ax_save_flags=$GCJFLAGS + + + + JAVACFLAGS__ax_save_flags=$JAVACFLAGS + + + + LDFLAGS__ax_save_flags=$LDFLAGS + + + + LIBS__ax_save_flags=$LIBS + + + + OBJCFLAGS__ax_save_flags=$OBJCFLAGS + + + + OBJCXXFLAGS__ax_save_flags=$OBJCXXFLAGS + + + + UPCFLAGS__ax_save_flags=$UPCFLAGS + + + + VALAFLAGS__ax_save_flags=$VALAFLAGS + + + + + if test "x$LIBGEARMAN_CPPFLAGS" != "x"; then : + CPPFLAGS="$CPPFLAGS $LIBGEARMAN_CPPFLAGS" +fi + + if test "x$LIBGEARMAN_LDFLAGS" != "x"; then : + LDFLAGS="$LDFLAGS $LIBGEARMAN_LDFLAGS" +fi + + ac_fn_c_check_header_mongrel "$LINENO" "libgearman/gearman.h" "ac_cv_header_libgearman_gearman_h" "$ac_includes_default" +if test "x$ac_cv_header_libgearman_gearman_h" = xyes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgearman" >&5 +$as_echo_n "checking for main in -lgearman... " >&6; } +if ${ac_cv_lib_gearman_main+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgearman $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_gearman_main=yes +else + ac_cv_lib_gearman_main=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_gearman_main" >&5 +$as_echo "$ac_cv_lib_gearman_main" >&6; } +if test "x$ac_cv_lib_gearman_main" = xyes; then : + ax_cv_have_LIBGEARMAN=yes +else + ax_cv_have_LIBGEARMAN=no +fi + + +else + ax_cv_have_LIBGEARMAN=no +fi + + + + + CCASFLAGS=$CCASFLAGS__ax_save_flags + + + CFLAGS=$CFLAGS__ax_save_flags + + + CPPFLAGS=$CPPFLAGS__ax_save_flags + + + CXXFLAGS=$CXXFLAGS__ax_save_flags + + + ERLCFLAGS=$ERLCFLAGS__ax_save_flags + + + FCFLAGS=$FCFLAGS__ax_save_flags + + + FCLIBS=$FCLIBS__ax_save_flags + + + FFLAGS=$FFLAGS__ax_save_flags + + + FLIBS=$FLIBS__ax_save_flags + + + GCJFLAGS=$GCJFLAGS__ax_save_flags + + + JAVACFLAGS=$JAVACFLAGS__ax_save_flags + + + LDFLAGS=$LDFLAGS__ax_save_flags + + + LIBS=$LIBS__ax_save_flags + + + OBJCFLAGS=$OBJCFLAGS__ax_save_flags + + + OBJCXXFLAGS=$OBJCXXFLAGS__ax_save_flags + + + UPCFLAGS=$UPCFLAGS__ax_save_flags + + + VALAFLAGS=$VALAFLAGS__ax_save_flags + + + + +fi + + + if test "$ax_cv_have_LIBGEARMAN" = "yes"; then : + +$as_echo "#define HAVE_LIBGEARMAN 1" >>confdefs.h + + : +else + +$as_echo "#define HAVE_LIBGEARMAN 0" >>confdefs.h + +fi + + + + if true; then + BUILDING_LIBMEMCACHED_TRUE= + BUILDING_LIBMEMCACHED_FALSE='#' +else + BUILDING_LIBMEMCACHED_TRUE='#' + BUILDING_LIBMEMCACHED_FALSE= +fi + + if false; then + HAVE_LIBMEMCACHED_TRUE= + HAVE_LIBMEMCACHED_FALSE='#' +else + HAVE_LIBMEMCACHED_TRUE='#' + HAVE_LIBMEMCACHED_FALSE= +fi + + if false; then + HAVE_LIBDRIZZLE_TRUE= + HAVE_LIBDRIZZLE_FALSE='#' +else + HAVE_LIBDRIZZLE_TRUE='#' + HAVE_LIBDRIZZLE_FALSE= +fi + + +$as_echo "#define HAVE_LIBMEMCACHED 1" >>confdefs.h + + + if false; then + BUILDING_GEARMAN_TRUE= + BUILDING_GEARMAN_FALSE='#' +else + BUILDING_GEARMAN_TRUE='#' + BUILDING_GEARMAN_FALSE= +fi + + +# Specialty checks + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of cstdint" >&5 +$as_echo_n "checking for location of cstdint... " >&6; } +if ${ac_cv_cxx_cstdint+:} false; then : + $as_echo_n "(cached) " >&6 +else + + 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 + + + + CCASFLAGS__ax_save_flags=$CCASFLAGS + + + + CFLAGS__ax_save_flags=$CFLAGS + + + + CPPFLAGS__ax_save_flags=$CPPFLAGS + + + + CXXFLAGS__ax_save_flags=$CXXFLAGS + + + + ERLCFLAGS__ax_save_flags=$ERLCFLAGS + + + + FCFLAGS__ax_save_flags=$FCFLAGS + + + + FCLIBS__ax_save_flags=$FCLIBS + + + + FFLAGS__ax_save_flags=$FFLAGS + + + + FLIBS__ax_save_flags=$FLIBS + + + + GCJFLAGS__ax_save_flags=$GCJFLAGS + + + + JAVACFLAGS__ax_save_flags=$JAVACFLAGS + + + + LDFLAGS__ax_save_flags=$LDFLAGS + + + + LIBS__ax_save_flags=$LIBS + + + + OBJCFLAGS__ax_save_flags=$OBJCFLAGS + + + + OBJCXXFLAGS__ax_save_flags=$OBJCXXFLAGS + + + + UPCFLAGS__ax_save_flags=$UPCFLAGS + + + + VALAFLAGS__ax_save_flags=$VALAFLAGS + + + + CXXFLAGS="${CXX_STANDARD} ${CXXFLAGS}" + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +int +main () +{ + + uint32_t t + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cxx_cstdint_cstdint="" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + if test -z "$ac_cxx_cstdint_cstdint"; then : + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +int +main () +{ + uint32_t t + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cxx_cstdint_tr1_cstdint="" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + if test -z "$ac_cxx_cstdint_tr1_cstdint"; then : + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +int +main () +{ + uint32_t t + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cxx_cstdint_boost_cstdint_hpp="" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +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 + + + CCASFLAGS=$CCASFLAGS__ax_save_flags + + + CFLAGS=$CFLAGS__ax_save_flags + + + CPPFLAGS=$CPPFLAGS__ax_save_flags + + + CXXFLAGS=$CXXFLAGS__ax_save_flags + + + ERLCFLAGS=$ERLCFLAGS__ax_save_flags + + + FCFLAGS=$FCFLAGS__ax_save_flags + + + FCLIBS=$FCLIBS__ax_save_flags + + + FFLAGS=$FFLAGS__ax_save_flags + + + FLIBS=$FLIBS__ax_save_flags + + + GCJFLAGS=$GCJFLAGS__ax_save_flags + + + JAVACFLAGS=$JAVACFLAGS__ax_save_flags + + + LDFLAGS=$LDFLAGS__ax_save_flags + + + LIBS=$LIBS__ax_save_flags + + + OBJCFLAGS=$OBJCFLAGS__ax_save_flags + + + OBJCXXFLAGS=$OBJCXXFLAGS__ax_save_flags + + + UPCFLAGS=$UPCFLAGS__ax_save_flags + + + VALAFLAGS=$VALAFLAGS__ax_save_flags + + + + + if test -n "$ac_cxx_cstdint_cstdint"; then : + ac_cv_cxx_cstdint=$ac_cxx_cstdint_cstdint +elif test -n "$ac_cxx_cstdint_tr1_cstdint"; then : + ac_cv_cxx_cstdint=$ac_cxx_cstdint_tr1_cstdint +elif test -n "$ac_cxx_cstdint_boost_cstdint_hpp"; then : + ac_cv_cxx_cstdint=$ac_cxx_cstdint_boost_cstdint_hpp +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_cstdint" >&5 +$as_echo "$ac_cv_cxx_cstdint" >&6; } + + if test -n "$ac_cv_cxx_cstdint"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_cstdint" >&5 +$as_echo "$ac_cv_cxx_cstdint" >&6; } +else + + ac_cv_cxx_cstdint="" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find a cstdint header." >&5 +$as_echo "$as_me: WARNING: Could not find a cstdint header." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_cstdint" >&5 +$as_echo "$ac_cv_cxx_cstdint" >&6; } + +fi + + +cat >>confdefs.h <<_ACEOF +#define CSTDINT_H $ac_cv_cxx_cstdint +_ACEOF + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of cinttypes" >&5 +$as_echo_n "checking for location of cinttypes... " >&6; } +if ${ac_cv_cxx_cinttypes+:} false; then : + $as_echo_n "(cached) " >&6 +else + + + + CCASFLAGS__ax_save_flags=$CCASFLAGS + + + + CFLAGS__ax_save_flags=$CFLAGS + + + + CPPFLAGS__ax_save_flags=$CPPFLAGS + + + + CXXFLAGS__ax_save_flags=$CXXFLAGS + + + + ERLCFLAGS__ax_save_flags=$ERLCFLAGS + + + + FCFLAGS__ax_save_flags=$FCFLAGS + + + + FCLIBS__ax_save_flags=$FCLIBS + + + + FFLAGS__ax_save_flags=$FFLAGS + + + + FLIBS__ax_save_flags=$FLIBS + + + + GCJFLAGS__ax_save_flags=$GCJFLAGS + + + + JAVACFLAGS__ax_save_flags=$JAVACFLAGS + + + + LDFLAGS__ax_save_flags=$LDFLAGS + + + + LIBS__ax_save_flags=$LIBS + + + + OBJCFLAGS__ax_save_flags=$OBJCFLAGS + + + + OBJCXXFLAGS__ax_save_flags=$OBJCXXFLAGS + + + + UPCFLAGS__ax_save_flags=$UPCFLAGS + + + + VALAFLAGS__ax_save_flags=$VALAFLAGS + + + + CXXFLAGS="${CXX_STANDARD} ${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 + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +int +main () +{ + + uint32_t foo= UINT32_C(1); + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cxx_cinttypes_cinttypes="" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +# Look for tr1/cinttypes + if test -z "$ac_cxx_cinttypes_cinttypes"; then : + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +int +main () +{ + + uint32_t foo= UINT32_C(1); + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cxx_cinttypes_tr1_cinttypes="" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +# Look for boost/cinttypes.hpp + if test -z "$ac_cxx_cinttypes_tr1_cinttypes"; then : + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +int +main () +{ + + uint32_t foo= UINT32_C(1); + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cxx_cinttypes_boost_cinttypes_hpp="" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +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 + + + CCASFLAGS=$CCASFLAGS__ax_save_flags + + + CFLAGS=$CFLAGS__ax_save_flags + + + CPPFLAGS=$CPPFLAGS__ax_save_flags + + + CXXFLAGS=$CXXFLAGS__ax_save_flags + + + ERLCFLAGS=$ERLCFLAGS__ax_save_flags + + + FCFLAGS=$FCFLAGS__ax_save_flags + + + FCLIBS=$FCLIBS__ax_save_flags + + + FFLAGS=$FFLAGS__ax_save_flags + + + FLIBS=$FLIBS__ax_save_flags + + + GCJFLAGS=$GCJFLAGS__ax_save_flags + + + JAVACFLAGS=$JAVACFLAGS__ax_save_flags + + + LDFLAGS=$LDFLAGS__ax_save_flags + + + LIBS=$LIBS__ax_save_flags + + + OBJCFLAGS=$OBJCFLAGS__ax_save_flags + + + OBJCXXFLAGS=$OBJCXXFLAGS__ax_save_flags + + + UPCFLAGS=$UPCFLAGS__ax_save_flags + + + VALAFLAGS=$VALAFLAGS__ax_save_flags + + + + + if test -n "$ac_cxx_cinttypes_cinttypes"; then : + ac_cv_cxx_cinttypes=$ac_cxx_cinttypes_cinttypes +elif test -n "$ac_cxx_cinttypes_tr1_cinttypes"; then : + ac_cv_cxx_cinttypes=$ac_cxx_cinttypes_tr1_cinttypes +elif test -n "$ac_cxx_cinttypes_boost_cinttypes_hpp"; then : + ac_cv_cxx_cinttypes=$ac_cxx_cinttypes_boost_cinttypes_hpp +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_cinttypes" >&5 +$as_echo "$ac_cv_cxx_cinttypes" >&6; } + + if test -n "$ac_cv_cxx_cinttypes"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_cinttypes" >&5 +$as_echo "$ac_cv_cxx_cinttypes" >&6; } + +else + + ac_cv_cxx_cinttypes="" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find a cinttypes header." >&5 +$as_echo "$as_me: WARNING: Could not find a cinttypes header." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_cinttypes" >&5 +$as_echo "$ac_cv_cxx_cinttypes" >&6; } + +fi + + +$as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h + + +cat >>confdefs.h <<_ACEOF +#define CINTTYPES_H $ac_cv_cxx_cinttypes +_ACEOF + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if ${ac_cv_c_bigendian+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +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 + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +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 + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then : + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_bigendian=no +else + ac_cv_c_bigendian=yes +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_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h +;; #( + no) + ;; #( + universal) + +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + + ;; #( + *) + as_fn_error $? "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac + + + + 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 for htonll" >&5 +$as_echo_n "checking for htonll... " >&6; } +if ${ac_cv_have_htonll+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include + +int +main () +{ + return htonll(0) + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_have_htonll=yes +else + ac_cv_have_htonll=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_htonll" >&5 +$as_echo "$ac_cv_have_htonll" >&6; } + 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 "x$ac_cv_have_htonll" = "xyes"; then : + + +$as_echo "#define HAVE_HTONLL 1" >>confdefs.h + +fi + + if test "x$ac_cv_have_htonll" = "xno"; then + BUILD_BYTEORDER_TRUE= + BUILD_BYTEORDER_FALSE='#' +else + BUILD_BYTEORDER_TRUE='#' + BUILD_BYTEORDER_FALSE= +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working SO_SNDTIMEO" >&5 +$as_echo_n "checking for working SO_SNDTIMEO... " >&6; } +if ${ac_cv_have_so_sndtimeo+:} 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 + + if test "$cross_compiling" = yes; then : + ac_cv_have_so_sndtimeo=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include +#include +#include +#include +#include + +int +main () +{ + + int sock = socket(AF_INET, SOCK_STREAM, 0); + struct timeval waittime; + + waittime.tv_sec= 0; + waittime.tv_usec= 500; + + if (setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO, + &waittime, (socklen_t)sizeof(struct timeval)) == -1) { + if (errno == ENOPROTOOPT) { + return 1; + } + } + return 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_have_so_sndtimeo=yes +else + ac_cv_have_so_sndtimeo=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + + if test "x$ac_cv_have_so_sndtimeo" = "xyes"; then : + + +$as_echo "#define HAVE_SNDTIMEO 1" >>confdefs.h + +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 + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_so_sndtimeo" >&5 +$as_echo "$ac_cv_have_so_sndtimeo" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working SO_RCVTIMEO" >&5 +$as_echo_n "checking for working SO_RCVTIMEO... " >&6; } +if ${ac_cv_have_so_rcvtimeo+:} 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 + + if test "$cross_compiling" = yes; then : + ac_cv_have_so_rcvtimeo=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#include +#include +#include +#include +#include + +int +main () +{ + + int sock = socket(AF_INET, SOCK_STREAM, 0); + struct timeval waittime; + + waittime.tv_sec= 0; + waittime.tv_usec= 500; + + if (setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, + &waittime, (socklen_t)sizeof(struct timeval)) == -1) { + if (errno == ENOPROTOOPT) { + return 1; + } + } + return 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_have_so_rcvtimeo=yes +else + ac_cv_have_so_rcvtimeo=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + + + if test "x$ac_cv_have_so_rcvtimeo" = "xyes"; then : + + +$as_echo "#define HAVE_RCVTIMEO 1" >>confdefs.h + +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 + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_so_rcvtimeo" >&5 +$as_echo "$ac_cv_have_so_rcvtimeo" >&6; } + +# Check whether --enable-hsieh_hash was given. +if test "${enable_hsieh_hash+set}" = set; then : + enableval=$enable_hsieh_hash; ac_cv_enable_hsieh_hash=yes +else + ac_cv_enable_hsieh_hash=no +fi + + + if test "$ac_cv_enable_hsieh_hash" = "yes"; then : + +$as_echo "#define HAVE_HSIEH_HASH 1" >>confdefs.h + +fi + + if test "$ac_cv_enable_hsieh_hash" = "yes"; then + INCLUDE_HSIEH_SRC_TRUE= + INCLUDE_HSIEH_SRC_FALSE='#' +else + INCLUDE_HSIEH_SRC_TRUE='#' + INCLUDE_HSIEH_SRC_FALSE= +fi + + +# Check whether --enable-murmur_hash was given. +if test "${enable_murmur_hash+set}" = set; then : + enableval=$enable_murmur_hash; ac_cv_enable_murmur_hash=no +else + ac_cv_enable_murmur_hash=yes +fi + + + if test "$ac_cv_enable_murmur_hash" = "yes"; then : + +$as_echo "#define HAVE_MURMUR_HASH 1" >>confdefs.h + +fi + + if test "$ac_cv_enable_murmur_hash" = "yes"; then + INCLUDE_MURMUR_SRC_TRUE= + INCLUDE_MURMUR_SRC_FALSE='#' +else + INCLUDE_MURMUR_SRC_TRUE='#' + INCLUDE_MURMUR_SRC_FALSE= +fi + + +# Check whether --enable-fnv64_hash was given. +if test "${enable_fnv64_hash+set}" = set; then : + enableval=$enable_fnv64_hash; ac_cv_enable_fnv64_hash=no +else + ac_cv_enable_fnv64_hash=yes +fi + + + if test "$ac_cv_enable_fnv64_hash" = "yes"; then : + +$as_echo "#define HAVE_FNV64_HASH 1" >>confdefs.h + +fi + +# Check whether --enable-memaslap was given. +if test "${enable_memaslap+set}" = set; then : + enableval=$enable_memaslap; ac_cv_enable_memaslap=yes +else + ac_cv_enable_memaslap=no +fi + + + if test "$ac_cv_enable_memaslap" = "yes"; then + BUILD_MEMASLAP_TRUE= + BUILD_MEMASLAP_FALSE='#' +else + BUILD_MEMASLAP_TRUE='#' + BUILD_MEMASLAP_FALSE= +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 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supported struct padding" >&5 +$as_echo_n "checking for supported struct padding... " >&6; } +if ${ac_cv_supported_struct_padding+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + #include +#include "libmemcached/memcached/protocol_binary.h" + +int +main () +{ + protocol_binary_request_set request; + int a = 1; + switch (a) { + case sizeof(request): + case sizeof(request.bytes): + break; + default: + a = 2; + } + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_supported_struct_padding=no +else + ac_cv_supported_struct_padding=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_supported_struct_padding" >&5 +$as_echo "$ac_cv_supported_struct_padding" >&6; } + 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 "x$ac_cv_supported_struct_padding" = "xno"; then : + as_fn_error $? "Unsupported struct padding done by compiler." "$LINENO" 5 +fi + + + # Check whether --enable-deprecated was given. +if test "${enable_deprecated+set}" = set; then : + enableval=$enable_deprecated; ac_enable_deprecated="$enableval" +else + ac_enable_deprecated="no" +fi + + + if test "$ac_enable_deprecated" = "yes"; then : + DEPRECATED="#define MEMCACHED_ENABLE_DEPRECATED 1" +fi + + + +# Checks for programs. +for ac_prog in dpkg-gensymbols +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_DPKG_GENSYMBOLS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DPKG_GENSYMBOLS"; then + ac_cv_prog_DPKG_GENSYMBOLS="$DPKG_GENSYMBOLS" # 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_DPKG_GENSYMBOLS="$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 +DPKG_GENSYMBOLS=$ac_cv_prog_DPKG_GENSYMBOLS +if test -n "$DPKG_GENSYMBOLS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DPKG_GENSYMBOLS" >&5 +$as_echo "$DPKG_GENSYMBOLS" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DPKG_GENSYMBOLS" && break +done + +for ac_prog in 'flex' +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_LEX+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # 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_LEX="$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 +LEX=$ac_cv_prog_LEX +if test -n "$LEX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 +$as_echo "$LEX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$LEX" && break +done +test -n "$LEX" || LEX=":" + +for ac_prog in perl +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_PERL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$PERL"; then + ac_cv_prog_PERL="$PERL" # 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_PERL="$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 +PERL=$ac_cv_prog_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 + + + test -n "$PERL" && break +done + +for ac_prog in 'valgrind' +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_VALGRIND+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$VALGRIND"; then + ac_cv_prog_VALGRIND="$VALGRIND" # 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_VALGRIND="$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 +VALGRIND=$ac_cv_prog_VALGRIND +if test -n "$VALGRIND"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VALGRIND" >&5 +$as_echo "$VALGRIND" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$VALGRIND" && break +done + +for ac_prog in 'wine' +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_WINE+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$WINE"; then + ac_cv_prog_WINE="$WINE" # 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_WINE="$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 +WINE=$ac_cv_prog_WINE +if test -n "$WINE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINE" >&5 +$as_echo "$WINE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$WINE" && break +done + +for ac_prog in 'bison --warnings=all' +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_YACC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # 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_YACC="$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 +YACC=$ac_cv_prog_YACC +if test -n "$YACC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 +$as_echo "$YACC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$YACC" && break +done +test -n "$YACC" || YACC=":" + +for ac_prog in rpmbuild --nocheck +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_RPMBUILD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RPMBUILD"; then + ac_cv_prog_RPMBUILD="$RPMBUILD" # 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_RPMBUILD="$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 +RPMBUILD=$ac_cv_prog_RPMBUILD +if test -n "$RPMBUILD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RPMBUILD" >&5 +$as_echo "$RPMBUILD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$RPMBUILD" && break +done + +for ac_prog in rpmdev-setuptree +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_RPMDEV_SETUPTREE+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RPMDEV_SETUPTREE"; then + ac_cv_prog_RPMDEV_SETUPTREE="$RPMDEV_SETUPTREE" # 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_RPMDEV_SETUPTREE="$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 +RPMDEV_SETUPTREE=$ac_cv_prog_RPMDEV_SETUPTREE +if test -n "$RPMDEV_SETUPTREE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RPMDEV_SETUPTREE" >&5 +$as_echo "$RPMDEV_SETUPTREE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$RPMDEV_SETUPTREE" && break +done + +for ac_prog in rpm +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_RPM+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RPM"; then + ac_cv_prog_RPM="$RPM" # 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_RPM="$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 +RPM=$ac_cv_prog_RPM +if test -n "$RPM"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RPM" >&5 +$as_echo "$RPM" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$RPM" && break +done + +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 + + +{ $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 + + + + + + + + + + + + if test -z "$MEMCACHED_BINARY"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memcached executable path has been provided" >&5 +$as_echo_n "checking whether memcached executable path has been provided... " >&6; } + +# Check whether --with-memcached was given. +if test "${with_memcached+set}" = set; then : + withval=$with_memcached; + if test "$withval" != yes && test "$withval" != no; then : + + MEMCACHED_BINARY="$withval" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMCACHED_BINARY" >&5 +$as_echo "$MEMCACHED_BINARY" >&6; } + +else + + MEMCACHED_BINARY="" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + if test "$withval" != no; then : + + # Extract the first word of "memcached", so it can be a program name with args. +set dummy memcached; 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_MEMCACHED_BINARY+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MEMCACHED_BINARY in + [\\/]* | ?:[\\/]*) + ac_cv_path_MEMCACHED_BINARY="$MEMCACHED_BINARY" # 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_MEMCACHED_BINARY="$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_MEMCACHED_BINARY" && ac_cv_path_MEMCACHED_BINARY="unknown" + ;; +esac +fi +MEMCACHED_BINARY=$ac_cv_path_MEMCACHED_BINARY +if test -n "$MEMCACHED_BINARY"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMCACHED_BINARY" >&5 +$as_echo "$MEMCACHED_BINARY" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +fi + +fi + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + # Extract the first word of "memcached", so it can be a program name with args. +set dummy memcached; 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_MEMCACHED_BINARY+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $MEMCACHED_BINARY in + [\\/]* | ?:[\\/]*) + ac_cv_path_MEMCACHED_BINARY="$MEMCACHED_BINARY" # 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_MEMCACHED_BINARY="$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_MEMCACHED_BINARY" && ac_cv_path_MEMCACHED_BINARY="unknown" + ;; +esac +fi +MEMCACHED_BINARY=$ac_cv_path_MEMCACHED_BINARY +if test -n "$MEMCACHED_BINARY"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMCACHED_BINARY" >&5 +$as_echo "$MEMCACHED_BINARY" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +fi + + +fi + + + + + + + ax_memcached_success= + if test x"$MEMCACHED_BINARY" != xunknown; then : + if test -x "$MEMCACHED_BINARY"; then : + ax_memcached_version=`$MEMCACHED_BINARY -h | sed 1q | awk '{print \$ 2 }' | sed 's|\-a-z0-9*$||' | awk -F. '{printf "%d.%d.%d", $1, $2, $3}'` + if test -n "$ax_memcached_version"; then : + ax_memcached_success='ok' + { $as_echo "$as_me:${as_lineno-$LINENO}: result: memcached version \"$ax_memcached_version\"" >&5 +$as_echo "memcached version \"$ax_memcached_version\"" >&6; } + +cat >>confdefs.h <<_ACEOF +#define MEMCACHED_VERSION "$ax_memcached_version" +_ACEOF + +fi + +fi + +fi + + if test -n "$ax_memcached_success"; then : + +$as_echo "#define HAVE_MEMCACHED_BINARY 1" >>confdefs.h + + +cat >>confdefs.h <<_ACEOF +#define MEMCACHED_BINARY "$MEMCACHED_BINARY" +_ACEOF + + +else + +$as_echo "#define HAVE_MEMCACHED_BINARY 0" >>confdefs.h + + MEMCACHED_BINARY= + +fi + + + + + + + + + + + + if test -z "$SPHINXBUILD"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sphinx-build executable path has been provided" >&5 +$as_echo_n "checking whether sphinx-build executable path has been provided... " >&6; } + +# Check whether --with-sphinx-build was given. +if test "${with_sphinx_build+set}" = set; then : + withval=$with_sphinx_build; + if test "$withval" != yes && test "$withval" != no; then : + + SPHINXBUILD="$withval" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SPHINXBUILD" >&5 +$as_echo "$SPHINXBUILD" >&6; } + +else + + SPHINXBUILD="" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + if test "$withval" != no; then : + + # Extract the first word of "sphinx-build", so it can be a program name with args. +set dummy sphinx-build; 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_SPHINXBUILD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $SPHINXBUILD in + [\\/]* | ?:[\\/]*) + ac_cv_path_SPHINXBUILD="$SPHINXBUILD" # 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_SPHINXBUILD="$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_SPHINXBUILD" && ac_cv_path_SPHINXBUILD=":" + ;; +esac +fi +SPHINXBUILD=$ac_cv_path_SPHINXBUILD +if test -n "$SPHINXBUILD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SPHINXBUILD" >&5 +$as_echo "$SPHINXBUILD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +fi + +fi + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + # Extract the first word of "sphinx-build", so it can be a program name with args. +set dummy sphinx-build; 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_SPHINXBUILD+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $SPHINXBUILD in + [\\/]* | ?:[\\/]*) + ac_cv_path_SPHINXBUILD="$SPHINXBUILD" # 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_SPHINXBUILD="$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_SPHINXBUILD" && ac_cv_path_SPHINXBUILD=":" + ;; +esac +fi +SPHINXBUILD=$ac_cv_path_SPHINXBUILD +if test -n "$SPHINXBUILD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SPHINXBUILD" >&5 +$as_echo "$SPHINXBUILD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +fi + + +fi + + + + + + + if test x"SPHINXBUILD" = x":"; then : + SPHINXBUILD= +else + if test -x "$SPHINXBUILD"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Checking to see if $SPHINXBUILD is recent" >&5 +$as_echo_n "checking Checking to see if $SPHINXBUILD is recent... " >&6; } + junk=`$SPHINXBUILD --version &> version_file` + if test $? -eq 0; then : + ax_sphinx_build_version=`head -1 version_file` +else + junk=`$SPHINXBUILD &> version_file` + ax_sphinx_build_version=`head -1 version_file` + rm version_file + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SPHINXBUILD is version \"$ax_sphinx_build_version\"" >&5 +$as_echo "$SPHINXBUILD is version \"$ax_sphinx_build_version\"" >&6; } + $SPHINXBUILD -Q -C -b man -d conftest.d . . >/dev/null 2>&1 + if test $? -eq 0; then : + +else + SPHINXBUILD= +fi + rm -rf conftest.d +fi + +fi + rm -f version_file + +fi + + if test -n "${SPHINXBUILD}"; then : + + : +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: sphinx-build version 1.0 or greater is required to build man pages" >&5 +$as_echo "$as_me: WARNING: sphinx-build version 1.0 or greater is required to build man pages" >&2;} +fi + + + + + + + + + + + + if test -z "$LCOV"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lcov executable path has been provided" >&5 +$as_echo_n "checking whether lcov executable path has been provided... " >&6; } + +# Check whether --with-lcov was given. +if test "${with_lcov+set}" = set; then : + withval=$with_lcov; + if test "$withval" != yes && test "$withval" != no; then : + + LCOV="$withval" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5 +$as_echo "$LCOV" >&6; } + +else + + LCOV="" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + if test "$withval" != no; then : + + # Extract the first word of "lcov", so it can be a program name with args. +set dummy lcov; 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_LCOV+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $LCOV in + [\\/]* | ?:[\\/]*) + ac_cv_path_LCOV="$LCOV" # 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_LCOV="$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 +LCOV=$ac_cv_path_LCOV +if test -n "$LCOV"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5 +$as_echo "$LCOV" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +fi + +fi + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + # Extract the first word of "lcov", so it can be a program name with args. +set dummy lcov; 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_LCOV+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $LCOV in + [\\/]* | ?:[\\/]*) + ac_cv_path_LCOV="$LCOV" # 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_LCOV="$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 +LCOV=$ac_cv_path_LCOV +if test -n "$LCOV"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5 +$as_echo "$LCOV" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +fi + + +fi + + + + + + + + + + + + + + + + + if test -z "$LCOV_GENHTML"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether genhtml executable path has been provided" >&5 +$as_echo_n "checking whether genhtml executable path has been provided... " >&6; } + +# Check whether --with-genhtml was given. +if test "${with_genhtml+set}" = set; then : + withval=$with_genhtml; + if test "$withval" != yes && test "$withval" != no; then : + + LCOV_GENHTML="$withval" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV_GENHTML" >&5 +$as_echo "$LCOV_GENHTML" >&6; } + +else + + LCOV_GENHTML="" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + if test "$withval" != no; then : + + # Extract the first word of "genhtml", so it can be a program name with args. +set dummy genhtml; 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_LCOV_GENHTML+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $LCOV_GENHTML in + [\\/]* | ?:[\\/]*) + ac_cv_path_LCOV_GENHTML="$LCOV_GENHTML" # 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_LCOV_GENHTML="$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 +LCOV_GENHTML=$ac_cv_path_LCOV_GENHTML +if test -n "$LCOV_GENHTML"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV_GENHTML" >&5 +$as_echo "$LCOV_GENHTML" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +fi + +fi + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + # Extract the first word of "genhtml", so it can be a program name with args. +set dummy genhtml; 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_LCOV_GENHTML+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $LCOV_GENHTML in + [\\/]* | ?:[\\/]*) + ac_cv_path_LCOV_GENHTML="$LCOV_GENHTML" # 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_LCOV_GENHTML="$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 +LCOV_GENHTML=$ac_cv_path_LCOV_GENHTML +if test -n "$LCOV_GENHTML"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV_GENHTML" >&5 +$as_echo "$LCOV_GENHTML" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +fi + + +fi + + + + + + + +$as_echo "#define HAVE_MEMCACHED_SASL_BINARY 0" >>confdefs.h + + +# Checks for libraries. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5 +$as_echo_n "checking for library containing getopt_long... " >&6; } +if ${ac_cv_search_getopt_long+:} 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 getopt_long (); +int +main () +{ +return getopt_long (); + ; + return 0; +} +_ACEOF +for ac_lib in '' gnugetopt; 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_getopt_long=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_getopt_long+:} false; then : + break +fi +done +if ${ac_cv_search_getopt_long+:} false; then : + +else + ac_cv_search_getopt_long=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5 +$as_echo "$ac_cv_search_getopt_long" >&6; } +ac_res=$ac_cv_search_getopt_long +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 +$as_echo_n "checking for library containing gethostbyname... " >&6; } +if ${ac_cv_search_gethostbyname+:} 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 gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +for ac_lib in '' nsl; 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_gethostbyname=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_gethostbyname+:} false; then : + break +fi +done +if ${ac_cv_search_gethostbyname+:} false; then : + +else + ac_cv_search_gethostbyname=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 +$as_echo "$ac_cv_search_gethostbyname" >&6; } +ac_res=$ac_cv_search_gethostbyname +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + +# Checks for header files. + + + + for ac_header in $ac_header_list +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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +# Windows only + + + + + + + +# Checks for typedefs, structures, and compiler characteristics. + +# Checks for library functions. + +for ac_func in alarm +do : + ac_fn_c_check_func "$LINENO" "alarm" "ac_cv_func_alarm" +if test "x$ac_cv_func_alarm" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ALARM 1 +_ACEOF + +fi +done + +for ac_func in atexit +do : + ac_fn_c_check_func "$LINENO" "atexit" "ac_cv_func_atexit" +if test "x$ac_cv_func_atexit" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ATEXIT 1 +_ACEOF + +fi +done + +for ac_func in clock_gettime +do : + ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" +if test "x$ac_cv_func_clock_gettime" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_CLOCK_GETTIME 1 +_ACEOF + +fi +done + +for ac_func in dup2 +do : + ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2" +if test "x$ac_cv_func_dup2" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DUP2 1 +_ACEOF + +fi +done + +for ac_func in fcntl +do : + ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl" +if test "x$ac_cv_func_fcntl" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FCNTL 1 +_ACEOF + +fi +done + +for ac_func in floor +do : + ac_fn_c_check_func "$LINENO" "floor" "ac_cv_func_floor" +if test "x$ac_cv_func_floor" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FLOOR 1 +_ACEOF + +fi +done + +for ac_func in getcwd +do : + ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd" +if test "x$ac_cv_func_getcwd" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETCWD 1 +_ACEOF + +fi +done + +for ac_func in getline +do : + ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline" +if test "x$ac_cv_func_getline" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETLINE 1 +_ACEOF + +fi +done + +for ac_func in gettimeofday +do : + ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" +if test "x$ac_cv_func_gettimeofday" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETTIMEOFDAY 1 +_ACEOF + +fi +done + +for ac_func in inet_ntoa +do : + ac_fn_c_check_func "$LINENO" "inet_ntoa" "ac_cv_func_inet_ntoa" +if test "x$ac_cv_func_inet_ntoa" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_INET_NTOA 1 +_ACEOF + +fi +done + +for ac_func in memchr +do : + ac_fn_c_check_func "$LINENO" "memchr" "ac_cv_func_memchr" +if test "x$ac_cv_func_memchr" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MEMCHR 1 +_ACEOF + +fi +done + +for ac_func in memmove +do : + ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove" +if test "x$ac_cv_func_memmove" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MEMMOVE 1 +_ACEOF + +fi +done + +for ac_func in memset +do : + ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset" +if test "x$ac_cv_func_memset" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MEMSET 1 +_ACEOF + +fi +done + +for ac_func in pipe2 +do : + ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" +if test "x$ac_cv_func_pipe2" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PIPE2 1 +_ACEOF + +fi +done + +for ac_func in putenv +do : + ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv" +if test "x$ac_cv_func_putenv" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PUTENV 1 +_ACEOF + +fi +done + +for ac_func in select +do : + ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select" +if test "x$ac_cv_func_select" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SELECT 1 +_ACEOF + +fi +done + +for ac_func in setenv +do : + ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv" +if test "x$ac_cv_func_setenv" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SETENV 1 +_ACEOF + +fi +done + +for ac_func in sigignore +do : + ac_fn_c_check_func "$LINENO" "sigignore" "ac_cv_func_sigignore" +if test "x$ac_cv_func_sigignore" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SIGIGNORE 1 +_ACEOF + +fi +done + +for ac_func in socket +do : + ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" +if test "x$ac_cv_func_socket" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SOCKET 1 +_ACEOF + +fi +done + +for ac_func in sqrt +do : + ac_fn_c_check_func "$LINENO" "sqrt" "ac_cv_func_sqrt" +if test "x$ac_cv_func_sqrt" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SQRT 1 +_ACEOF + +fi +done + +for ac_func in strcasecmp +do : + ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" +if test "x$ac_cv_func_strcasecmp" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRCASECMP 1 +_ACEOF + +fi +done + +for ac_func in strchr +do : + ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr" +if test "x$ac_cv_func_strchr" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRCHR 1 +_ACEOF + +fi +done + +for ac_func in strdup +do : + ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup" +if test "x$ac_cv_func_strdup" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRDUP 1 +_ACEOF + +fi +done + +for ac_func in strerror +do : + ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" +if test "x$ac_cv_func_strerror" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRERROR 1 +_ACEOF + +fi +done + +for ac_func in strstr +do : + ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr" +if test "x$ac_cv_func_strstr" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRSTR 1 +_ACEOF + +fi +done + +for ac_func in strtol +do : + ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol" +if test "x$ac_cv_func_strtol" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRTOL 1 +_ACEOF + +fi +done + +for ac_func in strtoul +do : + ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul" +if test "x$ac_cv_func_strtoul" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRTOUL 1 +_ACEOF + +fi +done + +for ac_func in strtoull +do : + ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull" +if test "x$ac_cv_func_strtoull" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRTOULL 1 +_ACEOF + +fi +done + +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 + +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 +$as_echo_n "checking for working alloca.h... " >&6; } +if ${ac_cv_working_alloca_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +char *p = (char *) alloca (2 * sizeof (int)); + if (p) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_working_alloca_h=yes +else + ac_cv_working_alloca_h=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +$as_echo "$ac_cv_working_alloca_h" >&6; } +if test $ac_cv_working_alloca_h = yes; then + +$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +$as_echo_n "checking for alloca... " >&6; } +if ${ac_cv_func_alloca_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER +# include +# define alloca _alloca +# else +# ifdef HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +void *alloca (size_t); +# endif +# endif +# endif +# endif +#endif + +int +main () +{ +char *p = (char *) alloca (1); + if (p) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_func_alloca_works=yes +else + ac_cv_func_alloca_works=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +$as_echo "$ac_cv_func_alloca_works" >&6; } + +if test $ac_cv_func_alloca_works = yes; then + +$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h + +else + # The SVR3 libPW and SVR4 libucb both contain incompatible functions +# that cause trouble. Some versions do not even contain alloca or +# contain a buggy version. If you still want to use their alloca, +# use ar to extract alloca.o from them instead of compiling alloca.c. + +ALLOCA=\${LIBOBJDIR}alloca.$ac_objext + +$as_echo "#define C_ALLOCA 1" >>confdefs.h + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 +$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } +if ${ac_cv_os_cray+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined CRAY && ! defined CRAY2 +webecray +#else +wenotbecray +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "webecray" >/dev/null 2>&1; then : + ac_cv_os_cray=yes +else + ac_cv_os_cray=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 +$as_echo "$ac_cv_os_cray" >&6; } +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; 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 CRAY_STACKSEG_END $ac_func +_ACEOF + + break +fi + + done +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +$as_echo_n "checking stack direction for C alloca... " >&6; } +if ${ac_cv_c_stack_direction+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_c_stack_direction=0 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +find_stack_direction (int *addr, int depth) +{ + int dir, dummy = 0; + if (! addr) + addr = &dummy; + *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; + dir = depth ? find_stack_direction (addr, depth - 1) : 0; + return dir + dummy; +} + +int +main (int argc, char **argv) +{ + return find_stack_direction (0, argc + !argv + 20) < 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_stack_direction=1 +else + ac_cv_c_stack_direction=-1 +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_c_stack_direction" >&5 +$as_echo "$ac_cv_c_stack_direction" >&6; } +cat >>confdefs.h <<_ACEOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +_ACEOF + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5 +$as_echo_n "checking for error_at_line... " >&6; } +if ${ac_cv_lib_error_at_line+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +error_at_line (0, 0, "", 0, "an error occurred"); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_error_at_line=yes +else + ac_cv_lib_error_at_line=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5 +$as_echo "$ac_cv_lib_error_at_line" >&6; } +if test $ac_cv_lib_error_at_line = no; then + case " $LIBOBJS " in + *" error.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS error.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" +if test "x$ac_cv_type_pid_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF + +fi + +for ac_header in vfork.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" +if test "x$ac_cv_header_vfork_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_VFORK_H 1 +_ACEOF + +fi + +done + +for ac_func in fork vfork +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 + +if test "x$ac_cv_func_fork" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 +$as_echo_n "checking for working fork... " >&6; } +if ${ac_cv_func_fork_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_fork_works=cross +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* By Ruediger Kuhlmann. */ + return fork () < 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_fork_works=yes +else + ac_cv_func_fork_works=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_fork_works" >&5 +$as_echo "$ac_cv_func_fork_works" >&6; } + +else + ac_cv_func_fork_works=$ac_cv_func_fork +fi +if test "x$ac_cv_func_fork_works" = xcross; then + case $host in + *-*-amigaos* | *-*-msdosdjgpp*) + # Override, as these systems have only a dummy fork() stub + ac_cv_func_fork_works=no + ;; + *) + ac_cv_func_fork_works=yes + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 +$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} +fi +ac_cv_func_vfork_works=$ac_cv_func_vfork +if test "x$ac_cv_func_vfork" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 +$as_echo_n "checking for working vfork... " >&6; } +if ${ac_cv_func_vfork_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_vfork_works=cross +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Thanks to Paul Eggert for this test. */ +$ac_includes_default +#include +#ifdef HAVE_VFORK_H +# include +#endif +/* On some sparc systems, changes by the child to local and incoming + argument registers are propagated back to the parent. The compiler + is told about this with #include , but some compilers + (e.g. gcc -O) don't grok . Test for this by using a + static variable whose address is put into a register that is + clobbered by the vfork. */ +static void +#ifdef __cplusplus +sparc_address_test (int arg) +# else +sparc_address_test (arg) int arg; +#endif +{ + static pid_t child; + if (!child) { + child = vfork (); + if (child < 0) { + perror ("vfork"); + _exit(2); + } + if (!child) { + arg = getpid(); + write(-1, "", 0); + _exit (arg); + } + } +} + +int +main () +{ + pid_t parent = getpid (); + pid_t child; + + sparc_address_test (0); + + child = vfork (); + + if (child == 0) { + /* Here is another test for sparc vfork register problems. This + test uses lots of local variables, at least as many local + variables as main has allocated so far including compiler + temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris + 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should + reuse the register of parent for one of the local variables, + since it will think that parent can't possibly be used any more + in this routine. Assigning to the local variable will thus + munge parent in the parent process. */ + pid_t + p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), + p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); + /* Convince the compiler that p..p7 are live; otherwise, it might + use the same hardware register for all 8 local variables. */ + if (p != p1 || p != p2 || p != p3 || p != p4 + || p != p5 || p != p6 || p != p7) + _exit(1); + + /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent + from child file descriptors. If the child closes a descriptor + before it execs or exits, this munges the parent's descriptor + as well. Test for this by closing stdout in the child. */ + _exit(close(fileno(stdout)) != 0); + } else { + int status; + struct stat st; + + while (wait(&status) != child) + ; + return ( + /* Was there some problem with vforking? */ + child < 0 + + /* Did the child fail? (This shouldn't happen.) */ + || status + + /* Did the vfork/compiler bug occur? */ + || parent != getpid() + + /* Did the file descriptor bug occur? */ + || fstat(fileno(stdout), &st) != 0 + ); + } +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_vfork_works=yes +else + ac_cv_func_vfork_works=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_vfork_works" >&5 +$as_echo "$ac_cv_func_vfork_works" >&6; } + +fi; +if test "x$ac_cv_func_fork_works" = xcross; then + ac_cv_func_vfork_works=$ac_cv_func_vfork + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 +$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} +fi + +if test "x$ac_cv_func_vfork_works" = xyes; then + +$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h + +else + +$as_echo "#define vfork fork" >>confdefs.h + +fi +if test "x$ac_cv_func_fork_works" = xyes; then + +$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h + +fi + +ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" +if test "x$ac_cv_have_decl_strerror_r" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRERROR_R $ac_have_decl +_ACEOF + +for ac_func in strerror_r +do : + ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r" +if test "x$ac_cv_func_strerror_r" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRERROR_R 1 +_ACEOF + +fi +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5 +$as_echo_n "checking whether strerror_r returns char *... " >&6; } +if ${ac_cv_func_strerror_r_char_p+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ac_cv_func_strerror_r_char_p=no + if test $ac_cv_have_decl_strerror_r = yes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + char buf[100]; + char x = *strerror_r (0, buf, sizeof buf); + char *p = strerror_r (0, buf, sizeof buf); + return !p || x; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_func_strerror_r_char_p=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + else + # strerror_r is not declared. Choose between + # systems that have relatively inaccessible declarations for the + # function. BeOS and DEC UNIX 4.0 fall in this category, but the + # former has a strerror_r that returns char*, while the latter + # has a strerror_r that returns `int'. + # This test should segfault on the DEC system. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default + extern char *strerror_r (); +int +main () +{ +char buf[100]; + char x = *strerror_r (0, buf, sizeof buf); + return ! isalpha (x); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_strerror_r_char_p=yes +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_func_strerror_r_char_p" >&5 +$as_echo "$ac_cv_func_strerror_r_char_p" >&6; } +if test $ac_cv_func_strerror_r_char_p = yes; then + +$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h + +fi + + +ac_fn_c_check_header_mongrel "$LINENO" "umem.h" "ac_cv_header_umem_h" "$ac_includes_default" +if test "x$ac_cv_header_umem_h" = xyes; then : + +$as_echo "#define HAVE_UMEM_H 1" >>confdefs.h + + build_cache=no +else + build_cache=yes +fi + + + + if test "x$build_cache" = "xyes"; then + BUILD_CACHE_TRUE= + BUILD_CACHE_FALSE='#' +else + BUILD_CACHE_TRUE='#' + BUILD_CACHE_FALSE= +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler vendor" >&5 +$as_echo_n "checking for C compiler vendor... " >&6; } +if ${ax_cv_c_compiler_vendor+:} false; then : + $as_echo_n "(cached) " >&6 +else + # note: don't check for gcc first since some other compilers define __GNUC__ + vendors="intel: __ICC,__ECC,__INTEL_COMPILER + ibm: __xlc__,__xlC__,__IBMC__,__IBMCPP__ + pathscale: __PATHCC__,__PATHSCALE__ + clang: __clang__ + fujitsu: __FUJITSU + gnu: __GNUC__ + sun: __SUNPRO_C,__SUNPRO_CC + hp: __HP_cc,__HP_aCC + dec: __DECC,__DECCXX,__DECC_VER,__DECCXX_VER + borland: __BORLANDC__,__TURBOC__ + comeau: __COMO__ + cray: _CRAYC + kai: __KCC + lcc: __LCC__ + sgi: __sgi,sgi + microsoft: _MSC_VER + metrowerks: __MWERKS__ + watcom: __WATCOMC__ + portland: __PGI + unknown: UNKNOWN" + for ventest in $vendors; do + case $ventest in + *:) vendor=$ventest; continue ;; + *) vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")" ;; + esac + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + #if !($vencpp) + thisisanerror; + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done + ax_cv_c_compiler_vendor=`echo $vendor | cut -d: -f1` + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_compiler_vendor" >&5 +$as_echo "$ax_cv_c_compiler_vendor" >&6; } + + +ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" " + #ifdef HAVE_SYS_TYPES_H + # include + #endif + #ifdef HAVE_NETINET_IN_H + # include + #endif + #ifdef HAVE_NETDB_H + # include + #endif +" +if test "x$ac_cv_type_in_port_t" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_IN_PORT_T 1 +_ACEOF + + +fi + +ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" +if test "x$ac_cv_type_ptrdiff_t" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_PTRDIFF_T 1 +_ACEOF + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 +$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } +if ${ac_cv_header_stdbool_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #ifndef bool + "error: bool is not defined" + #endif + #ifndef false + "error: false is not defined" + #endif + #if false + "error: false is not 0" + #endif + #ifndef true + "error: true is not defined" + #endif + #if true != 1 + "error: true is not 1" + #endif + #ifndef __bool_true_false_are_defined + "error: __bool_true_false_are_defined is not defined" + #endif + + struct s { _Bool s: 1; _Bool t; } s; + + char a[true == 1 ? 1 : -1]; + char b[false == 0 ? 1 : -1]; + char c[__bool_true_false_are_defined == 1 ? 1 : -1]; + char d[(bool) 0.5 == true ? 1 : -1]; + /* See body of main program for 'e'. */ + char f[(_Bool) 0.0 == false ? 1 : -1]; + char g[true]; + char h[sizeof (_Bool)]; + char i[sizeof s.t]; + enum { j = false, k = true, l = false * true, m = true * 256 }; + /* The following fails for + HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ + _Bool n[m]; + char o[sizeof n == m * sizeof n[0] ? 1 : -1]; + char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; + /* Catch a bug in an HP-UX C compiler. See + http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html + */ + _Bool q = true; + _Bool *pq = &q; + +int +main () +{ + + bool e = &s; + *pq |= q; + *pq |= ! q; + /* Refer to every declared value, to avoid compiler optimizations. */ + return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + + !m + !n + !o + !p + !q + !pq); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdbool_h=yes +else + ac_cv_header_stdbool_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 +$as_echo "$ac_cv_header_stdbool_h" >&6; } + ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" +if test "x$ac_cv_type__Bool" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE__BOOL 1 +_ACEOF + + +fi + + +if test $ac_cv_header_stdbool_h = yes; then + +$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h + +fi + +ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t" +case $ac_cv_c_int16_t in #( + no|yes) ;; #( + *) + +cat >>confdefs.h <<_ACEOF +#define int16_t $ac_cv_c_int16_t +_ACEOF +;; +esac + +ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t" +case $ac_cv_c_int32_t in #( + no|yes) ;; #( + *) + +cat >>confdefs.h <<_ACEOF +#define int32_t $ac_cv_c_int32_t +_ACEOF +;; +esac + +ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t" +case $ac_cv_c_int64_t in #( + no|yes) ;; #( + *) + +cat >>confdefs.h <<_ACEOF +#define int64_t $ac_cv_c_int64_t +_ACEOF +;; +esac + +ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t" +case $ac_cv_c_int8_t in #( + no|yes) ;; #( + *) + +cat >>confdefs.h <<_ACEOF +#define int8_t $ac_cv_c_int8_t +_ACEOF +;; +esac + +ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" +if test "x$ac_cv_type_off_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define off_t long int +_ACEOF + +fi + +ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" +if test "x$ac_cv_type_pid_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF + +fi + +ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" +if test "x$ac_cv_type_ssize_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define ssize_t int +_ACEOF + +fi + +ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t" +case $ac_cv_c_uint16_t in #( + no|yes) ;; #( + *) + + +cat >>confdefs.h <<_ACEOF +#define uint16_t $ac_cv_c_uint16_t +_ACEOF +;; + esac + +ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t" +case $ac_cv_c_uint32_t in #( + no|yes) ;; #( + *) + +$as_echo "#define _UINT32_T 1" >>confdefs.h + + +cat >>confdefs.h <<_ACEOF +#define uint32_t $ac_cv_c_uint32_t +_ACEOF +;; + esac + +ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t" +case $ac_cv_c_uint64_t in #( + no|yes) ;; #( + *) + +$as_echo "#define _UINT64_T 1" >>confdefs.h + + +cat >>confdefs.h <<_ACEOF +#define uint64_t $ac_cv_c_uint64_t +_ACEOF +;; + esac + +ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t" +case $ac_cv_c_uint8_t in #( + no|yes) ;; #( + *) + +$as_echo "#define _UINT8_T 1" >>confdefs.h + + +cat >>confdefs.h <<_ACEOF +#define uint8_t $ac_cv_c_uint8_t +_ACEOF +;; + esac + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if ${ac_cv_c_bigendian+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +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 + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +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 + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then : + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_bigendian=no +else + ac_cv_c_bigendian=yes +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_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h +;; #( + no) + ;; #( + universal) + +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + + ;; #( + *) + as_fn_error $? "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; + esac + +{ $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 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 +$as_echo_n "checking for inline... " >&6; } +if ${ac_cv_c_inline+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_inline=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_inline" != no && break +done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 +$as_echo "$ac_cv_c_inline" >&6; } + +case $ac_cv_c_inline in + inline | yes) ;; + *) + case $ac_cv_c_inline in + no) ac_val=;; + *) ac_val=$ac_cv_c_inline;; + esac + cat >>confdefs.h <<_ACEOF +#ifndef __cplusplus +#define inline $ac_val +#endif +_ACEOF + ;; +esac + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 +$as_echo_n "checking for working volatile... " >&6; } +if ${ac_cv_c_volatile+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + +volatile int x; +int * volatile y = (int *) 0; +return !x && !y; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_volatile=yes +else + ac_cv_c_volatile=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_volatile" >&5 +$as_echo "$ac_cv_c_volatile" >&6; } +if test $ac_cv_c_volatile = no; then + +$as_echo "#define volatile /**/" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 +$as_echo_n "checking for C/C++ restrict keyword... " >&6; } +if ${ac_cv_c_restrict+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_restrict=no + # The order here caters to the fact that C++ does not require restrict. + for ac_kw in __restrict __restrict__ _Restrict restrict; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +typedef int * int_ptr; + int foo (int_ptr $ac_kw ip) { + return ip[0]; + } +int +main () +{ +int s[1]; + int * $ac_kw t = s; + t[0] = 0; + return foo(t) + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_restrict=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_restrict" != no && break + done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 +$as_echo "$ac_cv_c_restrict" >&6; } + + case $ac_cv_c_restrict in + restrict) ;; + no) $as_echo "#define restrict /**/" >>confdefs.h + ;; + *) cat >>confdefs.h <<_ACEOF +#define restrict $ac_cv_c_restrict +_ACEOF + ;; + esac + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GCC C++ ABI name demangling" >&5 +$as_echo_n "checking whether the compiler supports GCC C++ ABI name demangling... " >&6; } +if ${ax_cv_cxx_gcc_abi_demangle+:} false; then : + $as_echo_n "(cached) " >&6 +else + 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 "$cross_compiling" = yes; then : + ax_cv_cxx_gcc_abi_demangle=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + template + class A {}; +int +main () +{ +A instance; +#if defined(_WIN32) + return EXIT_FAILURE; +#endif + int status = 0; + char* c_name = abi::__cxa_demangle(typeid(instance).name(), 0, 0, &status); + + std::string name(c_name); + ::free(c_name); + + if (name.compare("A") != 0) + { + return EXIT_FAILURE; + } + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_run "$LINENO"; then : + ax_cv_cxx_gcc_abi_demangle=yes +else + ax_cv_cxx_gcc_abi_demangle=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +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 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_gcc_abi_demangle" >&5 +$as_echo "$ax_cv_cxx_gcc_abi_demangle" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for cxx_gcc_abi_demangle" >&5 +$as_echo_n "checking checking for cxx_gcc_abi_demangle... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$ax_cv_cxx_gcc_abi_demangle\"" >&5 +$as_echo "\"$ax_cv_cxx_gcc_abi_demangle\"" >&6; } + if test "x$ax_cv_cxx_gcc_abi_demangle" = xyes; then : + +$as_echo "#define HAVE_GCC_ABI_DEMANGLE 1" >>confdefs.h + +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking test for a working libevent" >&5 +$as_echo_n "checking test for a working libevent... " >&6; } +if ${ax_cv_libevent+:} false; then : + $as_echo_n "(cached) " >&6 +else + + + CCASFLAGS__ax_save_flags=$CCASFLAGS + + + + CFLAGS__ax_save_flags=$CFLAGS + + + + CPPFLAGS__ax_save_flags=$CPPFLAGS + + + + CXXFLAGS__ax_save_flags=$CXXFLAGS + + + + ERLCFLAGS__ax_save_flags=$ERLCFLAGS + + + + FCFLAGS__ax_save_flags=$FCFLAGS + + + + FCLIBS__ax_save_flags=$FCLIBS + + + + FFLAGS__ax_save_flags=$FFLAGS + + + + FLIBS__ax_save_flags=$FLIBS + + + + GCJFLAGS__ax_save_flags=$GCJFLAGS + + + + JAVACFLAGS__ax_save_flags=$JAVACFLAGS + + + + LDFLAGS__ax_save_flags=$LDFLAGS + + + + LIBS__ax_save_flags=$LIBS + + + + OBJCFLAGS__ax_save_flags=$OBJCFLAGS + + + + OBJCXXFLAGS__ax_save_flags=$OBJCXXFLAGS + + + + UPCFLAGS__ax_save_flags=$UPCFLAGS + + + + VALAFLAGS__ax_save_flags=$VALAFLAGS + + + + LIBS="-levent $LIBS" + 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 "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test program execution failed" >&5 +$as_echo "$as_me: WARNING: test program execution failed" >&2;} +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +#include + +int +main () +{ + + struct event_base *tmp_event= event_init(); + event_base_free(tmp_event); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ax_cv_libevent=yes +else + ax_cv_libevent=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +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 + + + CCASFLAGS=$CCASFLAGS__ax_save_flags + + + CFLAGS=$CFLAGS__ax_save_flags + + + CPPFLAGS=$CPPFLAGS__ax_save_flags + + + CXXFLAGS=$CXXFLAGS__ax_save_flags + + + ERLCFLAGS=$ERLCFLAGS__ax_save_flags + + + FCFLAGS=$FCFLAGS__ax_save_flags + + + FCLIBS=$FCLIBS__ax_save_flags + + + FFLAGS=$FFLAGS__ax_save_flags + + + FLIBS=$FLIBS__ax_save_flags + + + GCJFLAGS=$GCJFLAGS__ax_save_flags + + + JAVACFLAGS=$JAVACFLAGS__ax_save_flags + + + LDFLAGS=$LDFLAGS__ax_save_flags + + + LIBS=$LIBS__ax_save_flags + + + OBJCFLAGS=$OBJCFLAGS__ax_save_flags + + + OBJCXXFLAGS=$OBJCXXFLAGS__ax_save_flags + + + UPCFLAGS=$UPCFLAGS__ax_save_flags + + + VALAFLAGS=$VALAFLAGS__ax_save_flags + + + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_libevent" >&5 +$as_echo "$ax_cv_libevent" >&6; } + + if test "x$ax_cv_libevent" = "xyes"; then : + LIBEVENT_LIB=-levent + + +$as_echo "#define HAVE_LIBEVENT 1" >>confdefs.h + +else + +$as_echo "#define HAVE_LIBEVENT 0" >>confdefs.h + +fi + + if test "x$ax_cv_libevent" = "xyes"; then + HAVE_LIBEVENT_TRUE= + HAVE_LIBEVENT_FALSE='#' +else + HAVE_LIBEVENT_TRUE='#' + HAVE_LIBEVENT_FALSE= +fi + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: + if test "x$ax_cv_libevent" = xyes; then : + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 +$as_echo_n "checking for clock_gettime in -lrt... " >&6; } +if ${ac_cv_lib_rt_clock_gettime+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lrt $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 clock_gettime (); +int +main () +{ +return clock_gettime (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_rt_clock_gettime=yes +else + ac_cv_lib_rt_clock_gettime=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_rt_clock_gettime" >&5 +$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } +if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : + RT_LIB=-lrt + + +$as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h + +else + +$as_echo "#define HAVE_CLOCK_GETTIME 0" >>confdefs.h + +fi + + + +for ac_header in atomic.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "atomic.h" "ac_cv_header_atomic_h" "$ac_includes_default" +if test "x$ac_cv_header_atomic_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ATOMIC_H 1 +_ACEOF + +fi + +done + +if test "x$ac_cv_header_atomic_h" = "xyes"; then : + for ac_func in atomic_add_64 +do : + ac_fn_c_check_func "$LINENO" "atomic_add_64" "ac_cv_func_atomic_add_64" +if test "x$ac_cv_func_atomic_add_64" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ATOMIC_ADD_64 1 +_ACEOF + +fi +done + + for ac_func in atomic_add_32 +do : + ac_fn_c_check_func "$LINENO" "atomic_add_32" "ac_cv_func_atomic_add_32" +if test "x$ac_cv_func_atomic_add_32" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ATOMIC_ADD_32 1 +_ACEOF + +fi +done + + if test "x$ac_cv_func_atomic_add_64" = "xyes" -a "x$ac_cv_func_atomic_add_32" = "xyes"; then : + +$as_echo "#define USE_ATOMIC_H 1" >>confdefs.h + +fi +fi + + +$as_echo "#define HAVE_LIBDRIZZLE 0" >>confdefs.h + + +$as_echo "#define HAVE_DRIZZLED_BINARY 0" >>confdefs.h + + +$as_echo "#define DRIZZLED_BINARY 0" >>confdefs.h + + +$as_echo "#define GEARMAND_BLOBSLAP_WORKER 0" >>confdefs.h + + +$as_echo "#define HAVE_LIBPQ 0" >>confdefs.h + + +$as_echo "#define HAVE_LIBCURL 0" >>confdefs.h + + +# Check for the requirements for running memcached with less privileges +# than the default privilege set. On Solaris we need setppriv and priv.h +# If you want to add support for other platforms you should check for +# your requirements, define HAVE_DROP_PRIVILEGES, and make sure you add +# the source file containing the implementation into memcached_SOURCE +# in Makefile.am +for ac_func in setppriv +do : + ac_fn_c_check_func "$LINENO" "setppriv" "ac_cv_func_setppriv" +if test "x$ac_cv_func_setppriv" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SETPPRIV 1 +_ACEOF + ac_fn_c_check_header_mongrel "$LINENO" "priv.h" "ac_cv_header_priv_h" "$ac_includes_default" +if test "x$ac_cv_header_priv_h" = xyes; then : + +$as_echo "#define HAVE_DROP_PRIVILEGES 1" >>confdefs.h + + build_solaris_privs=yes +fi + + + +fi +done + + + if test "x$ac_cv_header_poll_h" = "xno"; then + BUILD_POLL_TRUE= + BUILD_POLL_FALSE='#' +else + BUILD_POLL_TRUE='#' + BUILD_POLL_FALSE= +fi + + if test "x$ac_cv_header_winsock2_h" = "xyes"; then + BUILD_WIN32_WRAPPERS_TRUE= + BUILD_WIN32_WRAPPERS_FALSE='#' +else + BUILD_WIN32_WRAPPERS_TRUE='#' + BUILD_WIN32_WRAPPERS_FALSE= +fi + +if test "x$ac_cv_header_winsock2_h" = "xyes"; then : + AM_LDFLAGS="$AM_LDFLAGS -lws2_32" + AM_CFLAGS="$AM_CFLAGS $NO_WERROR" + AM_CXXFLAGS="$AM_CXXFLAGS $NO_WERROR" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSG_NOSIGNAL" >&5 +$as_echo_n "checking for MSG_NOSIGNAL... " >&6; } +if ${ac_cv_msg_nosignal+:} 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 + + + + CCASFLAGS__ax_save_flags=$CCASFLAGS + + + + CFLAGS__ax_save_flags=$CFLAGS + + + + CPPFLAGS__ax_save_flags=$CPPFLAGS + + + + CXXFLAGS__ax_save_flags=$CXXFLAGS + + + + ERLCFLAGS__ax_save_flags=$ERLCFLAGS + + + + FCFLAGS__ax_save_flags=$FCFLAGS + + + + FCLIBS__ax_save_flags=$FCLIBS + + + + FFLAGS__ax_save_flags=$FFLAGS + + + + FLIBS__ax_save_flags=$FLIBS + + + + GCJFLAGS__ax_save_flags=$GCJFLAGS + + + + JAVACFLAGS__ax_save_flags=$JAVACFLAGS + + + + LDFLAGS__ax_save_flags=$LDFLAGS + + + + LIBS__ax_save_flags=$LIBS + + + + OBJCFLAGS__ax_save_flags=$OBJCFLAGS + + + + OBJCXXFLAGS__ax_save_flags=$OBJCXXFLAGS + + + + UPCFLAGS__ax_save_flags=$UPCFLAGS + + + + VALAFLAGS__ax_save_flags=$VALAFLAGS + + + + CFLAGS="$CFLAGS -I${srcdir}" + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +int flags= MSG_NOSIGNAL + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_msg_nosignal="yes" +fi +rm -f core conftest.err conftest.$ac_objext 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 + + + CCASFLAGS=$CCASFLAGS__ax_save_flags + + + CFLAGS=$CFLAGS__ax_save_flags + + + CPPFLAGS=$CPPFLAGS__ax_save_flags + + + CXXFLAGS=$CXXFLAGS__ax_save_flags + + + ERLCFLAGS=$ERLCFLAGS__ax_save_flags + + + FCFLAGS=$FCFLAGS__ax_save_flags + + + FCLIBS=$FCLIBS__ax_save_flags + + + FFLAGS=$FFLAGS__ax_save_flags + + + FLIBS=$FLIBS__ax_save_flags + + + GCJFLAGS=$GCJFLAGS__ax_save_flags + + + JAVACFLAGS=$JAVACFLAGS__ax_save_flags + + + LDFLAGS=$LDFLAGS__ax_save_flags + + + LIBS=$LIBS__ax_save_flags + + + OBJCFLAGS=$OBJCFLAGS__ax_save_flags + + + OBJCXXFLAGS=$OBJCXXFLAGS__ax_save_flags + + + UPCFLAGS=$UPCFLAGS__ax_save_flags + + + VALAFLAGS=$VALAFLAGS__ax_save_flags + + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_msg_nosignal" >&5 +$as_echo "$ac_cv_msg_nosignal" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSG_DONTWAIT" >&5 +$as_echo_n "checking for MSG_DONTWAIT... " >&6; } +if ${ac_cv_msg_dontwait+:} 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 + + + + CCASFLAGS__ax_save_flags=$CCASFLAGS + + + + CFLAGS__ax_save_flags=$CFLAGS + + + + CPPFLAGS__ax_save_flags=$CPPFLAGS + + + + CXXFLAGS__ax_save_flags=$CXXFLAGS + + + + ERLCFLAGS__ax_save_flags=$ERLCFLAGS + + + + FCFLAGS__ax_save_flags=$FCFLAGS + + + + FCLIBS__ax_save_flags=$FCLIBS + + + + FFLAGS__ax_save_flags=$FFLAGS + + + + FLIBS__ax_save_flags=$FLIBS + + + + GCJFLAGS__ax_save_flags=$GCJFLAGS + + + + JAVACFLAGS__ax_save_flags=$JAVACFLAGS + + + + LDFLAGS__ax_save_flags=$LDFLAGS + + + + LIBS__ax_save_flags=$LIBS + + + + OBJCFLAGS__ax_save_flags=$OBJCFLAGS + + + + OBJCXXFLAGS__ax_save_flags=$OBJCXXFLAGS + + + + UPCFLAGS__ax_save_flags=$UPCFLAGS + + + + VALAFLAGS__ax_save_flags=$VALAFLAGS + + + + CFLAGS="$CFLAGS -I${srcdir}" + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +int flags= MSG_DONTWAIT + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_msg_dontwait="yes" +fi +rm -f core conftest.err conftest.$ac_objext 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 + + + CCASFLAGS=$CCASFLAGS__ax_save_flags + + + CFLAGS=$CFLAGS__ax_save_flags + + + CPPFLAGS=$CPPFLAGS__ax_save_flags + + + CXXFLAGS=$CXXFLAGS__ax_save_flags + + + ERLCFLAGS=$ERLCFLAGS__ax_save_flags + + + FCFLAGS=$FCFLAGS__ax_save_flags + + + FCLIBS=$FCLIBS__ax_save_flags + + + FFLAGS=$FFLAGS__ax_save_flags + + + FLIBS=$FLIBS__ax_save_flags + + + GCJFLAGS=$GCJFLAGS__ax_save_flags + + + JAVACFLAGS=$JAVACFLAGS__ax_save_flags + + + LDFLAGS=$LDFLAGS__ax_save_flags + + + LIBS=$LIBS__ax_save_flags + + + OBJCFLAGS=$OBJCFLAGS__ax_save_flags + + + OBJCXXFLAGS=$OBJCXXFLAGS__ax_save_flags + + + UPCFLAGS=$UPCFLAGS__ax_save_flags + + + VALAFLAGS=$VALAFLAGS__ax_save_flags + + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_msg_dontwait" >&5 +$as_echo "$ac_cv_msg_dontwait" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSG_MORE" >&5 +$as_echo_n "checking for MSG_MORE... " >&6; } +if ${ac_cv_msg_more+:} 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 + + + + CCASFLAGS__ax_save_flags=$CCASFLAGS + + + + CFLAGS__ax_save_flags=$CFLAGS + + + + CPPFLAGS__ax_save_flags=$CPPFLAGS + + + + CXXFLAGS__ax_save_flags=$CXXFLAGS + + + + ERLCFLAGS__ax_save_flags=$ERLCFLAGS + + + + FCFLAGS__ax_save_flags=$FCFLAGS + + + + FCLIBS__ax_save_flags=$FCLIBS + + + + FFLAGS__ax_save_flags=$FFLAGS + + + + FLIBS__ax_save_flags=$FLIBS + + + + GCJFLAGS__ax_save_flags=$GCJFLAGS + + + + JAVACFLAGS__ax_save_flags=$JAVACFLAGS + + + + LDFLAGS__ax_save_flags=$LDFLAGS + + + + LIBS__ax_save_flags=$LIBS + + + + OBJCFLAGS__ax_save_flags=$OBJCFLAGS + + + + OBJCXXFLAGS__ax_save_flags=$OBJCXXFLAGS + + + + UPCFLAGS__ax_save_flags=$UPCFLAGS + + + + VALAFLAGS__ax_save_flags=$VALAFLAGS + + + + CFLAGS="$CFLAGS -I${srcdir}" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +int flags= MSG_MORE + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_msg_more="yes" +fi +rm -f core conftest.err conftest.$ac_objext 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 + + + CCASFLAGS=$CCASFLAGS__ax_save_flags + + + CFLAGS=$CFLAGS__ax_save_flags + + + CPPFLAGS=$CPPFLAGS__ax_save_flags + + + CXXFLAGS=$CXXFLAGS__ax_save_flags + + + ERLCFLAGS=$ERLCFLAGS__ax_save_flags + + + FCFLAGS=$FCFLAGS__ax_save_flags + + + FCLIBS=$FCLIBS__ax_save_flags + + + FFLAGS=$FFLAGS__ax_save_flags + + + FLIBS=$FLIBS__ax_save_flags + + + GCJFLAGS=$GCJFLAGS__ax_save_flags + + + JAVACFLAGS=$JAVACFLAGS__ax_save_flags + + + LDFLAGS=$LDFLAGS__ax_save_flags + + + LIBS=$LIBS__ax_save_flags + + + OBJCFLAGS=$OBJCFLAGS__ax_save_flags + + + OBJCXXFLAGS=$OBJCXXFLAGS__ax_save_flags + + + UPCFLAGS=$UPCFLAGS__ax_save_flags + + + VALAFLAGS=$VALAFLAGS__ax_save_flags + + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_msg_more" >&5 +$as_echo "$ac_cv_msg_more" >&6; } + + if test "x$ac_cv_msg_nosignal" = "xyes"; then : + +$as_echo "#define HAVE_MSG_NOSIGNAL 1" >>confdefs.h + +fi + if test "x$ac_cv_msg_dontwait" = "xyes"; then : + +$as_echo "#define HAVE_MSG_DONTWAIT 1" >>confdefs.h + +fi + if test "x$ac_cv_msg_more" = "xyes"; then : + +$as_echo "#define HAVE_MSG_MORE 1" >>confdefs.h + +fi + + + ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default" +if test "x$ac_cv_header_uuid_uuid_h" = xyes; then : + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking check to see if -luuid is needed" >&5 +$as_echo_n "checking check to see if -luuid is needed... " >&6; } +if ${ax_cv_libuuid_is_required+:} 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 + + if test "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test program execution failed" >&5 +$as_echo "$as_me: WARNING: test program execution failed" >&2;} +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + + uuid_t out; + uuid_generate(out); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ax_cv_libuuid_is_required=no +else + ax_cv_libuuid_is_required=yes +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +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 + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_libuuid_is_required" >&5 +$as_echo "$ax_cv_libuuid_is_required" >&6; } + + if test "$ax_cv_libuuid_is_required" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking check to see if -luuid is needed" >&5 +$as_echo_n "checking check to see if -luuid is needed... " >&6; } +if ${ax_cv_libuuid_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + + + CCASFLAGS__ax_save_flags=$CCASFLAGS + + + + CFLAGS__ax_save_flags=$CFLAGS + + + + CPPFLAGS__ax_save_flags=$CPPFLAGS + + + + CXXFLAGS__ax_save_flags=$CXXFLAGS + + + + ERLCFLAGS__ax_save_flags=$ERLCFLAGS + + + + FCFLAGS__ax_save_flags=$FCFLAGS + + + + FCLIBS__ax_save_flags=$FCLIBS + + + + FFLAGS__ax_save_flags=$FFLAGS + + + + FLIBS__ax_save_flags=$FLIBS + + + + GCJFLAGS__ax_save_flags=$GCJFLAGS + + + + JAVACFLAGS__ax_save_flags=$JAVACFLAGS + + + + LDFLAGS__ax_save_flags=$LDFLAGS + + + + LIBS__ax_save_flags=$LIBS + + + + OBJCFLAGS__ax_save_flags=$OBJCFLAGS + + + + OBJCXXFLAGS__ax_save_flags=$OBJCXXFLAGS + + + + UPCFLAGS__ax_save_flags=$UPCFLAGS + + + + VALAFLAGS__ax_save_flags=$VALAFLAGS + + + + LIBS="-luuid $LIBS" + 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 "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test program execution failed" >&5 +$as_echo "$as_me: WARNING: test program execution failed" >&2;} +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + + uuid_t out; + uuid_generate(out); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ax_cv_libuuid_works=yes +else + ax_cv_libuuid_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +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 + + + CCASFLAGS=$CCASFLAGS__ax_save_flags + + + CFLAGS=$CFLAGS__ax_save_flags + + + CPPFLAGS=$CPPFLAGS__ax_save_flags + + + CXXFLAGS=$CXXFLAGS__ax_save_flags + + + ERLCFLAGS=$ERLCFLAGS__ax_save_flags + + + FCFLAGS=$FCFLAGS__ax_save_flags + + + FCLIBS=$FCLIBS__ax_save_flags + + + FFLAGS=$FFLAGS__ax_save_flags + + + FLIBS=$FLIBS__ax_save_flags + + + GCJFLAGS=$GCJFLAGS__ax_save_flags + + + JAVACFLAGS=$JAVACFLAGS__ax_save_flags + + + LDFLAGS=$LDFLAGS__ax_save_flags + + + LIBS=$LIBS__ax_save_flags + + + OBJCFLAGS=$OBJCFLAGS__ax_save_flags + + + OBJCXXFLAGS=$OBJCXXFLAGS__ax_save_flags + + + UPCFLAGS=$UPCFLAGS__ax_save_flags + + + VALAFLAGS=$VALAFLAGS__ax_save_flags + + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_libuuid_works" >&5 +$as_echo "$ax_cv_libuuid_works" >&6; } + +fi + + if test "$ax_cv_libuuid_is_required" = yes; then : + if test "$ax_cv_libuuid_works" = yes; then : + ax_libuuid=yes +fi +else + ax_libuuid=yes +fi + +else + ax_libuuid=no +fi + + + + if test "x$ax_libuuid" = xyes; then : + +$as_echo "#define HAVE_UUID_UUID_H 1" >>confdefs.h + + if test "x$ax_cv_libuuid_is_required" = xyes; then : + LIBUUID_LIB='-luuid' +fi +else + +$as_echo "#define HAVE_UUID_UUID_H 0" >>confdefs.h + + +fi + + + if test "x$ax_libuuid" = xyes; then + HAVE_LIBUUID_TRUE= + HAVE_LIBUUID_FALSE='#' +else + HAVE_LIBUUID_TRUE='#' + HAVE_LIBUUID_FALSE= +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5 +$as_echo_n "checking for uuid_generate_time_safe... " >&6; } +if ${ax_cv_uuid_generate_time_safe+:} false; then : + $as_echo_n "(cached) " >&6 +else + + + CCASFLAGS__ax_save_flags=$CCASFLAGS + + + + CFLAGS__ax_save_flags=$CFLAGS + + + + CPPFLAGS__ax_save_flags=$CPPFLAGS + + + + CXXFLAGS__ax_save_flags=$CXXFLAGS + + + + ERLCFLAGS__ax_save_flags=$ERLCFLAGS + + + + FCFLAGS__ax_save_flags=$FCFLAGS + + + + FCLIBS__ax_save_flags=$FCLIBS + + + + FFLAGS__ax_save_flags=$FFLAGS + + + + FLIBS__ax_save_flags=$FLIBS + + + + GCJFLAGS__ax_save_flags=$GCJFLAGS + + + + JAVACFLAGS__ax_save_flags=$JAVACFLAGS + + + + LDFLAGS__ax_save_flags=$LDFLAGS + + + + LIBS__ax_save_flags=$LIBS + + + + OBJCFLAGS__ax_save_flags=$OBJCFLAGS + + + + OBJCXXFLAGS__ax_save_flags=$OBJCXXFLAGS + + + + UPCFLAGS__ax_save_flags=$UPCFLAGS + + + + VALAFLAGS__ax_save_flags=$VALAFLAGS + + + + LIBS="$LIBUUID_LIB $LIBS" + 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 "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test program execution failed" >&5 +$as_echo "$as_me: WARNING: test program execution failed" >&2;} +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include +int +main () +{ + + uuid_t out; + uuid_generate_time_safe(out); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ax_cv_uuid_generate_time_safe=yes +else + ax_cv_uuid_generate_time_safe=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +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 + + + CCASFLAGS=$CCASFLAGS__ax_save_flags + + + CFLAGS=$CFLAGS__ax_save_flags + + + CPPFLAGS=$CPPFLAGS__ax_save_flags + + + CXXFLAGS=$CXXFLAGS__ax_save_flags + + + ERLCFLAGS=$ERLCFLAGS__ax_save_flags + + + FCFLAGS=$FCFLAGS__ax_save_flags + + + FCLIBS=$FCLIBS__ax_save_flags + + + FFLAGS=$FFLAGS__ax_save_flags + + + FLIBS=$FLIBS__ax_save_flags + + + GCJFLAGS=$GCJFLAGS__ax_save_flags + + + JAVACFLAGS=$JAVACFLAGS__ax_save_flags + + + LDFLAGS=$LDFLAGS__ax_save_flags + + + LIBS=$LIBS__ax_save_flags + + + OBJCFLAGS=$OBJCFLAGS__ax_save_flags + + + OBJCXXFLAGS=$OBJCXXFLAGS__ax_save_flags + + + UPCFLAGS=$UPCFLAGS__ax_save_flags + + + VALAFLAGS=$VALAFLAGS__ax_save_flags + + + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_uuid_generate_time_safe" >&5 +$as_echo "$ax_cv_uuid_generate_time_safe" >&6; } + + if test "$ax_cv_uuid_generate_time_safe" = yes; then : + +$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h + +else + +$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 0" >>confdefs.h + +fi + + + + + + + + if ${ax_cv_have_LIBSASL+:} false; then : + $as_echo_n "(cached) " >&6 +else + + + CCASFLAGS__ax_save_flags=$CCASFLAGS + + + + CFLAGS__ax_save_flags=$CFLAGS + + + + CPPFLAGS__ax_save_flags=$CPPFLAGS + + + + CXXFLAGS__ax_save_flags=$CXXFLAGS + + + + ERLCFLAGS__ax_save_flags=$ERLCFLAGS + + + + FCFLAGS__ax_save_flags=$FCFLAGS + + + + FCLIBS__ax_save_flags=$FCLIBS + + + + FFLAGS__ax_save_flags=$FFLAGS + + + + FLIBS__ax_save_flags=$FLIBS + + + + GCJFLAGS__ax_save_flags=$GCJFLAGS + + + + JAVACFLAGS__ax_save_flags=$JAVACFLAGS + + + + LDFLAGS__ax_save_flags=$LDFLAGS + + + + LIBS__ax_save_flags=$LIBS + + + + OBJCFLAGS__ax_save_flags=$OBJCFLAGS + + + + OBJCXXFLAGS__ax_save_flags=$OBJCXXFLAGS + + + + UPCFLAGS__ax_save_flags=$UPCFLAGS + + + + VALAFLAGS__ax_save_flags=$VALAFLAGS + + + + + if test "x$LIBSASL_CPPFLAGS" != "x"; then : + CPPFLAGS="$CPPFLAGS $LIBSASL_CPPFLAGS" +fi + + if test "x$LIBSASL_LDFLAGS" != "x"; then : + LDFLAGS="$LDFLAGS $LIBSASL_LDFLAGS" +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 : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsasl2" >&5 +$as_echo_n "checking for main in -lsasl2... " >&6; } +if ${ac_cv_lib_sasl2_main+:} 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. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_sasl2_main=yes +else + ac_cv_lib_sasl2_main=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_main" >&5 +$as_echo "$ac_cv_lib_sasl2_main" >&6; } +if test "x$ac_cv_lib_sasl2_main" = xyes; then : + ax_cv_have_LIBSASL=yes +else + ax_cv_have_LIBSASL=no +fi + + +else + ax_cv_have_LIBSASL=no +fi + + + + + CCASFLAGS=$CCASFLAGS__ax_save_flags + + + CFLAGS=$CFLAGS__ax_save_flags + + + CPPFLAGS=$CPPFLAGS__ax_save_flags + + + CXXFLAGS=$CXXFLAGS__ax_save_flags + + + ERLCFLAGS=$ERLCFLAGS__ax_save_flags + + + FCFLAGS=$FCFLAGS__ax_save_flags + + + FCLIBS=$FCLIBS__ax_save_flags + + + FFLAGS=$FFLAGS__ax_save_flags + + + FLIBS=$FLIBS__ax_save_flags + + + GCJFLAGS=$GCJFLAGS__ax_save_flags + + + JAVACFLAGS=$JAVACFLAGS__ax_save_flags + + + LDFLAGS=$LDFLAGS__ax_save_flags + + + LIBS=$LIBS__ax_save_flags + + + OBJCFLAGS=$OBJCFLAGS__ax_save_flags + + + OBJCXXFLAGS=$OBJCXXFLAGS__ax_save_flags + + + UPCFLAGS=$UPCFLAGS__ax_save_flags + + + VALAFLAGS=$VALAFLAGS__ax_save_flags + + + + +fi + + + if test "$ax_cv_have_LIBSASL" = "yes"; then : + +$as_echo "#define HAVE_LIBSASL 1" >>confdefs.h + + + ax_sasl_check=yes + SASL_LIB=-lsasl2 + +else + + ax_sasl_check=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking to see if sasl works" >&5 +$as_echo_n "checking checking to see if sasl works... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$ax_sasl_check\"" >&5 +$as_echo "\"$ax_sasl_check\"" >&6; } + +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 + + + +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 + +ax_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on True64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 +$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; } + 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 pthread_join (); +int +main () +{ +return pthread_join (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_pthread_ok=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 +$as_echo "$ax_pthread_ok" >&6; } + if test x"$ax_pthread_ok" = xno; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all, and "pthread-config" +# which is a program returning the flags for the Pth emulation library. + +ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) +# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) +# -pthreads: Solaris/gcc +# -mthreads: Mingw32/gcc, Lynx/gcc +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads too; +# also defines -D_REENTRANT) +# ... -mt is also the pthreads flag for HP/aCC +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) + +case ${host_os} in + solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (We need to link with -pthreads/-mt/ + # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather + # a function called by this macro, so we could check for that, but + # who knows whether they'll stub that too in a future libc.) So, + # we'll just look for -pthreads and -lpthread first: + + ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" + ;; + + darwin*) + ax_pthread_flags="none -pthread $ax_pthread_flags" + ;; +esac + +# Clang doesn't consider unrecognized options an error unless we specify +# -Werror. We throw in some extra Clang-specific options to ensure that +# this doesn't happen for GCC, which also accepts -Werror. + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5 +$as_echo_n "checking if compiler needs -Werror to reject unknown flags... " >&6; } +save_CFLAGS="$CFLAGS" +ax_pthread_extra_flags="-Werror" +CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo(void); +int +main () +{ +foo() + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + ax_pthread_extra_flags= + { $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 +CFLAGS="$save_CFLAGS" + +if test x"$ax_pthread_ok" = xno; then +for flag in $ax_pthread_flags; do + + case $flag in + none) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 +$as_echo_n "checking whether pthreads work without any flags... " >&6; } + ;; + + -*) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5 +$as_echo_n "checking whether pthreads work with $flag... " >&6; } + PTHREAD_CFLAGS="$flag" + ;; + + pthread-config) + # Extract the first word of "pthread-config", so it can be a program name with args. +set dummy pthread-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_prog_ax_pthread_config+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ax_pthread_config"; then + ac_cv_prog_ax_pthread_config="$ax_pthread_config" # 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_ax_pthread_config="yes" + $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_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" +fi +fi +ax_pthread_config=$ac_cv_prog_ax_pthread_config +if test -n "$ax_pthread_config"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 +$as_echo "$ax_pthread_config" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test x"$ax_pthread_config" = xno; then continue; fi + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5 +$as_echo_n "checking for the pthreads library -l$flag... " >&6; } + PTHREAD_LIBS="-l$flag" + ;; + esac + + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + static void routine(void *a) { a = 0; } + static void *start_routine(void *a) { return a; } +int +main () +{ +pthread_t th; pthread_attr_t attr; + pthread_create(&th, 0, start_routine, 0); + pthread_join(th, 0); + pthread_attr_init(&attr); + pthread_cleanup_push(routine, 0); + pthread_cleanup_pop(0) /* ; */ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_pthread_ok=yes +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 +$as_echo "$ax_pthread_ok" >&6; } + if test "x$ax_pthread_ok" = xyes; then + break; + fi + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + +# Various other checks: +if test "x$ax_pthread_ok" = xyes; then + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 +$as_echo_n "checking for joinable pthread attribute... " >&6; } + attr_name=unknown + for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +int attr = $attr; return attr /* ; */ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + attr_name=$attr; break +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + done + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5 +$as_echo "$attr_name" >&6; } + if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then + +cat >>confdefs.h <<_ACEOF +#define PTHREAD_CREATE_JOINABLE $attr_name +_ACEOF + + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5 +$as_echo_n "checking if more special flags are required for pthreads... " >&6; } + flag=no + case ${host_os} in + aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; + osf* | hpux*) flag="-D_REENTRANT";; + solaris*) + if test "$GCC" = "yes"; then + flag="-D_REENTRANT" + else + # TODO: What about Clang on Solaris? + flag="-mt -D_REENTRANT" + fi + ;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flag" >&5 +$as_echo "$flag" >&6; } + if test "x$flag" != xno; then + PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 +$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; } +if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +int i = PTHREAD_PRIO_INHERIT; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_PTHREAD_PRIO_INHERIT=yes +else + ax_cv_PTHREAD_PRIO_INHERIT=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 +$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } + if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then : + +$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h + +fi + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + # More AIX lossage: compile with *_r variant + if test "x$GCC" != xyes; then + case $host_os in + aix*) + case "x/$CC" in #( + x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : + #handle absolute path differently from PATH based program lookup + case "x$CC" in #( + x/*) : + if as_fn_executable_p ${CC}_r; then : + PTHREAD_CC="${CC}_r" +fi ;; #( + *) : + for ac_prog in ${CC}_r +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_PTHREAD_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$PTHREAD_CC"; then + ac_cv_prog_PTHREAD_CC="$PTHREAD_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_PTHREAD_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 +PTHREAD_CC=$ac_cv_prog_PTHREAD_CC +if test -n "$PTHREAD_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 +$as_echo "$PTHREAD_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$PTHREAD_CC" && break +done +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" + ;; +esac ;; #( + *) : + ;; +esac + ;; + esac + fi +fi + +test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" + + + + + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$ax_pthread_ok" = xyes; then + +$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h + + : +else + ax_pthread_ok=no + as_fn_error $? "could not find libpthread" "$LINENO" 5 +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 + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking check for pthread_timedjoin_np" >&5 +$as_echo_n "checking check for pthread_timedjoin_np... " >&6; } +if ${ax_cv_pthread_timedjoin_np+:} false; then : + $as_echo_n "(cached) " >&6 +else + + + CCASFLAGS__ax_save_flags=$CCASFLAGS + + + + CFLAGS__ax_save_flags=$CFLAGS + + + + CPPFLAGS__ax_save_flags=$CPPFLAGS + + + + CXXFLAGS__ax_save_flags=$CXXFLAGS + + + + ERLCFLAGS__ax_save_flags=$ERLCFLAGS + + + + FCFLAGS__ax_save_flags=$FCFLAGS + + + + FCLIBS__ax_save_flags=$FCLIBS + + + + FFLAGS__ax_save_flags=$FFLAGS + + + + FLIBS__ax_save_flags=$FLIBS + + + + GCJFLAGS__ax_save_flags=$GCJFLAGS + + + + JAVACFLAGS__ax_save_flags=$JAVACFLAGS + + + + LDFLAGS__ax_save_flags=$LDFLAGS + + + + LIBS__ax_save_flags=$LIBS + + + + OBJCFLAGS__ax_save_flags=$OBJCFLAGS + + + + OBJCXXFLAGS__ax_save_flags=$OBJCXXFLAGS + + + + UPCFLAGS__ax_save_flags=$UPCFLAGS + + + + VALAFLAGS__ax_save_flags=$VALAFLAGS + + + + CFLAGS="$PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS" + 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. */ + +#include +#include + +int +main () +{ + + pthread_t thread; + pthread_timedjoin_np(thread, NULL, NULL); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_pthread_timedjoin_np=yes +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 + + + CCASFLAGS=$CCASFLAGS__ax_save_flags + + + CFLAGS=$CFLAGS__ax_save_flags + + + CPPFLAGS=$CPPFLAGS__ax_save_flags + + + CXXFLAGS=$CXXFLAGS__ax_save_flags + + + ERLCFLAGS=$ERLCFLAGS__ax_save_flags + + + FCFLAGS=$FCFLAGS__ax_save_flags + + + FCLIBS=$FCLIBS__ax_save_flags + + + FFLAGS=$FFLAGS__ax_save_flags + + + FLIBS=$FLIBS__ax_save_flags + + + GCJFLAGS=$GCJFLAGS__ax_save_flags + + + JAVACFLAGS=$JAVACFLAGS__ax_save_flags + + + LDFLAGS=$LDFLAGS__ax_save_flags + + + LIBS=$LIBS__ax_save_flags + + + OBJCFLAGS=$OBJCFLAGS__ax_save_flags + + + OBJCXXFLAGS=$OBJCXXFLAGS__ax_save_flags + + + UPCFLAGS=$UPCFLAGS__ax_save_flags + + + VALAFLAGS=$VALAFLAGS__ax_save_flags + + + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_pthread_timedjoin_np" >&5 +$as_echo "$ax_cv_pthread_timedjoin_np" >&6; } + + if test "$ax_cv_pthread_timedjoin_np" = yes; then : + +$as_echo "#define HAVE_PTHREAD_TIMEDJOIN_NP 1" >>confdefs.h + +else + +$as_echo "#define HAVE_PTHREAD_TIMEDJOIN_NP 0" >>confdefs.h + +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 + + + # The sasl functions should only be visible if we build with sasl support + # + + # Check whether --enable-sasl was given. +if test "${enable_sasl+set}" = set; then : + enableval=$enable_sasl; ac_enable_sasl="$enableval" +else + ac_enable_sasl=yes +fi + + + if test "x${ac_enable_sasl}" = xyes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking to see if enabling sasl" >&5 +$as_echo_n "checking checking to see if enabling sasl... " >&6; } + if test "x${ax_sasl_check}" = xyes; then : + + ax_sasl_option=yes +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: request to add sasl support failed, please see config.log" >&5 +$as_echo "$as_me: WARNING: request to add sasl support failed, please see config.log" >&2;} + ac_enable_sasl=no + ax_sasl_option=no +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$ax_sasl_option\"" >&5 +$as_echo "\"$ax_sasl_option\"" >&6; } +else + + ax_sasl_option=no +fi + if test "x${ax_sasl_option}" = xyes; then + HAVE_SASL_TRUE= + HAVE_SASL_FALSE='#' +else + HAVE_SASL_TRUE='#' + HAVE_SASL_FALSE= +fi + + + if test "x$ac_enable_sasl" = xyes; then : + LIBMEMCACHED_WITH_SASL_SUPPORT="#define LIBMEMCACHED_WITH_SASL_SUPPORT 1" +else + LIBMEMCACHED_WITH_SASL_SUPPORT="#define LIBMEMCACHED_WITH_SASL_SUPPORT 0" +fi + + + +# backtrace(), others require shared builds + + if test "x$enable_shared" = "xyes"; then + SHARED_ENABLED_TRUE= + SHARED_ENABLED_FALSE='#' +else + SHARED_ENABLED_TRUE='#' + SHARED_ENABLED_FALSE= +fi + + + + # Check whether --enable-dtrace was given. +if test "${enable_dtrace+set}" = set; then : + enableval=$enable_dtrace; ac_cv_enable_dtrace="$enableval" +else + ac_cv_enable_dtrace="no" +fi + + + if test "$ac_cv_enable_dtrace" = "yes"; then : + + for ac_prog in dtrace +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_DTRACE+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DTRACE"; then + ac_cv_prog_DTRACE="$DTRACE" # 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_DTRACE="$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 +DTRACE=$ac_cv_prog_DTRACE +if test -n "$DTRACE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5 +$as_echo "$DTRACE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$DTRACE" && break +done + + for ac_header in sys/sdt.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_sdt_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_SDT_H 1 +_ACEOF + +fi + +done + + + if test "x$ac_cv_prog_DTRACE" = "xdtrace" -a "x${ac_cv_header_sys_sdt_h}" = "xyes"; then : + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace works" >&5 +$as_echo_n "checking if dtrace works... " >&6; } +if ${ac_cv_dtrace_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat >conftest.d <<_ACEOF +provider Example { + probe increment(int); +}; +_ACEOF + $DTRACE -h -o conftest.h -s conftest.d 2>/dev/zero + if test $? -eq 0; then : + ac_cv_dtrace_works=yes +else + ac_cv_dtrace_works=no +fi + rm -f conftest.h conftest.d + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_works" >&5 +$as_echo "$ac_cv_dtrace_works" >&6; } + if test "x$ac_cv_dtrace_works" = "xyes"; then : + + +$as_echo "#define HAVE_DTRACE 1" >>confdefs.h + + +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should instrument object files" >&5 +$as_echo_n "checking if dtrace should instrument object files... " >&6; } +if ${ac_cv_dtrace_needs_objects+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat >conftest.d <<_ACEOF +provider Example { + probe increment(int); +}; +_ACEOF + $DTRACE -G -o conftest.d.o -s conftest.d 2>/dev/zero + if test $? -eq 0; then : + ac_cv_dtrace_needs_objects=yes +else + ac_cv_dtrace_needs_objects=no +fi + rm -f conftest.d.o conftest.d + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_needs_objects" >&5 +$as_echo "$ac_cv_dtrace_needs_objects" >&6; } + ac_cv_have_dtrace=yes + +fi +fi + + if test "x$ac_cv_dtrace_works" = "xyes"; then + HAVE_DTRACE_TRUE= + HAVE_DTRACE_FALSE='#' +else + HAVE_DTRACE_TRUE='#' + HAVE_DTRACE_FALSE= +fi + + if test "x$ac_cv_dtrace_needs_objects" = "xyes"; then + DTRACE_NEEDS_OBJECTS_TRUE= + DTRACE_NEEDS_OBJECTS_FALSE='#' +else + DTRACE_NEEDS_OBJECTS_TRUE='#' + DTRACE_NEEDS_OBJECTS_FALSE= +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 ${ax_cv_gcc_atomic_builtins+:} false; then : + $as_echo_n "(cached) " >&6 +else + + + CCASFLAGS__ax_save_flags=$CCASFLAGS + + + + CFLAGS__ax_save_flags=$CFLAGS + + + + CPPFLAGS__ax_save_flags=$CPPFLAGS + + + + CXXFLAGS__ax_save_flags=$CXXFLAGS + + + + ERLCFLAGS__ax_save_flags=$ERLCFLAGS + + + + FCFLAGS__ax_save_flags=$FCFLAGS + + + + FCLIBS__ax_save_flags=$FCLIBS + + + + FFLAGS__ax_save_flags=$FFLAGS + + + + FLIBS__ax_save_flags=$FLIBS + + + + GCJFLAGS__ax_save_flags=$GCJFLAGS + + + + JAVACFLAGS__ax_save_flags=$JAVACFLAGS + + + + LDFLAGS__ax_save_flags=$LDFLAGS + + + + LIBS__ax_save_flags=$LIBS + + + + OBJCFLAGS__ax_save_flags=$OBJCFLAGS + + + + OBJCXXFLAGS__ax_save_flags=$OBJCXXFLAGS + + + + UPCFLAGS__ax_save_flags=$UPCFLAGS + + + + VALAFLAGS__ax_save_flags=$VALAFLAGS + + + + 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 "$cross_compiling" = yes; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: test program execution failed" >&5 +$as_echo "$as_me: WARNING: test program execution failed" >&2;} +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + int foo= -10; int bar= 10; + if (!__sync_fetch_and_add(&foo, bar) || foo) + { + return -1; + } + bar= __sync_lock_test_and_set(&foo, bar); + if (bar || foo != 10) + { + return -1; + } + bar= __sync_val_compare_and_swap(&bar, foo, 15); + if (bar) + { + return -1; + } + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ax_cv_gcc_atomic_builtins=yes +else + ax_cv_gcc_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 + + 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 + + + CCASFLAGS=$CCASFLAGS__ax_save_flags + + + CFLAGS=$CFLAGS__ax_save_flags + + + CPPFLAGS=$CPPFLAGS__ax_save_flags + + + CXXFLAGS=$CXXFLAGS__ax_save_flags + + + ERLCFLAGS=$ERLCFLAGS__ax_save_flags + + + FCFLAGS=$FCFLAGS__ax_save_flags + + + FCLIBS=$FCLIBS__ax_save_flags + + + FFLAGS=$FFLAGS__ax_save_flags + + + FLIBS=$FLIBS__ax_save_flags + + + GCJFLAGS=$GCJFLAGS__ax_save_flags + + + JAVACFLAGS=$JAVACFLAGS__ax_save_flags + + + LDFLAGS=$LDFLAGS__ax_save_flags + + + LIBS=$LIBS__ax_save_flags + + + OBJCFLAGS=$OBJCFLAGS__ax_save_flags + + + OBJCXXFLAGS=$OBJCXXFLAGS__ax_save_flags + + + UPCFLAGS=$UPCFLAGS__ax_save_flags + + + VALAFLAGS=$VALAFLAGS__ax_save_flags + + + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_gcc_atomic_builtins" >&5 +$as_echo "$ax_cv_gcc_atomic_builtins" >&6; } + + if test "x$ax_cv_gcc_atomic_builtins" = "xyes"; then : + +$as_echo "#define HAVE_GCC_ATOMIC_BUILTINS 1" >>confdefs.h + + +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if ${ac_cv_c_bigendian+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +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 + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_bigendian=yes +else + ac_cv_c_bigendian=no +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 + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then : + # Try to guess by grepping values from an object file. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_bigendian=no +else + ac_cv_c_bigendian=yes +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_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + + +$as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h + + +$as_echo "#define ENDIAN_BIG 1" >>confdefs.h + + +$as_echo "#define ENDIAN_LITTLE 0" >>confdefs.h +;; #( + no) + + ;; #( + universal) + + as_fn_error $? "unable to determine endian" "$LINENO" 5 + + ;; #( + *) + + +$as_echo "#define WORDS_BIGENDIAN 0" >>confdefs.h + + +$as_echo "#define ENDIAN_BIG 0" >>confdefs.h + + +$as_echo "#define ENDIAN_LITTLE 1" >>confdefs.h + + ;; + esac + + + + + # Check whether --enable-assert was given. +if test "${enable_assert+set}" = set; then : + enableval=$enable_assert; ax_enable_assert=yes +else + ax_enable_assert=no +fi + + + if test "$ax_enable_assert" = "yes" -o "$ax_enable_debug" = "yes" -o "$ac_cv_vcs_checkout" = "yes" ; then : + ax_enable_assert="yes" +else + ax_enable_assert="no" + +$as_echo "#define NDEBUG 1" >>confdefs.h + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assert" >&5 +$as_echo_n "checking for assert... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_enable_assert" >&5 +$as_echo "$ax_enable_assert" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking C Compiler version" >&5 +$as_echo_n "checking C Compiler version... " >&6; } + + case "$ax_cv_c_compiler_vendor" in #( + sun) : + ax_c_compiler_version=`$CC -V 2>&1 | sed 1q` ;; #( + intel) : + ax_c_compiler_version=`$CC --version 2>&1 | sed 1q` ;; #( + clang) : + ax_c_compiler_version=`$CC --version 2>&1 | sed 1q` ;; #( + gnu) : + ax_c_compiler_version=`$CC --version | sed 1q` ;; #( + mingw) : + ax_c_compiler_version=`$CC --version | sed 1q` ;; #( + *) : + ax_c_compiler_version="unknown: $ax_cv_c_compiler_vendor" ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$ax_c_compiler_version\"" >&5 +$as_echo "\"$ax_c_compiler_version\"" >&6; } + CC_VERSION_VENDOR="$ax_cv_c_compiler_vendor" + + CC_VERSION="$ax_c_compiler_version" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking C++ Compiler version" >&5 +$as_echo_n "checking C++ Compiler version... " >&6; } + + case "$ax_cv_c_compiler_vendor" in #( + sun) : + ax_cxx_compiler_version=`$CXX -V 2>&1 | sed 1q` ;; #( + intel) : + ax_cxx_compiler_version=`$CXX --version 2>&1 | sed 1q` ;; #( + clang) : + ax_cxx_compiler_version=`$CXX --version 2>&1 | sed 1q` ;; #( + gnu) : + ax_cxx_compiler_version=`$CXX --version | sed 1q` ;; #( + mingw) : + ax_cxx_compiler_version=`$CXX --version | sed 1q` ;; #( + *) : + ax_cxx_compiler_version="unknown: $ax_cv_c_compiler_vendor" ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$ax_cxx_compiler_version\"" >&5 +$as_echo "\"$ax_cxx_compiler_version\"" >&6; } + CXX_VERSION_VENDOR="$ax_cv_c_compiler_vendor" + + CXX_VERSION="$ax_cxx_compiler_version" + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking MINGW" >&5 +$as_echo_n "checking MINGW... " >&6; } + ac_fn_c_check_decl "$LINENO" "__MINGW32__" "ac_cv_have_decl___MINGW32__" "$ac_includes_default" +if test "x$ac_cv_have_decl___MINGW32__" = xyes; then : + MINGW=yes + ax_c_compiler_version_vendor=mingw +else + MINGW=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MINGW" >&5 +$as_echo "$MINGW" >&6; } + + + + if test "x$GCC" = xyes; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if !defined(__GNUC__) || (__GNUC__ < 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ < 7)) +# error GCC is Too Old! +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_c_gcc_recent=yes +else + ac_c_gcc_recent=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + + + + CFLAG_VISIBILITY= + HAVE_VISIBILITY=0 + if test -n "$GCC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5 +$as_echo_n "checking whether the -Werror option is usable... " >&6; } + if ${gl_cv_cc_vis_werror+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_cc_vis_werror=yes +else + gl_cv_cc_vis_werror=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_CFLAGS" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5 +$as_echo "$gl_cv_cc_vis_werror" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5 +$as_echo_n "checking for simple visibility declarations... " >&6; } + if ${gl_cv_cc_visibility+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gl_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fvisibility=hidden" + if test $gl_cv_cc_vis_werror = yes; then + CFLAGS="$CFLAGS -Werror" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +extern __attribute__((__visibility__("hidden"))) int hiddenvar; + extern __attribute__((__visibility__("default"))) int exportedvar; + extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); + extern __attribute__((__visibility__("default"))) int exportedfunc (void); + void dummyfunc (void) {} + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_cc_visibility=yes +else + gl_cv_cc_visibility=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS="$gl_save_CFLAGS" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5 +$as_echo "$gl_cv_cc_visibility" >&6; } + if test $gl_cv_cc_visibility = yes; then + CFLAG_VISIBILITY="-fvisibility=hidden" + HAVE_VISIBILITY=1 + fi + fi + + + +cat >>confdefs.h <<_ACEOF +#define HAVE_VISIBILITY $HAVE_VISIBILITY +_ACEOF + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if all warnings into errors" >&5 +$as_echo_n "checking if all warnings into errors... " >&6; } +if ${ac_cv_warnings_as_errors+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$ac_cv_vcs_checkout" = xyes; then : + ac_cv_warnings_as_errors=yes +else + ac_cv_warnings_as_errors=no +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_warnings_as_errors" >&5 +$as_echo "$ac_cv_warnings_as_errors" >&6; } + + + +# Check whether --with-sanitize was given. +if test "${with_sanitize+set}" = set; then : + withval=$with_sanitize; case $with_sanitize in #( + thread) : + + ax_harden_sanitize='thread' ;; #( + address) : + + ax_harden_sanitize='address' ;; #( + *) : + ax_harden_sanitize='rest' ;; +esac + +else + if test "x$ax_enable_debug" = xyes; then : + ax_harden_sanitize='rest' +fi +fi + + + + + if test -n "$CFLAG_VISIBILITY"; then : + CPPFLAGS="$CPPFLAGS $CFLAG_VISIBILITY" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if all warnings into errors" >&5 +$as_echo_n "checking if all warnings into errors... " >&6; } +if ${ac_cv_warnings_as_errors+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$ac_cv_vcs_checkout" = xyes; then : + ac_cv_warnings_as_errors=yes +else + ac_cv_warnings_as_errors=no +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_warnings_as_errors" >&5 +$as_echo "$ac_cv_warnings_as_errors" >&6; } + + if test "$CC" != "clang"; then : + + +for flag in -z relro -z now; do + as_CACHEVAR=`$as_echo "ax_cv_check_ldflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts $flag" >&5 +$as_echo_n "checking whether the linker accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${LDFLAGS+:} false; then : + case " $LDFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS already contains \$flag"; } >&5 + (: LDFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS \$flag\""; } >&5 + (: LDFLAGS="$LDFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + LDFLAGS="$LDFLAGS $flag" + ;; + esac +else + LDFLAGS="$flag" +fi + +else + : +fi + +done + + + if test "x$ac_cv_warnings_as_errors" = xyes; then : + + +for flag in -Werror; do + as_CACHEVAR=`$as_echo "ax_cv_check_ldflags__$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts $flag" >&5 +$as_echo_n "checking whether the linker accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${LDFLAGS+:} false; then : + case " $LDFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS already contains \$flag"; } >&5 + (: LDFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS \$flag\""; } >&5 + (: LDFLAGS="$LDFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + LDFLAGS="$LDFLAGS $flag" + ;; + esac +else + LDFLAGS="$flag" +fi + +else + : +fi + +done + +fi + if test "x$ac_cv_vcs_checkout" = xyes; then : + + +for flag in -rdynamic; do + as_CACHEVAR=`$as_echo "ax_cv_check_ldflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts $flag" >&5 +$as_echo_n "checking whether the linker accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${LDFLAGS+:} false; then : + case " $LDFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS already contains \$flag"; } >&5 + (: LDFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : LDFLAGS=\"\$LDFLAGS \$flag\""; } >&5 + (: LDFLAGS="$LDFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + LDFLAGS="$LDFLAGS $flag" + ;; + esac +else + LDFLAGS="$flag" +fi + +else + : +fi + +done + + +# AX_APPEND_LINK_FLAGS([--coverage]) +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 + + if test "x$ax_enable_debug" = xyes; then : + CFLAGS='' + + +for flag in -H; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -g; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -g3; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fmudflapth; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fno-eliminate-unused-debug-types; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fno-omit-frame-pointer; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +else + + + +for flag in -g; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -O2; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +fi + + if test "x$ac_cv_vcs_checkout" = xyes; then : + + +for flag in -fstack-check; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + +# _APPEND_COMPILE_FLAGS_ERROR([--coverage]) + + +for flag in -Wpragmas; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wunknown-pragmas; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + +else + + +for flag in -Wno-unknown-pragmas; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wno-pragmas; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + +fi + + if test "$CC" = "clang"; then : + + +for flag in -Qunused-arguments; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + +fi + + + +for flag in -Wall; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wextra; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Weverything; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wthis-test-should-fail; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + +# Anything below this comment please keep sorted. +# _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-format-attribute]) + + +for flag in -Wunsuffixed-float-constants; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wjump-misses-init; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wno-attributes; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Waddress; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wvarargs; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Warray-bounds; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wbad-function-cast; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + +# Not in use -Wc++-compat + + +for flag in -Wchar-subscripts; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wcomment; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wfloat-equal; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wformat-security; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wformat=2; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wformat-y2k; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wlogical-op; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wmaybe-uninitialized; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wmissing-field-initializers; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + if test "x$MINGW" = xyes; then : + + +for flag in -Wno-missing-noreturn; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + +else + + +for flag in -Wmissing-noreturn; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + +fi + + +for flag in -Wmissing-prototypes; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wnested-externs; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wnormalized=id; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Woverride-init; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wpointer-arith; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wpointer-sign; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + if test "x$MINGW" = xyes; then : + + +for flag in -Wno-suggest-attribute=const; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wno-suggest-attribute=noreturn; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wno-suggest-attribute=pure; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wno-redundant-decls; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + +else + + +for flag in -Wredundant-decls; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + +fi + + +for flag in -Wshadow; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wshorten-64-to-32; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wsign-compare; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wstrict-overflow=1; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wstrict-prototypes; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wswitch-enum; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wtrampolines; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wundef; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wunsafe-loop-optimizations; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -funsafe-loop-optimizations; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + + +for flag in -Wclobbered; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wunused; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wunused-result; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wunused-variable; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wunused-parameter; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wunused-local-typedefs; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wwrite-strings; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fwrapv; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fmudflapt; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -pipe; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fPIE -pie; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wsizeof-pointer-memaccess; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wpacked; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + +# _APPEND_COMPILE_FLAGS_ERROR([-Wlong-long]) +# GCC 4.5 removed this. +# _APPEND_COMPILE_FLAGS_ERROR([-Wunreachable-code]) + + if test "x$MINGW" != xyes; then : + + if test "x$enable_shared" = "xyes"; then : + case $ax_harden_sanitize in #( + thread) : + + + +for flag in -fsanitize=thread; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + ;; #( + address) : + + + +for flag in -fsanitize=address; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + ;; #( + rest) : + + + +for flag in -fno-omit-frame-pointer; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=integer; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=memory; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=alignment; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=bool; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=bounds; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=enum; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=float-cast-overflow; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=float-divide-by-zero; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=integer-divide-by-zero; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=null; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=object-size; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=return; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=shift; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=signed-integer-overflow; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=unreachable; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=unsigned-integer-overflow; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=vla-bound; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=vptr; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + ;; #( + *) : + ;; +esac + +fi + +fi + + + if test "x$ax_enable_debug" = xno; then : + if test "x$ac_cv_vcs_checkout" = xyes; then : + if test "x${host_os}" != "xmingw"; then : + if test "x$ac_c_gcc_recent" = xyes; then : + + +for flag in -D_FORTIFY_SOURCE=2; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + #_APPEND_COMPILE_FLAGS_ERROR([-Wstack-protector]) + #_APPEND_COMPILE_FLAGS_ERROR([-fstack-protector --param=ssp-buffer-size=4]) + + +for flag in -fstack-protector-all; do + as_CACHEVAR=`$as_echo "ax_cv_check_cflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +$as_echo_n "checking whether C compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains \$flag"; } >&5 + (: CFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS \$flag\""; } >&5 + (: CFLAGS="$CFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS $flag" + ;; + esac +else + CFLAGS="$flag" +fi + +else + : +fi + +done + + + +fi +fi +fi +fi + + if test "x$ac_cv_warnings_as_errors" = xyes; then : + if ${CFLAGS+:} false; then : + case " $CFLAGS " in + *" -Werror "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS already contains -Werror"; } >&5 + (: CFLAGS already contains -Werror) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CFLAGS=\"\$CFLAGS -Werror\""; } >&5 + (: CFLAGS="$CFLAGS -Werror") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CFLAGS="$CFLAGS -Werror" + ;; + esac +else + CFLAGS="-Werror" +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 + + + 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 "x$ax_enable_debug" = xyes; then : + CXXFLAGS='' + + +for flag in -H; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -g; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -g3; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fmudflapth; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fno-inline; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fno-eliminate-unused-debug-types; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fno-omit-frame-pointer; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + +else + + + +for flag in -g; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -O2; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + +fi + + if test "x$ac_cv_vcs_checkout" = xyes; then : + + +for flag in -fstack-check; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + +# _APPEND_COMPILE_FLAGS_ERROR([--coverage]) + + +for flag in -Wpragmas; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wunknown-pragmas; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + +else + + +for flag in -Wno-unknown-pragmas; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wno-pragmas; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + +fi + + if test "$CXX" = "clang++"; then : + + +for flag in -Qunused-arguments; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + +fi + + + +for flag in -Wall; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wextra; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Weverything; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wthis-test-should-fail; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + +# Anything below this comment please keep sorted. +# _APPEND_COMPILE_FLAGS_ERROR([-Wmissing-format-attribute]) + + +for flag in -Wno-attributes; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wvarargs; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Waddress; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Warray-bounds; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wchar-subscripts; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wcomment; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wctor-dtor-privacy; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wfloat-equal; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wformat=2; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wformat-y2k; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wmaybe-uninitialized; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wmissing-field-initializers; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wlogical-op; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wnon-virtual-dtor; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wnormalized=id; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Woverloaded-virtual; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wpointer-arith; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + if test "x$MINGW" = xyes; then : + + +for flag in -Wno-suggest-attribute=const; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wno-missing-noreturn; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wmissing-noreturn; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wno-suggest-attribute=noreturn; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wno-error=suggest-attribute=noreturn; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wno-redundant-decls; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + +else + + +for flag in -Wredundant-decls; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + +fi + + +for flag in -Wshadow; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wshorten-64-to-32; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wsign-compare; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wstrict-overflow=1; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wswitch-enum; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wtrampolines; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wundef; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wunsafe-loop-optimizations; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -funsafe-loop-optimizations; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wc++11-compat; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + +# _APPEND_COMPILE_FLAGS_ERROR([-Weffc++]) +# _APPEND_COMPILE_FLAGS_ERROR([-Wold-style-cast]) + + +for flag in -Wclobbered; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wunused; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wunused-result; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wunused-variable; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wunused-parameter; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wunused-local-typedefs; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wwrite-strings; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wformat-security; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fwrapv; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fmudflapt; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -pipe; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fPIE -pie; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wsizeof-pointer-memaccess; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -Wpacked; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + +# _APPEND_COMPILE_FLAGS_ERROR([-Wlong-long]) +# GCC 4.5 removed this. +# _APPEND_COMPILE_FLAGS_ERROR([-Wunreachable-code]) + + if test "x$ax_enable_debug" = xno; then : + if test "x$ac_cv_vcs_checkout" = xyes; then : + if test "x${host_os}" != "xmingw"; then : + if test "x$ac_c_gcc_recent" = xyes; then : + + +for flag in -D_FORTIFY_SOURCE=2; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + #_APPEND_COMPILE_FLAGS_ERROR([-Wstack-protector]) + #_APPEND_COMPILE_FLAGS_ERROR([-fstack-protector --param=ssp-buffer-size=4]) + + +for flag in -fstack-protector-all; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + +fi +fi +fi +fi + + if test "x$MINGW" != xyes; then : + + if test "x$enable_shared" = "xyes"; then : + case $ax_harden_sanitize in #( + thread) : + + + +for flag in -fsanitize=thread; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + ;; #( + address) : + + + +for flag in -fsanitize=address; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + ;; #( + rest) : + + + +for flag in -fno-omit-frame-pointer; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=integer; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=memory; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=alignment; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=bool; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=bounds; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=enum; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=float-cast-overflow; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=float-divide-by-zero; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=integer-divide-by-zero; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=null; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=object-size; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=return; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=shift; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=signed-integer-overflow; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=unreachable; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=unsigned-integer-overflow; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=vla-bound; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + + + +for flag in -fsanitize=vptr; do + as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags_-Werror_$flag" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 +$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } +if eval \${$as_CACHEVAR+:} false; then : + $as_echo_n "(cached) " >&6 +else + + ax_check_save_flags=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -Werror $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + eval "$as_CACHEVAR=yes" +else + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CXXFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" $flag "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains \$flag"; } >&5 + (: CXXFLAGS already contains $flag) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS \$flag\""; } >&5 + (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS $flag" + ;; + esac +else + CXXFLAGS="$flag" +fi + +else + : +fi + +done + + ;; #( + *) : + ;; +esac + +fi + +fi + + + if test "x$ac_cv_warnings_as_errors" = xyes; then : + if ${CXXFLAGS+:} false; then : + case " $CXXFLAGS " in + *" -Werror "*) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains -Werror"; } >&5 + (: CXXFLAGS already contains -Werror) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; + *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS=\"\$CXXFLAGS -Werror\""; } >&5 + (: CXXFLAGS="$CXXFLAGS -Werror") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + CXXFLAGS="$CXXFLAGS -Werror" + ;; + esac +else + CXXFLAGS="-Werror" +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 + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking the number of available CPUs" >&5 +$as_echo_n "checking the number of available CPUs... " >&6; } + CPU_COUNT="0" + + case $host_os in #( + + *darwin*) : + + if test -x /usr/sbin/sysctl; then : + + sysctl_a=`/usr/sbin/sysctl -a 2>/dev/null| grep -c hw.cpu` + if test sysctl_a; then : + + CPU_COUNT=`/usr/sbin/sysctl -n hw.ncpu` + +fi + +fi ;; #( + + *linux*) : + + if test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo; then : + + if test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo; then : + + CPU_COUNT=`$EGREP -c '^processor' /proc/cpuinfo` + +fi + +fi + ;; #( + *) : + ;; +esac + + if test "x$CPU_COUNT" = "x0"; then : + + CPU_COUNT="1" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unable to detect (assuming 1) " >&5 +$as_echo "unable to detect (assuming 1) " >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPU_COUNT " >&5 +$as_echo "$CPU_COUNT " >&6; } + +fi + + + + + # Check whether --enable-jobserver was given. +if test "${enable_jobserver+set}" = set; then : + enableval=$enable_jobserver; +else + enable_jobserver=yes +fi + + if test "x$enable_jobserver" = "xyes"; then + enable_jobserver=$CPU_COUNT + ((enable_jobserver++)) + fi + + if test "x$enable_jobserver" != "xno"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: added jobserver support to make for $enable_jobserver jobs" >&5 +$as_echo "$as_me: added jobserver support to make for $enable_jobserver jobs" >&6;} + + + + +printf "AM_MAKEFLAGS += -j$enable_jobserver \n" >> "$AMINCLUDE" + + + fi + + +ac_config_files="$ac_config_files Makefile docs/conf.py libmemcached-1.0/configure.h support/libmemcached.pc support/libmemcached.spec" + +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 + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + +if test -z "${DEBUG_TRUE}" && test -z "${DEBUG_FALSE}"; then + as_fn_error $? "conditional \"DEBUG\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${IS_VCS_CHECKOUT_TRUE}" && test -z "${IS_VCS_CHECKOUT_FALSE}"; then + as_fn_error $? "conditional \"IS_VCS_CHECKOUT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_WIN32_TRUE}" && test -z "${BUILD_WIN32_FALSE}"; then + as_fn_error $? "conditional \"BUILD_WIN32\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HOST_OSX_TRUE}" && test -z "${HOST_OSX_FALSE}"; then + as_fn_error $? "conditional \"HOST_OSX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HOST_LINUX_TRUE}" && test -z "${HOST_LINUX_FALSE}"; then + as_fn_error $? "conditional \"HOST_LINUX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HOST_FREEBSD_TRUE}" && test -z "${HOST_FREEBSD_FALSE}"; then + as_fn_error $? "conditional \"HOST_FREEBSD\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_LIBMEMCACHED_PROTOCOL_TRUE}" && test -z "${BUILD_LIBMEMCACHED_PROTOCOL_FALSE}"; then + as_fn_error $? "conditional \"BUILD_LIBMEMCACHED_PROTOCOL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_LIBMYSQL_TRUE}" && test -z "${HAVE_LIBMYSQL_FALSE}"; then + as_fn_error $? "conditional \"HAVE_LIBMYSQL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILDING_LIBMEMCACHED_TRUE}" && test -z "${BUILDING_LIBMEMCACHED_FALSE}"; then + as_fn_error $? "conditional \"BUILDING_LIBMEMCACHED\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_LIBMEMCACHED_TRUE}" && test -z "${HAVE_LIBMEMCACHED_FALSE}"; then + as_fn_error $? "conditional \"HAVE_LIBMEMCACHED\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_LIBDRIZZLE_TRUE}" && test -z "${HAVE_LIBDRIZZLE_FALSE}"; then + as_fn_error $? "conditional \"HAVE_LIBDRIZZLE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILDING_GEARMAN_TRUE}" && test -z "${BUILDING_GEARMAN_FALSE}"; then + as_fn_error $? "conditional \"BUILDING_GEARMAN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +if test -z "${BUILD_BYTEORDER_TRUE}" && test -z "${BUILD_BYTEORDER_FALSE}"; then + as_fn_error $? "conditional \"BUILD_BYTEORDER\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${INCLUDE_HSIEH_SRC_TRUE}" && test -z "${INCLUDE_HSIEH_SRC_FALSE}"; then + as_fn_error $? "conditional \"INCLUDE_HSIEH_SRC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${INCLUDE_MURMUR_SRC_TRUE}" && test -z "${INCLUDE_MURMUR_SRC_FALSE}"; then + as_fn_error $? "conditional \"INCLUDE_MURMUR_SRC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_MEMASLAP_TRUE}" && test -z "${BUILD_MEMASLAP_FALSE}"; then + as_fn_error $? "conditional \"BUILD_MEMASLAP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_CACHE_TRUE}" && test -z "${BUILD_CACHE_FALSE}"; then + as_fn_error $? "conditional \"BUILD_CACHE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +if test -z "${HAVE_LIBEVENT_TRUE}" && test -z "${HAVE_LIBEVENT_FALSE}"; then + as_fn_error $? "conditional \"HAVE_LIBEVENT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_POLL_TRUE}" && test -z "${BUILD_POLL_FALSE}"; then + as_fn_error $? "conditional \"BUILD_POLL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_WIN32_WRAPPERS_TRUE}" && test -z "${BUILD_WIN32_WRAPPERS_FALSE}"; then + as_fn_error $? "conditional \"BUILD_WIN32_WRAPPERS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_LIBUUID_TRUE}" && test -z "${HAVE_LIBUUID_FALSE}"; then + as_fn_error $? "conditional \"HAVE_LIBUUID\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_SASL_TRUE}" && test -z "${HAVE_SASL_FALSE}"; then + as_fn_error $? "conditional \"HAVE_SASL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${SHARED_ENABLED_TRUE}" && test -z "${SHARED_ENABLED_FALSE}"; then + as_fn_error $? "conditional \"SHARED_ENABLED\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${HAVE_DTRACE_TRUE}" && test -z "${HAVE_DTRACE_FALSE}"; then + as_fn_error $? "conditional \"HAVE_DTRACE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${DTRACE_NEEDS_OBJECTS_TRUE}" && test -z "${DTRACE_NEEDS_OBJECTS_FALSE}"; then + as_fn_error $? "conditional \"DTRACE_NEEDS_OBJECTS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${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 libmemcached $as_me 1.0.18, 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="\\ +libmemcached config.status 1.0.18 +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' +MKDIR_P='$MKDIR_P' +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 +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + + +# 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"`' +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_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"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $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"`' +sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $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_c_name_address \ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ +nm_file_list_spec \ +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\\"\\\`\\\\\\"" + ;; + *) + 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 \ +sys_lib_dlsearch_path_spec \ +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\\"\\\`\\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" + ;; + esac +done + +ac_aux_dir='$ac_aux_dir' +xsi_shell='$xsi_shell' +lt_shell_append='$lt_shell_append' + +# See if we are running on zsh, and set the options which 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' + TIMESTAMP='$TIMESTAMP' + RM='$RM' + ofile='$ofile' + + + + + + +_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 + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "mem_config.h") CONFIG_HEADERS="$CONFIG_HEADERS mem_config.h:mem_config.in" ;; + "libhashkit/hashkitcon.h") CONFIG_FILES="$CONFIG_FILES libhashkit/hashkitcon.h" ;; + "libhashkit-1.0/configure.h") CONFIG_FILES="$CONFIG_FILES libhashkit-1.0/configure.h" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; + "libtest/version.h") CONFIG_FILES="$CONFIG_FILES libtest/version.h" ;; + "libtest/yatlcon.h") CONFIG_FILES="$CONFIG_FILES libtest/yatlcon.h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "docs/conf.py") CONFIG_FILES="$CONFIG_FILES docs/conf.py" ;; + "libmemcached-1.0/configure.h") CONFIG_FILES="$CONFIG_FILES libmemcached-1.0/configure.h" ;; + "support/libmemcached.pc") CONFIG_FILES="$CONFIG_FILES support/libmemcached.pc" ;; + "support/libmemcached.spec") CONFIG_FILES="$CONFIG_FILES support/libmemcached.spec" ;; + + *) 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 + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + 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 +s&@MKDIR_P@&$ac_MKDIR_P&;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 +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :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 + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + "libtool":C) + + # See if we are running on zsh, and set the options which 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 + +# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $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. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# Written by Gordon Matzigkeit, 1996 +# +# This file is part of GNU Libtool. +# +# 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 +# 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 GNU Libtool; see the file COPYING. If not, a copy +# can be downloaded from http://www.gnu.org/licenses/gpl.html, or +# obtained by writing to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + +# The names of the tagged configurations supported by this script. +available_tags="CXX " + +# ### 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 + +# 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 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 + +# 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 in which our libraries should be installed. +lt_sysroot=$lt_sysroot + +# 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 + +# Run-time system search path for libraries. +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# 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 + + 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 "X${COLLECT_NAMES+set}" != Xset; 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) + + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi + + + 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 + + ;; + + 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 + + +echo "---" +echo "Configuration summary for $PACKAGE_NAME version $VERSION" +echo "" +echo " * Installation prefix: $prefix" +echo " * System type: $host_vendor-$host_os" +echo " * Host CPU: $host_cpu" +echo " * C Compiler: $CC_VERSION" +echo " * C Flags: $CFLAGS" +echo " * C++ Compiler: $CXX_VERSION" +echo " * C++ Flags: $CXXFLAGS" +echo " * CPP Flags: $CPPFLAGS" +echo " * LIB Flags: $LIB" +echo " * Assertions enabled: $ax_enable_assert" +echo " * Debug enabled: $ax_enable_debug" +echo " * Shared: $enable_shared" +echo " * Warnings as failure: $ac_cv_warnings_as_errors" +echo " * SASL support: $ac_enable_sasl" +echo " * make -j: $enable_jobserver" +echo " * VCS checkout: $ac_cv_vcs_checkout" +echo "" +echo "---" + +case "$host_os" in + *freebsd*) + echo "*****" + echo "*" + echo "* NOTE: You are on FreeBSD. BSD make will not work." + echo "*" + echo "* use 'gmake' To build libmemcached" + echo "*" + echo "*****" + ;; +esac + diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..17b7351 --- /dev/null +++ b/configure.ac @@ -0,0 +1,378 @@ +# configure.ac -*- autoconf -*- vim: filetype=config +# +# LibmemcacheD +# Copyright (C) 2011-2013 Data Differential, http://datadifferential.com/ +# Copyright (C) 2006-2010 Brian Aker, Monty Taylor, Trond Norbye +# All rights reserved. +# +# Use and distribution licensed under the BSD license. See +# the COPYING file in this directory for full text. + +m4_include([version.m4]) + +AC_PREREQ([2.61]) +AC_INIT([libmemcached],VERSION_NUMBER,[http://libmemcached.org/]) + +# Setup the compilers early on +AC_PROG_CC([cc gcc clang]) +AC_PROG_CXX([c++ g++ clang++]) + +AC_CONFIG_AUX_DIR([build-aux]) +AC_CONFIG_MACRO_DIR([m4]) + +AC_CANONICAL_HOST +AC_ARG_PROGRAM +AC_USE_SYSTEM_EXTENSIONS + +AM_INIT_AUTOMAKE([1.11 color-tests -Wno-portability subdir-objects foreign tar-ustar]) + +AC_CONFIG_HEADERS([mem_config.h:mem_config.in])dnl Keep filename to 8.3 for MS-DOS. +AC_SUBST([AUTOHEADER_FILE],[mem_config.h]) +AC_CONFIG_SRCDIR([libmemcached/memcached.cc]) + +#shared library versioning +MEMCACHED_UTIL_LIBRARY_VERSION=2:0:0 +MEMCACHED_PROTOCAL_LIBRARY_VERSION=0:0:0 +MEMCACHED_LIBRARY_VERSION=11:0:0 +# | | | +# +------+ | +---+ +# | | | +# current:revision:age +# | | | +# | | +- increment if interfaces have been added +# | | set to zero if interfaces have been removed or changed +# | +- increment if source code has changed +# | set to zero if current is incremented +# +- increment if interfaces have been added, removed or changed +AC_SUBST([MEMCACHED_UTIL_LIBRARY_VERSION]) +AC_SUBST([MEMCACHED_PROTOCAL_LIBRARY_VERSION]) +AC_SUBST([MEMCACHED_LIBRARY_VERSION]) + +AX_HEX_VERSION([LIBMEMCACHED],[$VERSION]) +AX_HEX_VERSION([LIBHASHKIT],[1.0.0]) +AC_SUBST([RPM_RELEASE],[1]) + +m4_include([libhashkit/include.m4]) + +LT_PREREQ([2.2]) +LT_INIT([dlopen]) +LT_LANG([C++]) +LT_LIB_M + +AC_SUBST([lt_cv_dlopen_libs]) + + +AC_PROG_CC_C99 +AS_IF([test "x${ac_cv_prog_cc_c99}" == "xno"],[AC_MSG_ERROR([No c99 compatible compiler found])]) + +AC_DEFUN([CHECK_CXX0X],[ + AC_LANG_PUSH([C++]) + AX_CHECK_COMPILE_FLAG([-std=c++0x],[ + CXX="$CXX -std=c++0x"]) + AC_LANG_POP([C++]) + ]) +CHECK_CXX0X + +AX_ASSERT + +AX_PLATFORM +m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) + +AC_DEFUN([LIBMEMCACHED_PROTOCOL], + [AC_ARG_ENABLE([libmemcachedprotocol], + [AS_HELP_STRING([--enable-libmemcachedprotocol], + [Enable libmemcachedprotocol])], + [ax_enable_libmemcachedprotocol=yes], + [ax_enable_libmemcachedprotocol=no]) + + AM_CONDITIONAL([BUILD_LIBMEMCACHED_PROTOCOL],[test "$ax_enable_libmemcachedprotocol" = "yes"]) + + AC_MSG_CHECKING([for libmemcachedprotocol]) + AC_MSG_RESULT([$ax_enable_libmemcachedprotocol]) + ]) +LIBMEMCACHED_PROTOCOL + +# Adding support for libtest +m4_include([libtest/yatl.m4]) + +CHECK_FOR_GEARMAND +CHECK_FOR_LIBGEARMAND + +AM_CONDITIONAL([BUILDING_LIBMEMCACHED],[true]) +AM_CONDITIONAL([HAVE_LIBMEMCACHED],[false]) +AM_CONDITIONAL([HAVE_LIBDRIZZLE],[false]) +AC_DEFINE([HAVE_LIBMEMCACHED],[1],[Enables libmemcached Support]) + +AM_CONDITIONAL([BUILDING_GEARMAN],[false]) + +# Specialty checks +AX_CXX_CINTTYPES +CONFIG_EXTRA +DETECT_BYTEORDER +SETSOCKOPT_SANITY +ENABLE_HSIEH_HASH +ENABLE_MURMUR_HASH +ENABLE_FNV64_HASH +ENABLE_MEMASLAP +PROTOCOL_BINARY_TEST +ENABLE_DEPRECATED + +# Checks for programs. +AC_CHECK_PROGS([DPKG_GENSYMBOLS],[dpkg-gensymbols]) +AC_CHECK_PROGS([LEX],['flex'],[:]) +AC_CHECK_PROGS([PERL],[perl]) +AC_CHECK_PROGS([VALGRIND],['valgrind']) +AC_CHECK_PROGS([WINE],['wine']) +AC_CHECK_PROGS([YACC],['bison --warnings=all'],[:]) +AC_CHECK_PROGS([RPMBUILD],[rpmbuild --nocheck]) +AC_CHECK_PROGS([RPMDEV_SETUPTREE],[rpmdev-setuptree]) +AC_CHECK_PROGS([RPM],[rpm]) +AC_PROG_AWK +AC_PROG_MKDIR_P +AC_PROG_SED +AX_PROG_MEMCACHED +AX_PROG_SPHINX_BUILD(,[AC_MSG_WARN([sphinx-build version 1.0 or greater is required to build man pages])]) +AX_WITH_PROG([LCOV],[lcov]) +AX_WITH_PROG([LCOV_GENHTML],[genhtml]) +AC_DEFINE([HAVE_MEMCACHED_SASL_BINARY],[0],[If Memcached binary with sasl support is available]) + +# Checks for libraries. +AC_SEARCH_LIBS([getopt_long],[gnugetopt]) +AC_SEARCH_LIBS([gethostbyname],[nsl]) + +# Checks for header files. +AC_CHECK_HEADERS_ONCE([arpa/inet.h]) +AC_CHECK_HEADERS_ONCE([errno.h]) +AC_CHECK_HEADERS_ONCE([execinfo.h]) +AC_CHECK_HEADERS_ONCE([fcntl.h]) +AC_CHECK_HEADERS_ONCE([features.h]) +AC_CHECK_HEADERS_ONCE([fnmatch.h]) +AC_CHECK_HEADERS_ONCE([inttypes.h]) +AC_CHECK_HEADERS_ONCE([libintl.h]) +AC_CHECK_HEADERS_ONCE([limits.h]) +AC_CHECK_HEADERS_ONCE([mach/mach.h]) +AC_CHECK_HEADERS_ONCE([malloc.h]) +AC_CHECK_HEADERS_ONCE([math.h]) +AC_CHECK_HEADERS_ONCE([netdb.h]) +AC_CHECK_HEADERS_ONCE([netinet/in.h]) +AC_CHECK_HEADERS_ONCE([netinet/tcp.h]) +AC_CHECK_HEADERS_ONCE([poll.h]) +AC_CHECK_HEADERS_ONCE([pthread.h]) +AC_CHECK_HEADERS_ONCE([spawn.h]) +AC_CHECK_HEADERS_ONCE([stdarg.h]) +AC_CHECK_HEADERS_ONCE([stddef.h]) +AC_CHECK_HEADERS_ONCE([stdio.h]) +AC_CHECK_HEADERS_ONCE([stdlib.h]) +AC_CHECK_HEADERS_ONCE([sys/socket.h]) +AC_CHECK_HEADERS_ONCE([sys/sysctl.h]) +AC_CHECK_HEADERS_ONCE([sys/time.h]) +AC_CHECK_HEADERS_ONCE([sys/types.h]) +AC_CHECK_HEADERS_ONCE([sys/un.h]) +AC_CHECK_HEADERS_ONCE([sys/wait.h]) +AC_CHECK_HEADERS_ONCE([syslog.h]) +AC_CHECK_HEADERS_ONCE([time.h]) +AC_CHECK_HEADERS_ONCE([unistd.h]) + +# Windows only +AC_CHECK_HEADERS_ONCE([winsock2.h]) +AC_CHECK_HEADERS_ONCE([ws2tcpip.h]) + +# Checks for typedefs, structures, and compiler characteristics. + +# Checks for library functions. + +AC_CHECK_FUNCS([alarm]) +AC_CHECK_FUNCS([atexit]) +AC_CHECK_FUNCS([clock_gettime]) +AC_CHECK_FUNCS([dup2]) +AC_CHECK_FUNCS([fcntl]) +AC_CHECK_FUNCS([floor]) +AC_CHECK_FUNCS([getcwd]) +AC_CHECK_FUNCS([getline]) +AC_CHECK_FUNCS([gettimeofday]) +AC_CHECK_FUNCS([inet_ntoa]) +AC_CHECK_FUNCS([memchr]) +AC_CHECK_FUNCS([memmove]) +AC_CHECK_FUNCS([memset]) +AC_CHECK_FUNCS([pipe2]) +AC_CHECK_FUNCS([putenv]) +AC_CHECK_FUNCS([select]) +AC_CHECK_FUNCS([setenv]) +AC_CHECK_FUNCS([sigignore]) +AC_CHECK_FUNCS([socket]) +AC_CHECK_FUNCS([sqrt]) +AC_CHECK_FUNCS([strcasecmp]) +AC_CHECK_FUNCS([strchr]) +AC_CHECK_FUNCS([strdup]) +AC_CHECK_FUNCS([strerror]) +AC_CHECK_FUNCS([strstr]) +AC_CHECK_FUNCS([strtol]) +AC_CHECK_FUNCS([strtoul]) +AC_CHECK_FUNCS([strtoull]) +AC_FUNC_ALLOCA +AC_FUNC_ERROR_AT_LINE +AC_FUNC_FORK +AC_FUNC_STRERROR_R + +AC_CHECK_HEADER([umem.h], + [AC_DEFINE([HAVE_UMEM_H],[1],[Define this if you have umem.h]) + build_cache=no], + [build_cache=yes]) + +AM_CONDITIONAL([BUILD_CACHE],[test "x$build_cache" = "xyes"]) + +AX_COMPILER_VENDOR + +AC_CHECK_TYPES([in_port_t],,,[[ + #ifdef HAVE_SYS_TYPES_H + # include + #endif + #ifdef HAVE_NETINET_IN_H + # include + #endif + #ifdef HAVE_NETDB_H + # include + #endif]]) +AC_CHECK_TYPES([ptrdiff_t]) +AC_HEADER_STDBOOL +AC_TYPE_INT16_T +AC_TYPE_INT32_T +AC_TYPE_INT64_T +AC_TYPE_INT8_T +AC_TYPE_OFF_T +AC_TYPE_PID_T +AC_TYPE_SSIZE_T +AC_TYPE_UINT16_T +AC_TYPE_UINT32_T +AC_TYPE_UINT64_T +AC_TYPE_UINT8_T + +AC_C_BIGENDIAN +AC_C_CONST +AC_C_INLINE +AC_C_VOLATILE +AC_C_RESTRICT + +AX_CXX_GCC_ABI_DEMANGLE + +AX_LIBEVENT + +AC_CHECK_LIB([rt],[clock_gettime], + [AC_SUBST([RT_LIB],[-lrt]) + AC_DEFINE([HAVE_CLOCK_GETTIME],[1],[Have clock_gettime])], + [AC_DEFINE([HAVE_CLOCK_GETTIME],[0],[Have clock_gettime])]) + + +AC_CHECK_HEADERS([atomic.h]) +AS_IF([test "x$ac_cv_header_atomic_h" = "xyes"], + [AC_CHECK_FUNCS([atomic_add_64]) + AC_CHECK_FUNCS([atomic_add_32]) + AS_IF([test "x$ac_cv_func_atomic_add_64" = "xyes" -a "x$ac_cv_func_atomic_add_32" = "xyes"], + [AC_DEFINE([USE_ATOMIC_H],[1],[Define to true if you want to use functions from atomic.h])])]) + +AC_DEFINE([HAVE_LIBDRIZZLE],[0],[Support for libdrizzle]) +AC_DEFINE([HAVE_DRIZZLED_BINARY],[0],[Support for DrizzleD]) +AC_DEFINE([DRIZZLED_BINARY],[0],[Support for DrizzleD]) +AC_DEFINE([GEARMAND_BLOBSLAP_WORKER],[0],[Support for Gearman Blobslap worker]) +AC_DEFINE([HAVE_LIBPQ],[0],[Support for Postgres]) +AC_DEFINE([HAVE_LIBCURL],[0],[Support for libcurl]) + +# Check for the requirements for running memcached with less privileges +# than the default privilege set. On Solaris we need setppriv and priv.h +# If you want to add support for other platforms you should check for +# your requirements, define HAVE_DROP_PRIVILEGES, and make sure you add +# the source file containing the implementation into memcached_SOURCE +# in Makefile.am +AC_CHECK_FUNCS([setppriv], + [AC_CHECK_HEADER([priv.h], + [AC_DEFINE([HAVE_DROP_PRIVILEGES], + [1], + [Define this if you have an implementation of drop_privileges()]) + build_solaris_privs=yes]) + ]) + +AM_CONDITIONAL([BUILD_POLL],[test "x$ac_cv_header_poll_h" = "xno"]) +AM_CONDITIONAL([BUILD_WIN32_WRAPPERS],[test "x$ac_cv_header_winsock2_h" = "xyes"]) +AS_IF([test "x$ac_cv_header_winsock2_h" = "xyes"], + [AM_LDFLAGS="$AM_LDFLAGS -lws2_32" + AM_CFLAGS="$AM_CFLAGS $NO_WERROR" + AM_CXXFLAGS="$AM_CXXFLAGS $NO_WERROR" + ]) +SOCKET_SEND_FLAGS + +AX_UUID_GENERATE_TIME_SAFE + +AC_DEFUN([CHECK_FOR_PTHREAD_AND_SASL], + [AC_LANG_PUSH([C++]) + AX_PTHREAD(, [AC_MSG_ERROR([could not find libpthread])]) + AX_PTHREAD_TIMEDJOIN_NP + AC_LANG_POP([C++]) + + # The sasl functions should only be visible if we build with sasl support + # + AX_SASL_OPTION + AS_IF([test "x$ac_enable_sasl" = xyes], + [LIBMEMCACHED_WITH_SASL_SUPPORT="#define LIBMEMCACHED_WITH_SASL_SUPPORT 1"], + [LIBMEMCACHED_WITH_SASL_SUPPORT="#define LIBMEMCACHED_WITH_SASL_SUPPORT 0"]) + AC_SUBST([LIBMEMCACHED_WITH_SASL_SUPPORT]) + ]) +CHECK_FOR_PTHREAD_AND_SASL + +# backtrace(), others require shared builds +AC_DEFUN([__ENABLE_SHARED], + [AC_REQUIRE([AX_PLATFORM]) + AS_IF([test "x${TARGET_WINDOWS}" = "xtrue"],[enable_shared=no]) + AS_IF([test "x$enable_shared" = "xyes"], + [AC_DEFINE([HAVE_SHARED_ENABLED],[1],[Enable code which requires shared library support. Like backtrace().])])]) +AM_CONDITIONAL([SHARED_ENABLED],[test "x$enable_shared" = "xyes"]) + +PANDORA_ENABLE_DTRACE +HAVE_GCC_ATOMICS +AX_ENDIAN +AX_ASSERT +AX_HARDEN_COMPILER_FLAGS + +AX_AM_JOBSERVER([yes]) + +AC_CONFIG_FILES([Makefile + docs/conf.py + libmemcached-1.0/configure.h + support/libmemcached.pc + support/libmemcached.spec + ]) +AC_OUTPUT + +echo "---" +echo "Configuration summary for $PACKAGE_NAME version $VERSION" +echo "" +echo " * Installation prefix: $prefix" +echo " * System type: $host_vendor-$host_os" +echo " * Host CPU: $host_cpu" +echo " * C Compiler: $CC_VERSION" +echo " * C Flags: $CFLAGS" +echo " * C++ Compiler: $CXX_VERSION" +echo " * C++ Flags: $CXXFLAGS" +echo " * CPP Flags: $CPPFLAGS" +echo " * LIB Flags: $LIB" +echo " * Assertions enabled: $ax_enable_assert" +echo " * Debug enabled: $ax_enable_debug" +echo " * Shared: $enable_shared" +echo " * Warnings as failure: $ac_cv_warnings_as_errors" +echo " * SASL support: $ac_enable_sasl" +echo " * make -j: $enable_jobserver" +echo " * VCS checkout: $ac_cv_vcs_checkout" +echo "" +echo "---" + +case "$host_os" in + *freebsd*) + echo "*****" + echo "*" + echo "* NOTE: You are on FreeBSD. BSD make will not work." + echo "*" + echo "* use 'gmake' To build libmemcached" + echo "*" + echo "*****" + ;; +esac + diff --git a/docs/conf.py.in b/docs/conf.py.in new file mode 100644 index 0000000..7fa47d2 --- /dev/null +++ b/docs/conf.py.in @@ -0,0 +1,361 @@ +# -*- coding: utf-8 -*- +# +# libmemcached documentation build configuration file, created by +# sphinx-quickstart on Sun Mar 6 12:05:53 2011. +# +# This file is execfile()d with the current directory set to its containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys, os + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +#sys.path.insert(0, os.path.abspath('.')) + +# -- General configuration ----------------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +#needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = [] + +#extensions = ['sphinxcontrib.googleanalytics'] + +# Google +#googleanalytics_id = 'UA-15307604-2' +#googleanalytics_enabled = 'True' + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'libmemcached' +copyright = u'2011-2013, Brian Aker DataDifferential, http://datadifferential.com/' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '@VERSION@' +# The full version, including alpha/beta/rc tags. +release = '@VERSION@' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build'] + +# The reST default role (used for this markup: `text`) to use for all documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + + +# -- Options for HTML output --------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'default' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +html_show_sourcelink = False + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +#html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'libmemcacheddoc' + + +# -- Options for LaTeX output -------------------------------------------------- + +# The paper size ('letter' or 'a4'). +#latex_paper_size = 'letter' + +# The font size ('10pt', '11pt' or '12pt'). +#latex_font_size = '10pt' + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass [howto/manual]). +latex_documents = [ + ('index', 'libmemcached.tex', u'libmemcached Documentation', + u'Brian Aker', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Additional stuff for the LaTeX preamble. +#latex_preamble = '' + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output -------------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ('hashkit_create', 'hashkit_clone', u'libhashkit Documentation', [u'Brian Aker'], 3), + ('hashkit_create', 'hashkit_create', u'libhashkit Documentation', [u'Brian Aker'], 3), + ('hashkit_create', 'hashkit_free', u'libhashkit Documentation', [u'Brian Aker'], 3), + ('hashkit_create', 'hashkit_is_allocated', u'libhashkit Documentation', [u'Brian Aker'], 3), + ('hashkit_functions', 'hashkit_crc32', u'libhashkit Documentation', [u'Brian Aker'], 3), + ('hashkit_functions', 'hashkit_fnv1_32', u'libhashkit Documentation', [u'Brian Aker'], 3), + ('hashkit_functions', 'hashkit_fnv1_64', u'libhashkit Documentation', [u'Brian Aker'], 3), + ('hashkit_functions', 'hashkit_fnv1a_32', u'libhashkit Documentation', [u'Brian Aker'], 3), + ('hashkit_functions', 'hashkit_fnv1a_64', u'libhashkit Documentation', [u'Brian Aker'], 3), + ('hashkit_functions', 'hashkit_functions', u'libhashkit Documentation', [u'Brian Aker'], 3), + ('hashkit_functions', 'hashkit_hsieh', u'libhashkit Documentation', [u'Brian Aker'], 3), + ('hashkit_functions', 'hashkit_jenkins', u'libhashkit Documentation', [u'Brian Aker'], 3), + ('hashkit_functions', 'hashkit_md5', u'libhashkit Documentation', [u'Brian Aker'], 3), + ('hashkit_functions', 'hashkit_murmur', u'libhashkit Documentation', [u'Brian Aker'], 3), + ('hashkit_value', 'hashkit_value', u'libhashkit Documentation', [u'Brian Aker'], 3), + ('libhashkit', 'libhashkit', u'libhashkit Documentation', [u'Brian Aker'], 3), + ('libmemcached', 'libmemcached', u'Introducing the C Client Library for memcached', [u'Brian Aker'], 3), + ('libmemcached_configuration', 'libmemcached_check_configuration', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('libmemcached_configuration', 'libmemcached_configuration', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('libmemcached_configuration', 'memcached', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('libmemcached_examples', 'libmemcached_examples', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('libmemcachedutil', 'libmemcachedutil', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_analyze', 'memcached_analyze', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_append', 'memcached_append', u'Appending to or Prepending to data on the server', [u'Brian Aker'], 3), + ('memcached_append', 'memcached_append_by_key', u'Appending to or Prepending to data on the server', [u'Brian Aker'], 3), + ('memcached_append', 'memcached_prepend', u'Appending to or Prepending to data on the server', [u'Brian Aker'], 3), + ('memcached_append', 'memcached_prepend_by_key', u'Appending to or Prepending to data on the server', [u'Brian Aker'], 3), + ('memcached_auto', 'memcached_auto', u'Incrementing and Decrementing Values', [u'Brian Aker'], 3), + ('memcached_auto', 'memcached_decrement', u'Incrementing and Decrementing Values', [u'Brian Aker'], 3), + ('memcached_auto', 'memcached_decrement_with_initial', u'Incrementing and Decrementing Values', [u'Brian Aker'], 3), + ('memcached_auto', 'memcached_increment', u'Incrementing and Decrementing Values', [u'Brian Aker'], 3), + ('memcached_auto', 'memcached_increment_with_initial', u'Incrementing and Decrementing Values', [u'Brian Aker'], 3), + ('memcached_behavior', 'memcached_behavior', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_behavior', 'memcached_behavior_get', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_behavior', 'memcached_behavior_set', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_callback', 'memcached_callback', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_callback', 'memcached_callback_get', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_callback', 'memcached_callback_set', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_cas', 'memcached_cas', u'Working with data on the server in an atomic fashion', [u'Brian Aker'], 3), + ('memcached_cas', 'memcached_cas_by_key', u'Storing and Replacing Data', [u'Brian Aker'], 3), + ('memcached_create', 'memcached_clone', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_create', 'memcached_create', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_create', 'memcached_free', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_create', 'memcached_servers_reset', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_delete', 'memcached_delete', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_delete', 'memcached_delete_by_key', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('libmemcached-1.0/memcached_touch', 'memcached_touch', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('libmemcached-1.0/memcached_touch', 'memcached_touch_by_key', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('libmemcached/memcached_exist', 'memcached_exist', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('libmemcached/memcached_exist', 'memcached_exist_by_key', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_dump', 'memcached_dump', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_flush', 'memcached_flush', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_flush_buffers', 'memcached_flush_buffers', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_generate_hash_value', 'memcached_generate_hash', u'Generating hash values directly', [u'Brian Aker'], 3), + ('memcached_generate_hash_value', 'memcached_generate_hash_value', u'Generating hash values directly', [u'Brian Aker'], 3), + ('libmemcached/memcached_fetch', 'memcached_fetch', u'Retrieving data from the server', [u'Brian Aker'], 3), + ('memcached_get', 'memcached_fetch_execute', u'Retrieving data from the server', [u'Brian Aker'], 3), + ('memcached_get', 'memcached_fetch_result', u'Retrieving data from the server', [u'Brian Aker'], 3), + ('memcached_get', 'memcached_get', u'Retrieving data from the server', [u'Brian Aker'], 3), + ('memcached_get', 'memcached_get_by_key', u'Retrieving data from the server', [u'Brian Aker'], 3), + ('libmemcached/memcached_return_t', 'memcached_return_t', u'Return type values ', [u'Brian Aker'], 3), + ('memcached_get', 'memcached_mget', u'Retrieving data from the server', [u'Brian Aker'], 3), + ('memcached_get', 'memcached_mget_by_key', u'Retrieving data from the server', [u'Brian Aker'], 3), + ('memcached_get', 'memcached_mget_execute', u'Retrieving data from the server', [u'Brian Aker'], 3), + ('memcached_get', 'memcached_mget_execute_by_key', u'Retrieving data from the server', [u'Brian Aker'], 3), + ('libmemcached/memcached_last_error_message', 'memcached_last_error_message', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_memory_allocators', 'memcached_get_memory_allocators', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_memory_allocators', 'memcached_memory_allocators', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_memory_allocators', 'memcached_set_memory_allocators', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_memory_allocators', 'memcached_set_memory_allocators_context', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_pool', 'memcached_pool', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_pool', 'memcached_pool_behavior_get', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_pool', 'memcached_pool_behavior_set', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_pool', 'memcached_pool_create', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_pool', 'memcached_pool_destroy', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_pool', 'memcached_pool_fetch', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_pool', 'memcached_pool_pop', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_pool', 'memcached_pool_push', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_pool', 'memcached_pool_release', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_pool', 'memcached_pool_st', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_quit', 'memcached_quit', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('libmemcached-1.0/memcached_set_encoding_key', 'memcached_set_encoding_key', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_result_st', 'memcached_result_cas', u'Working with result sets', [u'Brian Aker'], 3), + ('memcached_result_st', 'memcached_result_create', u'Working with result sets', [u'Brian Aker'], 3), + ('memcached_result_st', 'memcached_result_flags', u'Working with result sets', [u'Brian Aker'], 3), + ('memcached_result_st', 'memcached_result_free', u'Working with result sets', [u'Brian Aker'], 3), + ('memcached_result_st', 'memcached_result_key_length', u'Working with result sets', [u'Brian Aker'], 3), + ('memcached_result_st', 'memcached_result_key_value', u'Working with result sets', [u'Brian Aker'], 3), + ('memcached_result_st', 'memcached_result_length', u'Working with result sets', [u'Brian Aker'], 3), + ('memcached_result_st', 'memcached_result_st', u'Working with result sets', [u'Brian Aker'], 3), + ('memcached_result_st', 'memcached_result_value', u'Working with result sets', [u'Brian Aker'], 3), + ('memcached_sasl', 'memcached_destroy_sasl_auth_data', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_sasl', 'memcached_get_sasl_callbacks', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_sasl', 'memcached_sasl', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_sasl', 'memcached_sasl_set_auth_data', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_sasl', 'memcached_set_sasl_callbacks', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_server_st', 'memcached_server_list_append', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_server_st', 'memcached_server_list_count', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_server_st', 'memcached_server_list_free', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_server_st', 'memcached_servers_parse', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_servers', 'memcached_server_add', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_servers', 'memcached_server_add_unix_socket', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_servers', 'memcached_server_count', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_servers', 'memcached_server_cursor', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_servers', 'memcached_server_list', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_servers', 'memcached_server_push', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_servers', 'memcached_server_st', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_servers', 'memcached_servers', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_set', 'memcached_add', u'Storing and Replacing Data', [u'Brian Aker'], 3), + ('memcached_set', 'memcached_add_by_key', u'Storing and Replacing Data', [u'Brian Aker'], 3), + ('memcached_set', 'memcached_replace', u'Storing and Replacing Data', [u'Brian Aker'], 3), + ('memcached_set', 'memcached_replace_by_key', u'Storing and Replacing Data', [u'Brian Aker'], 3), + ('memcached_set', 'memcached_set', u'Storing and Replacing Data', [u'Brian Aker'], 3), + ('memcached_set', 'memcached_set_by_key', u'Storing and Replacing Data', [u'Brian Aker'], 3), + ('memcached_stats', 'memcached_stat', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_stats', 'memcached_stat_execute', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_stats', 'memcached_stat_get_keys', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_stats', 'memcached_stat_get_value', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_stats', 'memcached_stat_servername', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_stats', 'memcached_stats', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_strerror', 'memcached_strerror', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_user_data', 'memcached_get_user_data', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_user_data', 'memcached_set_user_data', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_user_data', 'memcached_user_data', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_verbosity', 'memcached_verbosity', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_version', 'memcached_lib_version', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('memcached_version', 'memcached_version', u'libmemcached Documentation', [u'Brian Aker'], 3), + ('bin/memcapable', 'memcapable', u'libmemcached Documentation', [u'Brian Aker'], 1), + ('bin/memcat', 'memcat', u'libmemcached Documentation', [u'Brian Aker'], 1), + ('bin/memcp', 'memcp', u'libmemcached Documentation', [u'Brian Aker'], 1), + ('bin/memdump', 'memdump', u'libmemcached Documentation', [u'Brian Aker'], 1), + ('bin/memerror', 'memerror', u'libmemcached Documentation', [u'Brian Aker'], 1), + ('bin/memflush', 'memflush', u'libmemcached Documentation', [u'Brian Aker'], 1), + ('bin/memrm', 'memrm', u'libmemcached Documentation', [u'Brian Aker'], 1), + ('bin/memaslap', 'memaslap', u'libmemcached Documentation', [u'Brian Aker'], 1), + ('bin/memslap', 'memslap', u'libmemcached Documentation', [u'Brian Aker'], 1), + ('bin/memstat', 'memstat', u'libmemcached Documentation', [u'Brian Aker'], 1), + ('bin/memexist', 'memexist', u'libmemcached Documentation', [u'Brian Aker'], 1), + ('bin/memparse', 'memparse', u'libmemcached Documentation', [u'Brian Aker'], 1), + ('bin/memping', 'memping', u'libmemcached Documentation', [u'Brian Aker'], 1), + ('bin/memtouch', 'memtouch', u'libmemcached Documentation', [u'Brian Aker'], 1), + ] diff --git a/docs/include.am b/docs/include.am new file mode 100644 index 0000000..f28079f --- /dev/null +++ b/docs/include.am @@ -0,0 +1,101 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# Makefile for Sphinx documentation +# + +SPHINXOPTS = ${SPHINX_WARNINGS} -q +PAPER = +SPHINX_BUILDDIR = ${abs_top_builddir}/docs + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SPHINX_BUILDDIR) + +.PHONY: clean-docs-check +clean-docs-check: + -rm -rf docs/_build docs/doctrees man/.doctrees/ + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest + +sphinx-help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +install-html-local: html-local + @$(MKDIR_P) $(htmldir)/html + @cp -r ${top_builddir}/html $(htmldir)/ + +html-local: docs/conf.py + @PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) ${top_builddir}/html + +singlehtml: html-local + @PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/singlehtml + +pickle: docs/conf.py + PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: docs/conf.py + PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: docs/conf.py + PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(SPHINX_BUILDDIR)/htmlhelp." + +epub: docs/conf.py + PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(SPHINX_BUILDDIR)/epub." + +latex: docs/conf.py + PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(SPHINX_BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: latex + PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + make -C $(SPHINX_BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(SPHINX_BUILDDIR)/latex." + +text: docs/conf.py + @PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/text + +man: + @PYTHONPATH=$(SPHINX_BUILDDIR)/docs $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) ${top_builddir}/man + + +changes: docs/conf.py + @PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/changes + +linkcheck: docs/conf.py + PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/linkcheck + +doctest: docs/conf.py + PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(SPHINX_BUILDDIR)/doctest/output.txt." diff --git a/example/byteorder.cc b/example/byteorder.cc new file mode 100644 index 0000000..fdfa021 --- /dev/null +++ b/example/byteorder.cc @@ -0,0 +1,89 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +#include + +#include + +/* Byte swap a 64-bit number. */ +#ifndef swap64 +static inline uint64_t swap64(uint64_t in) +{ +#ifndef WORDS_BIGENDIAN + /* Little endian, flip the bytes around until someone makes a faster/better + * way to do this. */ + uint64_t rv= 0; + for (uint8_t x= 0; x < 8; x++) + { + rv= (rv << 8) | (in & 0xff); + in >>= 8; + } + return rv; +#else + /* big-endian machines don't need byte swapping */ + return in; +#endif // WORDS_BIGENDIAN +} +#endif + +#ifdef HAVE_HTONLL + +uint64_t example_ntohll(uint64_t value) +{ + return ntohll(value); +} + +uint64_t example_htonll(uint64_t value) +{ + return htonll(value); +} + +#else // HAVE_HTONLL + +uint64_t example_ntohll(uint64_t value) +{ + return swap64(value); +} + +uint64_t example_htonll(uint64_t value) +{ + return swap64(value); +} + +#endif // HAVE_HTONLL diff --git a/example/byteorder.h b/example/byteorder.h new file mode 100644 index 0000000..1e319a3 --- /dev/null +++ b/example/byteorder.h @@ -0,0 +1,49 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Byteorder for example + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +uint64_t example_ntohll(uint64_t); + +uint64_t example_htonll(uint64_t); + +#ifdef __cplusplus +} +#endif diff --git a/example/include.am b/example/include.am new file mode 100644 index 0000000..c58a5ff --- /dev/null +++ b/example/include.am @@ -0,0 +1,26 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +if HAVE_LIBEVENT +noinst_PROGRAMS+= example/memcached_light +endif + +noinst_HEADERS+= example/byteorder.h +noinst_HEADERS+= example/memcached_light.h +noinst_HEADERS+= example/storage.h + +example_memcached_light_SOURCES= +example_memcached_light_LDADD= +example_memcached_light_LDFLAGS= + +example_memcached_light_SOURCES+= example/byteorder.cc +example_memcached_light_SOURCES+= example/interface_v0.cc +example_memcached_light_SOURCES+= example/interface_v1.cc +example_memcached_light_SOURCES+= example/memcached_light.cc +example_memcached_light_SOURCES+= example/storage.cc +example_memcached_light_SOURCES+= util/daemon.cc +example_memcached_light_SOURCES+= util/pidfile.cc + +example_memcached_light_LDADD+= libmemcached/libmemcachedprotocol.la +example_memcached_light_LDADD+= @LIBEVENT_LIB@ diff --git a/example/interface_v0.cc b/example/interface_v0.cc new file mode 100644 index 0000000..64debdd --- /dev/null +++ b/example/interface_v0.cc @@ -0,0 +1,561 @@ +/* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */ +/** + * This file contains an implementation of the callback interface for level 0 + * in the protocol library. You might want to have your copy of the protocol + * specification next to your coffee ;-) + */ + +#include "mem_config.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include "example/memcached_light.h" +#include "example/storage.h" +#include "util/log.hpp" + + +using namespace datadifferential; + +static util::log_info_st *log_file= NULL; + +static protocol_binary_response_status noop_command_handler(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler) +{ + protocol_binary_response_no_extras response; + memset(&response, 0, sizeof(protocol_binary_response_no_extras)); + + response.message.header.response.magic= PROTOCOL_BINARY_RES; + response.message.header.response.opcode= PROTOCOL_BINARY_CMD_NOOP; + response.message.header.response.status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS); + response.message.header.response.opaque= header->request.opaque; + + return response_handler(cookie, header, (protocol_binary_response_header*)&response); +} + +static protocol_binary_response_status quit_command_handler(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler) +{ + protocol_binary_response_no_extras response; + memset(&response, 0, sizeof(protocol_binary_response_no_extras)); + + response.message.header.response.magic= PROTOCOL_BINARY_RES; + response.message.header.response.opcode= PROTOCOL_BINARY_CMD_QUIT; + response.message.header.response.status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS); + response.message.header.response.opaque= header->request.opaque; + + if (header->request.opcode == PROTOCOL_BINARY_CMD_QUIT) + { + response_handler(cookie, header, (protocol_binary_response_header*)&response); + } + + /* I need a better way to signal to close the connection */ + return PROTOCOL_BINARY_RESPONSE_EINTERNAL; +} + +static protocol_binary_response_status get_command_handler(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler) +{ + uint8_t opcode= header->request.opcode; + union protocol_binary_response_get_un { + protocol_binary_response_get response; + char buffer[4096]; + }; + + protocol_binary_response_get_un msg; + memset(&msg, 0, sizeof(protocol_binary_response_get_un)); + + msg.response.message.header.response.magic= PROTOCOL_BINARY_RES; + msg.response.message.header.response.opcode= opcode; + msg.response.message.header.response.status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS); + msg.response.message.header.response.opaque= header->request.opaque; + + struct item *item= get_item(header + 1, ntohs(header->request.keylen)); + if (item) + { + msg.response.message.body.flags= htonl(item->flags); + char *ptr= (char*)(msg.response.bytes + sizeof(*header) + 4); + uint32_t bodysize= 4; + msg.response.message.header.response.cas= example_htonll(item->cas); + if (opcode == PROTOCOL_BINARY_CMD_GETK || opcode == PROTOCOL_BINARY_CMD_GETKQ) + { + memcpy(ptr, item->key, item->nkey); + msg.response.message.header.response.keylen= htons((uint16_t)item->nkey); + ptr += item->nkey; + bodysize += (uint32_t)item->nkey; + } + memcpy(ptr, item->data, item->size); + bodysize += (uint32_t)item->size; + msg.response.message.header.response.bodylen= htonl(bodysize); + msg.response.message.header.response.extlen= 4; + + release_item(item); + return response_handler(cookie, header, (protocol_binary_response_header*)&msg); + } + else if (opcode == PROTOCOL_BINARY_CMD_GET || opcode == PROTOCOL_BINARY_CMD_GETK) + { + msg.response.message.header.response.status= htons(PROTOCOL_BINARY_RESPONSE_KEY_ENOENT); + return response_handler(cookie, header, (protocol_binary_response_header*)&msg); + } + + /* Q shouldn't report a miss ;-) */ + return PROTOCOL_BINARY_RESPONSE_SUCCESS; +} + +static protocol_binary_response_status delete_command_handler(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler) +{ + size_t keylen= ntohs(header->request.keylen); + + char *key= ((char*)header) + sizeof(*header); + protocol_binary_response_no_extras response; + memset(&response, 0, sizeof(protocol_binary_response_no_extras)); + + response.message.header.response.magic= PROTOCOL_BINARY_RES; + response.message.header.response.opcode= header->request.opcode; + response.message.header.response.opaque= header->request.opaque; + + if (delete_item(key, keylen) == false) + { + log_file->write(util::VERBOSE_NOTICE, "%s not found: %.*s", __func__, keylen, key); + response.message.header.response.status= htons(PROTOCOL_BINARY_RESPONSE_KEY_ENOENT); + return response_handler(cookie, header, (protocol_binary_response_header*)&response); + } + else if (header->request.opcode == PROTOCOL_BINARY_CMD_DELETE) + { + log_file->write(util::VERBOSE_NOTICE, "%s not found: %.*s", __func__, keylen, key); + /* DELETEQ doesn't want success response */ + response.message.header.response.status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS); + return response_handler(cookie, header, (protocol_binary_response_header*)&response); + } + + log_file->write(util::VERBOSE_NOTICE, "%s deleted: %.*s", __func__, keylen, key); + + return PROTOCOL_BINARY_RESPONSE_SUCCESS; +} + +static protocol_binary_response_status flush_command_handler(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler) +{ + uint8_t opcode= header->request.opcode; + + /* @fixme sett inn when! */ + flush(0); + + if (opcode == PROTOCOL_BINARY_CMD_FLUSH) + { + protocol_binary_response_no_extras response; + memset(&response, 0, sizeof(protocol_binary_response_no_extras)); + + response.message.header.response.magic= PROTOCOL_BINARY_RES; + response.message.header.response.opcode= opcode; + response.message.header.response.status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS); + response.message.header.response.opaque= header->request.opaque; + + return response_handler(cookie, header, (protocol_binary_response_header*)&response); + } + + return PROTOCOL_BINARY_RESPONSE_SUCCESS; +} + +static protocol_binary_response_status arithmetic_command_handler(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler) +{ + protocol_binary_request_incr *req= (protocol_binary_request_incr*)header; + protocol_binary_response_incr response; + memset(&response, 0, sizeof(protocol_binary_response_incr)); + + response.message.header.response.magic= PROTOCOL_BINARY_RES; + response.message.header.response.opcode= header->request.opcode; + response.message.header.response.opaque= header->request.opaque; + + uint16_t keylen= ntohs(header->request.keylen); + uint64_t initial= example_ntohll(req->message.body.initial); + uint64_t delta= example_ntohll(req->message.body.delta); + uint32_t expiration= ntohl(req->message.body.expiration); + uint32_t flags= 0; + void *key= req->bytes + sizeof(req->bytes); + protocol_binary_response_status rval= PROTOCOL_BINARY_RESPONSE_SUCCESS; + + uint64_t value= initial; + + struct item *item= get_item(key, keylen); + if (item != NULL) + { + if (header->request.opcode == PROTOCOL_BINARY_CMD_INCREMENT || + header->request.opcode == PROTOCOL_BINARY_CMD_INCREMENTQ) + { + value= (*(uint64_t*)item->data) + delta; + } + else + { + if (delta > *(uint64_t*)item->data) + { + value= 0; + } + else + { + value= *(uint64_t*)item->data - delta; + } + } + expiration= (uint32_t)item->exp; + flags= item->flags; + + release_item(item); + delete_item(key, keylen); + } + + item= create_item(key, keylen, NULL, sizeof(value), flags, (time_t)expiration); + if (item == NULL) + { + rval= PROTOCOL_BINARY_RESPONSE_ENOMEM; + } + else + { + memcpy(item->data, &value, sizeof(value)); + put_item(item); + } + + response.message.header.response.status= htons(rval); + if (rval == PROTOCOL_BINARY_RESPONSE_SUCCESS) + { + response.message.header.response.bodylen= ntohl(8); + response.message.body.value= example_ntohll((*(uint64_t*)item->data)); + response.message.header.response.cas= example_ntohll(item->cas); + + release_item(item); + if (header->request.opcode == PROTOCOL_BINARY_CMD_INCREMENTQ || + header->request.opcode == PROTOCOL_BINARY_CMD_DECREMENTQ) + { + return PROTOCOL_BINARY_RESPONSE_SUCCESS; + } + } + + return response_handler(cookie, header, (protocol_binary_response_header*)&response); +} + +static protocol_binary_response_status version_command_handler(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler) +{ + const char *versionstring= "1.0.0"; + union protocol_binary_response_header_un + { + protocol_binary_response_header packet; + char buffer[256]; + }; + + protocol_binary_response_header_un response; + memset(&response, 0, sizeof(protocol_binary_response_header_un)); + + response.packet.response.magic= PROTOCOL_BINARY_RES; + response.packet.response.opcode= PROTOCOL_BINARY_CMD_VERSION; + response.packet.response.status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS); + response.packet.response.opaque= header->request.opaque; + response.packet.response.cas= 0; + response.packet.response.bodylen= htonl((uint32_t)strlen(versionstring)); + + assert(sizeof(protocol_binary_response_header) +strlen(versionstring) <= 256); + memcpy(response.buffer + sizeof(protocol_binary_response_header), versionstring, strlen(versionstring)); + + return response_handler(cookie, header, (protocol_binary_response_header*)&response); +} + +static protocol_binary_response_status concat_command_handler(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler) +{ + protocol_binary_response_status rval= PROTOCOL_BINARY_RESPONSE_SUCCESS; + uint16_t keylen= ntohs(header->request.keylen); + uint64_t cas= example_ntohll(header->request.cas); + void *key= header + 1; + uint32_t vallen= ntohl(header->request.bodylen) - keylen; + void *val= (char*)key + keylen; + + struct item *item= get_item(key, keylen); + struct item *nitem= NULL; + + if (item == NULL) + { + rval= PROTOCOL_BINARY_RESPONSE_KEY_ENOENT; + } + else if (cas != 0 && cas != item->cas) + { + rval= PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS; + } + else if ((nitem= create_item(key, keylen, NULL, item->size + vallen, + item->flags, item->exp)) == NULL) + { + release_item(item); + rval= PROTOCOL_BINARY_RESPONSE_ENOMEM; + } + else + { + if (header->request.opcode == PROTOCOL_BINARY_CMD_APPEND || + header->request.opcode == PROTOCOL_BINARY_CMD_APPENDQ) + { + memcpy(nitem->data, item->data, item->size); + memcpy(((char*)(nitem->data)) + item->size, val, vallen); + } + else + { + memcpy(nitem->data, val, vallen); + memcpy(((char*)(nitem->data)) + vallen, item->data, item->size); + } + release_item(item); + delete_item(key, keylen); + put_item(nitem); + cas= nitem->cas; + release_item(nitem); + + if (header->request.opcode == PROTOCOL_BINARY_CMD_APPEND || + header->request.opcode == PROTOCOL_BINARY_CMD_PREPEND) + { + protocol_binary_response_no_extras response; + memset(&response, 0, sizeof(protocol_binary_response_no_extras)); + + response.message.header.response.magic= PROTOCOL_BINARY_RES; + response.message.header.response.opcode= header->request.opcode; + response.message.header.response.status= htons(rval); + response.message.header.response.opaque= header->request.opaque; + response.message.header.response.cas= example_htonll(cas); + + return response_handler(cookie, header, (protocol_binary_response_header*)&response); + } + } + + return rval; +} + +static protocol_binary_response_status set_command_handler(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler) +{ + size_t keylen= ntohs(header->request.keylen); + size_t datalen= ntohl(header->request.bodylen) - keylen - 8; + protocol_binary_request_replace *request= (protocol_binary_request_replace*)header; + uint32_t flags= ntohl(request->message.body.flags); + time_t timeout= (time_t)ntohl(request->message.body.expiration); + char *key= ((char*)header) + sizeof(*header) + 8; + char *data= key + keylen; + + protocol_binary_response_no_extras response; + memset(&response, 0, sizeof(protocol_binary_response_no_extras)); + + response.message.header.response.magic= PROTOCOL_BINARY_RES; + response.message.header.response.opcode= header->request.opcode; + response.message.header.response.status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS); + response.message.header.response.opaque= header->request.opaque; + + if (header->request.cas != 0) + { + /* validate cas */ + struct item* item= get_item(key, keylen); + if (item != NULL) + { + if (item->cas != example_ntohll(header->request.cas)) + { + release_item(item); + response.message.header.response.status= htons(PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS); + return response_handler(cookie, header, (protocol_binary_response_header*)&response); + } + release_item(item); + } + } + + delete_item(key, keylen); + struct item* item= create_item(key, keylen, data, datalen, flags, timeout); + if (item == NULL) + { + response.message.header.response.status= htons(PROTOCOL_BINARY_RESPONSE_ENOMEM); + } + else + { + put_item(item); + /* SETQ shouldn't return a message */ + if (header->request.opcode == PROTOCOL_BINARY_CMD_SET) + { + response.message.header.response.cas= example_htonll(item->cas); + release_item(item); + return response_handler(cookie, header, (protocol_binary_response_header*)&response); + } + release_item(item); + + return PROTOCOL_BINARY_RESPONSE_SUCCESS; + } + + return response_handler(cookie, header, (protocol_binary_response_header*)&response); +} + +static protocol_binary_response_status add_command_handler(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler) +{ + size_t keylen= ntohs(header->request.keylen); + size_t datalen= ntohl(header->request.bodylen) - keylen - 8; + protocol_binary_request_add *request= (protocol_binary_request_add*)header; + uint32_t flags= ntohl(request->message.body.flags); + time_t timeout= (time_t)ntohl(request->message.body.expiration); + char *key= ((char*)header) + sizeof(*header) + 8; + char *data= key + keylen; + + protocol_binary_response_no_extras response; + memset(&response, 0, sizeof(protocol_binary_response_no_extras)); + + response.message.header.response.magic= PROTOCOL_BINARY_RES; + response.message.header.response.opcode= header->request.opcode; + response.message.header.response.status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS); + response.message.header.response.opaque= header->request.opaque; + + struct item* item= get_item(key, keylen); + if (item == NULL) + { + item= create_item(key, keylen, data, datalen, flags, timeout); + if (item == NULL) + response.message.header.response.status= htons(PROTOCOL_BINARY_RESPONSE_ENOMEM); + else + { + put_item(item); + /* ADDQ shouldn't return a message */ + if (header->request.opcode == PROTOCOL_BINARY_CMD_ADD) + { + response.message.header.response.cas= example_htonll(item->cas); + release_item(item); + return response_handler(cookie, header, (protocol_binary_response_header*)&response); + } + release_item(item); + return PROTOCOL_BINARY_RESPONSE_SUCCESS; + } + } + else + { + release_item(item); + response.message.header.response.status= htons(PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS); + } + + return response_handler(cookie, header, (protocol_binary_response_header*)&response); +} + +static protocol_binary_response_status replace_command_handler(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler) +{ + size_t keylen= ntohs(header->request.keylen); + size_t datalen= ntohl(header->request.bodylen) - keylen - 8; + protocol_binary_request_replace *request= (protocol_binary_request_replace*)header; + uint32_t flags= ntohl(request->message.body.flags); + time_t timeout= (time_t)ntohl(request->message.body.expiration); + char *key= ((char*)header) + sizeof(*header) + 8; + char *data= key + keylen; + + protocol_binary_response_no_extras response; + memset(&response, 0, sizeof(protocol_binary_response_no_extras)); + + response.message.header.response.magic= PROTOCOL_BINARY_RES; + response.message.header.response.opcode= header->request.opcode; + response.message.header.response.status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS); + response.message.header.response.opaque= header->request.opaque; + + struct item* item= get_item(key, keylen); + if (item == NULL) + { + response.message.header.response.status= htons(PROTOCOL_BINARY_RESPONSE_KEY_ENOENT); + } + else if (header->request.cas == 0 || example_ntohll(header->request.cas) == item->cas) + { + release_item(item); + delete_item(key, keylen); + item= create_item(key, keylen, data, datalen, flags, timeout); + + if (item == NULL) + { + response.message.header.response.status= htons(PROTOCOL_BINARY_RESPONSE_ENOMEM); + } + else + { + put_item(item); + /* REPLACEQ shouldn't return a message */ + if (header->request.opcode == PROTOCOL_BINARY_CMD_REPLACE) + { + response.message.header.response.cas= example_htonll(item->cas); + release_item(item); + return response_handler(cookie, header, (protocol_binary_response_header*)&response); + } + release_item(item); + return PROTOCOL_BINARY_RESPONSE_SUCCESS; + } + } + else + { + response.message.header.response.status= htons(PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS); + release_item(item); + } + + return response_handler(cookie, header, (protocol_binary_response_header*)&response); +} + +static protocol_binary_response_status stat_command_handler(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler) +{ + /* Just send the terminating packet*/ + protocol_binary_response_no_extras response; + memset(&response, 0, sizeof(protocol_binary_response_no_extras)); + + response.message.header.response.magic= PROTOCOL_BINARY_RES; + response.message.header.response.opcode= PROTOCOL_BINARY_CMD_STAT; + response.message.header.response.status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS); + response.message.header.response.opaque= header->request.opaque; + + return response_handler(cookie, header, (protocol_binary_response_header*)&response); +} + +memcached_binary_protocol_callback_st interface_v0_impl; + +void initialize_interface_v0_handler(util::log_info_st& arg) +{ + log_file= &arg; + + interface_v0_impl.interface_version= MEMCACHED_PROTOCOL_HANDLER_V0; + interface_v0_impl.interface.v0.comcode[PROTOCOL_BINARY_CMD_GET]= get_command_handler; + interface_v0_impl.interface.v0.comcode[PROTOCOL_BINARY_CMD_SET]= set_command_handler; + interface_v0_impl.interface.v0.comcode[PROTOCOL_BINARY_CMD_ADD]= add_command_handler; + interface_v0_impl.interface.v0.comcode[PROTOCOL_BINARY_CMD_REPLACE]= replace_command_handler; + interface_v0_impl.interface.v0.comcode[PROTOCOL_BINARY_CMD_DELETE]= delete_command_handler; + interface_v0_impl.interface.v0.comcode[PROTOCOL_BINARY_CMD_INCREMENT]= arithmetic_command_handler; + interface_v0_impl.interface.v0.comcode[PROTOCOL_BINARY_CMD_DECREMENT]= arithmetic_command_handler; + interface_v0_impl.interface.v0.comcode[PROTOCOL_BINARY_CMD_QUIT]= quit_command_handler; + interface_v0_impl.interface.v0.comcode[PROTOCOL_BINARY_CMD_FLUSH]= flush_command_handler; + interface_v0_impl.interface.v0.comcode[PROTOCOL_BINARY_CMD_GETQ]= get_command_handler; + interface_v0_impl.interface.v0.comcode[PROTOCOL_BINARY_CMD_NOOP]= noop_command_handler; + interface_v0_impl.interface.v0.comcode[PROTOCOL_BINARY_CMD_VERSION]= version_command_handler; + interface_v0_impl.interface.v0.comcode[PROTOCOL_BINARY_CMD_GETK]= get_command_handler; + interface_v0_impl.interface.v0.comcode[PROTOCOL_BINARY_CMD_GETKQ]= get_command_handler; + interface_v0_impl.interface.v0.comcode[PROTOCOL_BINARY_CMD_APPEND]= concat_command_handler; + interface_v0_impl.interface.v0.comcode[PROTOCOL_BINARY_CMD_PREPEND]= concat_command_handler; + interface_v0_impl.interface.v0.comcode[PROTOCOL_BINARY_CMD_STAT]= stat_command_handler; + interface_v0_impl.interface.v0.comcode[PROTOCOL_BINARY_CMD_SETQ]= set_command_handler; + interface_v0_impl.interface.v0.comcode[PROTOCOL_BINARY_CMD_ADDQ]= add_command_handler; + interface_v0_impl.interface.v0.comcode[PROTOCOL_BINARY_CMD_REPLACEQ]= replace_command_handler; + interface_v0_impl.interface.v0.comcode[PROTOCOL_BINARY_CMD_DELETEQ]= delete_command_handler; + interface_v0_impl.interface.v0.comcode[PROTOCOL_BINARY_CMD_INCREMENTQ]= arithmetic_command_handler; + interface_v0_impl.interface.v0.comcode[PROTOCOL_BINARY_CMD_DECREMENTQ]= arithmetic_command_handler; + interface_v0_impl.interface.v0.comcode[PROTOCOL_BINARY_CMD_QUITQ]= quit_command_handler; + interface_v0_impl.interface.v0.comcode[PROTOCOL_BINARY_CMD_FLUSHQ]= flush_command_handler; + interface_v0_impl.interface.v0.comcode[PROTOCOL_BINARY_CMD_APPENDQ]= concat_command_handler; + interface_v0_impl.interface.v0.comcode[PROTOCOL_BINARY_CMD_PREPENDQ]= concat_command_handler; +} diff --git a/example/interface_v1.cc b/example/interface_v1.cc new file mode 100644 index 0000000..61dd929 --- /dev/null +++ b/example/interface_v1.cc @@ -0,0 +1,417 @@ +/* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */ +/** + * This file contains an implementation of the callback interface for level 1 + * in the protocol library. If you compare the implementation with the one + * in interface_v0.cc you will see that this implementation is much easier and + * hides all of the protocol logic and let you focus on the application + * logic. One "problem" with this layer is that it is synchronous, so that + * you will not receive the next command before a answer to the previous + * command is being sent. + */ +#include "mem_config.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include "example/memcached_light.h" +#include "example/storage.h" +#include "util/log.hpp" + +static datadifferential::util::log_info_st *log_file= NULL; + +static protocol_binary_response_status add_handler(const void *cookie, + const void *key, + uint16_t keylen, + const void *data, + uint32_t datalen, + uint32_t flags, + uint32_t exptime, + uint64_t *cas) +{ + (void)cookie; + protocol_binary_response_status rval= PROTOCOL_BINARY_RESPONSE_SUCCESS; + struct item* item= get_item(key, keylen); + if (item == NULL) + { + item= create_item(key, keylen, data, datalen, flags, (time_t)exptime); + if (item == 0) + { + rval= PROTOCOL_BINARY_RESPONSE_ENOMEM; + } + else + { + put_item(item); + *cas= item->cas; + release_item(item); + } + } + else + { + rval= PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS; + } + + return rval; +} + +static protocol_binary_response_status append_handler(const void *cookie, + const void *key, + uint16_t keylen, + const void* val, + uint32_t vallen, + uint64_t cas, + uint64_t *result_cas) +{ + (void)cookie; + protocol_binary_response_status rval= PROTOCOL_BINARY_RESPONSE_SUCCESS; + + struct item *item= get_item(key, keylen); + struct item *nitem; + + if (item == NULL) + { + rval= PROTOCOL_BINARY_RESPONSE_KEY_ENOENT; + } + else if (cas != 0 && cas != item->cas) + { + rval= PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS; + } + else if ((nitem= create_item(key, keylen, NULL, item->size + vallen, + item->flags, item->exp)) == NULL) + { + release_item(item); + rval= PROTOCOL_BINARY_RESPONSE_ENOMEM; + } + else + { + memcpy(nitem->data, item->data, item->size); + memcpy(((char*)(nitem->data)) + item->size, val, vallen); + release_item(item); + delete_item(key, keylen); + put_item(nitem); + *result_cas= nitem->cas; + release_item(nitem); + } + + return rval; +} + +static protocol_binary_response_status decrement_handler(const void *cookie, + const void *key, + uint16_t keylen, + uint64_t delta, + uint64_t initial, + uint32_t expiration, + uint64_t *result, + uint64_t *result_cas) { + (void)cookie; + protocol_binary_response_status rval= PROTOCOL_BINARY_RESPONSE_SUCCESS; + uint64_t val= initial; + struct item *item= get_item(key, keylen); + + if (item != NULL) + { + if (delta > *(uint64_t*)item->data) + val= 0; + else + val= *(uint64_t*)item->data - delta; + + expiration= (uint32_t)item->exp; + release_item(item); + delete_item(key, keylen); + } + + item= create_item(key, keylen, NULL, sizeof(initial), 0, (time_t)expiration); + if (item == 0) + { + rval= PROTOCOL_BINARY_RESPONSE_ENOMEM; + } + else + { + memcpy(item->data, &val, sizeof(val)); + put_item(item); + *result= val; + *result_cas= item->cas; + release_item(item); + } + + return rval; +} + +static protocol_binary_response_status delete_handler(const void *, // cookie + const void *key, + uint16_t keylen, + uint64_t cas) +{ + protocol_binary_response_status rval= PROTOCOL_BINARY_RESPONSE_SUCCESS; + + if (cas != 0) + { + struct item *item= get_item(key, keylen); + if (item != NULL) + { + if (item->cas != cas) + { + release_item(item); + return PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS; + } + release_item(item); + } + } + + if (!delete_item(key, keylen)) + { + rval= PROTOCOL_BINARY_RESPONSE_KEY_ENOENT; + } + + return rval; +} + + +static protocol_binary_response_status flush_handler(const void * /* cookie */, uint32_t /* when */) +{ + return PROTOCOL_BINARY_RESPONSE_SUCCESS; +} + +static protocol_binary_response_status get_handler(const void *cookie, + const void *key, + uint16_t keylen, + memcached_binary_protocol_get_response_handler response_handler) { + struct item *item= get_item(key, keylen); + + if (item == NULL) + { + return PROTOCOL_BINARY_RESPONSE_KEY_ENOENT; + } + + protocol_binary_response_status rc; + rc= response_handler(cookie, key, (uint16_t)keylen, + item->data, (uint32_t)item->size, item->flags, + item->cas); + release_item(item); + return rc; +} + +static protocol_binary_response_status increment_handler(const void *cookie, + const void *key, + uint16_t keylen, + uint64_t delta, + uint64_t initial, + uint32_t expiration, + uint64_t *result, + uint64_t *result_cas) { + (void)cookie; + protocol_binary_response_status rval= PROTOCOL_BINARY_RESPONSE_SUCCESS; + uint64_t val= initial; + struct item *item= get_item(key, keylen); + + if (item != NULL) + { + val= (*(uint64_t*)item->data) + delta; + expiration= (uint32_t)item->exp; + release_item(item); + delete_item(key, keylen); + } + + item= create_item(key, keylen, NULL, sizeof(initial), 0, (time_t)expiration); + if (item == NULL) + { + rval= PROTOCOL_BINARY_RESPONSE_ENOMEM; + } + else + { + char buffer[1024] = {0}; + memcpy(buffer, key, keylen); + memcpy(item->data, &val, sizeof(val)); + put_item(item); + *result= val; + *result_cas= item->cas; + release_item(item); + } + + return rval; +} + +static protocol_binary_response_status noop_handler(const void *cookie) { + (void)cookie; + return PROTOCOL_BINARY_RESPONSE_SUCCESS; +} + +static protocol_binary_response_status prepend_handler(const void *cookie, + const void *key, + uint16_t keylen, + const void* val, + uint32_t vallen, + uint64_t cas, + uint64_t *result_cas) { + (void)cookie; + protocol_binary_response_status rval= PROTOCOL_BINARY_RESPONSE_SUCCESS; + + struct item *item= get_item(key, keylen); + struct item *nitem= NULL; + + if (item == NULL) + { + rval= PROTOCOL_BINARY_RESPONSE_KEY_ENOENT; + } + else if (cas != 0 && cas != item->cas) + { + rval= PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS; + } + else if ((nitem= create_item(key, keylen, NULL, item->size + vallen, + item->flags, item->exp)) == NULL) + { + rval= PROTOCOL_BINARY_RESPONSE_ENOMEM; + } + else + { + memcpy(nitem->data, val, vallen); + memcpy(((char*)(nitem->data)) + vallen, item->data, item->size); + release_item(item); + item= NULL; + delete_item(key, keylen); + put_item(nitem); + *result_cas= nitem->cas; + } + + if (item) + release_item(item); + + if (nitem) + release_item(nitem); + + return rval; +} + +static protocol_binary_response_status quit_handler(const void *) //cookie +{ + return PROTOCOL_BINARY_RESPONSE_SUCCESS; +} + +static protocol_binary_response_status replace_handler(const void *, // cookie + const void *key, + uint16_t keylen, + const void* data, + uint32_t datalen, + uint32_t flags, + uint32_t exptime, + uint64_t cas, + uint64_t *result_cas) +{ + protocol_binary_response_status rval= PROTOCOL_BINARY_RESPONSE_SUCCESS; + struct item* item= get_item(key, keylen); + + if (item == NULL) + { + rval= PROTOCOL_BINARY_RESPONSE_KEY_ENOENT; + } + else if (cas == 0 || cas == item->cas) + { + release_item(item); + delete_item(key, keylen); + item= create_item(key, keylen, data, datalen, flags, (time_t)exptime); + if (item == 0) + { + rval= PROTOCOL_BINARY_RESPONSE_ENOMEM; + } + else + { + put_item(item); + *result_cas= item->cas; + release_item(item); + } + } + else + { + rval= PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS; + release_item(item); + } + + return rval; +} + +static protocol_binary_response_status set_handler(const void *cookie, + const void *key, + uint16_t keylen, + const void* data, + uint32_t datalen, + uint32_t flags, + uint32_t exptime, + uint64_t cas, + uint64_t *result_cas) { + (void)cookie; + protocol_binary_response_status rval= PROTOCOL_BINARY_RESPONSE_SUCCESS; + + if (cas != 0) + { + struct item* item= get_item(key, keylen); + if (item != NULL && cas != item->cas) + { + /* Invalid CAS value */ + release_item(item); + return PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS; + } + } + + delete_item(key, keylen); + struct item* item= create_item(key, keylen, data, datalen, flags, (time_t)exptime); + if (item == 0) + { + rval= PROTOCOL_BINARY_RESPONSE_ENOMEM; + } + else + { + put_item(item); + *result_cas= item->cas; + release_item(item); + } + + return rval; +} + +static protocol_binary_response_status stat_handler(const void *cookie, + const void *, // key + uint16_t, // keylen, + memcached_binary_protocol_stat_response_handler response_handler) +{ + /* Just return an empty packet */ + return response_handler(cookie, NULL, 0, NULL, 0); +} + +static protocol_binary_response_status version_handler(const void *cookie, + memcached_binary_protocol_version_response_handler response_handler) +{ + const char *version= "0.1.1"; + return response_handler(cookie, version, (uint32_t)strlen(version)); +} + +memcached_binary_protocol_callback_st interface_v1_impl; + +void initialize_interface_v1_handler(datadifferential::util::log_info_st& arg) +{ + log_file= &arg; + memset(&interface_v1_impl, 0, sizeof(memcached_binary_protocol_callback_st)); + + interface_v1_impl.interface_version= MEMCACHED_PROTOCOL_HANDLER_V1; + interface_v1_impl.interface.v1.add= add_handler; + interface_v1_impl.interface.v1.append= append_handler; + interface_v1_impl.interface.v1.decrement= decrement_handler; + interface_v1_impl.interface.v1.delete_object= delete_handler; + interface_v1_impl.interface.v1.flush_object= flush_handler; + interface_v1_impl.interface.v1.get= get_handler; + interface_v1_impl.interface.v1.increment= increment_handler; + interface_v1_impl.interface.v1.noop= noop_handler; + interface_v1_impl.interface.v1.prepend= prepend_handler; + interface_v1_impl.interface.v1.quit= quit_handler; + interface_v1_impl.interface.v1.replace= replace_handler; + interface_v1_impl.interface.v1.set= set_handler; + interface_v1_impl.interface.v1.stat= stat_handler; + interface_v1_impl.interface.v1.version= version_handler; +} diff --git a/example/memcached_light.cc b/example/memcached_light.cc new file mode 100644 index 0000000..c5385d7 --- /dev/null +++ b/example/memcached_light.cc @@ -0,0 +1,646 @@ +/* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */ +/** + * What is a library without an example to show you how to use the library? + * This example use both interfaces to implement a small memcached server. + * Please note that this is an exemple on how to use the library, not + * an implementation of a scalable memcached server. If you look closely + * at the example it isn't even multithreaded ;-) + * + * With that in mind, let me give you some pointers into the source: + * storage.c/h - Implements the item store for this server and not really + * interesting for this example. + * interface_v0.cc - Shows an implementation of the memcached server by using + * the "raw" access to the packets as they arrive + * interface_v1.cc - Shows an implementation of the memcached server by using + * the more "logical" interface. + * memcached_light.cc- This file sets up all of the sockets and run the main + * message loop. + * + * + * config.h is included so that I can use the ntohll/htonll on platforms that + * doesn't have that (this is a private function inside libmemcached, so you + * cannot use it directly from libmemcached without special modifications to + * the library) + */ + +#include + +#include +#include +#include +#include "example/storage.h" +#include "example/memcached_light.h" + +#include "util/daemon.hpp" +#include "util/log.hpp" +#include "util/pidfile.hpp" + +using namespace datadifferential; + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern memcached_binary_protocol_callback_st interface_v0_impl; +extern memcached_binary_protocol_callback_st interface_v1_impl; + +static memcached_socket_t server_sockets[1024]; +static int num_server_sockets= 0; + +struct connection +{ + void *userdata; + struct event event; +}; + +/* The default maximum number of connections... (change with -c) */ +static int maxconns= 1024; + +static struct connection *socket_userdata_map; +static struct event_base *event_base= NULL; + +struct options_st { + std::string pid_file; + std::string service; + std::string log_file; + bool is_verbose; + bool opt_daemon; + + options_st() : + service("9999"), + is_verbose(false), + opt_daemon(false) + { + } +}; + +static options_st global_options; + +/** + * Callback for driving a client connection + * @param fd the socket for the client socket + * @param which identifying the event that occurred (not used) + * @param arg the connection structure for the client + */ +static void drive_client(memcached_socket_t fd, short, void *arg) +{ + struct connection *client= (struct connection*)arg; + struct memcached_protocol_client_st* c= (struct memcached_protocol_client_st*)client->userdata; + assert(c != NULL); + + memcached_protocol_event_t events= memcached_protocol_client_work(c); + if (events & MEMCACHED_PROTOCOL_ERROR_EVENT) + { + if (global_options.is_verbose) + { + struct sockaddr_in sin; + socklen_t addrlen= sizeof(sin); + + if (getsockname(fd, (struct sockaddr *)&sin, &addrlen) != -1) + { + std::cout << __FILE__ << ":" << __LINE__ + << " close(MEMCACHED_PROTOCOL_ERROR_EVENT)" + << " " << inet_ntoa(sin.sin_addr) << ":" << sin.sin_port + << " fd:" << fd + << std::endl; + } + else + { + std::cout << __FILE__ << ":" << __LINE__ << "close() MEMCACHED_PROTOCOL_ERROR_EVENT" << std::endl; + } + } + + memcached_protocol_client_destroy(c); + closesocket(fd); + } + else + { + short flags = 0; + if (events & MEMCACHED_PROTOCOL_WRITE_EVENT) + { + flags= EV_WRITE; + } + + if (events & MEMCACHED_PROTOCOL_READ_EVENT) + { + flags|= EV_READ; + } + + event_set(&client->event, int(fd), flags, drive_client, client); + event_base_set(event_base, &client->event); + + if (event_add(&client->event, 0) == -1) + { + memcached_protocol_client_destroy(c); + closesocket(fd); + } + } +} + +/** + * Callback for accepting new connections + * @param fd the socket for the server socket + * @param which identifying the event that occurred (not used) + * @param arg the connection structure for the server + */ +static void accept_handler(memcached_socket_t fd, short, void *arg) +{ + struct connection *server= (struct connection *)arg; + /* accept new client */ + struct sockaddr_storage addr; + socklen_t addrlen= sizeof(addr); + memcached_socket_t sock= accept(fd, (struct sockaddr *)&addr, &addrlen); + + if (sock == INVALID_SOCKET) + { + perror("Failed to accept client"); + } + +#ifndef WIN32 + if (sock >= maxconns) + { + closesocket(sock); + return ; + } +#endif + + struct memcached_protocol_client_st* c= memcached_protocol_create_client((memcached_protocol_st*)server->userdata, sock); + if (c == NULL) + { + closesocket(sock); + } + else + { + memcached_protocol_client_set_verbose(c, global_options.is_verbose); + struct connection *client = &socket_userdata_map[sock]; + client->userdata= c; + + event_set(&client->event, int(sock), EV_READ, drive_client, client); + event_base_set(event_base, &client->event); + if (event_add(&client->event, 0) == -1) + { + std::cerr << "Failed to add event for " << sock << std::endl; + memcached_protocol_client_destroy(c); + closesocket(sock); + } + } +} + +static bool server_socket(util::log_info_st& log_file, const std::string& service) +{ + struct addrinfo *ai; + struct addrinfo hints; + memset(&hints, 0, sizeof(struct addrinfo)); + + hints.ai_flags= AI_PASSIVE; + hints.ai_family= AF_UNSPEC; + hints.ai_socktype= SOCK_STREAM; + + int error= getaddrinfo("127.0.0.1", service.c_str(), &hints, &ai); + if (error != 0) + { + if (error != EAI_SYSTEM) + { + std::string buffer("getaddrinfo: "); + buffer+= gai_strerror(error); + log_file.write(util::VERBOSE_ERROR, buffer.c_str()); + } + else + { + std::string buffer("getaddrinfo: "); + buffer+= strerror(errno); + log_file.write(util::VERBOSE_ERROR, buffer.c_str()); + } + + return false; + } + + struct linger ling= {0, 0}; + + for (struct addrinfo *next= ai; next; next= next->ai_next) + { + memcached_socket_t sock= socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); + if (sock == INVALID_SOCKET) + { + std::string buffer("Failed to create socket: "); + buffer+= strerror(errno); + log_file.write(util::VERBOSE_ERROR, buffer.c_str()); + continue; + } + + int flags; +#ifdef WIN32 + u_long arg = 1; + if (ioctlsocket(sock, FIONBIO, &arg) == SOCKET_ERROR) + { + std::cerr << "Failed to set nonblocking io: " << strerror(errno) << std::endl; + closesocket(sock); + continue; + } +#else + flags= fcntl(sock, F_GETFL, 0); + if (flags == -1) + { + std::string buffer("Failed to get socket flags: "); + buffer+= strerror(errno); + log_file.write(util::VERBOSE_ERROR, buffer.c_str()); + closesocket(sock); + continue; + } + + if ((flags & O_NONBLOCK) != O_NONBLOCK) + { + if (fcntl(sock, F_SETFL, flags | O_NONBLOCK) == -1) + { + std::string buffer("Failed to set socket to nonblocking mode: "); + buffer+= strerror(errno); + log_file.write(util::VERBOSE_ERROR, buffer.c_str()); + closesocket(sock); + continue; + } + } +#endif + + flags= 1; + if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void *)&flags, sizeof(flags)) != 0) + { + std::cerr << "Failed to set SO_REUSEADDR: " << strerror(errno) << std::endl; + } + + if (setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (void *)&flags, sizeof(flags)) != 0) + { + std::cerr << "Failed to set SO_KEEPALIVE: " << strerror(errno) << std::endl; + } + + if (setsockopt(sock, SOL_SOCKET, SO_LINGER, (void *)&ling, sizeof(ling)) != 0) + { + std::cerr << "Failed to set SO_LINGER: " << strerror(errno) << std::endl; + } + + if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (void *)&flags, sizeof(flags)) != 0) + { + std::cerr << "Failed to set TCP_NODELAY: " << strerror(errno) << std::endl; + } + + if (bind(sock, next->ai_addr, next->ai_addrlen) == SOCKET_ERROR) + { + if (get_socket_errno() != EADDRINUSE) + { + std::cerr << "bind(): " << strerror(errno) << std::endl; + freeaddrinfo(ai); + } + closesocket(sock); + continue; + } + + if (listen(sock, 1024) == SOCKET_ERROR) + { + std::string buffer("listen(): "); + buffer+= strerror(errno); + log_file.write(util::VERBOSE_ERROR, buffer.c_str()); + closesocket(sock); + continue; + } + + if (global_options.is_verbose) + { + std::string buffer("Listening to: "); + buffer+= global_options.service; + log_file.write(util::VERBOSE_NOTICE, buffer.c_str()); + } + + server_sockets[num_server_sockets++]= sock; + } + + freeaddrinfo(ai); + + return (num_server_sockets > 0) ? true : false; +} + +/** + * Convert a command code to a textual string + * @param cmd the comcode to convert + * @return a textual string with the command or NULL for unknown commands + */ +static const char* comcode2str(uint8_t cmd) +{ + static const char * const text[] = { + "GET", "SET", "ADD", "REPLACE", "DELETE", + "INCREMENT", "DECREMENT", "QUIT", "FLUSH", + "GETQ", "NOOP", "VERSION", "GETK", "GETKQ", + "APPEND", "PREPEND", "STAT", "SETQ", "ADDQ", + "REPLACEQ", "DELETEQ", "INCREMENTQ", "DECREMENTQ", + "QUITQ", "FLUSHQ", "APPENDQ", "PREPENDQ" + }; + + if (cmd <= PROTOCOL_BINARY_CMD_PREPENDQ) + { + return text[cmd]; + } + + return NULL; +} + +/** + * Print out the command we are about to execute + */ +static void pre_execute(const void *cookie, + protocol_binary_request_header *header) +{ + if (global_options.is_verbose) + { + if (header) + { + const char *cmd= comcode2str(header->request.opcode); + if (cmd != NULL) + { + std::cout << "pre_execute from " << cookie << ": " << cmd << std::endl; + } + else + { + std::cout << "pre_execute from " << cookie << ": " << header->request.opcode << std::endl; + } + } + else + { + std::cout << "pre_execute from " << cookie << std::endl; + } + } +} + +/** + * Print out the command we just executed + */ +static void post_execute(const void *cookie, + protocol_binary_request_header *header) +{ + if (global_options.is_verbose) + { + if (header) + { + const char *cmd= comcode2str(header->request.opcode); + if (cmd != NULL) + { + std::cout << "post_execute from " << cookie << ": " << cmd << std::endl; + } + else + { + std::cout << "post_execute from " << cookie << ": " << header->request.opcode << std::endl; + } + } + else + { + std::cout << "post_execute from " << cookie << std::endl; + } + } +} + +/** + * Callback handler for all unknown commands. + * Send an unknown command back to the client + */ +static protocol_binary_response_status unknown(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler) +{ + protocol_binary_response_no_extras response; + memset(&response, 0, sizeof(protocol_binary_response_no_extras)); + + response.message.header.response.magic= PROTOCOL_BINARY_RES; + response.message.header.response.opcode= header->request.opcode; + response.message.header.response.status= htons(PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND); + response.message.header.response.opaque= header->request.opaque; + + return response_handler(cookie, header, (protocol_binary_response_header*)&response); +} + +/** + * Program entry point. Bind to the specified port(s) and serve clients + * + * @param argc number of items in the argument vector + * @param argv argument vector + * @return EXIT_SUCCESS on success, 1 otherwise + */ +int main(int argc, char **argv) +{ + memcached_binary_protocol_callback_st *interface= &interface_v0_impl; + + { + enum long_option_t { + OPT_HELP, + OPT_VERBOSE, + OPT_DAEMON, + OPT_PROTOCOL_VERSION, + OPT_VERSION, + OPT_PORT, + OPT_MAX_CONNECTIONS, + OPT_LOGFILE, + OPT_PIDFILE + }; + + static struct option long_options[]= + { + { "help", no_argument, NULL, OPT_HELP }, + { "port", required_argument, NULL, OPT_PORT }, + { "verbose", no_argument, NULL, OPT_VERBOSE }, + { "daemon", no_argument, NULL, OPT_DAEMON }, + { "protocol", no_argument, NULL, OPT_PROTOCOL_VERSION }, + { "version", no_argument, NULL, OPT_VERSION }, + { "max-connections", required_argument, NULL, OPT_MAX_CONNECTIONS }, + { "pid-file", required_argument, NULL, OPT_PIDFILE }, + { "log-file", required_argument, NULL, OPT_LOGFILE }, + {0, 0, 0, 0} + }; + + bool opt_help= false; + int option_index; + bool done= false; + while (done == false) + { + switch (getopt_long(argc, argv, "", long_options, &option_index)) + { + case -1: + done= true; + break; + + case OPT_PROTOCOL_VERSION: + interface= &interface_v1_impl; + break; + + case OPT_PIDFILE: + global_options.pid_file= optarg; + break; + + case OPT_LOGFILE: + global_options.log_file= optarg; + break; + + case OPT_VERBOSE: + global_options.is_verbose= true; + break; + + case OPT_VERSION: + break; + + case OPT_DAEMON: + global_options.opt_daemon= true; + break; + + case OPT_PORT: + global_options.service= optarg; + break; + + case OPT_MAX_CONNECTIONS: + maxconns= atoi(optarg); + break; + + case OPT_HELP: /* FALLTHROUGH */ + opt_help= true; + break; + + default: + { + std::cerr << "Unknown option: " << optarg << std::endl; + return EXIT_FAILURE; + } + } + } + + if (opt_help) + { + std::cout << "Usage: " << argv[0] << std::endl; + for (struct option *ptr_option= long_options; ptr_option->name; ptr_option++) + { + std::cout << "\t" << ptr_option->name << std::endl; + } + return EXIT_SUCCESS; + } + } + + if (global_options.opt_daemon) + { + util::daemonize(false, true); + } + + if (initialize_storage() == false) + { + /* Error message already printed */ + return EXIT_FAILURE; + } + + util::Pidfile _pid_file(global_options.pid_file); + + if (_pid_file.create() == false) + { + std::cerr << "Failed to create pid-file" << _pid_file.error_message() << std::endl; + return EXIT_FAILURE; + } + + util::log_info_st log_file(argv[0], global_options.log_file, false); + log_file.write(util::VERBOSE_NOTICE, "starting log"); + + /* + * We need to initialize the handlers manually due to a bug in the + * warnings generated by struct initialization in gcc (all the way up to 4.4) + */ + initialize_interface_v0_handler(log_file); + initialize_interface_v1_handler(log_file); + + + if (server_socket(log_file, global_options.service) == false) + { + return EXIT_FAILURE; + } + + if (num_server_sockets == 0) + { + log_file.write(util::VERBOSE_ERROR, "No server sockets are available."); + return EXIT_FAILURE; + } + + /* + * Create and initialize the handles to the protocol handlers. I want + * to be able to trace the traffic throught the pre/post handlers, and + * set up a common handler for unknown messages + */ + interface->pre_execute= pre_execute; + interface->post_execute= post_execute; + interface->unknown= unknown; + + struct memcached_protocol_st *protocol_handle; + if ((protocol_handle= memcached_protocol_create_instance()) == NULL) + { + log_file.write(util::VERBOSE_ERROR, "No server sockets are available."); + return EXIT_FAILURE; + } + + socket_userdata_map= (struct connection*)calloc((size_t)(maxconns), sizeof(struct connection)); + if (socket_userdata_map == NULL) + { + log_file.write(util::VERBOSE_ERROR, "Failed to allocate room for connections"); + return EXIT_FAILURE; + } + + memcached_binary_protocol_set_callbacks(protocol_handle, interface); + memcached_binary_protocol_set_pedantic(protocol_handle, true); + + event_base= event_init(); + if (event_base == NULL) + { + std::cerr << "Failed to create an instance of libevent" << std::endl; + return EXIT_FAILURE; + } + + for (int xx= 0; xx < num_server_sockets; ++xx) + { + struct connection *conn= &socket_userdata_map[server_sockets[xx]]; + conn->userdata= protocol_handle; + + event_set(&conn->event, int(server_sockets[xx]), EV_READ | EV_PERSIST, accept_handler, conn); + + event_base_set(event_base, &conn->event); + if (event_add(&conn->event, 0) == -1) + { + log_file.write(util::VERBOSE_ERROR, "Failed to add event"); + closesocket(server_sockets[xx]); + } + } + + if (global_options.opt_daemon) + { + if (util::daemon_is_ready(true) == false) + { + log_file.write(util::VERBOSE_ERROR, "Failed for util::daemon_is_ready()"); + return EXIT_FAILURE; + } + } + + + /* Serve all of the clients */ + switch (event_base_loop(event_base, 0)) + { + case -1: + log_file.write(util::VERBOSE_ERROR, "event_base_loop() failed"); + break; + + case 1: + log_file.write(util::VERBOSE_ERROR, "event_base_loop(), no events were registered"); + break; + + default: + break; + } + log_file.write(util::VERBOSE_NOTICE, "exiting"); + + /* NOTREACHED */ + return EXIT_SUCCESS; +} diff --git a/example/memcached_light.h b/example/memcached_light.h new file mode 100644 index 0000000..6abb874 --- /dev/null +++ b/example/memcached_light.h @@ -0,0 +1,44 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Memcached Light interface definitions + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */ +#pragma once + +#include "util/log.hpp" + +void initialize_interface_v0_handler(datadifferential::util::log_info_st&); +void initialize_interface_v1_handler(datadifferential::util::log_info_st&); diff --git a/example/storage.cc b/example/storage.cc new file mode 100644 index 0000000..79d2a7d --- /dev/null +++ b/example/storage.cc @@ -0,0 +1,168 @@ +/* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */ +#include "mem_config.h" +#include +#include +#include +#include +#include +#include "storage.h" + +struct list_entry { + struct item item; + struct list_entry *next; + struct list_entry *prev; +}; + +static struct list_entry *root; +static uint64_t cas; + +bool initialize_storage(void) +{ + return true; +} + +void shutdown_storage(void) +{ + /* Do nothing */ +} + +void put_item(struct item* item) +{ + struct list_entry* entry= (struct list_entry*)item; + + update_cas(item); + + if (root == NULL) + { + entry->next= entry->prev= entry; + } + else + { + entry->prev= root->prev; + entry->next= root; + entry->prev->next= entry; + entry->next->prev= entry; + } + + root= entry; +} + +struct item* get_item(const void* key, size_t nkey) +{ + struct list_entry *walker= root; + + if (root == NULL) + { + return NULL; + } + + do + { + if (((struct item*)walker)->nkey == nkey && + memcmp(((struct item*)walker)->key, key, nkey) == 0) + { + return (struct item*)walker; + } + walker= walker->next; + } while (walker != root); + + return NULL; +} + +struct item* create_item(const void* key, size_t nkey, const void* data, + size_t size, uint32_t flags, time_t exp) +{ + struct item* ret= (struct item*)calloc(1, sizeof(struct list_entry)); + + if (ret != NULL) + { + ret->key= malloc(nkey); + if (size > 0) + { + ret->data= malloc(size); + } + + if (ret->key == NULL || (size > 0 && ret->data == NULL)) + { + free(ret->key); + free(ret->data); + free(ret); + return NULL; + } + + memcpy(ret->key, key, nkey); + if (data != NULL) + { + memcpy(ret->data, data, size); + } + + ret->nkey= nkey; + ret->size= size; + ret->flags= flags; + ret->exp= exp; + } + + return ret; +} + +bool delete_item(const void* key, size_t nkey) +{ + struct item* item= get_item(key, nkey); + bool ret= false; + + if (item) + { + /* remove from linked list */ + struct list_entry *entry= (struct list_entry*)item; + + if (entry->next == entry) + { + /* Only one object in the list */ + root= NULL; + } + else + { + /* ensure that we don't loose track of the root, and this will + * change the start position for the next search ;-) */ + root= entry->next; + entry->prev->next= entry->next; + entry->next->prev= entry->prev; + } + + free(item->key); + free(item->data); + free(item); + ret= true; + } + + return ret; +} + +void flush(uint32_t /* when */) +{ + /* remove the complete linked list */ + if (root == NULL) + { + return; + } + + root->prev->next= NULL; + while (root != NULL) + { + struct item* tmp= (struct item*)root; + root= root->next; + + free(tmp->key); + free(tmp->data); + free(tmp); + } +} + +void update_cas(struct item* item) +{ + item->cas= ++cas; +} + +void release_item(struct item* /* item */) +{ +} diff --git a/example/storage.h b/example/storage.h new file mode 100644 index 0000000..bd1b878 --- /dev/null +++ b/example/storage.h @@ -0,0 +1,24 @@ +/* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */ +#pragma once + +struct item { + uint64_t cas; + void* key; + size_t nkey; + void* data; + size_t size; + uint32_t flags; + time_t exp; +}; + +bool initialize_storage(void); +void shutdown_storage(void); + +void update_cas(struct item* item); +void put_item(struct item* item); +struct item* get_item(const void* key, size_t nkey); +struct item* create_item(const void* key, size_t nkey, const void *data, + size_t size, uint32_t flags, time_t exp); +bool delete_item(const void* key, size_t nkey); +void flush(uint32_t when); +void release_item(struct item* item); diff --git a/libhashkit-1.0/algorithm.h b/libhashkit-1.0/algorithm.h new file mode 100644 index 0000000..72005aa --- /dev/null +++ b/libhashkit-1.0/algorithm.h @@ -0,0 +1,88 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +/** + * @file + * @brief HashKit Header + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +HASHKIT_API +uint32_t libhashkit_one_at_a_time(const char *key, size_t key_length); + +HASHKIT_API +uint32_t libhashkit_fnv1_64(const char *key, size_t key_length); + +HASHKIT_API +uint32_t libhashkit_fnv1a_64(const char *key, size_t key_length); + +HASHKIT_API +uint32_t libhashkit_fnv1_32(const char *key, size_t key_length); + +HASHKIT_API +uint32_t libhashkit_fnv1a_32(const char *key, size_t key_length); + +HASHKIT_API +uint32_t libhashkit_crc32(const char *key, size_t key_length); + +HASHKIT_API +uint32_t libhashkit_hsieh(const char *key, size_t key_length); + +HASHKIT_API +uint32_t libhashkit_murmur(const char *key, size_t key_length); + +HASHKIT_API +uint32_t libhashkit_murmur3(const char *key, size_t key_length); + +HASHKIT_API +uint32_t libhashkit_jenkins(const char *key, size_t key_length); + +HASHKIT_API +uint32_t libhashkit_md5(const char *key, size_t key_length); + +HASHKIT_API +void libhashkit_md5_signature(const unsigned char *key, size_t length, unsigned char *result); + +#ifdef __cplusplus +} +#endif diff --git a/libhashkit-1.0/behavior.h b/libhashkit-1.0/behavior.h new file mode 100644 index 0000000..8cc5709 --- /dev/null +++ b/libhashkit-1.0/behavior.h @@ -0,0 +1,56 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + + + + +/** + * @file + * @brief HashKit Header + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + + +#ifdef __cplusplus +} +#endif diff --git a/libhashkit-1.0/configure.h b/libhashkit-1.0/configure.h new file mode 100644 index 0000000..7698c0f --- /dev/null +++ b/libhashkit-1.0/configure.h @@ -0,0 +1,53 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2009-2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + + + + +#pragma once + +#define LIBHASHKIT_VERSION_STRING "1.0.0" +#define LIBHASHKIT_VERSION_HEX 0x01000000 + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} +#endif diff --git a/libhashkit-1.0/configure.h.in b/libhashkit-1.0/configure.h.in new file mode 100644 index 0000000..a2f70f9 --- /dev/null +++ b/libhashkit-1.0/configure.h.in @@ -0,0 +1,53 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2009-2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + + + + +#pragma once + +#define LIBHASHKIT_VERSION_STRING "@LIBHASHKIT_VERSION_STRING@" +#define LIBHASHKIT_VERSION_HEX @LIBHASHKIT_VERSION_HEX@ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} +#endif diff --git a/libhashkit-1.0/digest.h b/libhashkit-1.0/digest.h new file mode 100644 index 0000000..c34dc8a --- /dev/null +++ b/libhashkit-1.0/digest.h @@ -0,0 +1,60 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2009-2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + + + + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +HASHKIT_API +uint32_t hashkit_digest(const hashkit_st *self, const char *key, size_t key_length); + +/** + This is a utilitly function provided so that you can directly access hashes with a hashkit_st. +*/ + +HASHKIT_API +uint32_t libhashkit_digest(const char *key, size_t key_length, hashkit_hash_algorithm_t hash_algorithm); + +#ifdef __cplusplus +} +#endif diff --git a/libhashkit-1.0/function.h b/libhashkit-1.0/function.h new file mode 100644 index 0000000..664a008 --- /dev/null +++ b/libhashkit-1.0/function.h @@ -0,0 +1,73 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2009-2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + + + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +/** + This sets/gets the default function we will be using. +*/ +HASHKIT_API +hashkit_return_t hashkit_set_function(hashkit_st *hash, hashkit_hash_algorithm_t hash_algorithm); + +HASHKIT_API +hashkit_return_t hashkit_set_custom_function(hashkit_st *hash, hashkit_hash_fn function, void *context); + +HASHKIT_API +hashkit_hash_algorithm_t hashkit_get_function(const hashkit_st *hash); + +/** + This sets/gets the function we use for distribution. +*/ +HASHKIT_API +hashkit_return_t hashkit_set_distribution_function(hashkit_st *hash, hashkit_hash_algorithm_t hash_algorithm); + +HASHKIT_API +hashkit_return_t hashkit_set_custom_distribution_function(hashkit_st *self, hashkit_hash_fn function, void *context); + +HASHKIT_API +hashkit_hash_algorithm_t hashkit_get_distribution_function(const hashkit_st *self); + +#ifdef __cplusplus +} +#endif diff --git a/libhashkit-1.0/has.h b/libhashkit-1.0/has.h new file mode 100644 index 0000000..35e8616 --- /dev/null +++ b/libhashkit-1.0/has.h @@ -0,0 +1,52 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2009-2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + + + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +HASHKIT_API +bool libhashkit_has_algorithm(const hashkit_hash_algorithm_t); + +#ifdef __cplusplus +} +#endif diff --git a/libhashkit-1.0/hashkit.h b/libhashkit-1.0/hashkit.h new file mode 100644 index 0000000..da9bd36 --- /dev/null +++ b/libhashkit-1.0/hashkit.h @@ -0,0 +1,110 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2009-2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + + + + +#pragma once + + +#if !defined(__cplusplus) +# include +#endif +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct hashkit_st +{ + struct hashkit_function_st { + hashkit_hash_fn function; + void *context; + } base_hash, distribution_hash; + + struct { + bool is_base_same_distributed:1; + } flags; + + struct { + bool is_allocated:1; + } options; + + void *_key; +}; + +#ifdef __cplusplus +extern "C" { +#endif + +HASHKIT_API + hashkit_st *hashkit_create(hashkit_st *hash); + +HASHKIT_API + hashkit_st *hashkit_clone(hashkit_st *destination, const hashkit_st *ptr); + +HASHKIT_API + bool hashkit_compare(const hashkit_st *first, const hashkit_st *second); + +HASHKIT_API + void hashkit_free(hashkit_st *hash); + +HASHKIT_API + hashkit_string_st *hashkit_encrypt(hashkit_st *, + const char* source, size_t source_length); + +HASHKIT_API + hashkit_string_st *hashkit_decrypt(hashkit_st *, + const char* source, size_t source_length); + +HASHKIT_API + bool hashkit_key(hashkit_st *, const char *key, const size_t key_length); + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/libhashkit-1.0/hashkit.hpp b/libhashkit-1.0/hashkit.hpp new file mode 100644 index 0000000..a953d72 --- /dev/null +++ b/libhashkit-1.0/hashkit.hpp @@ -0,0 +1,98 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#pragma once + +#include +#include + +class Hashkit { + +public: + + Hashkit() + { + hashkit_create(&self); + } + + Hashkit(const Hashkit& source) + { + hashkit_clone(&self, &source.self); + } + + Hashkit& operator=(const Hashkit& source) + { + hashkit_free(&self); + hashkit_clone(&self, &source.self); + + return *this; + } + + friend bool operator==(const Hashkit &left, const Hashkit &right) + { + return hashkit_compare(&left.self, &right.self); + } + + uint32_t digest(std::string& str) + { + return hashkit_digest(&self, str.c_str(), str.length()); + } + + uint32_t digest(const char *key, size_t key_length) + { + return hashkit_digest(&self, key, key_length); + } + + hashkit_return_t set_function(hashkit_hash_algorithm_t hash_algorithm) + { + return hashkit_set_function(&self, hash_algorithm); + } + + hashkit_return_t set_distribution_function(hashkit_hash_algorithm_t hash_algorithm) + { + return hashkit_set_function(&self, hash_algorithm); + } + + ~Hashkit() + { + hashkit_free(&self); + } +private: + + hashkit_st self; +}; diff --git a/libhashkit-1.0/include.am b/libhashkit-1.0/include.am new file mode 100644 index 0000000..6e60d74 --- /dev/null +++ b/libhashkit-1.0/include.am @@ -0,0 +1,21 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root +# + +EXTRA_DIST+= libhashkit-1.0/configure.h.in +BUILT_SOURCES+= libhashkit-1.0/configure.h + +nobase_include_HEADERS+= libhashkit-1.0/algorithm.h +nobase_include_HEADERS+= libhashkit-1.0/behavior.h +nobase_include_HEADERS+= libhashkit-1.0/configure.h +nobase_include_HEADERS+= libhashkit-1.0/digest.h +nobase_include_HEADERS+= libhashkit-1.0/function.h +nobase_include_HEADERS+= libhashkit-1.0/has.h +nobase_include_HEADERS+= libhashkit-1.0/hashkit.h +nobase_include_HEADERS+= libhashkit-1.0/hashkit.hpp +nobase_include_HEADERS+= libhashkit-1.0/strerror.h +nobase_include_HEADERS+= libhashkit-1.0/string.h +nobase_include_HEADERS+= libhashkit-1.0/str_algorithm.h +nobase_include_HEADERS+= libhashkit-1.0/types.h +nobase_include_HEADERS+= libhashkit-1.0/visibility.h diff --git a/libhashkit-1.0/str_algorithm.h b/libhashkit-1.0/str_algorithm.h new file mode 100644 index 0000000..bb05eb5 --- /dev/null +++ b/libhashkit-1.0/str_algorithm.h @@ -0,0 +1,48 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +HASHKIT_API +const char *libhashkit_string_hash(hashkit_hash_algorithm_t type); + +#ifdef __cplusplus +} +#endif diff --git a/libhashkit-1.0/strerror.h b/libhashkit-1.0/strerror.h new file mode 100644 index 0000000..79eb145 --- /dev/null +++ b/libhashkit-1.0/strerror.h @@ -0,0 +1,50 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2009-2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +HASHKIT_API + const char *hashkit_strerror(hashkit_st *ptr, hashkit_return_t rc); + +#ifdef __cplusplus +} +#endif diff --git a/libhashkit-1.0/string.h b/libhashkit-1.0/string.h new file mode 100644 index 0000000..90cb3ae --- /dev/null +++ b/libhashkit-1.0/string.h @@ -0,0 +1,63 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2009-2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#pragma once + +#ifdef __cplusplus +struct hashkit_string_st; +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +HASHKIT_API +void hashkit_string_free(hashkit_string_st *ptr); + + +HASHKIT_API +size_t hashkit_string_length(const hashkit_string_st *self); + +HASHKIT_API +const char *hashkit_string_c_str(const hashkit_string_st* self); + +#ifdef __cplusplus +} // extern "C" +#endif + + diff --git a/libhashkit-1.0/types.h b/libhashkit-1.0/types.h new file mode 100644 index 0000000..37c33ee --- /dev/null +++ b/libhashkit-1.0/types.h @@ -0,0 +1,98 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2009-2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#pragma once + +typedef enum { + HASHKIT_SUCCESS, + HASHKIT_FAILURE, + HASHKIT_MEMORY_ALLOCATION_FAILURE, + HASHKIT_INVALID_HASH, + HASHKIT_INVALID_ARGUMENT, + HASHKIT_MAXIMUM_RETURN /* Always add new error code before */ +} hashkit_return_t; + +static inline bool hashkit_success(const hashkit_return_t rc) +{ + return (rc == HASHKIT_SUCCESS); +} + +static inline bool hashkit_failed(const hashkit_return_t rc) +{ + return (rc != HASHKIT_SUCCESS); +} + +typedef enum { + HASHKIT_HASH_DEFAULT= 0, // hashkit_one_at_a_time() + HASHKIT_HASH_MD5, + HASHKIT_HASH_CRC, + HASHKIT_HASH_FNV1_64, + HASHKIT_HASH_FNV1A_64, + HASHKIT_HASH_FNV1_32, + HASHKIT_HASH_FNV1A_32, + HASHKIT_HASH_HSIEH, + HASHKIT_HASH_MURMUR, + HASHKIT_HASH_JENKINS, + HASHKIT_HASH_MURMUR3, + HASHKIT_HASH_CUSTOM, + HASHKIT_HASH_MAX +} hashkit_hash_algorithm_t; + +/** + * Hash distributions that are available to use. + */ +typedef enum +{ + HASHKIT_DISTRIBUTION_MODULA, + HASHKIT_DISTRIBUTION_RANDOM, + HASHKIT_DISTRIBUTION_KETAMA, + HASHKIT_DISTRIBUTION_MAX /* Always add new values before this. */ +} hashkit_distribution_t; + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct hashkit_st hashkit_st; +typedef struct hashkit_string_st hashkit_string_st; + +typedef uint32_t (*hashkit_hash_fn)(const char *key, size_t key_length, void *context); + +#ifdef __cplusplus +} +#endif diff --git a/libhashkit-1.0/visibility.h b/libhashkit-1.0/visibility.h new file mode 100644 index 0000000..b8f194c --- /dev/null +++ b/libhashkit-1.0/visibility.h @@ -0,0 +1,48 @@ +/* + * Summary: interface for HashKit functions + * Description: visibitliy macros for HashKit library + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in this directory for full text. + * + * Author: Monty Taylor + */ + +/** + * @file + * @brief Visibility control macros + */ + +#pragma once + +/** + * + * HASHKIT_API is used for the public API symbols. It either DLL imports or + * DLL exports (or does nothing for static build). + * + * HASHKIT_LOCAL is used for non-api symbols. + */ + +#if defined(BUILDING_HASHKIT) +# if defined(HAVE_VISIBILITY) && HAVE_VISIBILITY +# define HASHKIT_API __attribute__ ((visibility("default"))) +# define HASHKIT_LOCAL __attribute__ ((visibility("hidden"))) +# elif defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550) +# define HASHKIT_API __global +# define HASHKIT_LOCAL __hidden +# elif defined(_MSC_VER) +# define HASHKIT_API extern __declspec(dllexport) +# define HASHKIT_LOCAL +# else +# define HASHKIT_API +# define HASHKIT_LOCAL +# endif /* defined(HAVE_VISIBILITY) */ +#else /* defined(BUILDING_HASHKIT) */ +# if defined(_MSC_VER) +# define HASHKIT_API extern __declspec(dllimport) +# define HASHKIT_LOCAL +# else +# define HASHKIT_API +# define HASHKIT_LOCAL +# endif /* defined(_MSC_VER) */ +#endif /* defined(BUILDING_HASHKIT) */ diff --git a/libhashkit/aes.cc b/libhashkit/aes.cc new file mode 100644 index 0000000..12adcae --- /dev/null +++ b/libhashkit/aes.cc @@ -0,0 +1,185 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libhashkit library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#include "libhashkit/common.h" + +#include "libhashkit/rijndael.hpp" + +#include + +#define AES_KEY_LENGTH 256 /* 128, 192, 256 */ +#define AES_BLOCK_SIZE 16 + +enum encrypt_t +{ + AES_ENCRYPT, + AES_DECRYPT +}; + +struct _key_t { + int nr; + uint32_t rk[4*(AES_MAXNR +1)]; +}; + +struct aes_key_t { + _key_t encode_key; + _key_t decode_key; +}; + +aes_key_t* aes_create_key(const char *key, const size_t key_length) +{ + aes_key_t* _aes_key= (aes_key_t*)(calloc(1, sizeof(aes_key_t))); + if (_aes_key) + { + uint8_t rkey[AES_KEY_LENGTH/8]; + uint8_t *rkey_end= rkey +AES_KEY_LENGTH/8; + const char *key_end= key +key_length; + + memset(rkey, 0, sizeof(rkey)); /* Set initial key */ + + uint8_t *ptr= rkey; + const char* sptr= key; + for (; sptr < key_end; ptr++,sptr++) + { + if (ptr == rkey_end) + { + ptr= rkey; /* Just loop over tmp_key until we used all key */ + } + *ptr^= (uint8_t)(*sptr); + } + + _aes_key->decode_key.nr= rijndaelKeySetupDec(_aes_key->decode_key.rk, rkey, AES_KEY_LENGTH); + _aes_key->encode_key.nr= rijndaelKeySetupEnc(_aes_key->encode_key.rk, rkey, AES_KEY_LENGTH); + } + + return _aes_key; +} + +aes_key_t* aes_clone_key(aes_key_t *_aes_key) +{ + if (_aes_key == NULL) + { + return NULL; + } + + aes_key_t* _aes_clone_key= (aes_key_t*)(calloc(1, sizeof(aes_key_t))); + if (_aes_clone_key) + { + memcpy(_aes_clone_key, _aes_key, sizeof(aes_key_t)); + } + + return _aes_clone_key; +} + +hashkit_string_st* aes_encrypt(aes_key_t *_aes_key, + const char* source, size_t source_length) +{ + if (_aes_key == NULL) + { + return NULL; + } + + size_t num_blocks= source_length/AES_BLOCK_SIZE; + + hashkit_string_st* destination= hashkit_string_create(source_length); + if (destination) + { + char *dest= hashkit_string_c_str_mutable(destination); + + for (size_t x= num_blocks; x > 0; x--) /* Encode complete blocks */ + { + rijndaelEncrypt(_aes_key->encode_key.rk, _aes_key->encode_key.nr, (const uint8_t*)(source), + (uint8_t*) (dest)); + source+= AES_BLOCK_SIZE; + dest+= AES_BLOCK_SIZE; + } + + uint8_t block[AES_BLOCK_SIZE]; + char pad_len= AES_BLOCK_SIZE - (source_length - AES_BLOCK_SIZE*num_blocks); + memcpy(block, source, 16 -pad_len); + memset(block + AES_BLOCK_SIZE -pad_len, pad_len, pad_len); + rijndaelEncrypt(_aes_key->encode_key.rk, _aes_key->encode_key.nr, block, (uint8_t*) (dest)); + hashkit_string_set_length(destination, AES_BLOCK_SIZE*(num_blocks + 1)); + } + + return destination; +} + +hashkit_string_st* aes_decrypt(aes_key_t *_aes_key, + const char* source, size_t source_length) +{ + if (_aes_key == NULL) + { + return NULL; + } + + size_t num_blocks= source_length/AES_BLOCK_SIZE; + if ((source_length != num_blocks*AES_BLOCK_SIZE) or num_blocks ==0 ) + { + return NULL; + } + + hashkit_string_st* destination= hashkit_string_create(source_length); + if (destination) + { + char *dest= hashkit_string_c_str_mutable(destination); + + for (size_t x = num_blocks-1; x > 0; x--) + { + rijndaelDecrypt(_aes_key->decode_key.rk, _aes_key->decode_key.nr, (const uint8_t*) (source), (uint8_t*)(dest)); + source+= AES_BLOCK_SIZE; + dest+= AES_BLOCK_SIZE; + } + + uint8_t block[AES_BLOCK_SIZE]; + rijndaelDecrypt(_aes_key->decode_key.rk, _aes_key->decode_key.nr, (const uint8_t*)(source), block); + /* Use last char in the block as size */ + unsigned int pad_len= (unsigned int) (unsigned char)(block[AES_BLOCK_SIZE-1]); + if (pad_len > AES_BLOCK_SIZE) + { + hashkit_string_free(destination); + return NULL; + } + + /* We could also check whole padding but we do not really need this */ + + memcpy(dest, block, AES_BLOCK_SIZE - pad_len); + hashkit_string_set_length(destination, AES_BLOCK_SIZE*num_blocks - pad_len); + } + + return destination; +} diff --git a/libhashkit/aes.h b/libhashkit/aes.h new file mode 100644 index 0000000..c46ffa2 --- /dev/null +++ b/libhashkit/aes.h @@ -0,0 +1,49 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +struct aes_key_t; + +hashkit_string_st* aes_encrypt(aes_key_t* _aes_key, + const char* source, size_t source_length); + +hashkit_string_st* aes_decrypt(aes_key_t* _aes_key, + const char* source, size_t source_length); + +aes_key_t* aes_create_key(const char *key, const size_t key_length); + +aes_key_t* aes_clone_key(aes_key_t* _aes_key); diff --git a/libhashkit/algorithm.cc b/libhashkit/algorithm.cc new file mode 100644 index 0000000..3eb28d6 --- /dev/null +++ b/libhashkit/algorithm.cc @@ -0,0 +1,98 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2006-2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libhashkit/common.h" + +uint32_t libhashkit_one_at_a_time(const char *key, size_t key_length) +{ + return hashkit_one_at_a_time(key, key_length, NULL); +} + +uint32_t libhashkit_fnv1_64(const char *key, size_t key_length) +{ + return hashkit_fnv1_64(key, key_length, NULL); +} + +uint32_t libhashkit_fnv1a_64(const char *key, size_t key_length) +{ + return hashkit_fnv1a_64(key, key_length, NULL); +} + +uint32_t libhashkit_fnv1_32(const char *key, size_t key_length) +{ + return hashkit_fnv1_32(key, key_length, NULL); +} + +uint32_t libhashkit_fnv1a_32(const char *key, size_t key_length) +{ + return hashkit_fnv1a_32(key, key_length, NULL); +} + +uint32_t libhashkit_crc32(const char *key, size_t key_length) +{ + return hashkit_crc32(key, key_length, NULL); +} + +uint32_t libhashkit_hsieh(const char *key, size_t key_length) +{ + return hashkit_hsieh(key, key_length, NULL); +} + +uint32_t libhashkit_murmur3(const char *key, size_t key_length) +{ + return hashkit_murmur3(key, key_length, NULL); +} + +uint32_t libhashkit_murmur(const char *key, size_t key_length) +{ + return hashkit_murmur(key, key_length, NULL); +} + +uint32_t libhashkit_jenkins(const char *key, size_t key_length) +{ + return hashkit_jenkins(key, key_length, NULL); +} + +uint32_t libhashkit_md5(const char *key, size_t key_length) +{ + return hashkit_md5(key, key_length, NULL); +} + +void libhashkit_md5_signature(const unsigned char *key, size_t length, unsigned char *result) +{ + md5_signature(key, (uint32_t)length, result); +} + diff --git a/libhashkit/algorithm.h b/libhashkit/algorithm.h new file mode 100644 index 0000000..93cdc1d --- /dev/null +++ b/libhashkit/algorithm.h @@ -0,0 +1,66 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +/** + * @file + * @brief HashKit Header + */ + +#pragma once + +uint32_t hashkit_one_at_a_time(const char *key, size_t key_length, void *context); + +uint32_t hashkit_fnv1_64(const char *key, size_t key_length, void *context); + +uint32_t hashkit_fnv1a_64(const char *key, size_t key_length, void *context); + +uint32_t hashkit_fnv1_32(const char *key, size_t key_length, void *context); + +uint32_t hashkit_fnv1a_32(const char *key, size_t key_length, void *context); + +uint32_t hashkit_crc32(const char *key, size_t key_length, void *context); + +uint32_t hashkit_hsieh(const char *key, size_t key_length, void *context); + +uint32_t hashkit_murmur(const char *key, size_t key_length, void *context); + +uint32_t hashkit_murmur3(const char *key, size_t key_length, void *context); + +uint32_t hashkit_jenkins(const char *key, size_t key_length, void *context); + +uint32_t hashkit_md5(const char *key, size_t key_length, void *context); diff --git a/libhashkit/behavior.cc b/libhashkit/behavior.cc new file mode 100644 index 0000000..6c7a9ac --- /dev/null +++ b/libhashkit/behavior.cc @@ -0,0 +1,38 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2009-2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#include diff --git a/libhashkit/common.h b/libhashkit/common.h new file mode 100644 index 0000000..d32d31b --- /dev/null +++ b/libhashkit/common.h @@ -0,0 +1,70 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#pragma once + +#include "libhashkit/hashkitcon.h" + +#include +#include +#include +#include +#include + +#ifndef __WORDSIZE +# ifdef __MINGW32__ +# define __WORDSIZE 32 +# endif +#endif + +#include +#include "libhashkit/algorithm.h" +#include "libhashkit/is.h" +#include "libhashkit/string.h" +#include "libhashkit/aes.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void md5_signature(const unsigned char *key, unsigned int length, unsigned char *result); + +int update_continuum(hashkit_st *hashkit); + +#ifdef __cplusplus +} +#endif diff --git a/libhashkit/crc32.cc b/libhashkit/crc32.cc new file mode 100644 index 0000000..fe9fe71 --- /dev/null +++ b/libhashkit/crc32.cc @@ -0,0 +1,122 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2009-2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* The crc32 functions and data was originally written by Spencer + * Garrett and was gleaned from the PostgreSQL source + * tree via the files contrib/ltree/crc32.[ch] and from FreeBSD at + * src/usr.bin/cksum/crc32.c. + */ + +#include + +static const uint32_t crc32tab[256] = { + 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, + 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, + 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, + 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, + 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, + 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, + 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, + 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, + 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, + 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, + 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, + 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, + 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, + 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, + 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, + 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, + 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, + 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, + 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, + 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, + 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, + 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, + 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, + 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, + 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, + 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, + 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, + 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, + 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, + 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, + 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, + 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, + 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, + 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, + 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, + 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, + 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, + 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, + 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, + 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, + 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, + 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, + 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, + 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, + 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, + 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, + 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, + 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, + 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, + 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, + 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, + 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, + 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, + 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, + 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, + 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, + 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, + 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, + 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, + 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, + 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, + 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, + 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d, +}; + +uint32_t hashkit_crc32(const char *key, size_t key_length, void *context) +{ + uint64_t x; + uint32_t crc= UINT32_MAX; + (void)context; + + for (x= 0; x < key_length; x++) + crc= (crc >> 8) ^ crc32tab[(crc ^ (uint64_t)key[x]) & 0xff]; + + return ((~crc) >> 16) & 0x7fff; +} diff --git a/libhashkit/digest.cc b/libhashkit/digest.cc new file mode 100644 index 0000000..2300293 --- /dev/null +++ b/libhashkit/digest.cc @@ -0,0 +1,93 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2010-2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#include + +uint32_t hashkit_digest(const hashkit_st *self, const char *key, size_t key_length) +{ + return self->base_hash.function(key, key_length, self->base_hash.context); +} + +uint32_t libhashkit_digest(const char *key, size_t key_length, hashkit_hash_algorithm_t hash_algorithm) +{ + switch (hash_algorithm) + { + case HASHKIT_HASH_DEFAULT: + return libhashkit_one_at_a_time(key, key_length); + case HASHKIT_HASH_MD5: + return libhashkit_md5(key, key_length); + case HASHKIT_HASH_CRC: + return libhashkit_crc32(key, key_length); + case HASHKIT_HASH_FNV1_64: + return libhashkit_fnv1_64(key, key_length); + case HASHKIT_HASH_FNV1A_64: + return libhashkit_fnv1a_64(key, key_length); + case HASHKIT_HASH_FNV1_32: + return libhashkit_fnv1_32(key, key_length); + case HASHKIT_HASH_FNV1A_32: + return libhashkit_fnv1a_32(key, key_length); + case HASHKIT_HASH_HSIEH: +#ifdef HAVE_HSIEH_HASH + return libhashkit_hsieh(key, key_length); +#else + return 1; +#endif + case HASHKIT_HASH_MURMUR3: + return libhashkit_murmur3(key, key_length); + + case HASHKIT_HASH_MURMUR: +#ifdef HAVE_MURMUR_HASH + return libhashkit_murmur(key, key_length); +#else + return 1; +#endif + case HASHKIT_HASH_JENKINS: + return libhashkit_jenkins(key, key_length); + case HASHKIT_HASH_CUSTOM: + case HASHKIT_HASH_MAX: + default: + if (DEBUG) + { + fprintf(stderr, "hashkit_hash_t was extended but libhashkit_generate_value was not updated\n"); + fflush(stderr); + assert(0); + } + break; + } + + return 1; +} diff --git a/libhashkit/encrypt.cc b/libhashkit/encrypt.cc new file mode 100644 index 0000000..95475d7 --- /dev/null +++ b/libhashkit/encrypt.cc @@ -0,0 +1,63 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libhashkit library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#include + +hashkit_string_st *hashkit_encrypt(hashkit_st *kit, + const char* source, size_t source_length) +{ + return aes_encrypt(static_cast(kit->_key), source, source_length); +} + +hashkit_string_st *hashkit_decrypt(hashkit_st *kit, + const char* source, size_t source_length) +{ + return aes_decrypt(static_cast(kit->_key), source, source_length); +} + +bool hashkit_key(hashkit_st *kit, const char *key, const size_t key_length) +{ + if (kit->_key) + { + free(kit->_key); + } + + kit->_key= aes_create_key(key, key_length); + + return bool(kit->_key); +} + diff --git a/libhashkit/fnv_32.cc b/libhashkit/fnv_32.cc new file mode 100644 index 0000000..52eea80 --- /dev/null +++ b/libhashkit/fnv_32.cc @@ -0,0 +1,73 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#include + +/* FNV hash'es lifted from Dustin Sallings work */ +static uint32_t FNV_32_INIT= 2166136261UL; +static uint32_t FNV_32_PRIME= 16777619; + +uint32_t hashkit_fnv1_32(const char *key, size_t key_length, void *context) +{ + uint32_t hash= FNV_32_INIT; + (void)context; + + for (size_t x= 0; x < key_length; x++) + { + uint32_t val= (uint32_t)key[x]; + hash *= FNV_32_PRIME; + hash ^= val; + } + + return hash; +} + +uint32_t hashkit_fnv1a_32(const char *key, size_t key_length, void *context) +{ + uint32_t hash= FNV_32_INIT; + (void)context; + + for (size_t x= 0; x < key_length; x++) + { + uint32_t val= (uint32_t)key[x]; + hash ^= val; + hash *= FNV_32_PRIME; + } + + return hash; +} diff --git a/libhashkit/fnv_64.cc b/libhashkit/fnv_64.cc new file mode 100644 index 0000000..68e4dd0 --- /dev/null +++ b/libhashkit/fnv_64.cc @@ -0,0 +1,85 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#include + +#if __WORDSIZE == 64 && defined(HAVE_FNV64_HASH) + +/* FNV hash'es lifted from Dustin Sallings work */ +static uint64_t FNV_64_INIT= 0xcbf29ce484222325; +static uint64_t FNV_64_PRIME= 0x100000001b3; + +uint32_t hashkit_fnv1_64(const char *key, size_t key_length, void *) +{ + /* Thanks to pierre@demartines.com for the pointer */ + uint64_t hash= FNV_64_INIT; + + for (size_t x= 0; x < key_length; x++) + { + hash *= FNV_64_PRIME; + hash ^= (uint64_t)key[x]; + } + + return (uint32_t)hash; +} + +uint32_t hashkit_fnv1a_64(const char *key, size_t key_length, void *) +{ + uint32_t hash= (uint32_t) FNV_64_INIT; + + for (size_t x= 0; x < key_length; x++) + { + uint32_t val= (uint32_t)key[x]; + hash ^= val; + hash *= (uint32_t) FNV_64_PRIME; + } + + return hash; +} + +#else +uint32_t hashkit_fnv1_64(const char *, size_t, void *) +{ + return 0; +} + +uint32_t hashkit_fnv1a_64(const char *, size_t, void *) +{ + return 0; +} +#endif diff --git a/libhashkit/function.cc b/libhashkit/function.cc new file mode 100644 index 0000000..bee87ff --- /dev/null +++ b/libhashkit/function.cc @@ -0,0 +1,203 @@ +/* HashKit + * Copyright (C) 2010 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + */ + +#include + +static hashkit_return_t _set_function(struct hashkit_st::hashkit_function_st *self, hashkit_hash_algorithm_t hash_algorithm) +{ + if (self == NULL) + { + return HASHKIT_INVALID_ARGUMENT; + } + + switch (hash_algorithm) + { + case HASHKIT_HASH_MD5: + self->function= hashkit_md5; + break; + + case HASHKIT_HASH_CRC: + self->function= hashkit_crc32; + break; + + case HASHKIT_HASH_FNV1_64: + if (libhashkit_has_algorithm(HASHKIT_HASH_FNV1_64)) + { + self->function= hashkit_fnv1_64; + break; + } + return HASHKIT_INVALID_ARGUMENT; + + case HASHKIT_HASH_FNV1A_64: + if (libhashkit_has_algorithm(HASHKIT_HASH_FNV1_64)) + { + self->function= hashkit_fnv1a_64; + break; + } + return HASHKIT_INVALID_ARGUMENT; + + case HASHKIT_HASH_FNV1_32: + self->function= hashkit_fnv1_32; + break; + + case HASHKIT_HASH_FNV1A_32: + self->function= hashkit_fnv1a_32; + break; + + case HASHKIT_HASH_HSIEH: + if (libhashkit_has_algorithm(HASHKIT_HASH_HSIEH)) + { + self->function= hashkit_hsieh; + break; + } + return HASHKIT_INVALID_ARGUMENT; + + case HASHKIT_HASH_MURMUR3: + case HASHKIT_HASH_MURMUR: + if (libhashkit_has_algorithm(HASHKIT_HASH_MURMUR)) + { + self->function= hashkit_murmur; + break; + } + return HASHKIT_INVALID_ARGUMENT; + + case HASHKIT_HASH_JENKINS: + self->function= hashkit_jenkins; + break; + + case HASHKIT_HASH_CUSTOM: + return HASHKIT_INVALID_ARGUMENT; + + case HASHKIT_HASH_DEFAULT: + self->function= hashkit_one_at_a_time; + break; + + case HASHKIT_HASH_MAX: + self->function= hashkit_one_at_a_time; + return HASHKIT_INVALID_HASH; + } + + self->context= NULL; + + return HASHKIT_SUCCESS; +} + +hashkit_return_t hashkit_set_function(hashkit_st *self, hashkit_hash_algorithm_t hash_algorithm) +{ + return _set_function(&self->base_hash, hash_algorithm); +} + +hashkit_return_t hashkit_set_distribution_function(hashkit_st *self, hashkit_hash_algorithm_t hash_algorithm) +{ + return _set_function(&self->distribution_hash, hash_algorithm); +} + +static hashkit_return_t _set_custom_function(struct hashkit_st::hashkit_function_st *self, hashkit_hash_fn function, void *context) +{ + if (self == NULL) + { + return HASHKIT_INVALID_ARGUMENT; + } + + if (function) + { + self->function= function; + self->context= context; + + return HASHKIT_SUCCESS; + } + + return HASHKIT_FAILURE; +} + +hashkit_return_t hashkit_set_custom_function(hashkit_st *self, hashkit_hash_fn function, void *context) +{ + if (self == NULL) + { + return HASHKIT_INVALID_ARGUMENT; + } + + + return _set_custom_function(&self->base_hash, function, context); +} + +hashkit_return_t hashkit_set_custom_distribution_function(hashkit_st *self, hashkit_hash_fn function, void *context) +{ + if (self == NULL) + { + return HASHKIT_INVALID_ARGUMENT; + } + + return _set_custom_function(&self->distribution_hash, function, context); +} + +static hashkit_hash_algorithm_t get_function_type(const hashkit_hash_fn function) +{ + if (function == hashkit_one_at_a_time) + { + return HASHKIT_HASH_DEFAULT; + } + else if (function == hashkit_md5) + { + return HASHKIT_HASH_MD5; + } + else if (function == hashkit_crc32) + { + return HASHKIT_HASH_CRC; + } + else if (function == hashkit_fnv1_64) + { + return HASHKIT_HASH_FNV1_64; + } + else if (function == hashkit_fnv1a_64) + { + return HASHKIT_HASH_FNV1A_64; + } + else if (function == hashkit_fnv1_32) + { + return HASHKIT_HASH_FNV1_32; + } + else if (function == hashkit_fnv1a_32) + { + return HASHKIT_HASH_FNV1A_32; + } + else if (function == hashkit_hsieh) + { + return HASHKIT_HASH_HSIEH; + } + else if (function == hashkit_murmur) + { + return HASHKIT_HASH_MURMUR; + } + else if (function == hashkit_jenkins) + { + return HASHKIT_HASH_JENKINS; + } + + return HASHKIT_HASH_CUSTOM; +} + +hashkit_hash_algorithm_t hashkit_get_function(const hashkit_st *self) +{ + if (self == NULL) + { + return HASHKIT_HASH_DEFAULT; + } + + return get_function_type(self->base_hash.function); +} + +hashkit_hash_algorithm_t hashkit_get_distribution_function(const hashkit_st *self) +{ + if (self == NULL) + { + return HASHKIT_HASH_DEFAULT; + } + + return get_function_type(self->distribution_hash.function); +} diff --git a/libhashkit/has.cc b/libhashkit/has.cc new file mode 100644 index 0000000..843e32e --- /dev/null +++ b/libhashkit/has.cc @@ -0,0 +1,82 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#include + +bool libhashkit_has_algorithm(const hashkit_hash_algorithm_t algo) +{ + switch (algo) + { + case HASHKIT_HASH_FNV1_64: + case HASHKIT_HASH_FNV1A_64: +#if __WORDSIZE == 64 && defined(HAVE_FNV64_HASH) + return true; +#else + return false; +#endif + + case HASHKIT_HASH_HSIEH: +#ifdef HAVE_HSIEH_HASH + return true; +#else + return false; +#endif + + case HASHKIT_HASH_MURMUR3: + case HASHKIT_HASH_MURMUR: +#ifdef HAVE_MURMUR_HASH + return true; +#else + return false; +#endif + + case HASHKIT_HASH_FNV1_32: + case HASHKIT_HASH_FNV1A_32: + case HASHKIT_HASH_DEFAULT: + case HASHKIT_HASH_MD5: + case HASHKIT_HASH_CRC: + case HASHKIT_HASH_JENKINS: + case HASHKIT_HASH_CUSTOM: + return true; + + case HASHKIT_HASH_MAX: + break; + } + + return false; +} diff --git a/libhashkit/hashkit.cc b/libhashkit/hashkit.cc new file mode 100644 index 0000000..e2528b9 --- /dev/null +++ b/libhashkit/hashkit.cc @@ -0,0 +1,140 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#include + +static inline void _hashkit_init(hashkit_st *self) +{ + self->base_hash.function= hashkit_one_at_a_time; + self->base_hash.context= NULL; + + self->distribution_hash.function= hashkit_one_at_a_time; + self->distribution_hash.context= NULL; + + self->flags.is_base_same_distributed= true; + self->_key= NULL; +} + +static inline hashkit_st *_hashkit_create(hashkit_st *self) +{ + if (self) + { + self->options.is_allocated= false; + } + else + { + self= (hashkit_st*)calloc(1, sizeof(hashkit_st)); + if (self == NULL) + { + return NULL; + } + + self->options.is_allocated= true; + } + + return self; +} + +hashkit_st *hashkit_create(hashkit_st *self) +{ + self= _hashkit_create(self); + if (self == NULL) + { + return NULL; + } + + _hashkit_init(self); + + return self; +} + + +void hashkit_free(hashkit_st *self) +{ + if (self and self->_key) + { + free(self->_key); + self->_key= NULL; + } + + if (hashkit_is_allocated(self)) + { + free(self); + } +} + +hashkit_st *hashkit_clone(hashkit_st *destination, const hashkit_st *source) +{ + if (source == NULL) + { + return hashkit_create(destination); + } + + /* new_clone will be a pointer to destination */ + destination= _hashkit_create(destination); + + // Should only happen on allocation failure. + if (destination == NULL) + { + return NULL; + } + + destination->base_hash= source->base_hash; + destination->distribution_hash= source->distribution_hash; + destination->flags= source->flags; + destination->_key= aes_clone_key(static_cast(source->_key)); + + return destination; +} + +bool hashkit_compare(const hashkit_st *first, const hashkit_st *second) +{ + if (not first or not second) + return false; + + if (first->base_hash.function == second->base_hash.function and + first->base_hash.context == second->base_hash.context and + first->distribution_hash.function == second->distribution_hash.function and + first->distribution_hash.context == second->distribution_hash.context and + first->flags.is_base_same_distributed == second->flags.is_base_same_distributed) + { + return true; + } + + return false; +} diff --git a/libhashkit/hashkit.h b/libhashkit/hashkit.h new file mode 100644 index 0000000..692d591 --- /dev/null +++ b/libhashkit/hashkit.h @@ -0,0 +1,40 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#pragma once + +#include diff --git a/libhashkit/hashkitcon.h.in b/libhashkit/hashkitcon.h.in new file mode 100644 index 0000000..9834962 --- /dev/null +++ b/libhashkit/hashkitcon.h.in @@ -0,0 +1,40 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#pragma once + +#include "@AUTOHEADER_FILE@" diff --git a/libhashkit/include.am b/libhashkit/include.am new file mode 100644 index 0000000..cfbacdd --- /dev/null +++ b/libhashkit/include.am @@ -0,0 +1,69 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root +# +# HashKit +# Copyright (C) 2009 Brian Aker +# All rights reserved. +# +# Use and distribution licensed under the BSD license. See +# the COPYING file in the parent directory for full text. + +lib_LTLIBRARIES+= libhashkit/libhashkit.la + +noinst_HEADERS+= libhashkit/aes.h +noinst_HEADERS+= libhashkit/algorithm.h +noinst_HEADERS+= libhashkit/murmur3.h +noinst_HEADERS+= libhashkit/common.h +noinst_HEADERS+= libhashkit/is.h +noinst_HEADERS+= libhashkit/rijndael.hpp +noinst_HEADERS+= libhashkit/string.h + + +nobase_include_HEADERS+= libhashkit/hashkit.h + +libhashkit_libhashkit_la_LIBADD= +libhashkit_libhashkit_la_SOURCES= +libhashkit_libhashkit_la_CXXFLAGS= +libhashkit_libhashkit_la_CFLAGS= + +libhashkit_libhashkit_la_SOURCES+= libhashkit/aes.cc +libhashkit_libhashkit_la_SOURCES+= libhashkit/algorithm.cc +libhashkit_libhashkit_la_SOURCES+= libhashkit/behavior.cc +libhashkit_libhashkit_la_SOURCES+= libhashkit/crc32.cc +libhashkit_libhashkit_la_SOURCES+= libhashkit/digest.cc +libhashkit_libhashkit_la_SOURCES+= libhashkit/encrypt.cc +libhashkit_libhashkit_la_SOURCES+= libhashkit/fnv_32.cc +libhashkit_libhashkit_la_SOURCES+= libhashkit/fnv_64.cc +libhashkit_libhashkit_la_SOURCES+= libhashkit/function.cc +libhashkit_libhashkit_la_SOURCES+= libhashkit/has.cc +libhashkit_libhashkit_la_SOURCES+= libhashkit/hashkit.cc +libhashkit_libhashkit_la_SOURCES+= libhashkit/jenkins.cc +libhashkit_libhashkit_la_SOURCES+= libhashkit/ketama.cc +libhashkit_libhashkit_la_SOURCES+= libhashkit/md5.cc +libhashkit_libhashkit_la_SOURCES+= libhashkit/murmur.cc +libhashkit_libhashkit_la_SOURCES+= libhashkit/murmur3.cc +libhashkit_libhashkit_la_SOURCES+= libhashkit/murmur3_api.cc +libhashkit_libhashkit_la_SOURCES+= libhashkit/one_at_a_time.cc +libhashkit_libhashkit_la_SOURCES+= libhashkit/rijndael.cc +libhashkit_libhashkit_la_SOURCES+= libhashkit/str_algorithm.cc +libhashkit_libhashkit_la_SOURCES+= libhashkit/strerror.cc +libhashkit_libhashkit_la_SOURCES+= libhashkit/string.cc + +if INCLUDE_HSIEH_SRC +libhashkit_libhashkit_la_SOURCES+= libhashkit/hsieh.cc +else +libhashkit_libhashkit_la_SOURCES+= libhashkit/nohsieh.cc +endif + +libhashkit_libhashkit_la_CXXFLAGS+= -DBUILDING_HASHKIT +libhashkit_libhashkit_la_CFLAGS+= -DBUILDING_HASHKIT + +libhashkit_libhashkit_la_LDFLAGS= -version-info $(HASHKIT_LIBRARY_VERSION) + +# library used for testing +noinst_LTLIBRARIES+= libhashkit/libhashkitinc.la + +libhashkit_libhashkitinc_la_SOURCES= ${libhashkit_libhashkit_la_SOURCES} +libhashkit_libhashkitinc_la_CFLAGS= ${libhashkit_libhashkit_la_CFLAGS} +libhashkit_libhashkitinc_la_CXXFLAGS= ${libhashkit_libhashkit_la_CXXFLAGS} diff --git a/libhashkit/include.m4 b/libhashkit/include.m4 new file mode 100644 index 0000000..257e5bc --- /dev/null +++ b/libhashkit/include.m4 @@ -0,0 +1,10 @@ +dnl Copyright (C) 2012 Data Differential, LLC. +dnl This file is free software; Data Differential, LLC. +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +HASHKIT_LIBRARY_VERSION=2:0:0 +AC_SUBST(HASHKIT_LIBRARY_VERSION) + +AC_CONFIG_FILES([libhashkit/hashkitcon.h]) +AC_CONFIG_FILES([libhashkit-1.0/configure.h]) diff --git a/libhashkit/is.h b/libhashkit/is.h new file mode 100644 index 0000000..e8e5772 --- /dev/null +++ b/libhashkit/is.h @@ -0,0 +1,43 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + + +#pragma once + +#define hashkit_is_allocated(__object) ((__object)->options.is_allocated) +#define hashkit_is_initialized(__object) ((__object)->options.is_initialized) + diff --git a/libhashkit/jenkins.cc b/libhashkit/jenkins.cc new file mode 100644 index 0000000..2001cab --- /dev/null +++ b/libhashkit/jenkins.cc @@ -0,0 +1,252 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* +* +* By Bob Jenkins, 2006. bob_jenkins@burtleburtle.net. You may use this +* code any way you wish, private, educational, or commercial. It's free. +* Use for hash table lookup, or anything where one collision in 2^^32 is +* acceptable. Do NOT use for cryptographic purposes. +* http://burtleburtle.net/bob/hash/index.html +* +* Modified by Brian Pontz for libmemcached +* TODO: +* Add big endian support +*/ + +#include + +#define hashsize(n) ((uint32_t)1<<(n)) +#define hashmask(n) (hashsize(n)-1) +#define rot(x,k) (((x)<<(k)) | ((x)>>(32-(k)))) + +#define mix(a,b,c) \ +{ \ + a -= c; a ^= rot(c, 4); c += b; \ + b -= a; b ^= rot(a, 6); a += c; \ + c -= b; c ^= rot(b, 8); b += a; \ + a -= c; a ^= rot(c,16); c += b; \ + b -= a; b ^= rot(a,19); a += c; \ + c -= b; c ^= rot(b, 4); b += a; \ +} + +#define final(a,b,c) \ +{ \ + c ^= b; c -= rot(b,14); \ + a ^= c; a -= rot(c,11); \ + b ^= a; b -= rot(a,25); \ + c ^= b; c -= rot(b,16); \ + a ^= c; a -= rot(c,4); \ + b ^= a; b -= rot(a,14); \ + c ^= b; c -= rot(b,24); \ +} + +#define JENKINS_INITVAL 13 + +/* +jenkins_hash() -- hash a variable-length key into a 32-bit value + k : the key (the unaligned variable-length array of bytes) + length : the length of the key, counting by bytes + initval : can be any 4-byte value +Returns a 32-bit value. Every bit of the key affects every bit of +the return value. Two keys differing by one or two bits will have +totally different hash values. + +The best hash table sizes are powers of 2. There is no need to do +mod a prime (mod is sooo slow!). If you need less than 32 bits, +use a bitmask. For example, if you need only 10 bits, do + h = (h & hashmask(10)); +In which case, the hash table should have hashsize(10) elements. +*/ + +uint32_t hashkit_jenkins(const char *key, size_t length, void *) +{ + uint32_t a,b,c; /* internal state */ +#ifndef WORDS_BIGENDIAN + union { const void *ptr; size_t i; } u; + u.ptr = key; +#endif + + /* Set up the internal state */ + a = b = c = 0xdeadbeef + ((uint32_t)length) + JENKINS_INITVAL; + +#ifndef WORDS_BIGENDIAN + if ((u.i & 0x3) == 0) + { + const uint32_t *k = (const uint32_t *)key; /* read 32-bit chunks */ + + /*------ all but last block: aligned reads and affect 32 bits of (a,b,c) */ + while (length > 12) + { + a += k[0]; + b += k[1]; + c += k[2]; + mix(a,b,c); + length -= 12; + k += 3; + } + + /*----------------------------- handle the last (probably partial) block */ + /* + * "k[2]&0xffffff" actually reads beyond the end of the string, but + * then masks off the part it's not allowed to read. Because the + * string is aligned, the masked-off tail is in the same word as the + * rest of the string. Every machine with memory protection I've seen + * does it on word boundaries, so is OK with this. But VALGRIND will + * still catch it and complain. The masking trick does make the hash + * noticably faster for short strings (like English words). + */ + switch(length) + { + case 12: c+=k[2]; b+=k[1]; a+=k[0]; break; + case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break; + case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break; + case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break; + case 8 : b+=k[1]; a+=k[0]; break; + case 7 : b+=k[1]&0xffffff; a+=k[0]; break; + case 6 : b+=k[1]&0xffff; a+=k[0]; break; + case 5 : b+=k[1]&0xff; a+=k[0]; break; + case 4 : a+=k[0]; break; + case 3 : a+=k[0]&0xffffff; break; + case 2 : a+=k[0]&0xffff; break; + case 1 : a+=k[0]&0xff; break; + case 0 : return c; /* zero length strings require no mixing */ + default: return c; + } + + } + else if ((u.i & 0x1) == 0) + { + const uint16_t *k = (const uint16_t *)key; /* read 16-bit chunks */ + const uint8_t *k8; + + /*--------------- all but last block: aligned reads and different mixing */ + while (length > 12) + { + a += k[0] + (((uint32_t)k[1])<<16); + b += k[2] + (((uint32_t)k[3])<<16); + c += k[4] + (((uint32_t)k[5])<<16); + mix(a,b,c); + length -= 12; + k += 6; + } + + /*----------------------------- handle the last (probably partial) block */ + k8 = (const uint8_t *)k; + switch(length) + { + case 12: c+=k[4]+(((uint32_t)k[5])<<16); + b+=k[2]+(((uint32_t)k[3])<<16); + a+=k[0]+(((uint32_t)k[1])<<16); + break; + case 11: c+=((uint32_t)k8[10])<<16; /* fall through */ + case 10: c+=k[4]; + b+=k[2]+(((uint32_t)k[3])<<16); + a+=k[0]+(((uint32_t)k[1])<<16); + break; + case 9 : c+=k8[8]; /* fall through */ + case 8 : b+=k[2]+(((uint32_t)k[3])<<16); + a+=k[0]+(((uint32_t)k[1])<<16); + break; + case 7 : b+=((uint32_t)k8[6])<<16; /* fall through */ + case 6 : b+=k[2]; + a+=k[0]+(((uint32_t)k[1])<<16); + break; + case 5 : b+=k8[4]; /* fall through */ + case 4 : a+=k[0]+(((uint32_t)k[1])<<16); + break; + case 3 : a+=((uint32_t)k8[2])<<16; /* fall through */ + case 2 : a+=k[0]; + break; + case 1 : a+=k8[0]; + break; + case 0 : return c; /* zero length requires no mixing */ + default: return c; + } + + } + else + { /* need to read the key one byte at a time */ +#endif /* little endian */ + const uint8_t *k = (const uint8_t *)key; + + /*--------------- all but the last block: affect some 32 bits of (a,b,c) */ + while (length > 12) + { + a += k[0]; + a += ((uint32_t)k[1])<<8; + a += ((uint32_t)k[2])<<16; + a += ((uint32_t)k[3])<<24; + b += k[4]; + b += ((uint32_t)k[5])<<8; + b += ((uint32_t)k[6])<<16; + b += ((uint32_t)k[7])<<24; + c += k[8]; + c += ((uint32_t)k[9])<<8; + c += ((uint32_t)k[10])<<16; + c += ((uint32_t)k[11])<<24; + mix(a,b,c); + length -= 12; + k += 12; + } + + /*-------------------------------- last block: affect all 32 bits of (c) */ + switch(length) /* all the case statements fall through */ + { + case 12: c+=((uint32_t)k[11])<<24; + case 11: c+=((uint32_t)k[10])<<16; + case 10: c+=((uint32_t)k[9])<<8; + case 9 : c+=k[8]; + case 8 : b+=((uint32_t)k[7])<<24; + case 7 : b+=((uint32_t)k[6])<<16; + case 6 : b+=((uint32_t)k[5])<<8; + case 5 : b+=k[4]; + case 4 : a+=((uint32_t)k[3])<<24; + case 3 : a+=((uint32_t)k[2])<<16; + case 2 : a+=((uint32_t)k[1])<<8; + case 1 : a+=k[0]; + break; + case 0 : return c; + default : return c; + } +#ifndef WORDS_BIGENDIAN + } +#endif + + final(a,b,c); + return c; +} diff --git a/libhashkit/ketama.cc b/libhashkit/ketama.cc new file mode 100644 index 0000000..eaa8442 --- /dev/null +++ b/libhashkit/ketama.cc @@ -0,0 +1,194 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#include +#include + +#if 0 +static uint32_t ketama_server_hash(const char *key, unsigned int key_length, int alignment) +{ + unsigned char results[16]; + + md5_signature((unsigned char*)key, key_length, results); + return ((uint32_t) (results[3 + alignment * 4] & 0xFF) << 24) + | ((uint32_t) (results[2 + alignment * 4] & 0xFF) << 16) + | ((uint32_t) (results[1 + alignment * 4] & 0xFF) << 8) + | (results[0 + alignment * 4] & 0xFF); +} + +static int continuum_points_cmp(const void *t1, const void *t2) +{ + hashkit_continuum_point_st *ct1= (hashkit_continuum_point_st *)t1; + hashkit_continuum_point_st *ct2= (hashkit_continuum_point_st *)t2; + + if (ct1->value == ct2->value) + return 0; + else if (ct1->value > ct2->value) + return 1; + else + return -1; +} + +int update_continuum(hashkit_st *hashkit) +{ + uint32_t count; + uint32_t continuum_index= 0; + uint32_t value; + uint32_t points_index; + uint32_t points_count= 0; + uint32_t points_per_server; + uint32_t points_per_hash; + uint64_t total_weight= 0; + uint32_t live_servers; + uint8_t *context; + + if (hashkit->active_fn != NULL || hashkit->weight_fn != NULL) + { + live_servers= 0; + + for (count= 0, context= hashkit->list; count < hashkit->list_size; + count++, context+= hashkit->context_size) + { + if (hashkit->active_fn != NULL) + { + if (hashkit->active_fn(context)) + live_servers++; + else + continue; + } + + if (hashkit->weight_fn != NULL) + total_weight+= hashkit->weight_fn(context); + } + } + + if (hashkit->active_fn == NULL) + live_servers= (uint32_t)hashkit->list_size; + + if (live_servers == 0) + return 0; + + if (hashkit->weight_fn == NULL) + { + points_per_server= HASHKIT_POINTS_PER_NODE; + points_per_hash= 1; + } + else + { + points_per_server= HASHKIT_POINTS_PER_NODE_WEIGHTED; + points_per_hash= 4; + } + + if (live_servers > hashkit->continuum_count) + { + hashkit_continuum_point_st *new_continuum; + + new_continuum= realloc(hashkit->continuum, + sizeof(hashkit_continuum_point_st) * + (live_servers + HASHKIT_CONTINUUM_ADDITION) * + points_per_server); + + if (new_continuum == NULL) + return ENOMEM; + + hashkit->continuum= new_continuum; + hashkit->continuum_count= live_servers + HASHKIT_CONTINUUM_ADDITION; + } + + for (count= 0, context= hashkit->list; count < hashkit->list_size; + count++, context+= hashkit->context_size) + { + if (hashkit->active_fn != NULL && hashkit->active_fn(context) == false) + continue; + + if (hashkit->weight_fn != NULL) + { + float pct = (float)hashkit->weight_fn(context) / (float)total_weight; + points_per_server= (uint32_t) ((floorf((float) (pct * HASHKIT_POINTS_PER_NODE_WEIGHTED / 4 * (float)live_servers + 0.0000000001))) * 4); + } + + for (points_index= 0; + points_index < points_per_server / points_per_hash; + points_index++) + { + char sort_host[HASHKIT_CONTINUUM_KEY_SIZE]= ""; + size_t sort_host_length; + + if (hashkit->continuum_key_fn == NULL) + { + sort_host_length= (size_t) snprintf(sort_host, HASHKIT_CONTINUUM_KEY_SIZE, "%u", + points_index); + } + else + { + sort_host_length= hashkit->continuum_key_fn(sort_host, HASHKIT_CONTINUUM_KEY_SIZE, + points_index, context); + } + + if (hashkit->weight_fn == NULL) + { + if (hashkit->continuum_hash_fn == NULL) + value= hashkit_default(sort_host, sort_host_length); + else + value= hashkit->continuum_hash_fn(sort_host, sort_host_length); + + hashkit->continuum[continuum_index].index= count; + hashkit->continuum[continuum_index++].value= value; + } + else + { + unsigned int i; + for (i = 0; i < points_per_hash; i++) + { + value= ketama_server_hash(sort_host, (uint32_t) sort_host_length, (int) i); + hashkit->continuum[continuum_index].index= count; + hashkit->continuum[continuum_index++].value= value; + } + } + } + + points_count+= points_per_server; + } + + hashkit->continuum_points_count= points_count; + qsort(hashkit->continuum, hashkit->continuum_points_count, sizeof(hashkit_continuum_point_st), + continuum_points_cmp); + + return 0; +} +#endif diff --git a/libhashkit/md5.cc b/libhashkit/md5.cc new file mode 100644 index 0000000..ef86776 --- /dev/null +++ b/libhashkit/md5.cc @@ -0,0 +1,412 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* + This Library has been modified from its original form by + Brian Aker (brian@tangent.org) + + See below for original Copyright. +*/ +/* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm + */ + +/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All +rights reserved. + +License to copy and use this software is granted provided that it +is identified as the "RSA Data Security, Inc. MD5 Message-Digest +Algorithm" in all material mentioning or referencing this software +or this function. + +License is also granted to make and use derivative works provided +that such works are identified as "derived from the RSA Data +Security, Inc. MD5 Message-Digest Algorithm" in all material +mentioning or referencing the derived work. + +RSA Data Security, Inc. makes no representations concerning either +the merchantability of this software or the suitability of this +software for any particular purpose. It is provided "as is" +without express or implied warranty of any kind. + +These notices must be retained in any copies of any part of this +documentation and/or software. +*/ + +#include + +#include +#include + +#define GCC_VERSION (__GNUC__ * 10000 \ + + __GNUC_MINOR__ * 100 \ + + __GNUC_PATCHLEVEL__) + +#if GCC_VERSION > 40600 +# pragma GCC diagnostic ignored "-Wunsafe-loop-optimizations" +#endif + +/* POINTER defines a generic pointer type */ +typedef unsigned char *POINTER; +typedef const unsigned char *CONST_POINTER; + + +/* UINT4 defines a four byte word */ +typedef unsigned int UINT4; + + +/* MD5 context. */ +typedef struct { + UINT4 state[4]; /* state (ABCD) */ + UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */ + unsigned char buffer[64]; /* input buffer */ +} MD5_CTX; + +static void MD5Init (MD5_CTX *context); /* context */ +static void MD5Update ( MD5_CTX *context, /* context */ + const unsigned char *input, /* input block */ + unsigned int inputLen); /* length of input block */ +static void MD5Final ( unsigned char digest[16], /* message digest */ + MD5_CTX *context); /* context */ + +/* Constants for MD5Transform routine. */ + +#define S11 7 +#define S12 12 +#define S13 17 +#define S14 22 +#define S21 5 +#define S22 9 +#define S23 14 +#define S24 20 +#define S31 4 +#define S32 11 +#define S33 16 +#define S34 23 +#define S41 6 +#define S42 10 +#define S43 15 +#define S44 21 + + +static void MD5Transform (UINT4 state[4], + const unsigned char block[64]); +static void Encode (unsigned char *output, + UINT4 *input, + unsigned int len); +static void Decode(UINT4 *output, const unsigned char *input, unsigned int len); + +static unsigned char PADDING[64] = { + 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +/* F, G, H and I are basic MD5 functions. + */ +#define F(x, y, z) (((x) & (y)) | ((~x) & (z))) +#define G(x, y, z) (((x) & (z)) | ((y) & (~z))) +#define H(x, y, z) ((x) ^ (y) ^ (z)) +#define I(x, y, z) ((y) ^ ((x) | (~z))) + +/* ROTATE_LEFT rotates x left n bits. + */ +#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n)))) + +/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4. +Rotation is separate from addition to prevent recomputation. + */ +#define FF(a, b, c, d, x, s, ac) { \ + (a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ + } +#define GG(a, b, c, d, x, s, ac) { \ + (a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ + } +#define HH(a, b, c, d, x, s, ac) { \ + (a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ + } +#define II(a, b, c, d, x, s, ac) { \ + (a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ + } + + +/* + Just a simple method for getting the signature + result must be == 16 +*/ +void md5_signature(const unsigned char *key, unsigned int length, unsigned char *result) +{ + MD5_CTX my_md5; + + MD5Init(&my_md5); + (void)MD5Update(&my_md5, key, length); + MD5Final(result, &my_md5); +} + +/* MD5 initialization. Begins an MD5 operation, writing a new context. + */ +static void MD5Init (MD5_CTX *context) /* context */ +{ + context->count[0] = context->count[1] = 0; + /* Load magic initialization constants. +*/ + context->state[0] = 0x67452301; + context->state[1] = 0xefcdab89; + context->state[2] = 0x98badcfe; + context->state[3] = 0x10325476; +} + +/* MD5 block update operation. Continues an MD5 message-digest + operation, processing another message block, and updating the + context. + */ + +static void MD5Update ( + MD5_CTX *context, /* context */ + const unsigned char *input, /* input block */ + unsigned int inputLen) /* length of input block */ +{ + unsigned int i, idx, partLen; + + /* Compute number of bytes mod 64 */ + idx = (unsigned int)((context->count[0] >> 3) & 0x3F); + + + /* Update number of bits */ + if ((context->count[0] += ((UINT4)inputLen << 3)) + < ((UINT4)inputLen << 3)) + context->count[1]++; + context->count[1] += ((UINT4)inputLen >> 29); + + partLen = 64 - idx; + + /* Transform as many times as possible. +*/ + if (inputLen >= partLen) { + memcpy((POINTER)&context->buffer[idx], (CONST_POINTER)input, partLen); + MD5Transform(context->state, context->buffer); + + for (i = partLen; i + 63 < inputLen; i += 64) + MD5Transform (context->state, (CONST_POINTER)&input[i]); + + idx = 0; + } + else + i = 0; + + /* Buffer remaining input */ + memcpy((POINTER)&context->buffer[idx], (CONST_POINTER)&input[i], + inputLen-i); +} + +/* MD5 finalization. Ends an MD5 message-digest operation, writing the + the message digest and zeroizing the context. + */ + +static void MD5Final ( + unsigned char digest[16], /* message digest */ + MD5_CTX *context) /* context */ +{ + unsigned char bits[8]; + unsigned int idx, padLen; + + /* Save number of bits */ + Encode (bits, context->count, 8); + + /* Pad out to 56 mod 64. +*/ + idx = (unsigned int)((context->count[0] >> 3) & 0x3f); + padLen = (idx < 56) ? (56 - idx) : (120 - idx); + MD5Update (context, PADDING, padLen); + + /* Append length (before padding) */ + MD5Update (context, bits, 8); + + /* Store state in digest */ + Encode (digest, context->state, 16); + + /* Zeroize sensitive information. +*/ + memset((POINTER)context, 0, sizeof (*context)); +} + +/* MD5 basic transformation. Transforms state based on block. + */ +static void MD5Transform ( + UINT4 state[4], + const unsigned char block[64]) +{ + UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16]; + + Decode (x, block, 64); + + /* Round 1 */ + FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */ + FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */ + FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */ + FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */ + FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */ + FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */ + FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */ + FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */ + FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */ + FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */ + FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */ + FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */ + FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */ + FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */ + FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */ + FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */ + + /* Round 2 */ + GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */ + GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */ + GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */ + GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */ + GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */ + GG (d, a, b, c, x[10], S22, 0x2441453); /* 22 */ + GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */ + GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */ + GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */ + GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */ + GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */ + GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */ + GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */ + GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */ + GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */ + GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */ + + /* Round 3 */ + HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */ + HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */ + HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */ + HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */ + HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */ + HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */ + HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */ + HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */ + HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */ + HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */ + HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */ + HH (b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */ + HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */ + HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */ + HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */ + HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */ + + /* Round 4 */ + II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */ + II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */ + II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */ + II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */ + II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */ + II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */ + II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */ + II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */ + II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */ + II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */ + II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */ + II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */ + II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */ + II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */ + II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */ + II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */ + + + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; + + /* Zeroize sensitive information. +*/ + memset((POINTER)x, 0, sizeof (x)); +} + +/* Encodes input (UINT4) into output (unsigned char). Assumes len is + a multiple of 4. + */ +static void Encode ( +unsigned char *output, +UINT4 *input, +unsigned int len) +{ + unsigned int i, j; + + for (i = 0, j = 0; j < len; i++, j += 4) { + output[j] = (unsigned char)(input[i] & 0xff); + output[j+1] = (unsigned char)((input[i] >> 8) & 0xff); + output[j+2] = (unsigned char)((input[i] >> 16) & 0xff); + output[j+3] = (unsigned char)((input[i] >> 24) & 0xff); + } +} + + +/* Decodes input (unsigned char) into output (UINT4). Assumes len is + a multiple of 4. + */ +static void Decode ( + UINT4 *output, + const unsigned char *input, + unsigned int len) +{ + unsigned int i, j; + + for (i = 0, j = 0; j < len; i++, j += 4) + output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) | + (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24); +} + +uint32_t hashkit_md5(const char *key, size_t key_length, void *context) +{ + unsigned char results[16]; + (void)context; + + md5_signature((unsigned char*)key, (unsigned int)key_length, results); + + return ((uint32_t) (results[3] & 0xFF) << 24) + | ((uint32_t) (results[2] & 0xFF) << 16) + | ((uint32_t) (results[1] & 0xFF) << 8) + | (results[0] & 0xFF); +} diff --git a/libhashkit/murmur.cc b/libhashkit/murmur.cc new file mode 100644 index 0000000..e15e510 --- /dev/null +++ b/libhashkit/murmur.cc @@ -0,0 +1,123 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* + "Murmur" hash provided by Austin, tanjent@gmail.com + http://murmurhash.googlepages.com/ + + Note - This code makes a few assumptions about how your machine behaves - + + 1. We can read a 4-byte value from any address without crashing + 2. sizeof(int) == 4 + + And it has a few limitations - + 1. It will not work incrementally. + 2. It will not produce the same results on little-endian and big-endian + machines. + + Updated to murmur2 hash - BP +*/ + +#include + +#ifdef HAVE_MURMUR_HASH + +uint32_t hashkit_murmur(const char *key, size_t length, void *context) +{ + /* + 'm' and 'r' are mixing constants generated offline. They're not + really 'magic', they just happen to work well. + */ + + const unsigned int m= 0x5bd1e995; + const uint32_t seed= (0xdeadbeef * (uint32_t)length); + const int r= 24; + + + // Initialize the hash to a 'random' value + + uint32_t h= seed ^ (uint32_t)length; + + // Mix 4 bytes at a time into the hash + + const unsigned char * data= (const unsigned char *)key; + (void)context; + + while(length >= 4) + { + unsigned int k = *(unsigned int *)data; + + k *= m; + k ^= k >> r; + k *= m; + + h *= m; + h ^= k; + + data += 4; + length -= 4; + } + + // Handle the last few bytes of the input array + + switch(length) + { + case 3: h ^= ((uint32_t)data[2]) << 16; + case 2: h ^= ((uint32_t)data[1]) << 8; + case 1: h ^= data[0]; + h *= m; + default: break; + }; + + /* + Do a few final mixes of the hash to ensure the last few bytes are + well-incorporated. + */ + + h ^= h >> 13; + h *= m; + h ^= h >> 15; + + return h; +} + +#else +uint32_t hashkit_murmur(const char *, size_t , void *) +{ + return 0; +} +#endif diff --git a/libhashkit/murmur3.cc b/libhashkit/murmur3.cc new file mode 100644 index 0000000..e5f06ce --- /dev/null +++ b/libhashkit/murmur3.cc @@ -0,0 +1,317 @@ +//----------------------------------------------------------------------------- +//MurmurHash3 was written by Austin Appleby, and is placed in the public +//domain. The author hereby disclaims copyright to this source code. + +// Note - The x86 and x64 versions do _not_ produce the same results, as the +// algorithms are optimized for their respective platforms. You can still +// compile and run any of them on any platform, but your performance with the +// non-native version will be less than optimal. + +#include "libhashkit/hashkitcon.h" + +#include "libhashkit/murmur3.h" + +//----------------------------------------------------------------------------- +// Platform-specific functions and macros + +#ifdef __GNUC__ +#define FORCE_INLINE __attribute__((always_inline)) inline +#else +#define FORCE_INLINE inline +#endif + +static FORCE_INLINE uint32_t rotl32 ( uint32_t x, int8_t r ) +{ + return (x << r) | (x >> (32 - r)); +} + +static FORCE_INLINE uint64_t rotl64 ( uint64_t x, int8_t r ) +{ + return (x << r) | (x >> (64 - r)); +} + +#define ROTL32(x,y) rotl32(x,y) +#define ROTL64(x,y) rotl64(x,y) + +#define BIG_CONSTANT(x) (x##LLU) + +//----------------------------------------------------------------------------- +// Block read - if your platform needs to do endian-swapping or can only +// handle aligned reads, do the conversion here + +#define getblock(p, i) (p[i]) + +//----------------------------------------------------------------------------- +// Finalization mix - force all bits of a hash block to avalanche + +static FORCE_INLINE uint32_t fmix32 ( uint32_t h ) +{ + h ^= h >> 16; + h *= 0x85ebca6b; + h ^= h >> 13; + h *= 0xc2b2ae35; + h ^= h >> 16; + + return h; +} + +//---------- + +static FORCE_INLINE uint64_t fmix64 ( uint64_t k ) +{ + k ^= k >> 33; + k *= BIG_CONSTANT(0xff51afd7ed558ccd); + k ^= k >> 33; + k *= BIG_CONSTANT(0xc4ceb9fe1a85ec53); + k ^= k >> 33; + + return k; +} + +//----------------------------------------------------------------------------- + +void MurmurHash3_x86_32 ( const void * key, int len, + uint32_t seed, void * out ) +{ + const uint8_t * data = (const uint8_t*)key; + const int nblocks = len / 4; + int i; + + uint32_t h1 = seed; + + uint32_t c1 = 0xcc9e2d51; + uint32_t c2 = 0x1b873593; + + //---------- + // body + + const uint32_t * blocks = (const uint32_t *)(data + nblocks*4); + + for(i = -nblocks; i; i++) + { + uint32_t k1 = getblock(blocks,i); + + k1 *= c1; + k1 = ROTL32(k1,15); + k1 *= c2; + + h1 ^= k1; + h1 = ROTL32(h1,13); + h1 = h1*5+0xe6546b64; + } + + //---------- + // tail + + const uint8_t * tail = (const uint8_t*)(data + nblocks*4); + + uint32_t k1 = 0; + + switch(len & 3) + { + case 3: k1 ^= tail[2] << 16; + case 2: k1 ^= tail[1] << 8; + case 1: k1 ^= tail[0]; + k1 *= c1; k1 = ROTL32(k1,15); k1 *= c2; h1 ^= k1; + }; + + //---------- + // finalization + + h1 ^= len; + + h1 = fmix32(h1); + + *(uint32_t*)out = h1; +} + +//----------------------------------------------------------------------------- + +void MurmurHash3_x86_128 ( const void * key, const int len, + uint32_t seed, void * out ) +{ + const uint8_t * data = (const uint8_t*)key; + const int nblocks = len / 16; + int i; + + uint32_t h1 = seed; + uint32_t h2 = seed; + uint32_t h3 = seed; + uint32_t h4 = seed; + + uint32_t c1 = 0x239b961b; + uint32_t c2 = 0xab0e9789; + uint32_t c3 = 0x38b34ae5; + uint32_t c4 = 0xa1e38b93; + + //---------- + // body + + const uint32_t * blocks = (const uint32_t *)(data + nblocks*16); + + for(i = -nblocks; i; i++) + { + uint32_t k1 = getblock(blocks,i*4+0); + uint32_t k2 = getblock(blocks,i*4+1); + uint32_t k3 = getblock(blocks,i*4+2); + uint32_t k4 = getblock(blocks,i*4+3); + + k1 *= c1; k1 = ROTL32(k1,15); k1 *= c2; h1 ^= k1; + + h1 = ROTL32(h1,19); h1 += h2; h1 = h1*5+0x561ccd1b; + + k2 *= c2; k2 = ROTL32(k2,16); k2 *= c3; h2 ^= k2; + + h2 = ROTL32(h2,17); h2 += h3; h2 = h2*5+0x0bcaa747; + + k3 *= c3; k3 = ROTL32(k3,17); k3 *= c4; h3 ^= k3; + + h3 = ROTL32(h3,15); h3 += h4; h3 = h3*5+0x96cd1c35; + + k4 *= c4; k4 = ROTL32(k4,18); k4 *= c1; h4 ^= k4; + + h4 = ROTL32(h4,13); h4 += h1; h4 = h4*5+0x32ac3b17; + } + + //---------- + // tail + + const uint8_t * tail = (const uint8_t*)(data + nblocks*16); + + uint32_t k1 = 0; + uint32_t k2 = 0; + uint32_t k3 = 0; + uint32_t k4 = 0; + + switch(len & 15) + { + case 15: k4 ^= tail[14] << 16; + case 14: k4 ^= tail[13] << 8; + case 13: k4 ^= tail[12] << 0; + k4 *= c4; k4 = ROTL32(k4,18); k4 *= c1; h4 ^= k4; + + case 12: k3 ^= tail[11] << 24; + case 11: k3 ^= tail[10] << 16; + case 10: k3 ^= tail[ 9] << 8; + case 9: k3 ^= tail[ 8] << 0; + k3 *= c3; k3 = ROTL32(k3,17); k3 *= c4; h3 ^= k3; + + case 8: k2 ^= tail[ 7] << 24; + case 7: k2 ^= tail[ 6] << 16; + case 6: k2 ^= tail[ 5] << 8; + case 5: k2 ^= tail[ 4] << 0; + k2 *= c2; k2 = ROTL32(k2,16); k2 *= c3; h2 ^= k2; + + case 4: k1 ^= tail[ 3] << 24; + case 3: k1 ^= tail[ 2] << 16; + case 2: k1 ^= tail[ 1] << 8; + case 1: k1 ^= tail[ 0] << 0; + k1 *= c1; k1 = ROTL32(k1,15); k1 *= c2; h1 ^= k1; + }; + + //---------- + // finalization + + h1 ^= len; h2 ^= len; h3 ^= len; h4 ^= len; + + h1 += h2; h1 += h3; h1 += h4; + h2 += h1; h3 += h1; h4 += h1; + + h1 = fmix32(h1); + h2 = fmix32(h2); + h3 = fmix32(h3); + h4 = fmix32(h4); + + h1 += h2; h1 += h3; h1 += h4; + h2 += h1; h3 += h1; h4 += h1; + + ((uint32_t*)out)[0] = h1; + ((uint32_t*)out)[1] = h2; + ((uint32_t*)out)[2] = h3; + ((uint32_t*)out)[3] = h4; +} + +//----------------------------------------------------------------------------- + +void MurmurHash3_x64_128 ( const void * key, const int len, + const uint32_t seed, void * out ) +{ + const uint8_t * data = (const uint8_t*)key; + const int nblocks = len / 16; + int i; + + uint64_t h1 = seed; + uint64_t h2 = seed; + + uint64_t c1 = BIG_CONSTANT(0x87c37b91114253d5); + uint64_t c2 = BIG_CONSTANT(0x4cf5ad432745937f); + + //---------- + // body + + const uint64_t * blocks = (const uint64_t *)(data); + + for(i = 0; i < nblocks; i++) + { + uint64_t k1 = getblock(blocks,i*2+0); + uint64_t k2 = getblock(blocks,i*2+1); + + k1 *= c1; k1 = ROTL64(k1,31); k1 *= c2; h1 ^= k1; + + h1 = ROTL64(h1,27); h1 += h2; h1 = h1*5+0x52dce729; + + k2 *= c2; k2 = ROTL64(k2,33); k2 *= c1; h2 ^= k2; + + h2 = ROTL64(h2,31); h2 += h1; h2 = h2*5+0x38495ab5; + } + + //---------- + // tail + + const uint8_t * tail = (const uint8_t*)(data + nblocks*16); + + uint64_t k1 = 0; + uint64_t k2 = 0; + + switch(len & 15) + { + case 15: k2 ^= (uint64_t)(tail[14]) << 48; + case 14: k2 ^= (uint64_t)(tail[13]) << 40; + case 13: k2 ^= (uint64_t)(tail[12]) << 32; + case 12: k2 ^= (uint64_t)(tail[11]) << 24; + case 11: k2 ^= (uint64_t)(tail[10]) << 16; + case 10: k2 ^= (uint64_t)(tail[ 9]) << 8; + case 9: k2 ^= (uint64_t)(tail[ 8]) << 0; + k2 *= c2; k2 = ROTL64(k2,33); k2 *= c1; h2 ^= k2; + + case 8: k1 ^= (uint64_t)(tail[ 7]) << 56; + case 7: k1 ^= (uint64_t)(tail[ 6]) << 48; + case 6: k1 ^= (uint64_t)(tail[ 5]) << 40; + case 5: k1 ^= (uint64_t)(tail[ 4]) << 32; + case 4: k1 ^= (uint64_t)(tail[ 3]) << 24; + case 3: k1 ^= (uint64_t)(tail[ 2]) << 16; + case 2: k1 ^= (uint64_t)(tail[ 1]) << 8; + case 1: k1 ^= (uint64_t)(tail[ 0]) << 0; + k1 *= c1; k1 = ROTL64(k1,31); k1 *= c2; h1 ^= k1; + }; + + //---------- + // finalization + + h1 ^= len; h2 ^= len; + + h1 += h2; + h2 += h1; + + h1 = fmix64(h1); + h2 = fmix64(h2); + + h1 += h2; + h2 += h1; + + ((uint64_t*)out)[0] = h1; + ((uint64_t*)out)[1] = h2; +} + +//----------------------------------------------------------------------------- + diff --git a/libhashkit/murmur3.h b/libhashkit/murmur3.h new file mode 100644 index 0000000..4eb4fa6 --- /dev/null +++ b/libhashkit/murmur3.h @@ -0,0 +1,16 @@ +//----------------------------------------------------------------------------- +// MurmurHash3 was written by Austin Appleby, and is placed in the +// public domain. The author hereby disclaims copyright to this source +// code. + +#pragma once + +//----------------------------------------------------------------------------- + +void MurmurHash3_x86_32 (const void *key, int len, uint32_t seed, void *out); + +void MurmurHash3_x86_128(const void *key, int len, uint32_t seed, void *out); + +void MurmurHash3_x64_128(const void *key, int len, uint32_t seed, void *out); + +//----------------------------------------------------------------------------- diff --git a/libhashkit/murmur3_api.cc b/libhashkit/murmur3_api.cc new file mode 100644 index 0000000..db35700 --- /dev/null +++ b/libhashkit/murmur3_api.cc @@ -0,0 +1,49 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libhashkit/common.h" +#include "libhashkit/murmur3.h" + +uint32_t hashkit_murmur3(const char *key, size_t length, void *) +{ + const uint32_t seed= (0xdeadbeef * (uint32_t)length); + + uint32_t ret; + MurmurHash3_x86_32(key, int(length), seed, &ret); + + return ret; +} diff --git a/libhashkit/nohsieh.cc b/libhashkit/nohsieh.cc new file mode 100644 index 0000000..8def993 --- /dev/null +++ b/libhashkit/nohsieh.cc @@ -0,0 +1,46 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +#ifdef HAVE_HSIEH_HASH +#error "not supported" +#else +uint32_t hashkit_hsieh(const char *, size_t , void *) +{ + return 0; +} +#endif diff --git a/libhashkit/one_at_a_time.cc b/libhashkit/one_at_a_time.cc new file mode 100644 index 0000000..647f3c1 --- /dev/null +++ b/libhashkit/one_at_a_time.cc @@ -0,0 +1,64 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +/* + This has is Jenkin's "One at A time Hash". +http://en.wikipedia.org/wiki/Jenkins_hash_function +*/ + +#include + +uint32_t hashkit_one_at_a_time(const char *key, size_t key_length, void *context) +{ + const char *ptr= key; + uint32_t value= 0; + (void)context; + + while (key_length--) + { + uint32_t val= (uint32_t) *ptr++; + value += val; + value += (value << 10); + value ^= (value >> 6); + } + value += (value << 3); + value ^= (value >> 11); + value += (value << 15); + + return value; +} diff --git a/libhashkit/rijndael.cc b/libhashkit/rijndael.cc new file mode 100644 index 0000000..93997cc --- /dev/null +++ b/libhashkit/rijndael.cc @@ -0,0 +1,1437 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +/** + * rijndael-alg-fst.c + * + * @version 3.0 (December 2000) + * + * Optimised ANSI C code for the Rijndael cipher (now AES) + * + * @author Vincent Rijmen + * @author Antoon Bosselaers + * @author Paulo Barreto + * + * This code is hereby placed in the public domain. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include +#include + +#include "libhashkit/rijndael.hpp" + +/* +Te0[x] = S [x].[02, 01, 01, 03]; +Te1[x] = S [x].[03, 02, 01, 01]; +Te2[x] = S [x].[01, 03, 02, 01]; +Te3[x] = S [x].[01, 01, 03, 02]; +Te4[x] = S [x].[01, 01, 01, 01]; + +Td0[x] = Si[x].[0e, 09, 0d, 0b]; +Td1[x] = Si[x].[0b, 0e, 09, 0d]; +Td2[x] = Si[x].[0d, 0b, 0e, 09]; +Td3[x] = Si[x].[09, 0d, 0b, 0e]; +Td4[x] = Si[x].[01, 01, 01, 01]; +*/ + +static const u32 Te0[256] = { + 0xc66363a5U, 0xf87c7c84U, 0xee777799U, 0xf67b7b8dU, + 0xfff2f20dU, 0xd66b6bbdU, 0xde6f6fb1U, 0x91c5c554U, + 0x60303050U, 0x02010103U, 0xce6767a9U, 0x562b2b7dU, + 0xe7fefe19U, 0xb5d7d762U, 0x4dababe6U, 0xec76769aU, + 0x8fcaca45U, 0x1f82829dU, 0x89c9c940U, 0xfa7d7d87U, + 0xeffafa15U, 0xb25959ebU, 0x8e4747c9U, 0xfbf0f00bU, + 0x41adadecU, 0xb3d4d467U, 0x5fa2a2fdU, 0x45afafeaU, + 0x239c9cbfU, 0x53a4a4f7U, 0xe4727296U, 0x9bc0c05bU, + 0x75b7b7c2U, 0xe1fdfd1cU, 0x3d9393aeU, 0x4c26266aU, + 0x6c36365aU, 0x7e3f3f41U, 0xf5f7f702U, 0x83cccc4fU, + 0x6834345cU, 0x51a5a5f4U, 0xd1e5e534U, 0xf9f1f108U, + 0xe2717193U, 0xabd8d873U, 0x62313153U, 0x2a15153fU, + 0x0804040cU, 0x95c7c752U, 0x46232365U, 0x9dc3c35eU, + 0x30181828U, 0x379696a1U, 0x0a05050fU, 0x2f9a9ab5U, + 0x0e070709U, 0x24121236U, 0x1b80809bU, 0xdfe2e23dU, + 0xcdebeb26U, 0x4e272769U, 0x7fb2b2cdU, 0xea75759fU, + 0x1209091bU, 0x1d83839eU, 0x582c2c74U, 0x341a1a2eU, + 0x361b1b2dU, 0xdc6e6eb2U, 0xb45a5aeeU, 0x5ba0a0fbU, + 0xa45252f6U, 0x763b3b4dU, 0xb7d6d661U, 0x7db3b3ceU, + 0x5229297bU, 0xdde3e33eU, 0x5e2f2f71U, 0x13848497U, + 0xa65353f5U, 0xb9d1d168U, 0x00000000U, 0xc1eded2cU, + 0x40202060U, 0xe3fcfc1fU, 0x79b1b1c8U, 0xb65b5bedU, + 0xd46a6abeU, 0x8dcbcb46U, 0x67bebed9U, 0x7239394bU, + 0x944a4adeU, 0x984c4cd4U, 0xb05858e8U, 0x85cfcf4aU, + 0xbbd0d06bU, 0xc5efef2aU, 0x4faaaae5U, 0xedfbfb16U, + 0x864343c5U, 0x9a4d4dd7U, 0x66333355U, 0x11858594U, + 0x8a4545cfU, 0xe9f9f910U, 0x04020206U, 0xfe7f7f81U, + 0xa05050f0U, 0x783c3c44U, 0x259f9fbaU, 0x4ba8a8e3U, + 0xa25151f3U, 0x5da3a3feU, 0x804040c0U, 0x058f8f8aU, + 0x3f9292adU, 0x219d9dbcU, 0x70383848U, 0xf1f5f504U, + 0x63bcbcdfU, 0x77b6b6c1U, 0xafdada75U, 0x42212163U, + 0x20101030U, 0xe5ffff1aU, 0xfdf3f30eU, 0xbfd2d26dU, + 0x81cdcd4cU, 0x180c0c14U, 0x26131335U, 0xc3ecec2fU, + 0xbe5f5fe1U, 0x359797a2U, 0x884444ccU, 0x2e171739U, + 0x93c4c457U, 0x55a7a7f2U, 0xfc7e7e82U, 0x7a3d3d47U, + 0xc86464acU, 0xba5d5de7U, 0x3219192bU, 0xe6737395U, + 0xc06060a0U, 0x19818198U, 0x9e4f4fd1U, 0xa3dcdc7fU, + 0x44222266U, 0x542a2a7eU, 0x3b9090abU, 0x0b888883U, + 0x8c4646caU, 0xc7eeee29U, 0x6bb8b8d3U, 0x2814143cU, + 0xa7dede79U, 0xbc5e5ee2U, 0x160b0b1dU, 0xaddbdb76U, + 0xdbe0e03bU, 0x64323256U, 0x743a3a4eU, 0x140a0a1eU, + 0x924949dbU, 0x0c06060aU, 0x4824246cU, 0xb85c5ce4U, + 0x9fc2c25dU, 0xbdd3d36eU, 0x43acacefU, 0xc46262a6U, + 0x399191a8U, 0x319595a4U, 0xd3e4e437U, 0xf279798bU, + 0xd5e7e732U, 0x8bc8c843U, 0x6e373759U, 0xda6d6db7U, + 0x018d8d8cU, 0xb1d5d564U, 0x9c4e4ed2U, 0x49a9a9e0U, + 0xd86c6cb4U, 0xac5656faU, 0xf3f4f407U, 0xcfeaea25U, + 0xca6565afU, 0xf47a7a8eU, 0x47aeaee9U, 0x10080818U, + 0x6fbabad5U, 0xf0787888U, 0x4a25256fU, 0x5c2e2e72U, + 0x381c1c24U, 0x57a6a6f1U, 0x73b4b4c7U, 0x97c6c651U, + 0xcbe8e823U, 0xa1dddd7cU, 0xe874749cU, 0x3e1f1f21U, + 0x964b4bddU, 0x61bdbddcU, 0x0d8b8b86U, 0x0f8a8a85U, + 0xe0707090U, 0x7c3e3e42U, 0x71b5b5c4U, 0xcc6666aaU, + 0x904848d8U, 0x06030305U, 0xf7f6f601U, 0x1c0e0e12U, + 0xc26161a3U, 0x6a35355fU, 0xae5757f9U, 0x69b9b9d0U, + 0x17868691U, 0x99c1c158U, 0x3a1d1d27U, 0x279e9eb9U, + 0xd9e1e138U, 0xebf8f813U, 0x2b9898b3U, 0x22111133U, + 0xd26969bbU, 0xa9d9d970U, 0x078e8e89U, 0x339494a7U, + 0x2d9b9bb6U, 0x3c1e1e22U, 0x15878792U, 0xc9e9e920U, + 0x87cece49U, 0xaa5555ffU, 0x50282878U, 0xa5dfdf7aU, + 0x038c8c8fU, 0x59a1a1f8U, 0x09898980U, 0x1a0d0d17U, + 0x65bfbfdaU, 0xd7e6e631U, 0x844242c6U, 0xd06868b8U, + 0x824141c3U, 0x299999b0U, 0x5a2d2d77U, 0x1e0f0f11U, + 0x7bb0b0cbU, 0xa85454fcU, 0x6dbbbbd6U, 0x2c16163aU, +}; +static const u32 Te1[256] = { + 0xa5c66363U, 0x84f87c7cU, 0x99ee7777U, 0x8df67b7bU, + 0x0dfff2f2U, 0xbdd66b6bU, 0xb1de6f6fU, 0x5491c5c5U, + 0x50603030U, 0x03020101U, 0xa9ce6767U, 0x7d562b2bU, + 0x19e7fefeU, 0x62b5d7d7U, 0xe64dababU, 0x9aec7676U, + 0x458fcacaU, 0x9d1f8282U, 0x4089c9c9U, 0x87fa7d7dU, + 0x15effafaU, 0xebb25959U, 0xc98e4747U, 0x0bfbf0f0U, + 0xec41adadU, 0x67b3d4d4U, 0xfd5fa2a2U, 0xea45afafU, + 0xbf239c9cU, 0xf753a4a4U, 0x96e47272U, 0x5b9bc0c0U, + 0xc275b7b7U, 0x1ce1fdfdU, 0xae3d9393U, 0x6a4c2626U, + 0x5a6c3636U, 0x417e3f3fU, 0x02f5f7f7U, 0x4f83ccccU, + 0x5c683434U, 0xf451a5a5U, 0x34d1e5e5U, 0x08f9f1f1U, + 0x93e27171U, 0x73abd8d8U, 0x53623131U, 0x3f2a1515U, + 0x0c080404U, 0x5295c7c7U, 0x65462323U, 0x5e9dc3c3U, + 0x28301818U, 0xa1379696U, 0x0f0a0505U, 0xb52f9a9aU, + 0x090e0707U, 0x36241212U, 0x9b1b8080U, 0x3ddfe2e2U, + 0x26cdebebU, 0x694e2727U, 0xcd7fb2b2U, 0x9fea7575U, + 0x1b120909U, 0x9e1d8383U, 0x74582c2cU, 0x2e341a1aU, + 0x2d361b1bU, 0xb2dc6e6eU, 0xeeb45a5aU, 0xfb5ba0a0U, + 0xf6a45252U, 0x4d763b3bU, 0x61b7d6d6U, 0xce7db3b3U, + 0x7b522929U, 0x3edde3e3U, 0x715e2f2fU, 0x97138484U, + 0xf5a65353U, 0x68b9d1d1U, 0x00000000U, 0x2cc1ededU, + 0x60402020U, 0x1fe3fcfcU, 0xc879b1b1U, 0xedb65b5bU, + 0xbed46a6aU, 0x468dcbcbU, 0xd967bebeU, 0x4b723939U, + 0xde944a4aU, 0xd4984c4cU, 0xe8b05858U, 0x4a85cfcfU, + 0x6bbbd0d0U, 0x2ac5efefU, 0xe54faaaaU, 0x16edfbfbU, + 0xc5864343U, 0xd79a4d4dU, 0x55663333U, 0x94118585U, + 0xcf8a4545U, 0x10e9f9f9U, 0x06040202U, 0x81fe7f7fU, + 0xf0a05050U, 0x44783c3cU, 0xba259f9fU, 0xe34ba8a8U, + 0xf3a25151U, 0xfe5da3a3U, 0xc0804040U, 0x8a058f8fU, + 0xad3f9292U, 0xbc219d9dU, 0x48703838U, 0x04f1f5f5U, + 0xdf63bcbcU, 0xc177b6b6U, 0x75afdadaU, 0x63422121U, + 0x30201010U, 0x1ae5ffffU, 0x0efdf3f3U, 0x6dbfd2d2U, + 0x4c81cdcdU, 0x14180c0cU, 0x35261313U, 0x2fc3ececU, + 0xe1be5f5fU, 0xa2359797U, 0xcc884444U, 0x392e1717U, + 0x5793c4c4U, 0xf255a7a7U, 0x82fc7e7eU, 0x477a3d3dU, + 0xacc86464U, 0xe7ba5d5dU, 0x2b321919U, 0x95e67373U, + 0xa0c06060U, 0x98198181U, 0xd19e4f4fU, 0x7fa3dcdcU, + 0x66442222U, 0x7e542a2aU, 0xab3b9090U, 0x830b8888U, + 0xca8c4646U, 0x29c7eeeeU, 0xd36bb8b8U, 0x3c281414U, + 0x79a7dedeU, 0xe2bc5e5eU, 0x1d160b0bU, 0x76addbdbU, + 0x3bdbe0e0U, 0x56643232U, 0x4e743a3aU, 0x1e140a0aU, + 0xdb924949U, 0x0a0c0606U, 0x6c482424U, 0xe4b85c5cU, + 0x5d9fc2c2U, 0x6ebdd3d3U, 0xef43acacU, 0xa6c46262U, + 0xa8399191U, 0xa4319595U, 0x37d3e4e4U, 0x8bf27979U, + 0x32d5e7e7U, 0x438bc8c8U, 0x596e3737U, 0xb7da6d6dU, + 0x8c018d8dU, 0x64b1d5d5U, 0xd29c4e4eU, 0xe049a9a9U, + 0xb4d86c6cU, 0xfaac5656U, 0x07f3f4f4U, 0x25cfeaeaU, + 0xafca6565U, 0x8ef47a7aU, 0xe947aeaeU, 0x18100808U, + 0xd56fbabaU, 0x88f07878U, 0x6f4a2525U, 0x725c2e2eU, + 0x24381c1cU, 0xf157a6a6U, 0xc773b4b4U, 0x5197c6c6U, + 0x23cbe8e8U, 0x7ca1ddddU, 0x9ce87474U, 0x213e1f1fU, + 0xdd964b4bU, 0xdc61bdbdU, 0x860d8b8bU, 0x850f8a8aU, + 0x90e07070U, 0x427c3e3eU, 0xc471b5b5U, 0xaacc6666U, + 0xd8904848U, 0x05060303U, 0x01f7f6f6U, 0x121c0e0eU, + 0xa3c26161U, 0x5f6a3535U, 0xf9ae5757U, 0xd069b9b9U, + 0x91178686U, 0x5899c1c1U, 0x273a1d1dU, 0xb9279e9eU, + 0x38d9e1e1U, 0x13ebf8f8U, 0xb32b9898U, 0x33221111U, + 0xbbd26969U, 0x70a9d9d9U, 0x89078e8eU, 0xa7339494U, + 0xb62d9b9bU, 0x223c1e1eU, 0x92158787U, 0x20c9e9e9U, + 0x4987ceceU, 0xffaa5555U, 0x78502828U, 0x7aa5dfdfU, + 0x8f038c8cU, 0xf859a1a1U, 0x80098989U, 0x171a0d0dU, + 0xda65bfbfU, 0x31d7e6e6U, 0xc6844242U, 0xb8d06868U, + 0xc3824141U, 0xb0299999U, 0x775a2d2dU, 0x111e0f0fU, + 0xcb7bb0b0U, 0xfca85454U, 0xd66dbbbbU, 0x3a2c1616U, +}; +static const u32 Te2[256] = { + 0x63a5c663U, 0x7c84f87cU, 0x7799ee77U, 0x7b8df67bU, + 0xf20dfff2U, 0x6bbdd66bU, 0x6fb1de6fU, 0xc55491c5U, + 0x30506030U, 0x01030201U, 0x67a9ce67U, 0x2b7d562bU, + 0xfe19e7feU, 0xd762b5d7U, 0xabe64dabU, 0x769aec76U, + 0xca458fcaU, 0x829d1f82U, 0xc94089c9U, 0x7d87fa7dU, + 0xfa15effaU, 0x59ebb259U, 0x47c98e47U, 0xf00bfbf0U, + 0xadec41adU, 0xd467b3d4U, 0xa2fd5fa2U, 0xafea45afU, + 0x9cbf239cU, 0xa4f753a4U, 0x7296e472U, 0xc05b9bc0U, + 0xb7c275b7U, 0xfd1ce1fdU, 0x93ae3d93U, 0x266a4c26U, + 0x365a6c36U, 0x3f417e3fU, 0xf702f5f7U, 0xcc4f83ccU, + 0x345c6834U, 0xa5f451a5U, 0xe534d1e5U, 0xf108f9f1U, + 0x7193e271U, 0xd873abd8U, 0x31536231U, 0x153f2a15U, + 0x040c0804U, 0xc75295c7U, 0x23654623U, 0xc35e9dc3U, + 0x18283018U, 0x96a13796U, 0x050f0a05U, 0x9ab52f9aU, + 0x07090e07U, 0x12362412U, 0x809b1b80U, 0xe23ddfe2U, + 0xeb26cdebU, 0x27694e27U, 0xb2cd7fb2U, 0x759fea75U, + 0x091b1209U, 0x839e1d83U, 0x2c74582cU, 0x1a2e341aU, + 0x1b2d361bU, 0x6eb2dc6eU, 0x5aeeb45aU, 0xa0fb5ba0U, + 0x52f6a452U, 0x3b4d763bU, 0xd661b7d6U, 0xb3ce7db3U, + 0x297b5229U, 0xe33edde3U, 0x2f715e2fU, 0x84971384U, + 0x53f5a653U, 0xd168b9d1U, 0x00000000U, 0xed2cc1edU, + 0x20604020U, 0xfc1fe3fcU, 0xb1c879b1U, 0x5bedb65bU, + 0x6abed46aU, 0xcb468dcbU, 0xbed967beU, 0x394b7239U, + 0x4ade944aU, 0x4cd4984cU, 0x58e8b058U, 0xcf4a85cfU, + 0xd06bbbd0U, 0xef2ac5efU, 0xaae54faaU, 0xfb16edfbU, + 0x43c58643U, 0x4dd79a4dU, 0x33556633U, 0x85941185U, + 0x45cf8a45U, 0xf910e9f9U, 0x02060402U, 0x7f81fe7fU, + 0x50f0a050U, 0x3c44783cU, 0x9fba259fU, 0xa8e34ba8U, + 0x51f3a251U, 0xa3fe5da3U, 0x40c08040U, 0x8f8a058fU, + 0x92ad3f92U, 0x9dbc219dU, 0x38487038U, 0xf504f1f5U, + 0xbcdf63bcU, 0xb6c177b6U, 0xda75afdaU, 0x21634221U, + 0x10302010U, 0xff1ae5ffU, 0xf30efdf3U, 0xd26dbfd2U, + 0xcd4c81cdU, 0x0c14180cU, 0x13352613U, 0xec2fc3ecU, + 0x5fe1be5fU, 0x97a23597U, 0x44cc8844U, 0x17392e17U, + 0xc45793c4U, 0xa7f255a7U, 0x7e82fc7eU, 0x3d477a3dU, + 0x64acc864U, 0x5de7ba5dU, 0x192b3219U, 0x7395e673U, + 0x60a0c060U, 0x81981981U, 0x4fd19e4fU, 0xdc7fa3dcU, + 0x22664422U, 0x2a7e542aU, 0x90ab3b90U, 0x88830b88U, + 0x46ca8c46U, 0xee29c7eeU, 0xb8d36bb8U, 0x143c2814U, + 0xde79a7deU, 0x5ee2bc5eU, 0x0b1d160bU, 0xdb76addbU, + 0xe03bdbe0U, 0x32566432U, 0x3a4e743aU, 0x0a1e140aU, + 0x49db9249U, 0x060a0c06U, 0x246c4824U, 0x5ce4b85cU, + 0xc25d9fc2U, 0xd36ebdd3U, 0xacef43acU, 0x62a6c462U, + 0x91a83991U, 0x95a43195U, 0xe437d3e4U, 0x798bf279U, + 0xe732d5e7U, 0xc8438bc8U, 0x37596e37U, 0x6db7da6dU, + 0x8d8c018dU, 0xd564b1d5U, 0x4ed29c4eU, 0xa9e049a9U, + 0x6cb4d86cU, 0x56faac56U, 0xf407f3f4U, 0xea25cfeaU, + 0x65afca65U, 0x7a8ef47aU, 0xaee947aeU, 0x08181008U, + 0xbad56fbaU, 0x7888f078U, 0x256f4a25U, 0x2e725c2eU, + 0x1c24381cU, 0xa6f157a6U, 0xb4c773b4U, 0xc65197c6U, + 0xe823cbe8U, 0xdd7ca1ddU, 0x749ce874U, 0x1f213e1fU, + 0x4bdd964bU, 0xbddc61bdU, 0x8b860d8bU, 0x8a850f8aU, + 0x7090e070U, 0x3e427c3eU, 0xb5c471b5U, 0x66aacc66U, + 0x48d89048U, 0x03050603U, 0xf601f7f6U, 0x0e121c0eU, + 0x61a3c261U, 0x355f6a35U, 0x57f9ae57U, 0xb9d069b9U, + 0x86911786U, 0xc15899c1U, 0x1d273a1dU, 0x9eb9279eU, + 0xe138d9e1U, 0xf813ebf8U, 0x98b32b98U, 0x11332211U, + 0x69bbd269U, 0xd970a9d9U, 0x8e89078eU, 0x94a73394U, + 0x9bb62d9bU, 0x1e223c1eU, 0x87921587U, 0xe920c9e9U, + 0xce4987ceU, 0x55ffaa55U, 0x28785028U, 0xdf7aa5dfU, + 0x8c8f038cU, 0xa1f859a1U, 0x89800989U, 0x0d171a0dU, + 0xbfda65bfU, 0xe631d7e6U, 0x42c68442U, 0x68b8d068U, + 0x41c38241U, 0x99b02999U, 0x2d775a2dU, 0x0f111e0fU, + 0xb0cb7bb0U, 0x54fca854U, 0xbbd66dbbU, 0x163a2c16U, +}; +static const u32 Te3[256] = { + + 0x6363a5c6U, 0x7c7c84f8U, 0x777799eeU, 0x7b7b8df6U, + 0xf2f20dffU, 0x6b6bbdd6U, 0x6f6fb1deU, 0xc5c55491U, + 0x30305060U, 0x01010302U, 0x6767a9ceU, 0x2b2b7d56U, + 0xfefe19e7U, 0xd7d762b5U, 0xababe64dU, 0x76769aecU, + 0xcaca458fU, 0x82829d1fU, 0xc9c94089U, 0x7d7d87faU, + 0xfafa15efU, 0x5959ebb2U, 0x4747c98eU, 0xf0f00bfbU, + 0xadadec41U, 0xd4d467b3U, 0xa2a2fd5fU, 0xafafea45U, + 0x9c9cbf23U, 0xa4a4f753U, 0x727296e4U, 0xc0c05b9bU, + 0xb7b7c275U, 0xfdfd1ce1U, 0x9393ae3dU, 0x26266a4cU, + 0x36365a6cU, 0x3f3f417eU, 0xf7f702f5U, 0xcccc4f83U, + 0x34345c68U, 0xa5a5f451U, 0xe5e534d1U, 0xf1f108f9U, + 0x717193e2U, 0xd8d873abU, 0x31315362U, 0x15153f2aU, + 0x04040c08U, 0xc7c75295U, 0x23236546U, 0xc3c35e9dU, + 0x18182830U, 0x9696a137U, 0x05050f0aU, 0x9a9ab52fU, + 0x0707090eU, 0x12123624U, 0x80809b1bU, 0xe2e23ddfU, + 0xebeb26cdU, 0x2727694eU, 0xb2b2cd7fU, 0x75759feaU, + 0x09091b12U, 0x83839e1dU, 0x2c2c7458U, 0x1a1a2e34U, + 0x1b1b2d36U, 0x6e6eb2dcU, 0x5a5aeeb4U, 0xa0a0fb5bU, + 0x5252f6a4U, 0x3b3b4d76U, 0xd6d661b7U, 0xb3b3ce7dU, + 0x29297b52U, 0xe3e33eddU, 0x2f2f715eU, 0x84849713U, + 0x5353f5a6U, 0xd1d168b9U, 0x00000000U, 0xeded2cc1U, + 0x20206040U, 0xfcfc1fe3U, 0xb1b1c879U, 0x5b5bedb6U, + 0x6a6abed4U, 0xcbcb468dU, 0xbebed967U, 0x39394b72U, + 0x4a4ade94U, 0x4c4cd498U, 0x5858e8b0U, 0xcfcf4a85U, + 0xd0d06bbbU, 0xefef2ac5U, 0xaaaae54fU, 0xfbfb16edU, + 0x4343c586U, 0x4d4dd79aU, 0x33335566U, 0x85859411U, + 0x4545cf8aU, 0xf9f910e9U, 0x02020604U, 0x7f7f81feU, + 0x5050f0a0U, 0x3c3c4478U, 0x9f9fba25U, 0xa8a8e34bU, + 0x5151f3a2U, 0xa3a3fe5dU, 0x4040c080U, 0x8f8f8a05U, + 0x9292ad3fU, 0x9d9dbc21U, 0x38384870U, 0xf5f504f1U, + 0xbcbcdf63U, 0xb6b6c177U, 0xdada75afU, 0x21216342U, + 0x10103020U, 0xffff1ae5U, 0xf3f30efdU, 0xd2d26dbfU, + 0xcdcd4c81U, 0x0c0c1418U, 0x13133526U, 0xecec2fc3U, + 0x5f5fe1beU, 0x9797a235U, 0x4444cc88U, 0x1717392eU, + 0xc4c45793U, 0xa7a7f255U, 0x7e7e82fcU, 0x3d3d477aU, + 0x6464acc8U, 0x5d5de7baU, 0x19192b32U, 0x737395e6U, + 0x6060a0c0U, 0x81819819U, 0x4f4fd19eU, 0xdcdc7fa3U, + 0x22226644U, 0x2a2a7e54U, 0x9090ab3bU, 0x8888830bU, + 0x4646ca8cU, 0xeeee29c7U, 0xb8b8d36bU, 0x14143c28U, + 0xdede79a7U, 0x5e5ee2bcU, 0x0b0b1d16U, 0xdbdb76adU, + 0xe0e03bdbU, 0x32325664U, 0x3a3a4e74U, 0x0a0a1e14U, + 0x4949db92U, 0x06060a0cU, 0x24246c48U, 0x5c5ce4b8U, + 0xc2c25d9fU, 0xd3d36ebdU, 0xacacef43U, 0x6262a6c4U, + 0x9191a839U, 0x9595a431U, 0xe4e437d3U, 0x79798bf2U, + 0xe7e732d5U, 0xc8c8438bU, 0x3737596eU, 0x6d6db7daU, + 0x8d8d8c01U, 0xd5d564b1U, 0x4e4ed29cU, 0xa9a9e049U, + 0x6c6cb4d8U, 0x5656faacU, 0xf4f407f3U, 0xeaea25cfU, + 0x6565afcaU, 0x7a7a8ef4U, 0xaeaee947U, 0x08081810U, + 0xbabad56fU, 0x787888f0U, 0x25256f4aU, 0x2e2e725cU, + 0x1c1c2438U, 0xa6a6f157U, 0xb4b4c773U, 0xc6c65197U, + 0xe8e823cbU, 0xdddd7ca1U, 0x74749ce8U, 0x1f1f213eU, + 0x4b4bdd96U, 0xbdbddc61U, 0x8b8b860dU, 0x8a8a850fU, + 0x707090e0U, 0x3e3e427cU, 0xb5b5c471U, 0x6666aaccU, + 0x4848d890U, 0x03030506U, 0xf6f601f7U, 0x0e0e121cU, + 0x6161a3c2U, 0x35355f6aU, 0x5757f9aeU, 0xb9b9d069U, + 0x86869117U, 0xc1c15899U, 0x1d1d273aU, 0x9e9eb927U, + 0xe1e138d9U, 0xf8f813ebU, 0x9898b32bU, 0x11113322U, + 0x6969bbd2U, 0xd9d970a9U, 0x8e8e8907U, 0x9494a733U, + 0x9b9bb62dU, 0x1e1e223cU, 0x87879215U, 0xe9e920c9U, + 0xcece4987U, 0x5555ffaaU, 0x28287850U, 0xdfdf7aa5U, + 0x8c8c8f03U, 0xa1a1f859U, 0x89898009U, 0x0d0d171aU, + 0xbfbfda65U, 0xe6e631d7U, 0x4242c684U, 0x6868b8d0U, + 0x4141c382U, 0x9999b029U, 0x2d2d775aU, 0x0f0f111eU, + 0xb0b0cb7bU, 0x5454fca8U, 0xbbbbd66dU, 0x16163a2cU, +}; +static const u32 Te4[256] = { + 0x63636363U, 0x7c7c7c7cU, 0x77777777U, 0x7b7b7b7bU, + 0xf2f2f2f2U, 0x6b6b6b6bU, 0x6f6f6f6fU, 0xc5c5c5c5U, + 0x30303030U, 0x01010101U, 0x67676767U, 0x2b2b2b2bU, + 0xfefefefeU, 0xd7d7d7d7U, 0xababababU, 0x76767676U, + 0xcacacacaU, 0x82828282U, 0xc9c9c9c9U, 0x7d7d7d7dU, + 0xfafafafaU, 0x59595959U, 0x47474747U, 0xf0f0f0f0U, + 0xadadadadU, 0xd4d4d4d4U, 0xa2a2a2a2U, 0xafafafafU, + 0x9c9c9c9cU, 0xa4a4a4a4U, 0x72727272U, 0xc0c0c0c0U, + 0xb7b7b7b7U, 0xfdfdfdfdU, 0x93939393U, 0x26262626U, + 0x36363636U, 0x3f3f3f3fU, 0xf7f7f7f7U, 0xccccccccU, + 0x34343434U, 0xa5a5a5a5U, 0xe5e5e5e5U, 0xf1f1f1f1U, + 0x71717171U, 0xd8d8d8d8U, 0x31313131U, 0x15151515U, + 0x04040404U, 0xc7c7c7c7U, 0x23232323U, 0xc3c3c3c3U, + 0x18181818U, 0x96969696U, 0x05050505U, 0x9a9a9a9aU, + 0x07070707U, 0x12121212U, 0x80808080U, 0xe2e2e2e2U, + 0xebebebebU, 0x27272727U, 0xb2b2b2b2U, 0x75757575U, + 0x09090909U, 0x83838383U, 0x2c2c2c2cU, 0x1a1a1a1aU, + 0x1b1b1b1bU, 0x6e6e6e6eU, 0x5a5a5a5aU, 0xa0a0a0a0U, + 0x52525252U, 0x3b3b3b3bU, 0xd6d6d6d6U, 0xb3b3b3b3U, + 0x29292929U, 0xe3e3e3e3U, 0x2f2f2f2fU, 0x84848484U, + 0x53535353U, 0xd1d1d1d1U, 0x00000000U, 0xededededU, + 0x20202020U, 0xfcfcfcfcU, 0xb1b1b1b1U, 0x5b5b5b5bU, + 0x6a6a6a6aU, 0xcbcbcbcbU, 0xbebebebeU, 0x39393939U, + 0x4a4a4a4aU, 0x4c4c4c4cU, 0x58585858U, 0xcfcfcfcfU, + 0xd0d0d0d0U, 0xefefefefU, 0xaaaaaaaaU, 0xfbfbfbfbU, + 0x43434343U, 0x4d4d4d4dU, 0x33333333U, 0x85858585U, + 0x45454545U, 0xf9f9f9f9U, 0x02020202U, 0x7f7f7f7fU, + 0x50505050U, 0x3c3c3c3cU, 0x9f9f9f9fU, 0xa8a8a8a8U, + 0x51515151U, 0xa3a3a3a3U, 0x40404040U, 0x8f8f8f8fU, + 0x92929292U, 0x9d9d9d9dU, 0x38383838U, 0xf5f5f5f5U, + 0xbcbcbcbcU, 0xb6b6b6b6U, 0xdadadadaU, 0x21212121U, + 0x10101010U, 0xffffffffU, 0xf3f3f3f3U, 0xd2d2d2d2U, + 0xcdcdcdcdU, 0x0c0c0c0cU, 0x13131313U, 0xececececU, + 0x5f5f5f5fU, 0x97979797U, 0x44444444U, 0x17171717U, + 0xc4c4c4c4U, 0xa7a7a7a7U, 0x7e7e7e7eU, 0x3d3d3d3dU, + 0x64646464U, 0x5d5d5d5dU, 0x19191919U, 0x73737373U, + 0x60606060U, 0x81818181U, 0x4f4f4f4fU, 0xdcdcdcdcU, + 0x22222222U, 0x2a2a2a2aU, 0x90909090U, 0x88888888U, + 0x46464646U, 0xeeeeeeeeU, 0xb8b8b8b8U, 0x14141414U, + 0xdedededeU, 0x5e5e5e5eU, 0x0b0b0b0bU, 0xdbdbdbdbU, + 0xe0e0e0e0U, 0x32323232U, 0x3a3a3a3aU, 0x0a0a0a0aU, + 0x49494949U, 0x06060606U, 0x24242424U, 0x5c5c5c5cU, + 0xc2c2c2c2U, 0xd3d3d3d3U, 0xacacacacU, 0x62626262U, + 0x91919191U, 0x95959595U, 0xe4e4e4e4U, 0x79797979U, + 0xe7e7e7e7U, 0xc8c8c8c8U, 0x37373737U, 0x6d6d6d6dU, + 0x8d8d8d8dU, 0xd5d5d5d5U, 0x4e4e4e4eU, 0xa9a9a9a9U, + 0x6c6c6c6cU, 0x56565656U, 0xf4f4f4f4U, 0xeaeaeaeaU, + 0x65656565U, 0x7a7a7a7aU, 0xaeaeaeaeU, 0x08080808U, + 0xbabababaU, 0x78787878U, 0x25252525U, 0x2e2e2e2eU, + 0x1c1c1c1cU, 0xa6a6a6a6U, 0xb4b4b4b4U, 0xc6c6c6c6U, + 0xe8e8e8e8U, 0xddddddddU, 0x74747474U, 0x1f1f1f1fU, + 0x4b4b4b4bU, 0xbdbdbdbdU, 0x8b8b8b8bU, 0x8a8a8a8aU, + 0x70707070U, 0x3e3e3e3eU, 0xb5b5b5b5U, 0x66666666U, + 0x48484848U, 0x03030303U, 0xf6f6f6f6U, 0x0e0e0e0eU, + 0x61616161U, 0x35353535U, 0x57575757U, 0xb9b9b9b9U, + 0x86868686U, 0xc1c1c1c1U, 0x1d1d1d1dU, 0x9e9e9e9eU, + 0xe1e1e1e1U, 0xf8f8f8f8U, 0x98989898U, 0x11111111U, + 0x69696969U, 0xd9d9d9d9U, 0x8e8e8e8eU, 0x94949494U, + 0x9b9b9b9bU, 0x1e1e1e1eU, 0x87878787U, 0xe9e9e9e9U, + 0xcecececeU, 0x55555555U, 0x28282828U, 0xdfdfdfdfU, + 0x8c8c8c8cU, 0xa1a1a1a1U, 0x89898989U, 0x0d0d0d0dU, + 0xbfbfbfbfU, 0xe6e6e6e6U, 0x42424242U, 0x68686868U, + 0x41414141U, 0x99999999U, 0x2d2d2d2dU, 0x0f0f0f0fU, + 0xb0b0b0b0U, 0x54545454U, 0xbbbbbbbbU, 0x16161616U, +}; +static const u32 Td0[256] = { + 0x51f4a750U, 0x7e416553U, 0x1a17a4c3U, 0x3a275e96U, + 0x3bab6bcbU, 0x1f9d45f1U, 0xacfa58abU, 0x4be30393U, + 0x2030fa55U, 0xad766df6U, 0x88cc7691U, 0xf5024c25U, + 0x4fe5d7fcU, 0xc52acbd7U, 0x26354480U, 0xb562a38fU, + 0xdeb15a49U, 0x25ba1b67U, 0x45ea0e98U, 0x5dfec0e1U, + 0xc32f7502U, 0x814cf012U, 0x8d4697a3U, 0x6bd3f9c6U, + 0x038f5fe7U, 0x15929c95U, 0xbf6d7aebU, 0x955259daU, + 0xd4be832dU, 0x587421d3U, 0x49e06929U, 0x8ec9c844U, + 0x75c2896aU, 0xf48e7978U, 0x99583e6bU, 0x27b971ddU, + 0xbee14fb6U, 0xf088ad17U, 0xc920ac66U, 0x7dce3ab4U, + 0x63df4a18U, 0xe51a3182U, 0x97513360U, 0x62537f45U, + 0xb16477e0U, 0xbb6bae84U, 0xfe81a01cU, 0xf9082b94U, + 0x70486858U, 0x8f45fd19U, 0x94de6c87U, 0x527bf8b7U, + 0xab73d323U, 0x724b02e2U, 0xe31f8f57U, 0x6655ab2aU, + 0xb2eb2807U, 0x2fb5c203U, 0x86c57b9aU, 0xd33708a5U, + 0x302887f2U, 0x23bfa5b2U, 0x02036abaU, 0xed16825cU, + 0x8acf1c2bU, 0xa779b492U, 0xf307f2f0U, 0x4e69e2a1U, + 0x65daf4cdU, 0x0605bed5U, 0xd134621fU, 0xc4a6fe8aU, + 0x342e539dU, 0xa2f355a0U, 0x058ae132U, 0xa4f6eb75U, + 0x0b83ec39U, 0x4060efaaU, 0x5e719f06U, 0xbd6e1051U, + 0x3e218af9U, 0x96dd063dU, 0xdd3e05aeU, 0x4de6bd46U, + 0x91548db5U, 0x71c45d05U, 0x0406d46fU, 0x605015ffU, + 0x1998fb24U, 0xd6bde997U, 0x894043ccU, 0x67d99e77U, + 0xb0e842bdU, 0x07898b88U, 0xe7195b38U, 0x79c8eedbU, + 0xa17c0a47U, 0x7c420fe9U, 0xf8841ec9U, 0x00000000U, + 0x09808683U, 0x322bed48U, 0x1e1170acU, 0x6c5a724eU, + 0xfd0efffbU, 0x0f853856U, 0x3daed51eU, 0x362d3927U, + 0x0a0fd964U, 0x685ca621U, 0x9b5b54d1U, 0x24362e3aU, + 0x0c0a67b1U, 0x9357e70fU, 0xb4ee96d2U, 0x1b9b919eU, + 0x80c0c54fU, 0x61dc20a2U, 0x5a774b69U, 0x1c121a16U, + 0xe293ba0aU, 0xc0a02ae5U, 0x3c22e043U, 0x121b171dU, + 0x0e090d0bU, 0xf28bc7adU, 0x2db6a8b9U, 0x141ea9c8U, + 0x57f11985U, 0xaf75074cU, 0xee99ddbbU, 0xa37f60fdU, + 0xf701269fU, 0x5c72f5bcU, 0x44663bc5U, 0x5bfb7e34U, + 0x8b432976U, 0xcb23c6dcU, 0xb6edfc68U, 0xb8e4f163U, + 0xd731dccaU, 0x42638510U, 0x13972240U, 0x84c61120U, + 0x854a247dU, 0xd2bb3df8U, 0xaef93211U, 0xc729a16dU, + 0x1d9e2f4bU, 0xdcb230f3U, 0x0d8652ecU, 0x77c1e3d0U, + 0x2bb3166cU, 0xa970b999U, 0x119448faU, 0x47e96422U, + 0xa8fc8cc4U, 0xa0f03f1aU, 0x567d2cd8U, 0x223390efU, + 0x87494ec7U, 0xd938d1c1U, 0x8ccaa2feU, 0x98d40b36U, + 0xa6f581cfU, 0xa57ade28U, 0xdab78e26U, 0x3fadbfa4U, + 0x2c3a9de4U, 0x5078920dU, 0x6a5fcc9bU, 0x547e4662U, + 0xf68d13c2U, 0x90d8b8e8U, 0x2e39f75eU, 0x82c3aff5U, + 0x9f5d80beU, 0x69d0937cU, 0x6fd52da9U, 0xcf2512b3U, + 0xc8ac993bU, 0x10187da7U, 0xe89c636eU, 0xdb3bbb7bU, + 0xcd267809U, 0x6e5918f4U, 0xec9ab701U, 0x834f9aa8U, + 0xe6956e65U, 0xaaffe67eU, 0x21bccf08U, 0xef15e8e6U, + 0xbae79bd9U, 0x4a6f36ceU, 0xea9f09d4U, 0x29b07cd6U, + 0x31a4b2afU, 0x2a3f2331U, 0xc6a59430U, 0x35a266c0U, + 0x744ebc37U, 0xfc82caa6U, 0xe090d0b0U, 0x33a7d815U, + 0xf104984aU, 0x41ecdaf7U, 0x7fcd500eU, 0x1791f62fU, + 0x764dd68dU, 0x43efb04dU, 0xccaa4d54U, 0xe49604dfU, + 0x9ed1b5e3U, 0x4c6a881bU, 0xc12c1fb8U, 0x4665517fU, + 0x9d5eea04U, 0x018c355dU, 0xfa877473U, 0xfb0b412eU, + 0xb3671d5aU, 0x92dbd252U, 0xe9105633U, 0x6dd64713U, + 0x9ad7618cU, 0x37a10c7aU, 0x59f8148eU, 0xeb133c89U, + 0xcea927eeU, 0xb761c935U, 0xe11ce5edU, 0x7a47b13cU, + 0x9cd2df59U, 0x55f2733fU, 0x1814ce79U, 0x73c737bfU, + 0x53f7cdeaU, 0x5ffdaa5bU, 0xdf3d6f14U, 0x7844db86U, + 0xcaaff381U, 0xb968c43eU, 0x3824342cU, 0xc2a3405fU, + 0x161dc372U, 0xbce2250cU, 0x283c498bU, 0xff0d9541U, + 0x39a80171U, 0x080cb3deU, 0xd8b4e49cU, 0x6456c190U, + 0x7bcb8461U, 0xd532b670U, 0x486c5c74U, 0xd0b85742U, +}; +static const u32 Td1[256] = { + 0x5051f4a7U, 0x537e4165U, 0xc31a17a4U, 0x963a275eU, + 0xcb3bab6bU, 0xf11f9d45U, 0xabacfa58U, 0x934be303U, + 0x552030faU, 0xf6ad766dU, 0x9188cc76U, 0x25f5024cU, + 0xfc4fe5d7U, 0xd7c52acbU, 0x80263544U, 0x8fb562a3U, + 0x49deb15aU, 0x6725ba1bU, 0x9845ea0eU, 0xe15dfec0U, + 0x02c32f75U, 0x12814cf0U, 0xa38d4697U, 0xc66bd3f9U, + 0xe7038f5fU, 0x9515929cU, 0xebbf6d7aU, 0xda955259U, + 0x2dd4be83U, 0xd3587421U, 0x2949e069U, 0x448ec9c8U, + 0x6a75c289U, 0x78f48e79U, 0x6b99583eU, 0xdd27b971U, + 0xb6bee14fU, 0x17f088adU, 0x66c920acU, 0xb47dce3aU, + 0x1863df4aU, 0x82e51a31U, 0x60975133U, 0x4562537fU, + 0xe0b16477U, 0x84bb6baeU, 0x1cfe81a0U, 0x94f9082bU, + 0x58704868U, 0x198f45fdU, 0x8794de6cU, 0xb7527bf8U, + 0x23ab73d3U, 0xe2724b02U, 0x57e31f8fU, 0x2a6655abU, + 0x07b2eb28U, 0x032fb5c2U, 0x9a86c57bU, 0xa5d33708U, + 0xf2302887U, 0xb223bfa5U, 0xba02036aU, 0x5ced1682U, + 0x2b8acf1cU, 0x92a779b4U, 0xf0f307f2U, 0xa14e69e2U, + 0xcd65daf4U, 0xd50605beU, 0x1fd13462U, 0x8ac4a6feU, + 0x9d342e53U, 0xa0a2f355U, 0x32058ae1U, 0x75a4f6ebU, + 0x390b83ecU, 0xaa4060efU, 0x065e719fU, 0x51bd6e10U, + 0xf93e218aU, 0x3d96dd06U, 0xaedd3e05U, 0x464de6bdU, + 0xb591548dU, 0x0571c45dU, 0x6f0406d4U, 0xff605015U, + 0x241998fbU, 0x97d6bde9U, 0xcc894043U, 0x7767d99eU, + 0xbdb0e842U, 0x8807898bU, 0x38e7195bU, 0xdb79c8eeU, + 0x47a17c0aU, 0xe97c420fU, 0xc9f8841eU, 0x00000000U, + 0x83098086U, 0x48322bedU, 0xac1e1170U, 0x4e6c5a72U, + 0xfbfd0effU, 0x560f8538U, 0x1e3daed5U, 0x27362d39U, + 0x640a0fd9U, 0x21685ca6U, 0xd19b5b54U, 0x3a24362eU, + 0xb10c0a67U, 0x0f9357e7U, 0xd2b4ee96U, 0x9e1b9b91U, + 0x4f80c0c5U, 0xa261dc20U, 0x695a774bU, 0x161c121aU, + 0x0ae293baU, 0xe5c0a02aU, 0x433c22e0U, 0x1d121b17U, + 0x0b0e090dU, 0xadf28bc7U, 0xb92db6a8U, 0xc8141ea9U, + 0x8557f119U, 0x4caf7507U, 0xbbee99ddU, 0xfda37f60U, + 0x9ff70126U, 0xbc5c72f5U, 0xc544663bU, 0x345bfb7eU, + 0x768b4329U, 0xdccb23c6U, 0x68b6edfcU, 0x63b8e4f1U, + 0xcad731dcU, 0x10426385U, 0x40139722U, 0x2084c611U, + 0x7d854a24U, 0xf8d2bb3dU, 0x11aef932U, 0x6dc729a1U, + 0x4b1d9e2fU, 0xf3dcb230U, 0xec0d8652U, 0xd077c1e3U, + 0x6c2bb316U, 0x99a970b9U, 0xfa119448U, 0x2247e964U, + 0xc4a8fc8cU, 0x1aa0f03fU, 0xd8567d2cU, 0xef223390U, + 0xc787494eU, 0xc1d938d1U, 0xfe8ccaa2U, 0x3698d40bU, + 0xcfa6f581U, 0x28a57adeU, 0x26dab78eU, 0xa43fadbfU, + 0xe42c3a9dU, 0x0d507892U, 0x9b6a5fccU, 0x62547e46U, + 0xc2f68d13U, 0xe890d8b8U, 0x5e2e39f7U, 0xf582c3afU, + 0xbe9f5d80U, 0x7c69d093U, 0xa96fd52dU, 0xb3cf2512U, + 0x3bc8ac99U, 0xa710187dU, 0x6ee89c63U, 0x7bdb3bbbU, + 0x09cd2678U, 0xf46e5918U, 0x01ec9ab7U, 0xa8834f9aU, + 0x65e6956eU, 0x7eaaffe6U, 0x0821bccfU, 0xe6ef15e8U, + 0xd9bae79bU, 0xce4a6f36U, 0xd4ea9f09U, 0xd629b07cU, + 0xaf31a4b2U, 0x312a3f23U, 0x30c6a594U, 0xc035a266U, + 0x37744ebcU, 0xa6fc82caU, 0xb0e090d0U, 0x1533a7d8U, + 0x4af10498U, 0xf741ecdaU, 0x0e7fcd50U, 0x2f1791f6U, + 0x8d764dd6U, 0x4d43efb0U, 0x54ccaa4dU, 0xdfe49604U, + 0xe39ed1b5U, 0x1b4c6a88U, 0xb8c12c1fU, 0x7f466551U, + 0x049d5eeaU, 0x5d018c35U, 0x73fa8774U, 0x2efb0b41U, + 0x5ab3671dU, 0x5292dbd2U, 0x33e91056U, 0x136dd647U, + 0x8c9ad761U, 0x7a37a10cU, 0x8e59f814U, 0x89eb133cU, + 0xeecea927U, 0x35b761c9U, 0xede11ce5U, 0x3c7a47b1U, + 0x599cd2dfU, 0x3f55f273U, 0x791814ceU, 0xbf73c737U, + 0xea53f7cdU, 0x5b5ffdaaU, 0x14df3d6fU, 0x867844dbU, + 0x81caaff3U, 0x3eb968c4U, 0x2c382434U, 0x5fc2a340U, + 0x72161dc3U, 0x0cbce225U, 0x8b283c49U, 0x41ff0d95U, + 0x7139a801U, 0xde080cb3U, 0x9cd8b4e4U, 0x906456c1U, + 0x617bcb84U, 0x70d532b6U, 0x74486c5cU, 0x42d0b857U, +}; +static const u32 Td2[256] = { + 0xa75051f4U, 0x65537e41U, 0xa4c31a17U, 0x5e963a27U, + 0x6bcb3babU, 0x45f11f9dU, 0x58abacfaU, 0x03934be3U, + 0xfa552030U, 0x6df6ad76U, 0x769188ccU, 0x4c25f502U, + 0xd7fc4fe5U, 0xcbd7c52aU, 0x44802635U, 0xa38fb562U, + 0x5a49deb1U, 0x1b6725baU, 0x0e9845eaU, 0xc0e15dfeU, + 0x7502c32fU, 0xf012814cU, 0x97a38d46U, 0xf9c66bd3U, + 0x5fe7038fU, 0x9c951592U, 0x7aebbf6dU, 0x59da9552U, + 0x832dd4beU, 0x21d35874U, 0x692949e0U, 0xc8448ec9U, + 0x896a75c2U, 0x7978f48eU, 0x3e6b9958U, 0x71dd27b9U, + 0x4fb6bee1U, 0xad17f088U, 0xac66c920U, 0x3ab47dceU, + 0x4a1863dfU, 0x3182e51aU, 0x33609751U, 0x7f456253U, + 0x77e0b164U, 0xae84bb6bU, 0xa01cfe81U, 0x2b94f908U, + 0x68587048U, 0xfd198f45U, 0x6c8794deU, 0xf8b7527bU, + 0xd323ab73U, 0x02e2724bU, 0x8f57e31fU, 0xab2a6655U, + 0x2807b2ebU, 0xc2032fb5U, 0x7b9a86c5U, 0x08a5d337U, + 0x87f23028U, 0xa5b223bfU, 0x6aba0203U, 0x825ced16U, + 0x1c2b8acfU, 0xb492a779U, 0xf2f0f307U, 0xe2a14e69U, + 0xf4cd65daU, 0xbed50605U, 0x621fd134U, 0xfe8ac4a6U, + 0x539d342eU, 0x55a0a2f3U, 0xe132058aU, 0xeb75a4f6U, + 0xec390b83U, 0xefaa4060U, 0x9f065e71U, 0x1051bd6eU, + + 0x8af93e21U, 0x063d96ddU, 0x05aedd3eU, 0xbd464de6U, + 0x8db59154U, 0x5d0571c4U, 0xd46f0406U, 0x15ff6050U, + 0xfb241998U, 0xe997d6bdU, 0x43cc8940U, 0x9e7767d9U, + 0x42bdb0e8U, 0x8b880789U, 0x5b38e719U, 0xeedb79c8U, + 0x0a47a17cU, 0x0fe97c42U, 0x1ec9f884U, 0x00000000U, + 0x86830980U, 0xed48322bU, 0x70ac1e11U, 0x724e6c5aU, + 0xfffbfd0eU, 0x38560f85U, 0xd51e3daeU, 0x3927362dU, + 0xd9640a0fU, 0xa621685cU, 0x54d19b5bU, 0x2e3a2436U, + 0x67b10c0aU, 0xe70f9357U, 0x96d2b4eeU, 0x919e1b9bU, + 0xc54f80c0U, 0x20a261dcU, 0x4b695a77U, 0x1a161c12U, + 0xba0ae293U, 0x2ae5c0a0U, 0xe0433c22U, 0x171d121bU, + 0x0d0b0e09U, 0xc7adf28bU, 0xa8b92db6U, 0xa9c8141eU, + 0x198557f1U, 0x074caf75U, 0xddbbee99U, 0x60fda37fU, + 0x269ff701U, 0xf5bc5c72U, 0x3bc54466U, 0x7e345bfbU, + 0x29768b43U, 0xc6dccb23U, 0xfc68b6edU, 0xf163b8e4U, + 0xdccad731U, 0x85104263U, 0x22401397U, 0x112084c6U, + 0x247d854aU, 0x3df8d2bbU, 0x3211aef9U, 0xa16dc729U, + 0x2f4b1d9eU, 0x30f3dcb2U, 0x52ec0d86U, 0xe3d077c1U, + 0x166c2bb3U, 0xb999a970U, 0x48fa1194U, 0x642247e9U, + 0x8cc4a8fcU, 0x3f1aa0f0U, 0x2cd8567dU, 0x90ef2233U, + 0x4ec78749U, 0xd1c1d938U, 0xa2fe8ccaU, 0x0b3698d4U, + 0x81cfa6f5U, 0xde28a57aU, 0x8e26dab7U, 0xbfa43fadU, + 0x9de42c3aU, 0x920d5078U, 0xcc9b6a5fU, 0x4662547eU, + 0x13c2f68dU, 0xb8e890d8U, 0xf75e2e39U, 0xaff582c3U, + 0x80be9f5dU, 0x937c69d0U, 0x2da96fd5U, 0x12b3cf25U, + 0x993bc8acU, 0x7da71018U, 0x636ee89cU, 0xbb7bdb3bU, + 0x7809cd26U, 0x18f46e59U, 0xb701ec9aU, 0x9aa8834fU, + 0x6e65e695U, 0xe67eaaffU, 0xcf0821bcU, 0xe8e6ef15U, + 0x9bd9bae7U, 0x36ce4a6fU, 0x09d4ea9fU, 0x7cd629b0U, + 0xb2af31a4U, 0x23312a3fU, 0x9430c6a5U, 0x66c035a2U, + 0xbc37744eU, 0xcaa6fc82U, 0xd0b0e090U, 0xd81533a7U, + 0x984af104U, 0xdaf741ecU, 0x500e7fcdU, 0xf62f1791U, + 0xd68d764dU, 0xb04d43efU, 0x4d54ccaaU, 0x04dfe496U, + 0xb5e39ed1U, 0x881b4c6aU, 0x1fb8c12cU, 0x517f4665U, + 0xea049d5eU, 0x355d018cU, 0x7473fa87U, 0x412efb0bU, + 0x1d5ab367U, 0xd25292dbU, 0x5633e910U, 0x47136dd6U, + 0x618c9ad7U, 0x0c7a37a1U, 0x148e59f8U, 0x3c89eb13U, + 0x27eecea9U, 0xc935b761U, 0xe5ede11cU, 0xb13c7a47U, + 0xdf599cd2U, 0x733f55f2U, 0xce791814U, 0x37bf73c7U, + 0xcdea53f7U, 0xaa5b5ffdU, 0x6f14df3dU, 0xdb867844U, + 0xf381caafU, 0xc43eb968U, 0x342c3824U, 0x405fc2a3U, + 0xc372161dU, 0x250cbce2U, 0x498b283cU, 0x9541ff0dU, + 0x017139a8U, 0xb3de080cU, 0xe49cd8b4U, 0xc1906456U, + 0x84617bcbU, 0xb670d532U, 0x5c74486cU, 0x5742d0b8U, +}; +static const u32 Td3[256] = { + 0xf4a75051U, 0x4165537eU, 0x17a4c31aU, 0x275e963aU, + 0xab6bcb3bU, 0x9d45f11fU, 0xfa58abacU, 0xe303934bU, + 0x30fa5520U, 0x766df6adU, 0xcc769188U, 0x024c25f5U, + 0xe5d7fc4fU, 0x2acbd7c5U, 0x35448026U, 0x62a38fb5U, + 0xb15a49deU, 0xba1b6725U, 0xea0e9845U, 0xfec0e15dU, + 0x2f7502c3U, 0x4cf01281U, 0x4697a38dU, 0xd3f9c66bU, + 0x8f5fe703U, 0x929c9515U, 0x6d7aebbfU, 0x5259da95U, + 0xbe832dd4U, 0x7421d358U, 0xe0692949U, 0xc9c8448eU, + 0xc2896a75U, 0x8e7978f4U, 0x583e6b99U, 0xb971dd27U, + 0xe14fb6beU, 0x88ad17f0U, 0x20ac66c9U, 0xce3ab47dU, + 0xdf4a1863U, 0x1a3182e5U, 0x51336097U, 0x537f4562U, + 0x6477e0b1U, 0x6bae84bbU, 0x81a01cfeU, 0x082b94f9U, + 0x48685870U, 0x45fd198fU, 0xde6c8794U, 0x7bf8b752U, + 0x73d323abU, 0x4b02e272U, 0x1f8f57e3U, 0x55ab2a66U, + 0xeb2807b2U, 0xb5c2032fU, 0xc57b9a86U, 0x3708a5d3U, + 0x2887f230U, 0xbfa5b223U, 0x036aba02U, 0x16825cedU, + 0xcf1c2b8aU, 0x79b492a7U, 0x07f2f0f3U, 0x69e2a14eU, + 0xdaf4cd65U, 0x05bed506U, 0x34621fd1U, 0xa6fe8ac4U, + 0x2e539d34U, 0xf355a0a2U, 0x8ae13205U, 0xf6eb75a4U, + 0x83ec390bU, 0x60efaa40U, 0x719f065eU, 0x6e1051bdU, + 0x218af93eU, 0xdd063d96U, 0x3e05aeddU, 0xe6bd464dU, + 0x548db591U, 0xc45d0571U, 0x06d46f04U, 0x5015ff60U, + 0x98fb2419U, 0xbde997d6U, 0x4043cc89U, 0xd99e7767U, + 0xe842bdb0U, 0x898b8807U, 0x195b38e7U, 0xc8eedb79U, + 0x7c0a47a1U, 0x420fe97cU, 0x841ec9f8U, 0x00000000U, + 0x80868309U, 0x2bed4832U, 0x1170ac1eU, 0x5a724e6cU, + 0x0efffbfdU, 0x8538560fU, 0xaed51e3dU, 0x2d392736U, + 0x0fd9640aU, 0x5ca62168U, 0x5b54d19bU, 0x362e3a24U, + 0x0a67b10cU, 0x57e70f93U, 0xee96d2b4U, 0x9b919e1bU, + 0xc0c54f80U, 0xdc20a261U, 0x774b695aU, 0x121a161cU, + 0x93ba0ae2U, 0xa02ae5c0U, 0x22e0433cU, 0x1b171d12U, + 0x090d0b0eU, 0x8bc7adf2U, 0xb6a8b92dU, 0x1ea9c814U, + 0xf1198557U, 0x75074cafU, 0x99ddbbeeU, 0x7f60fda3U, + 0x01269ff7U, 0x72f5bc5cU, 0x663bc544U, 0xfb7e345bU, + 0x4329768bU, 0x23c6dccbU, 0xedfc68b6U, 0xe4f163b8U, + 0x31dccad7U, 0x63851042U, 0x97224013U, 0xc6112084U, + 0x4a247d85U, 0xbb3df8d2U, 0xf93211aeU, 0x29a16dc7U, + 0x9e2f4b1dU, 0xb230f3dcU, 0x8652ec0dU, 0xc1e3d077U, + 0xb3166c2bU, 0x70b999a9U, 0x9448fa11U, 0xe9642247U, + 0xfc8cc4a8U, 0xf03f1aa0U, 0x7d2cd856U, 0x3390ef22U, + 0x494ec787U, 0x38d1c1d9U, 0xcaa2fe8cU, 0xd40b3698U, + 0xf581cfa6U, 0x7ade28a5U, 0xb78e26daU, 0xadbfa43fU, + 0x3a9de42cU, 0x78920d50U, 0x5fcc9b6aU, 0x7e466254U, + 0x8d13c2f6U, 0xd8b8e890U, 0x39f75e2eU, 0xc3aff582U, + 0x5d80be9fU, 0xd0937c69U, 0xd52da96fU, 0x2512b3cfU, + 0xac993bc8U, 0x187da710U, 0x9c636ee8U, 0x3bbb7bdbU, + 0x267809cdU, 0x5918f46eU, 0x9ab701ecU, 0x4f9aa883U, + 0x956e65e6U, 0xffe67eaaU, 0xbccf0821U, 0x15e8e6efU, + 0xe79bd9baU, 0x6f36ce4aU, 0x9f09d4eaU, 0xb07cd629U, + 0xa4b2af31U, 0x3f23312aU, 0xa59430c6U, 0xa266c035U, + 0x4ebc3774U, 0x82caa6fcU, 0x90d0b0e0U, 0xa7d81533U, + 0x04984af1U, 0xecdaf741U, 0xcd500e7fU, 0x91f62f17U, + 0x4dd68d76U, 0xefb04d43U, 0xaa4d54ccU, 0x9604dfe4U, + 0xd1b5e39eU, 0x6a881b4cU, 0x2c1fb8c1U, 0x65517f46U, + 0x5eea049dU, 0x8c355d01U, 0x877473faU, 0x0b412efbU, + 0x671d5ab3U, 0xdbd25292U, 0x105633e9U, 0xd647136dU, + 0xd7618c9aU, 0xa10c7a37U, 0xf8148e59U, 0x133c89ebU, + 0xa927eeceU, 0x61c935b7U, 0x1ce5ede1U, 0x47b13c7aU, + 0xd2df599cU, 0xf2733f55U, 0x14ce7918U, 0xc737bf73U, + 0xf7cdea53U, 0xfdaa5b5fU, 0x3d6f14dfU, 0x44db8678U, + 0xaff381caU, 0x68c43eb9U, 0x24342c38U, 0xa3405fc2U, + 0x1dc37216U, 0xe2250cbcU, 0x3c498b28U, 0x0d9541ffU, + 0xa8017139U, 0x0cb3de08U, 0xb4e49cd8U, 0x56c19064U, + 0xcb84617bU, 0x32b670d5U, 0x6c5c7448U, 0xb85742d0U, +}; +static const u32 Td4[256] = { + 0x52525252U, 0x09090909U, 0x6a6a6a6aU, 0xd5d5d5d5U, + 0x30303030U, 0x36363636U, 0xa5a5a5a5U, 0x38383838U, + 0xbfbfbfbfU, 0x40404040U, 0xa3a3a3a3U, 0x9e9e9e9eU, + 0x81818181U, 0xf3f3f3f3U, 0xd7d7d7d7U, 0xfbfbfbfbU, + 0x7c7c7c7cU, 0xe3e3e3e3U, 0x39393939U, 0x82828282U, + 0x9b9b9b9bU, 0x2f2f2f2fU, 0xffffffffU, 0x87878787U, + 0x34343434U, 0x8e8e8e8eU, 0x43434343U, 0x44444444U, + 0xc4c4c4c4U, 0xdedededeU, 0xe9e9e9e9U, 0xcbcbcbcbU, + 0x54545454U, 0x7b7b7b7bU, 0x94949494U, 0x32323232U, + 0xa6a6a6a6U, 0xc2c2c2c2U, 0x23232323U, 0x3d3d3d3dU, + 0xeeeeeeeeU, 0x4c4c4c4cU, 0x95959595U, 0x0b0b0b0bU, + 0x42424242U, 0xfafafafaU, 0xc3c3c3c3U, 0x4e4e4e4eU, + 0x08080808U, 0x2e2e2e2eU, 0xa1a1a1a1U, 0x66666666U, + 0x28282828U, 0xd9d9d9d9U, 0x24242424U, 0xb2b2b2b2U, + 0x76767676U, 0x5b5b5b5bU, 0xa2a2a2a2U, 0x49494949U, + 0x6d6d6d6dU, 0x8b8b8b8bU, 0xd1d1d1d1U, 0x25252525U, + 0x72727272U, 0xf8f8f8f8U, 0xf6f6f6f6U, 0x64646464U, + 0x86868686U, 0x68686868U, 0x98989898U, 0x16161616U, + 0xd4d4d4d4U, 0xa4a4a4a4U, 0x5c5c5c5cU, 0xccccccccU, + 0x5d5d5d5dU, 0x65656565U, 0xb6b6b6b6U, 0x92929292U, + 0x6c6c6c6cU, 0x70707070U, 0x48484848U, 0x50505050U, + 0xfdfdfdfdU, 0xededededU, 0xb9b9b9b9U, 0xdadadadaU, + 0x5e5e5e5eU, 0x15151515U, 0x46464646U, 0x57575757U, + 0xa7a7a7a7U, 0x8d8d8d8dU, 0x9d9d9d9dU, 0x84848484U, + 0x90909090U, 0xd8d8d8d8U, 0xababababU, 0x00000000U, + 0x8c8c8c8cU, 0xbcbcbcbcU, 0xd3d3d3d3U, 0x0a0a0a0aU, + 0xf7f7f7f7U, 0xe4e4e4e4U, 0x58585858U, 0x05050505U, + 0xb8b8b8b8U, 0xb3b3b3b3U, 0x45454545U, 0x06060606U, + 0xd0d0d0d0U, 0x2c2c2c2cU, 0x1e1e1e1eU, 0x8f8f8f8fU, + 0xcacacacaU, 0x3f3f3f3fU, 0x0f0f0f0fU, 0x02020202U, + 0xc1c1c1c1U, 0xafafafafU, 0xbdbdbdbdU, 0x03030303U, + 0x01010101U, 0x13131313U, 0x8a8a8a8aU, 0x6b6b6b6bU, + 0x3a3a3a3aU, 0x91919191U, 0x11111111U, 0x41414141U, + 0x4f4f4f4fU, 0x67676767U, 0xdcdcdcdcU, 0xeaeaeaeaU, + 0x97979797U, 0xf2f2f2f2U, 0xcfcfcfcfU, 0xcecececeU, + 0xf0f0f0f0U, 0xb4b4b4b4U, 0xe6e6e6e6U, 0x73737373U, + 0x96969696U, 0xacacacacU, 0x74747474U, 0x22222222U, + 0xe7e7e7e7U, 0xadadadadU, 0x35353535U, 0x85858585U, + 0xe2e2e2e2U, 0xf9f9f9f9U, 0x37373737U, 0xe8e8e8e8U, + 0x1c1c1c1cU, 0x75757575U, 0xdfdfdfdfU, 0x6e6e6e6eU, + 0x47474747U, 0xf1f1f1f1U, 0x1a1a1a1aU, 0x71717171U, + 0x1d1d1d1dU, 0x29292929U, 0xc5c5c5c5U, 0x89898989U, + 0x6f6f6f6fU, 0xb7b7b7b7U, 0x62626262U, 0x0e0e0e0eU, + 0xaaaaaaaaU, 0x18181818U, 0xbebebebeU, 0x1b1b1b1bU, + 0xfcfcfcfcU, 0x56565656U, 0x3e3e3e3eU, 0x4b4b4b4bU, + 0xc6c6c6c6U, 0xd2d2d2d2U, 0x79797979U, 0x20202020U, + 0x9a9a9a9aU, 0xdbdbdbdbU, 0xc0c0c0c0U, 0xfefefefeU, + 0x78787878U, 0xcdcdcdcdU, 0x5a5a5a5aU, 0xf4f4f4f4U, + 0x1f1f1f1fU, 0xddddddddU, 0xa8a8a8a8U, 0x33333333U, + 0x88888888U, 0x07070707U, 0xc7c7c7c7U, 0x31313131U, + 0xb1b1b1b1U, 0x12121212U, 0x10101010U, 0x59595959U, + 0x27272727U, 0x80808080U, 0xececececU, 0x5f5f5f5fU, + 0x60606060U, 0x51515151U, 0x7f7f7f7fU, 0xa9a9a9a9U, + 0x19191919U, 0xb5b5b5b5U, 0x4a4a4a4aU, 0x0d0d0d0dU, + 0x2d2d2d2dU, 0xe5e5e5e5U, 0x7a7a7a7aU, 0x9f9f9f9fU, + 0x93939393U, 0xc9c9c9c9U, 0x9c9c9c9cU, 0xefefefefU, + 0xa0a0a0a0U, 0xe0e0e0e0U, 0x3b3b3b3bU, 0x4d4d4d4dU, + 0xaeaeaeaeU, 0x2a2a2a2aU, 0xf5f5f5f5U, 0xb0b0b0b0U, + 0xc8c8c8c8U, 0xebebebebU, 0xbbbbbbbbU, 0x3c3c3c3cU, + 0x83838383U, 0x53535353U, 0x99999999U, 0x61616161U, + 0x17171717U, 0x2b2b2b2bU, 0x04040404U, 0x7e7e7e7eU, + 0xbabababaU, 0x77777777U, 0xd6d6d6d6U, 0x26262626U, + 0xe1e1e1e1U, 0x69696969U, 0x14141414U, 0x63636363U, + 0x55555555U, 0x21212121U, 0x0c0c0c0cU, 0x7d7d7d7dU, +}; +static const u32 rcon[] = { + 0x01000000, 0x02000000, 0x04000000, 0x08000000, + 0x10000000, 0x20000000, 0x40000000, 0x80000000, + 0x1B000000, 0x36000000, /* for 128-bit blocks, Rijndael never uses more than 10 rcon values */ +}; + +#define SWAP(x) (_lrotl(x, 8) & 0x00ff00ff | _lrotr(x, 8) & 0xff00ff00) + +#ifdef _MSC_VER +#define GETU32(p) SWAP(*((u32 *)(p))) +#define PUTU32(ct, st) { *((u32 *)(ct)) = SWAP((st)); } +#else +#define GETU32(pt) (((u32)(pt)[0] << 24) ^ ((u32)(pt)[1] << 16) ^ ((u32)(pt)[2] << 8) ^ ((u32)(pt)[3])) +#define PUTU32(ct, st) { (ct)[0] = (u8)((st) >> 24); (ct)[1] = (u8)((st) >> 16); (ct)[2] = (u8)((st) >> 8); (ct)[3] = (u8)(st); } +#endif + +/** + * Expand the cipher key into the encryption key schedule. + * + * @return the number of rounds for the given cipher key size. + */ +int rijndaelKeySetupEnc(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int keyBits) { + int i = 0; + u32 temp; + + rk[0] = GETU32(cipherKey ); + rk[1] = GETU32(cipherKey + 4); + rk[2] = GETU32(cipherKey + 8); + rk[3] = GETU32(cipherKey + 12); + if (keyBits == 128) { + for (;;) { + temp = rk[3]; + rk[4] = rk[0] ^ + (Te4[(temp >> 16) & 0xff] & 0xff000000) ^ + (Te4[(temp >> 8) & 0xff] & 0x00ff0000) ^ + (Te4[(temp ) & 0xff] & 0x0000ff00) ^ + (Te4[(temp >> 24) ] & 0x000000ff) ^ + rcon[i]; + rk[5] = rk[1] ^ rk[4]; + rk[6] = rk[2] ^ rk[5]; + rk[7] = rk[3] ^ rk[6]; + if (++i == 10) { + return 10; + } + rk += 4; + } + } + rk[4] = GETU32(cipherKey + 16); + rk[5] = GETU32(cipherKey + 20); + if (keyBits == 192) { + for (;;) { + temp = rk[ 5]; + rk[ 6] = rk[ 0] ^ + (Te4[(temp >> 16) & 0xff] & 0xff000000) ^ + (Te4[(temp >> 8) & 0xff] & 0x00ff0000) ^ + (Te4[(temp ) & 0xff] & 0x0000ff00) ^ + (Te4[(temp >> 24) ] & 0x000000ff) ^ + rcon[i]; + rk[ 7] = rk[ 1] ^ rk[ 6]; + rk[ 8] = rk[ 2] ^ rk[ 7]; + rk[ 9] = rk[ 3] ^ rk[ 8]; + if (++i == 8) { + return 12; + } + rk[10] = rk[ 4] ^ rk[ 9]; + rk[11] = rk[ 5] ^ rk[10]; + rk += 6; + } + } + rk[6] = GETU32(cipherKey + 24); + rk[7] = GETU32(cipherKey + 28); + if (keyBits == 256) { + for (;;) { + temp = rk[ 7]; + rk[ 8] = rk[ 0] ^ + (Te4[(temp >> 16) & 0xff] & 0xff000000) ^ + (Te4[(temp >> 8) & 0xff] & 0x00ff0000) ^ + (Te4[(temp ) & 0xff] & 0x0000ff00) ^ + (Te4[(temp >> 24) ] & 0x000000ff) ^ + rcon[i]; + rk[ 9] = rk[ 1] ^ rk[ 8]; + rk[10] = rk[ 2] ^ rk[ 9]; + rk[11] = rk[ 3] ^ rk[10]; + if (++i == 7) { + return 14; + } + temp = rk[11]; + rk[12] = rk[ 4] ^ + (Te4[(temp >> 24) ] & 0xff000000) ^ + (Te4[(temp >> 16) & 0xff] & 0x00ff0000) ^ + (Te4[(temp >> 8) & 0xff] & 0x0000ff00) ^ + (Te4[(temp ) & 0xff] & 0x000000ff); + rk[13] = rk[ 5] ^ rk[12]; + rk[14] = rk[ 6] ^ rk[13]; + rk[15] = rk[ 7] ^ rk[14]; + + rk += 8; + } + } + return 0; +} + +/** + * Expand the cipher key into the decryption key schedule. + * + * @return the number of rounds for the given cipher key size. + */ +int rijndaelKeySetupDec(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int keyBits) { + int Nr, i, j; + u32 temp; + + /* expand the cipher key: */ + Nr = rijndaelKeySetupEnc(rk, cipherKey, keyBits); + /* invert the order of the round keys: */ + for (i = 0, j = 4*Nr; i < j; i += 4, j -= 4) { + temp = rk[i ]; rk[i ] = rk[j ]; rk[j ] = temp; + temp = rk[i + 1]; rk[i + 1] = rk[j + 1]; rk[j + 1] = temp; + temp = rk[i + 2]; rk[i + 2] = rk[j + 2]; rk[j + 2] = temp; + temp = rk[i + 3]; rk[i + 3] = rk[j + 3]; rk[j + 3] = temp; + } + /* apply the inverse MixColumn transform to all round keys but the first and the last: */ + for (i = 1; i < Nr; i++) { + rk += 4; + rk[0] = + Td0[Te4[(rk[0] >> 24) ] & 0xff] ^ + Td1[Te4[(rk[0] >> 16) & 0xff] & 0xff] ^ + Td2[Te4[(rk[0] >> 8) & 0xff] & 0xff] ^ + Td3[Te4[(rk[0] ) & 0xff] & 0xff]; + rk[1] = + Td0[Te4[(rk[1] >> 24) ] & 0xff] ^ + Td1[Te4[(rk[1] >> 16) & 0xff] & 0xff] ^ + Td2[Te4[(rk[1] >> 8) & 0xff] & 0xff] ^ + Td3[Te4[(rk[1] ) & 0xff] & 0xff]; + rk[2] = + Td0[Te4[(rk[2] >> 24) ] & 0xff] ^ + Td1[Te4[(rk[2] >> 16) & 0xff] & 0xff] ^ + Td2[Te4[(rk[2] >> 8) & 0xff] & 0xff] ^ + Td3[Te4[(rk[2] ) & 0xff] & 0xff]; + rk[3] = + Td0[Te4[(rk[3] >> 24) ] & 0xff] ^ + Td1[Te4[(rk[3] >> 16) & 0xff] & 0xff] ^ + Td2[Te4[(rk[3] >> 8) & 0xff] & 0xff] ^ + Td3[Te4[(rk[3] ) & 0xff] & 0xff]; + } + return Nr; +} + +void rijndaelEncrypt(const u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 pt[16], u8 ct[16]) { + u32 s0, s1, s2, s3, t0, t1, t2, t3; +#ifndef FULL_UNROLL + int r; +#endif /* ?FULL_UNROLL */ + + /* + * map byte array block to cipher state + * and add initial round key: + */ + s0 = GETU32(pt ) ^ rk[0]; + s1 = GETU32(pt + 4) ^ rk[1]; + s2 = GETU32(pt + 8) ^ rk[2]; + s3 = GETU32(pt + 12) ^ rk[3]; +#ifdef FULL_UNROLL + /* round 1: */ + t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[ 4]; + t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[ 5]; + t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[ 6]; + t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[ 7]; + /* round 2: */ + s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[ 8]; + s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[ 9]; + s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[10]; + s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[11]; + /* round 3: */ + t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[12]; + t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[13]; + t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[14]; + t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[15]; + /* round 4: */ + s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[16]; + s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[17]; + s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[18]; + s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[19]; + /* round 5: */ + t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[20]; + t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[21]; + t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[22]; + t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[23]; + /* round 6: */ + s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[24]; + s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[25]; + s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[26]; + s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[27]; + /* round 7: */ + t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[28]; + t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[29]; + t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[30]; + t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[31]; + /* round 8: */ + s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[32]; + s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[33]; + s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[34]; + s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[35]; + /* round 9: */ + t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[36]; + t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[37]; + t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[38]; + t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[39]; + if (Nr > 10) { + /* round 10: */ + s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[40]; + s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[41]; + s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[42]; + s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[43]; + /* round 11: */ + t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[44]; + t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[45]; + t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[46]; + t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[47]; + if (Nr > 12) { + /* round 12: */ + s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[48]; + s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[49]; + s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[50]; + s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[51]; + /* round 13: */ + t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[52]; + t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[53]; + t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[54]; + t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[55]; + } + } + rk += Nr << 2; +#else /* !FULL_UNROLL */ + /* + * Nr - 1 full rounds: + */ + r = Nr >> 1; + for (;;) { + t0 = + Te0[(s0 >> 24) ] ^ + Te1[(s1 >> 16) & 0xff] ^ + Te2[(s2 >> 8) & 0xff] ^ + Te3[(s3 ) & 0xff] ^ + rk[4]; + t1 = + Te0[(s1 >> 24) ] ^ + Te1[(s2 >> 16) & 0xff] ^ + Te2[(s3 >> 8) & 0xff] ^ + Te3[(s0 ) & 0xff] ^ + rk[5]; + t2 = + Te0[(s2 >> 24) ] ^ + Te1[(s3 >> 16) & 0xff] ^ + Te2[(s0 >> 8) & 0xff] ^ + Te3[(s1 ) & 0xff] ^ + rk[6]; + t3 = + Te0[(s3 >> 24) ] ^ + Te1[(s0 >> 16) & 0xff] ^ + Te2[(s1 >> 8) & 0xff] ^ + Te3[(s2 ) & 0xff] ^ + rk[7]; + + rk += 8; + if (--r == 0) { + break; + } + + s0 = + Te0[(t0 >> 24) ] ^ + Te1[(t1 >> 16) & 0xff] ^ + Te2[(t2 >> 8) & 0xff] ^ + Te3[(t3 ) & 0xff] ^ + rk[0]; + s1 = + Te0[(t1 >> 24) ] ^ + Te1[(t2 >> 16) & 0xff] ^ + Te2[(t3 >> 8) & 0xff] ^ + Te3[(t0 ) & 0xff] ^ + rk[1]; + s2 = + Te0[(t2 >> 24) ] ^ + Te1[(t3 >> 16) & 0xff] ^ + Te2[(t0 >> 8) & 0xff] ^ + Te3[(t1 ) & 0xff] ^ + rk[2]; + s3 = + Te0[(t3 >> 24) ] ^ + Te1[(t0 >> 16) & 0xff] ^ + Te2[(t1 >> 8) & 0xff] ^ + Te3[(t2 ) & 0xff] ^ + rk[3]; + } +#endif /* ?FULL_UNROLL */ + /* + * apply last round and + * map cipher state to byte array block: + */ + s0 = + (Te4[(t0 >> 24) ] & 0xff000000) ^ + (Te4[(t1 >> 16) & 0xff] & 0x00ff0000) ^ + (Te4[(t2 >> 8) & 0xff] & 0x0000ff00) ^ + (Te4[(t3 ) & 0xff] & 0x000000ff) ^ + rk[0]; + PUTU32(ct , s0); + s1 = + (Te4[(t1 >> 24) ] & 0xff000000) ^ + (Te4[(t2 >> 16) & 0xff] & 0x00ff0000) ^ + (Te4[(t3 >> 8) & 0xff] & 0x0000ff00) ^ + (Te4[(t0 ) & 0xff] & 0x000000ff) ^ + rk[1]; + PUTU32(ct + 4, s1); + s2 = + (Te4[(t2 >> 24) ] & 0xff000000) ^ + (Te4[(t3 >> 16) & 0xff] & 0x00ff0000) ^ + (Te4[(t0 >> 8) & 0xff] & 0x0000ff00) ^ + (Te4[(t1 ) & 0xff] & 0x000000ff) ^ + rk[2]; + PUTU32(ct + 8, s2); + s3 = + (Te4[(t3 >> 24) ] & 0xff000000) ^ + (Te4[(t0 >> 16) & 0xff] & 0x00ff0000) ^ + (Te4[(t1 >> 8) & 0xff] & 0x0000ff00) ^ + (Te4[(t2 ) & 0xff] & 0x000000ff) ^ + rk[3]; + PUTU32(ct + 12, s3); +} + +void rijndaelDecrypt(const u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 ct[16], u8 pt[16]) { + u32 s0, s1, s2, s3, t0, t1, t2, t3; +#ifndef FULL_UNROLL + int r; +#endif /* ?FULL_UNROLL */ + + /* + * map byte array block to cipher state + * and add initial round key: + */ + s0 = GETU32(ct ) ^ rk[0]; + s1 = GETU32(ct + 4) ^ rk[1]; + s2 = GETU32(ct + 8) ^ rk[2]; + s3 = GETU32(ct + 12) ^ rk[3]; +#ifdef FULL_UNROLL + /* round 1: */ + t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[ 4]; + t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[ 5]; + t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[ 6]; + t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[ 7]; + /* round 2: */ + s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[ 8]; + s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[ 9]; + s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[10]; + s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[11]; + /* round 3: */ + t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[12]; + t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[13]; + t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[14]; + t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[15]; + /* round 4: */ + s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[16]; + s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[17]; + s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[18]; + s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[19]; + /* round 5: */ + t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[20]; + t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[21]; + t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[22]; + t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[23]; + /* round 6: */ + s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[24]; + s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[25]; + s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[26]; + s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[27]; + /* round 7: */ + t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[28]; + t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[29]; + t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[30]; + t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[31]; + /* round 8: */ + s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[32]; + s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[33]; + s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[34]; + s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[35]; + /* round 9: */ + t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[36]; + t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[37]; + t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[38]; + t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[39]; + if (Nr > 10) { + /* round 10: */ + s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[40]; + s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[41]; + s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[42]; + s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[43]; + /* round 11: */ + t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[44]; + t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[45]; + t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[46]; + t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[47]; + if (Nr > 12) { + /* round 12: */ + s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[48]; + s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[49]; + s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[50]; + s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[51]; + /* round 13: */ + t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[52]; + t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[53]; + t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[54]; + t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[55]; + } + } + rk += Nr << 2; +#else /* !FULL_UNROLL */ + /* + * Nr - 1 full rounds: + */ + r = Nr >> 1; + for (;;) { + t0 = + Td0[(s0 >> 24) ] ^ + Td1[(s3 >> 16) & 0xff] ^ + Td2[(s2 >> 8) & 0xff] ^ + Td3[(s1 ) & 0xff] ^ + rk[4]; + t1 = + Td0[(s1 >> 24) ] ^ + Td1[(s0 >> 16) & 0xff] ^ + Td2[(s3 >> 8) & 0xff] ^ + Td3[(s2 ) & 0xff] ^ + rk[5]; + t2 = + Td0[(s2 >> 24) ] ^ + Td1[(s1 >> 16) & 0xff] ^ + Td2[(s0 >> 8) & 0xff] ^ + Td3[(s3 ) & 0xff] ^ + rk[6]; + t3 = + Td0[(s3 >> 24) ] ^ + Td1[(s2 >> 16) & 0xff] ^ + Td2[(s1 >> 8) & 0xff] ^ + Td3[(s0 ) & 0xff] ^ + rk[7]; + + rk += 8; + if (--r == 0) { + break; + } + + s0 = + Td0[(t0 >> 24) ] ^ + Td1[(t3 >> 16) & 0xff] ^ + Td2[(t2 >> 8) & 0xff] ^ + Td3[(t1 ) & 0xff] ^ + rk[0]; + s1 = + Td0[(t1 >> 24) ] ^ + Td1[(t0 >> 16) & 0xff] ^ + Td2[(t3 >> 8) & 0xff] ^ + Td3[(t2 ) & 0xff] ^ + rk[1]; + s2 = + Td0[(t2 >> 24) ] ^ + Td1[(t1 >> 16) & 0xff] ^ + Td2[(t0 >> 8) & 0xff] ^ + Td3[(t3 ) & 0xff] ^ + rk[2]; + s3 = + Td0[(t3 >> 24) ] ^ + Td1[(t2 >> 16) & 0xff] ^ + Td2[(t1 >> 8) & 0xff] ^ + Td3[(t0 ) & 0xff] ^ + rk[3]; + } +#endif /* ?FULL_UNROLL */ + /* + * apply last round and + * map cipher state to byte array block: + */ + s0 = + (Td4[(t0 >> 24) ] & 0xff000000) ^ + (Td4[(t3 >> 16) & 0xff] & 0x00ff0000) ^ + (Td4[(t2 >> 8) & 0xff] & 0x0000ff00) ^ + (Td4[(t1 ) & 0xff] & 0x000000ff) ^ + rk[0]; + PUTU32(pt , s0); + s1 = + (Td4[(t1 >> 24) ] & 0xff000000) ^ + (Td4[(t0 >> 16) & 0xff] & 0x00ff0000) ^ + (Td4[(t3 >> 8) & 0xff] & 0x0000ff00) ^ + (Td4[(t2 ) & 0xff] & 0x000000ff) ^ + rk[1]; + PUTU32(pt + 4, s1); + s2 = + (Td4[(t2 >> 24) ] & 0xff000000) ^ + (Td4[(t1 >> 16) & 0xff] & 0x00ff0000) ^ + (Td4[(t0 >> 8) & 0xff] & 0x0000ff00) ^ + (Td4[(t3 ) & 0xff] & 0x000000ff) ^ + rk[2]; + PUTU32(pt + 8, s2); + s3 = + (Td4[(t3 >> 24) ] & 0xff000000) ^ + (Td4[(t2 >> 16) & 0xff] & 0x00ff0000) ^ + (Td4[(t1 >> 8) & 0xff] & 0x0000ff00) ^ + (Td4[(t0 ) & 0xff] & 0x000000ff) ^ + rk[3]; + PUTU32(pt + 12, s3); +} + +#ifdef INTERMEDIATE_VALUE_KAT + +void rijndaelEncryptRound(const u32 rk[/*4*(Nr + 1)*/], int Nr, u8 block[16], int rounds) { + int r; + u32 s0, s1, s2, s3, t0, t1, t2, t3; + + /* + * map byte array block to cipher state + * and add initial round key: + */ + s0 = GETU32(block ) ^ rk[0]; + s1 = GETU32(block + 4) ^ rk[1]; + s2 = GETU32(block + 8) ^ rk[2]; + s3 = GETU32(block + 12) ^ rk[3]; + rk += 4; + + /* + * Nr - 1 full rounds: + */ + for (r = (rounds < Nr ? rounds : Nr - 1); r > 0; r--) { + t0 = + Te0[(s0 >> 24) ] ^ + Te1[(s1 >> 16) & 0xff] ^ + Te2[(s2 >> 8) & 0xff] ^ + Te3[(s3 ) & 0xff] ^ + rk[0]; + t1 = + Te0[(s1 >> 24) ] ^ + Te1[(s2 >> 16) & 0xff] ^ + Te2[(s3 >> 8) & 0xff] ^ + Te3[(s0 ) & 0xff] ^ + rk[1]; + t2 = + Te0[(s2 >> 24) ] ^ + Te1[(s3 >> 16) & 0xff] ^ + Te2[(s0 >> 8) & 0xff] ^ + Te3[(s1 ) & 0xff] ^ + rk[2]; + t3 = + Te0[(s3 >> 24) ] ^ + Te1[(s0 >> 16) & 0xff] ^ + Te2[(s1 >> 8) & 0xff] ^ + Te3[(s2 ) & 0xff] ^ + rk[3]; + + s0 = t0; + s1 = t1; + s2 = t2; + s3 = t3; + rk += 4; + + } + + /* + * apply last round and + * map cipher state to byte array block: + */ + if (rounds == Nr) { + t0 = + (Te4[(s0 >> 24) ] & 0xff000000) ^ + (Te4[(s1 >> 16) & 0xff] & 0x00ff0000) ^ + (Te4[(s2 >> 8) & 0xff] & 0x0000ff00) ^ + (Te4[(s3 ) & 0xff] & 0x000000ff) ^ + rk[0]; + t1 = + (Te4[(s1 >> 24) ] & 0xff000000) ^ + (Te4[(s2 >> 16) & 0xff] & 0x00ff0000) ^ + (Te4[(s3 >> 8) & 0xff] & 0x0000ff00) ^ + (Te4[(s0 ) & 0xff] & 0x000000ff) ^ + rk[1]; + t2 = + (Te4[(s2 >> 24) ] & 0xff000000) ^ + (Te4[(s3 >> 16) & 0xff] & 0x00ff0000) ^ + (Te4[(s0 >> 8) & 0xff] & 0x0000ff00) ^ + (Te4[(s1 ) & 0xff] & 0x000000ff) ^ + rk[2]; + t3 = + (Te4[(s3 >> 24) ] & 0xff000000) ^ + (Te4[(s0 >> 16) & 0xff] & 0x00ff0000) ^ + (Te4[(s1 >> 8) & 0xff] & 0x0000ff00) ^ + (Te4[(s2 ) & 0xff] & 0x000000ff) ^ + rk[3]; + + s0 = t0; + s1 = t1; + s2 = t2; + s3 = t3; + } + + PUTU32(block , s0); + PUTU32(block + 4, s1); + PUTU32(block + 8, s2); + PUTU32(block + 12, s3); +} + +void rijndaelDecryptRound(const u32 rk[/*4*(Nr + 1)*/], int Nr, u8 block[16], int rounds) { + int r; + u32 s0, s1, s2, s3, t0, t1, t2, t3; + + /* + * map byte array block to cipher state + * and add initial round key: + */ + s0 = GETU32(block ) ^ rk[0]; + s1 = GETU32(block + 4) ^ rk[1]; + s2 = GETU32(block + 8) ^ rk[2]; + s3 = GETU32(block + 12) ^ rk[3]; + rk += 4; + + /* + * Nr - 1 full rounds: + */ + for (r = (rounds < Nr ? rounds : Nr) - 1; r > 0; r--) { + t0 = + Td0[(s0 >> 24) ] ^ + Td1[(s3 >> 16) & 0xff] ^ + Td2[(s2 >> 8) & 0xff] ^ + Td3[(s1 ) & 0xff] ^ + rk[0]; + t1 = + Td0[(s1 >> 24) ] ^ + Td1[(s0 >> 16) & 0xff] ^ + Td2[(s3 >> 8) & 0xff] ^ + Td3[(s2 ) & 0xff] ^ + rk[1]; + t2 = + Td0[(s2 >> 24) ] ^ + Td1[(s1 >> 16) & 0xff] ^ + Td2[(s0 >> 8) & 0xff] ^ + Td3[(s3 ) & 0xff] ^ + rk[2]; + t3 = + Td0[(s3 >> 24) ] ^ + Td1[(s2 >> 16) & 0xff] ^ + Td2[(s1 >> 8) & 0xff] ^ + Td3[(s0 ) & 0xff] ^ + rk[3]; + + s0 = t0; + s1 = t1; + s2 = t2; + s3 = t3; + rk += 4; + + } + + /* + * complete the last round and + * map cipher state to byte array block: + */ + t0 = + (Td4[(s0 >> 24) ] & 0xff000000) ^ + (Td4[(s3 >> 16) & 0xff] & 0x00ff0000) ^ + (Td4[(s2 >> 8) & 0xff] & 0x0000ff00) ^ + (Td4[(s1 ) & 0xff] & 0x000000ff); + t1 = + (Td4[(s1 >> 24) ] & 0xff000000) ^ + (Td4[(s0 >> 16) & 0xff] & 0x00ff0000) ^ + (Td4[(s3 >> 8) & 0xff] & 0x0000ff00) ^ + (Td4[(s2 ) & 0xff] & 0x000000ff); + t2 = + (Td4[(s2 >> 24) ] & 0xff000000) ^ + (Td4[(s1 >> 16) & 0xff] & 0x00ff0000) ^ + (Td4[(s0 >> 8) & 0xff] & 0x0000ff00) ^ + (Td4[(s3 ) & 0xff] & 0x000000ff); + t3 = + (Td4[(s3 >> 24) ] & 0xff000000) ^ + (Td4[(s2 >> 16) & 0xff] & 0x00ff0000) ^ + (Td4[(s1 >> 8) & 0xff] & 0x0000ff00) ^ + (Td4[(s0 ) & 0xff] & 0x000000ff); + + if (rounds == Nr) { + t0 ^= rk[0]; + t1 ^= rk[1]; + t2 ^= rk[2]; + t3 ^= rk[3]; + } + + PUTU32(block , t0); + PUTU32(block + 4, t1); + PUTU32(block + 8, t2); + PUTU32(block + 12, t3); +} + +#endif /* INTERMEDIATE_VALUE_KAT */ diff --git a/libhashkit/rijndael.hpp b/libhashkit/rijndael.hpp new file mode 100644 index 0000000..1d3aec6 --- /dev/null +++ b/libhashkit/rijndael.hpp @@ -0,0 +1,49 @@ +/** + * rijndael-alg-fst.h + * + * @version 3.0 (December 2000) + * + * Optimised ANSI C code for the Rijndael cipher (now AES) + * + * @author Vincent Rijmen + * @author Antoon Bosselaers + * @author Paulo Barreto + * + * This code is hereby placed in the public domain. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#pragma once + +#define MAXKC (256/32) +#define MAXKB (256/8) +#define MAXNR 14 + +#define AES_MAXKC MAXKC +#define AES_MAXKB MAXKB +#define AES_MAXNR MAXNR + +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned int u32; + +int rijndaelKeySetupEnc(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int keyBits); +int rijndaelKeySetupDec(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int keyBits); +void rijndaelEncrypt(const u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 pt[16], u8 ct[16]); +void rijndaelDecrypt(const u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 ct[16], u8 pt[16]); + +#ifdef INTERMEDIATE_VALUE_KAT +void rijndaelEncryptRound(const u32 rk[/*4*(Nr + 1)*/], int Nr, u8 block[16], int rounds); +void rijndaelDecryptRound(const u32 rk[/*4*(Nr + 1)*/], int Nr, u8 block[16], int rounds); +#endif /* INTERMEDIATE_VALUE_KAT */ diff --git a/libhashkit/str_algorithm.cc b/libhashkit/str_algorithm.cc new file mode 100644 index 0000000..b84a0bb --- /dev/null +++ b/libhashkit/str_algorithm.cc @@ -0,0 +1,58 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +const char * libhashkit_string_hash(hashkit_hash_algorithm_t type) +{ + switch(type) + { + case HASHKIT_HASH_DEFAULT: return "DEFAULT"; + case HASHKIT_HASH_MD5: return "MD5"; + case HASHKIT_HASH_CRC: return "CRC"; + case HASHKIT_HASH_FNV1_64: return "FNV1_64"; + case HASHKIT_HASH_FNV1A_64: return "FNV1A_64"; + case HASHKIT_HASH_FNV1_32: return "FNV1_32"; + case HASHKIT_HASH_FNV1A_32: return "FNV1A_32"; + case HASHKIT_HASH_HSIEH: return "HSIEH"; + case HASHKIT_HASH_MURMUR: return "MURMUR"; + case HASHKIT_HASH_MURMUR3: return "MURMUR3"; + case HASHKIT_HASH_JENKINS: return "JENKINS"; + case HASHKIT_HASH_CUSTOM: return "CUSTOM"; + default: + case HASHKIT_HASH_MAX: return "INVALID"; + } +} diff --git a/libhashkit/strerror.cc b/libhashkit/strerror.cc new file mode 100644 index 0000000..f67e5c5 --- /dev/null +++ b/libhashkit/strerror.cc @@ -0,0 +1,56 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * HashKit library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2009 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + + +#include + +const char *hashkit_strerror(hashkit_st *ptr, hashkit_return_t rc) +{ + (void)ptr; + switch (rc) + { + case HASHKIT_SUCCESS: return "SUCCESS"; + case HASHKIT_FAILURE: return "FAILURE"; + case HASHKIT_MEMORY_ALLOCATION_FAILURE: return "MEMORY ALLOCATION FAILURE"; + case HASHKIT_INVALID_ARGUMENT: return "INVALID ARGUMENT"; + case HASHKIT_INVALID_HASH: return "INVALID hashkit_hash_algorithm_t"; + case HASHKIT_MAXIMUM_RETURN: + default: + return "INVALID hashkit_return_t"; + } +} diff --git a/libhashkit/string.cc b/libhashkit/string.cc new file mode 100644 index 0000000..05bbdc5 --- /dev/null +++ b/libhashkit/string.cc @@ -0,0 +1,247 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libhashkit library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#include + +#include +#include + +#define HASHKIT_BLOCK_SIZE 1024 + +struct hashkit_string_st { + char *end; + size_t current_size; + char *string; +}; + +inline static bool _string_check(hashkit_string_st *string, size_t need) +{ + if (need and need > (size_t)(string->current_size - (size_t)(string->end - string->string))) + { + size_t current_offset= (size_t) (string->end - string->string); + + /* This is the block multiplier. To keep it larger and surive division errors we must round it up */ + size_t adjust= (need - (size_t)(string->current_size - (size_t)(string->end - string->string))) / HASHKIT_BLOCK_SIZE; + adjust++; + + size_t new_size= sizeof(char) * (size_t)((adjust * HASHKIT_BLOCK_SIZE) + string->current_size); + /* Test for overflow */ + if (new_size < need) + { + return false; + } + + char *new_value= (char*)realloc(string->string, new_size); + + if (new_value == NULL) + { + return false; + } + + string->string= new_value; + string->end= string->string + current_offset; + + string->current_size+= (HASHKIT_BLOCK_SIZE * adjust); + } + + return true; +} + +static inline void _init_string(hashkit_string_st *self) +{ + self->current_size= 0; + self->end= self->string= NULL; +} + +hashkit_string_st *hashkit_string_create(size_t initial_size) +{ + hashkit_string_st* self= (hashkit_string_st*)calloc(1, sizeof(hashkit_string_st)); + + if (self) + { + if (_string_check(self, initial_size) == false) + { + free(self); + + return NULL; + } + } + + return self; +} + +#if 0 +static bool hashkit_string_append_null(hashkit_string_st *string) +{ + if (_string_check(string, 1) == false) + { + return false; + } + + *string->end= 0; + + return true; +} +#endif + +bool hashkit_string_append_character(hashkit_string_st *string, + char character) +{ + if (_string_check(string, 1) == false) + { + return false; + } + + *string->end= character; + string->end++; + + return true; +} + +bool hashkit_string_append(hashkit_string_st *string, + const char *value, size_t length) +{ + if (_string_check(string, length) == false) + { + return false; + } + + assert(length <= string->current_size); + assert(string->string); + assert(string->end >= string->string); + + memcpy(string->end, value, length); + string->end+= length; + + return true; +} + +char *hashkit_string_c_copy(hashkit_string_st *string) +{ + if (hashkit_string_length(string) == 0) + { + return NULL; + } + + char *c_ptr= static_cast(malloc((hashkit_string_length(string)+1) * sizeof(char))); + if (c_ptr == NULL) + { + return NULL; + } + + memcpy(c_ptr, hashkit_string_c_str(string), hashkit_string_length(string)); + c_ptr[hashkit_string_length(string)]= 0; + + return c_ptr; +} + +void hashkit_string_reset(hashkit_string_st *string) +{ + string->end= string->string; +} + +void hashkit_string_free(hashkit_string_st *ptr) +{ + if (ptr == NULL) + { + return; + } + + if (ptr->string) + { + free(ptr->string); + } + free(ptr); +} + +bool hashkit_string_resize(hashkit_string_st& string, const size_t need) +{ + return _string_check(&string, need); +} + +size_t hashkit_string_length(const hashkit_string_st *self) +{ + return size_t(self->end -self->string); +} + +size_t hashkit_string_max_size(const hashkit_string_st *self) +{ + return self->current_size; +} + +char *hashkit_string_take(hashkit_string_st *self) +{ + assert(self); + if (self == NULL) + { + return NULL; + } + char *value= self->string; + + _init_string(self); + + return value; +} + +char *hashkit_string_c_str_mutable(hashkit_string_st *self) +{ + assert(self); + if (self == NULL) + { + return NULL; + } + return self->string; +} + +const char *hashkit_string_c_str(const hashkit_string_st* self) +{ + assert(self); + if (self == NULL) + { + return NULL; + } + return self->string; +} + +void hashkit_string_set_length(hashkit_string_st *self, size_t length) +{ + assert(self); + if (self and _string_check(self, length)) + { + self->end= self->string +length; + } +} diff --git a/libhashkit/string.h b/libhashkit/string.h new file mode 100644 index 0000000..8aee89e --- /dev/null +++ b/libhashkit/string.h @@ -0,0 +1,57 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Hashkit library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +hashkit_string_st *hashkit_string_create(size_t initial_size); + +bool hashkit_string_append_character(hashkit_string_st *string, char character); + +bool hashkit_string_append(hashkit_string_st *string, const char *value, size_t length); + +char *hashkit_string_c_copy(hashkit_string_st *string); + +void hashkit_string_reset(hashkit_string_st *string); + +bool hashkit_string_resize(hashkit_string_st& string, const size_t need); + +size_t hashkit_string_max_size(const hashkit_string_st *self); + +char *hashkit_string_take(hashkit_string_st *self); + +char *hashkit_string_c_str_mutable(hashkit_string_st *self); + +void hashkit_string_set_length(hashkit_string_st *self, size_t length); diff --git a/libmemcached-1.0/alloc.h b/libmemcached-1.0/alloc.h new file mode 100644 index 0000000..bc65b95 --- /dev/null +++ b/libmemcached-1.0/alloc.h @@ -0,0 +1,54 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +/** + Memory allocation functions. +*/ +typedef void (*memcached_free_fn)(const memcached_st *ptr, void *mem, void *context); +typedef void *(*memcached_malloc_fn)(const memcached_st *ptr, const size_t size, void *context); +typedef void *(*memcached_realloc_fn)(const memcached_st *ptr, void *mem, const size_t size, void *context); +typedef void *(*memcached_calloc_fn)(const memcached_st *ptr, size_t nelem, const size_t elsize, void *context); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached-1.0/allocators.h b/libmemcached-1.0/allocators.h new file mode 100644 index 0000000..86f05a0 --- /dev/null +++ b/libmemcached-1.0/allocators.h @@ -0,0 +1,64 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API +memcached_return_t memcached_set_memory_allocators(memcached_st *ptr, + memcached_malloc_fn mem_malloc, + memcached_free_fn mem_free, + memcached_realloc_fn mem_realloc, + memcached_calloc_fn mem_calloc, + void *context); + +LIBMEMCACHED_API +void memcached_get_memory_allocators(const memcached_st *ptr, + memcached_malloc_fn *mem_malloc, + memcached_free_fn *mem_free, + memcached_realloc_fn *mem_realloc, + memcached_calloc_fn *mem_calloc); + +LIBMEMCACHED_API +void *memcached_get_memory_allocators_context(const memcached_st *ptr); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached-1.0/analyze.h b/libmemcached-1.0/analyze.h new file mode 100644 index 0000000..0da3814 --- /dev/null +++ b/libmemcached-1.0/analyze.h @@ -0,0 +1,56 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API +memcached_analysis_st *memcached_analyze(memcached_st *memc, + memcached_stat_st *memc_stat, + memcached_return_t *error); + +LIBMEMCACHED_API +void memcached_analyze_free(memcached_analysis_st *); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached-1.0/auto.h b/libmemcached-1.0/auto.h new file mode 100644 index 0000000..f37d50f --- /dev/null +++ b/libmemcached-1.0/auto.h @@ -0,0 +1,111 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API + memcached_return_t memcached_increment(memcached_st *ptr, + const char *key, size_t key_length, + uint32_t offset, + uint64_t *value); +LIBMEMCACHED_API + memcached_return_t memcached_decrement(memcached_st *ptr, + const char *key, size_t key_length, + uint32_t offset, + uint64_t *value); + +LIBMEMCACHED_API + memcached_return_t memcached_increment_by_key(memcached_st *ptr, + const char *group_key, size_t group_key_length, + const char *key, size_t key_length, + uint64_t offset, + uint64_t *value); + +LIBMEMCACHED_API + memcached_return_t memcached_decrement_by_key(memcached_st *ptr, + const char *group_key, size_t group_key_length, + const char *key, size_t key_length, + uint64_t offset, + uint64_t *value); + +LIBMEMCACHED_API + memcached_return_t memcached_increment_with_initial(memcached_st *ptr, + const char *key, + size_t key_length, + uint64_t offset, + uint64_t initial, + time_t expiration, + uint64_t *value); + +LIBMEMCACHED_API + memcached_return_t memcached_decrement_with_initial(memcached_st *ptr, + const char *key, + size_t key_length, + uint64_t offset, + uint64_t initial, + time_t expiration, + uint64_t *value); + +LIBMEMCACHED_API + memcached_return_t memcached_increment_with_initial_by_key(memcached_st *ptr, + const char *group_key, + size_t group_key_length, + const char *key, + size_t key_length, + uint64_t offset, + uint64_t initial, + time_t expiration, + uint64_t *value); + +LIBMEMCACHED_API + memcached_return_t memcached_decrement_with_initial_by_key(memcached_st *ptr, + const char *group_key, + size_t group_key_length, + const char *key, + size_t key_length, + uint64_t offset, + uint64_t initial, + time_t expiration, + uint64_t *value); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached-1.0/basic_string.h b/libmemcached-1.0/basic_string.h new file mode 100644 index 0000000..de8d3d5 --- /dev/null +++ b/libmemcached-1.0/basic_string.h @@ -0,0 +1,55 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +// No assumptions of NULL should be made + +struct memcached_string_t { + const char *c_str; + size_t size; +}; + +#define memcached_size(X) (X).size; +#define memcached_c_str(X) (X).c_str; +#define memcached_string_param(X) (X).c_str, (X).size + +#ifdef __cplusplus +#define memcached_string_printf(X) int((X).size), (X).c_str +#else +#define memcached_string_printf(X) (int)((X).size), (X).c_str +#endif + diff --git a/libmemcached-1.0/behavior.h b/libmemcached-1.0/behavior.h new file mode 100644 index 0000000..c663353 --- /dev/null +++ b/libmemcached-1.0/behavior.h @@ -0,0 +1,83 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API +memcached_return_t memcached_behavior_set(memcached_st *ptr, const memcached_behavior_t flag, uint64_t data); + +LIBMEMCACHED_API +uint64_t memcached_behavior_get(memcached_st *ptr, const memcached_behavior_t flag); + +LIBMEMCACHED_API +memcached_return_t memcached_behavior_set_distribution(memcached_st *ptr, memcached_server_distribution_t type); + +LIBMEMCACHED_API +memcached_server_distribution_t memcached_behavior_get_distribution(memcached_st *ptr); + +LIBMEMCACHED_API +memcached_return_t memcached_behavior_set_key_hash(memcached_st *ptr, memcached_hash_t type); + +LIBMEMCACHED_API +memcached_hash_t memcached_behavior_get_key_hash(memcached_st *ptr); + +LIBMEMCACHED_API +memcached_return_t memcached_behavior_set_distribution_hash(memcached_st *ptr, memcached_hash_t type); + +LIBMEMCACHED_API +memcached_hash_t memcached_behavior_get_distribution_hash(memcached_st *ptr); + +LIBMEMCACHED_API + const char *libmemcached_string_behavior(const memcached_behavior_t flag); + +LIBMEMCACHED_API + const char *libmemcached_string_distribution(const memcached_server_distribution_t flag); + +LIBMEMCACHED_API + memcached_return_t memcached_bucket_set(memcached_st *self, + const uint32_t *host_map, + const uint32_t *forward_map, + const uint32_t buckets, + const uint32_t replicas); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached-1.0/callback.h b/libmemcached-1.0/callback.h new file mode 100644 index 0000000..a62e9aa --- /dev/null +++ b/libmemcached-1.0/callback.h @@ -0,0 +1,55 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API +memcached_return_t memcached_callback_set(memcached_st *ptr, + const memcached_callback_t flag, + const void *data); +LIBMEMCACHED_API +void *memcached_callback_get(memcached_st *ptr, + const memcached_callback_t flag, + memcached_return_t *error); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached-1.0/callbacks.h b/libmemcached-1.0/callbacks.h new file mode 100644 index 0000000..7ab8cb1 --- /dev/null +++ b/libmemcached-1.0/callbacks.h @@ -0,0 +1,53 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +typedef memcached_return_t (*memcached_execute_fn)(const memcached_st *ptr, memcached_result_st *result, void *context); +typedef memcached_return_t (*memcached_server_fn)(const memcached_st *ptr, const memcached_instance_st * server, void *context); +typedef memcached_return_t (*memcached_stat_fn)(const memcached_instance_st * server, + const char *key, size_t key_length, + const char *value, size_t value_length, + void *context); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached-1.0/configure.h b/libmemcached-1.0/configure.h new file mode 100644 index 0000000..8c7a2e3 --- /dev/null +++ b/libmemcached-1.0/configure.h @@ -0,0 +1,52 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker, Trond Norbye All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + + +#define LIBMEMCACHED_WITH_SASL_SUPPORT 1 + +#define LIBMEMCACHED_VERSION_STRING "1.0.18" +#define LIBMEMCACHED_VERSION_HEX 0x01000018 + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached-1.0/configure.h.in b/libmemcached-1.0/configure.h.in new file mode 100644 index 0000000..3f0465a --- /dev/null +++ b/libmemcached-1.0/configure.h.in @@ -0,0 +1,52 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker, Trond Norbye All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +@DEPRECATED@ +@LIBMEMCACHED_WITH_SASL_SUPPORT@ + +#define LIBMEMCACHED_VERSION_STRING "@LIBMEMCACHED_VERSION_STRING@" +#define LIBMEMCACHED_VERSION_HEX @LIBMEMCACHED_VERSION_HEX@ + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached-1.0/defaults.h b/libmemcached-1.0/defaults.h new file mode 100644 index 0000000..d440f8c --- /dev/null +++ b/libmemcached-1.0/defaults.h @@ -0,0 +1,56 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#pragma once + +/* Public defines */ +#define MEMCACHED_DEFAULT_PORT 11211 +#define MEMCACHED_DEFAULT_PORT_STRING "11211" +#define MEMCACHED_POINTS_PER_SERVER 100 +#define MEMCACHED_POINTS_PER_SERVER_KETAMA 160 +#define MEMCACHED_CONTINUUM_SIZE MEMCACHED_POINTS_PER_SERVER*100 /* This would then set max hosts to 100 */ +#define MEMCACHED_STRIDE 4 +#define MEMCACHED_DEFAULT_TIMEOUT 5000 +#define MEMCACHED_DEFAULT_CONNECT_TIMEOUT 4000 +#define MEMCACHED_CONTINUUM_ADDITION 10 /* How many extra slots we should build for in the continuum */ +#define MEMCACHED_EXPIRATION_NOT_ADD 0xffffffffU +#define MEMCACHED_SERVER_FAILURE_LIMIT 5 +#define MEMCACHED_SERVER_FAILURE_RETRY_TIMEOUT 2 +#define MEMCACHED_SERVER_FAILURE_DEAD_TIMEOUT 0 +#define MEMCACHED_SERVER_TIMEOUT_LIMIT 0 + diff --git a/libmemcached-1.0/delete.h b/libmemcached-1.0/delete.h new file mode 100644 index 0000000..617d585 --- /dev/null +++ b/libmemcached-1.0/delete.h @@ -0,0 +1,57 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API +memcached_return_t memcached_delete(memcached_st *ptr, const char *key, size_t key_length, + time_t expiration); + +LIBMEMCACHED_API +memcached_return_t memcached_delete_by_key(memcached_st *ptr, + const char *group_key, size_t group_key_length, + const char *key, size_t key_length, + time_t expiration); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached-1.0/deprecated_types.h b/libmemcached-1.0/deprecated_types.h new file mode 100644 index 0000000..0a6df65 --- /dev/null +++ b/libmemcached-1.0/deprecated_types.h @@ -0,0 +1,61 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* + * Warning, none of these should ever be used. + */ + +#pragma once + +/** + @note The following definitions are just here for backwards compatibility. +*/ +typedef memcached_return_t memcached_return; +typedef memcached_server_distribution_t memcached_server_distribution; +typedef memcached_behavior_t memcached_behavior; +typedef memcached_callback_t memcached_callback; +typedef memcached_hash_t memcached_hash; +typedef memcached_connection_t memcached_connection; +typedef memcached_clone_fn memcached_clone_func; +typedef memcached_cleanup_fn memcached_cleanup_func; +typedef memcached_execute_fn memcached_execute_function; +typedef memcached_server_fn memcached_server_function; +typedef memcached_trigger_key_fn memcached_trigger_key; +typedef memcached_trigger_delete_key_fn memcached_trigger_delete_key; +typedef memcached_dump_fn memcached_dump_func; +typedef memcached_instance_st *memcached_server_instance_st; + diff --git a/libmemcached-1.0/dump.h b/libmemcached-1.0/dump.h new file mode 100644 index 0000000..b6e639e --- /dev/null +++ b/libmemcached-1.0/dump.h @@ -0,0 +1,51 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API +memcached_return_t memcached_dump(memcached_st *ptr, memcached_dump_fn *function, void *context, uint32_t number_of_callbacks); + + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached-1.0/encoding_key.h b/libmemcached-1.0/encoding_key.h new file mode 100644 index 0000000..3adbcb6 --- /dev/null +++ b/libmemcached-1.0/encoding_key.h @@ -0,0 +1,49 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API + memcached_return_t memcached_set_encoding_key(memcached_st*, const char *str, size_t length); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached-1.0/error.h b/libmemcached-1.0/error.h new file mode 100644 index 0000000..9346bb0 --- /dev/null +++ b/libmemcached-1.0/error.h @@ -0,0 +1,67 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * LibMemcached + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API + const char *memcached_error(const memcached_st *); + +LIBMEMCACHED_API + const char *memcached_last_error_message(const memcached_st *); + +LIBMEMCACHED_API + void memcached_error_print(const memcached_st *); + +LIBMEMCACHED_API + memcached_return_t memcached_last_error(const memcached_st *); + +LIBMEMCACHED_API + int memcached_last_error_errno(const memcached_st *); + +LIBMEMCACHED_API + const char *memcached_server_error(const memcached_instance_st * ptr); + +LIBMEMCACHED_API + memcached_return_t memcached_server_error_return(const memcached_instance_st * ptr); + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/libmemcached-1.0/exception.hpp b/libmemcached-1.0/exception.hpp new file mode 100644 index 0000000..4759072 --- /dev/null +++ b/libmemcached-1.0/exception.hpp @@ -0,0 +1,60 @@ +/* + * Summary: Exceptions for the C++ interface + * + * Copy: See Copyright for the status of this software. + * + */ + +/** + * @file + * @brief Exception declarations + */ + +#pragma once + +#include +#include + +namespace memcache +{ + class Exception : public std::runtime_error + { + public: + Exception(const std::string& msg, int in_errno) + : + std::runtime_error(msg), + _errno(in_errno) + {} + + Exception(const char *msg, int in_errno) + : + std::runtime_error(std::string(msg)), + _errno(in_errno) {} + + virtual ~Exception() throw() {} + + int getErrno() const + { + return _errno; + } + + private: + int _errno; + }; + + class Warning : public Exception + { + public: + Warning(const std::string& msg, int in_errno) : Exception(msg, in_errno) {} + Warning(const char *msg, int in_errno) : Exception(msg, in_errno) {} + }; + + class Error : public Exception + { + public: + Error(const std::string& msg, int in_errno) : Exception(msg, in_errno) {} + Error(const char *msg, int in_errno) : Exception(msg, in_errno) {} + virtual ~Error() throw() {} + }; + +} /* namespace libmemcached */ diff --git a/libmemcached-1.0/exist.h b/libmemcached-1.0/exist.h new file mode 100644 index 0000000..ef60a81 --- /dev/null +++ b/libmemcached-1.0/exist.h @@ -0,0 +1,52 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API +memcached_return_t memcached_exist(memcached_st *memc, const char *key, size_t key_length); + +LIBMEMCACHED_API +memcached_return_t memcached_exist_by_key(memcached_st *memc, + const char *group_key, size_t group_key_length, + const char *key, size_t key_length); +#ifdef __cplusplus +} +#endif diff --git a/libmemcached-1.0/fetch.h b/libmemcached-1.0/fetch.h new file mode 100644 index 0000000..bff186a --- /dev/null +++ b/libmemcached-1.0/fetch.h @@ -0,0 +1,53 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API +memcached_return_t memcached_fetch_execute(memcached_st *ptr, + memcached_execute_fn *callback, + void *context, + uint32_t number_of_callbacks); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached-1.0/flush.h b/libmemcached-1.0/flush.h new file mode 100644 index 0000000..820a98e --- /dev/null +++ b/libmemcached-1.0/flush.h @@ -0,0 +1,49 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API +memcached_return_t memcached_flush(memcached_st *ptr, time_t expiration); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached-1.0/flush_buffers.h b/libmemcached-1.0/flush_buffers.h new file mode 100644 index 0000000..31b5868 --- /dev/null +++ b/libmemcached-1.0/flush_buffers.h @@ -0,0 +1,49 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API +memcached_return_t memcached_flush_buffers(memcached_st *mem); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached-1.0/get.h b/libmemcached-1.0/get.h new file mode 100644 index 0000000..32e4c5f --- /dev/null +++ b/libmemcached-1.0/get.h @@ -0,0 +1,110 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + + +#ifdef __cplusplus +extern "C" { +#endif + +/* Public defines */ +LIBMEMCACHED_API +char *memcached_get(memcached_st *ptr, + const char *key, size_t key_length, + size_t *value_length, + uint32_t *flags, + memcached_return_t *error); + +LIBMEMCACHED_API +memcached_return_t memcached_mget(memcached_st *ptr, + const char * const *keys, + const size_t *key_length, + size_t number_of_keys); + +LIBMEMCACHED_API +char *memcached_get_by_key(memcached_st *ptr, + const char *group_key, size_t group_key_length, + const char *key, size_t key_length, + size_t *value_length, + uint32_t *flags, + memcached_return_t *error); + +LIBMEMCACHED_API +memcached_return_t memcached_mget_by_key(memcached_st *ptr, + const char *group_key, + size_t group_key_length, + const char * const *keys, + const size_t *key_length, + const size_t number_of_keys); + +LIBMEMCACHED_API +char *memcached_fetch(memcached_st *ptr, + char *key, + size_t *key_length, + size_t *value_length, + uint32_t *flags, + memcached_return_t *error); + +LIBMEMCACHED_API +memcached_result_st *memcached_fetch_result(memcached_st *ptr, + memcached_result_st *result, + memcached_return_t *error); + +LIBMEMCACHED_API +memcached_return_t memcached_mget_execute(memcached_st *ptr, + const char * const *keys, + const size_t *key_length, + const size_t number_of_keys, + memcached_execute_fn *callback, + void *context, + const uint32_t number_of_callbacks); + +LIBMEMCACHED_API +memcached_return_t memcached_mget_execute_by_key(memcached_st *ptr, + const char *group_key, + size_t group_key_length, + const char * const *keys, + const size_t *key_length, + size_t number_of_keys, + memcached_execute_fn *callback, + void *context, + const uint32_t number_of_callbacks); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached-1.0/hash.h b/libmemcached-1.0/hash.h new file mode 100644 index 0000000..9fdb7d6 --- /dev/null +++ b/libmemcached-1.0/hash.h @@ -0,0 +1,65 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +/* The two public hash bits */ +LIBMEMCACHED_API +uint32_t memcached_generate_hash_value(const char *key, size_t key_length, memcached_hash_t hash_algorithm); + +LIBMEMCACHED_API +const hashkit_st *memcached_get_hashkit(const memcached_st *ptr); + +LIBMEMCACHED_API +memcached_return_t memcached_set_hashkit(memcached_st *ptr, hashkit_st *hashk); + +LIBMEMCACHED_API +uint32_t memcached_generate_hash(const memcached_st *ptr, const char *key, size_t key_length); + +LIBMEMCACHED_API +void memcached_autoeject(memcached_st *ptr); + +LIBMEMCACHED_API + const char * libmemcached_string_hash(memcached_hash_t type); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached-1.0/include.am b/libmemcached-1.0/include.am new file mode 100644 index 0000000..19e4828 --- /dev/null +++ b/libmemcached-1.0/include.am @@ -0,0 +1,56 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +EXTRA_DIST+= libmemcached-1.0/configure.h.in +BUILT_SOURCES+= libmemcached-1.0/configure.h + +include libmemcached-1.0/struct/include.am +include libmemcached-1.0/types/include.am + +# Tests for this version of the interface +include libmemcached-1.0/t/include.am + +nobase_include_HEADERS+= libmemcached-1.0/alloc.h +nobase_include_HEADERS+= libmemcached-1.0/allocators.h +nobase_include_HEADERS+= libmemcached-1.0/analyze.h +nobase_include_HEADERS+= libmemcached-1.0/auto.h +nobase_include_HEADERS+= libmemcached-1.0/basic_string.h +nobase_include_HEADERS+= libmemcached-1.0/behavior.h +nobase_include_HEADERS+= libmemcached-1.0/callback.h +nobase_include_HEADERS+= libmemcached-1.0/callbacks.h +nobase_include_HEADERS+= libmemcached-1.0/configure.h +nobase_include_HEADERS+= libmemcached-1.0/defaults.h +nobase_include_HEADERS+= libmemcached-1.0/delete.h +nobase_include_HEADERS+= libmemcached-1.0/deprecated_types.h +nobase_include_HEADERS+= libmemcached-1.0/dump.h +nobase_include_HEADERS+= libmemcached-1.0/encoding_key.h +nobase_include_HEADERS+= libmemcached-1.0/error.h +nobase_include_HEADERS+= libmemcached-1.0/exception.hpp +nobase_include_HEADERS+= libmemcached-1.0/exist.h +nobase_include_HEADERS+= libmemcached-1.0/fetch.h +nobase_include_HEADERS+= libmemcached-1.0/flush.h +nobase_include_HEADERS+= libmemcached-1.0/flush_buffers.h +nobase_include_HEADERS+= libmemcached-1.0/get.h +nobase_include_HEADERS+= libmemcached-1.0/hash.h +nobase_include_HEADERS+= libmemcached-1.0/limits.h +nobase_include_HEADERS+= libmemcached-1.0/memcached.h +nobase_include_HEADERS+= libmemcached-1.0/memcached.hpp +nobase_include_HEADERS+= libmemcached-1.0/options.h +nobase_include_HEADERS+= libmemcached-1.0/parse.h +nobase_include_HEADERS+= libmemcached-1.0/platform.h +nobase_include_HEADERS+= libmemcached-1.0/quit.h +nobase_include_HEADERS+= libmemcached-1.0/result.h +nobase_include_HEADERS+= libmemcached-1.0/return.h +nobase_include_HEADERS+= libmemcached-1.0/sasl.h +nobase_include_HEADERS+= libmemcached-1.0/server.h +nobase_include_HEADERS+= libmemcached-1.0/server_list.h +nobase_include_HEADERS+= libmemcached-1.0/stats.h +nobase_include_HEADERS+= libmemcached-1.0/storage.h +nobase_include_HEADERS+= libmemcached-1.0/strerror.h +nobase_include_HEADERS+= libmemcached-1.0/touch.h +nobase_include_HEADERS+= libmemcached-1.0/triggers.h +nobase_include_HEADERS+= libmemcached-1.0/types.h +nobase_include_HEADERS+= libmemcached-1.0/verbosity.h +nobase_include_HEADERS+= libmemcached-1.0/version.h +nobase_include_HEADERS+= libmemcached-1.0/visibility.h diff --git a/libmemcached-1.0/limits.h b/libmemcached-1.0/limits.h new file mode 100644 index 0000000..076df40 --- /dev/null +++ b/libmemcached-1.0/limits.h @@ -0,0 +1,46 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#pragma once + +#define MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH 20 +#define MEMCACHED_MAX_BUFFER 8196 +#define MEMCACHED_MAX_HOST_SORT_LENGTH 86 /* Used for Ketama */ +#define MEMCACHED_MAX_KEY 251 /* We add one to have it null terminated */ +#define MEMCACHED_PREFIX_KEY_MAX_SIZE 128 +#define MEMCACHED_VERSION_STRING_LENGTH 24 diff --git a/libmemcached-1.0/memcached.h b/libmemcached-1.0/memcached.h new file mode 100644 index 0000000..bc16e73 --- /dev/null +++ b/libmemcached-1.0/memcached.h @@ -0,0 +1,169 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +/* This seems to be required for older compilers @note http://stackoverflow.com/questions/8132399/how-to-printf-uint64-t */ +#ifndef __STDC_FORMAT_MACROS +# define __STDC_FORMAT_MACROS +#endif + +#ifdef __cplusplus +# include +# include +# include +#else +# include +# include +# include +# include +#endif + +#include + +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +// Everything above this line must be in the order specified. +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API +void memcached_servers_reset(memcached_st *ptr); + +LIBMEMCACHED_API +memcached_st *memcached_create(memcached_st *ptr); + +LIBMEMCACHED_API +memcached_st *memcached(const char *string, size_t string_length); + +LIBMEMCACHED_API +void memcached_free(memcached_st *ptr); + +LIBMEMCACHED_API +memcached_return_t memcached_reset(memcached_st *ptr); + +LIBMEMCACHED_API +void memcached_reset_last_disconnected_server(memcached_st *ptr); + +LIBMEMCACHED_API +memcached_st *memcached_clone(memcached_st *clone, const memcached_st *ptr); + +LIBMEMCACHED_API +void *memcached_get_user_data(const memcached_st *ptr); + +LIBMEMCACHED_API +void *memcached_set_user_data(memcached_st *ptr, void *data); + +LIBMEMCACHED_API +memcached_return_t memcached_push(memcached_st *destination, const memcached_st *source); + +LIBMEMCACHED_API +const memcached_instance_st * memcached_server_instance_by_position(const memcached_st *ptr, uint32_t server_key); + +LIBMEMCACHED_API +uint32_t memcached_server_count(const memcached_st *); + +LIBMEMCACHED_API +uint64_t memcached_query_id(const memcached_st *); + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/libmemcached-1.0/memcached.hpp b/libmemcached-1.0/memcached.hpp new file mode 100644 index 0000000..6500c0a --- /dev/null +++ b/libmemcached-1.0/memcached.hpp @@ -0,0 +1,878 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* + * Summary: C++ interface for memcached server + * + * Copy: See Copyright for the status of this software. + * + * Authors: Padraig O'Sullivan + * Patrick Galbraith + */ + +/** + * @file memcached.hpp + * @brief Libmemcached C++ interface + */ + +#pragma once + +#include +#if 0 +#include +#endif + +#include + +#include +#include +#include +#include + +namespace memcache +{ + +/** + * This is the core memcached library (if later, other objects + * are needed, they will be created from this class). + */ +class Memcache +{ +public: + + Memcache() + { + memc_= memcached(NULL, 0); + } + + Memcache(const std::string &config) + { + memc_= memcached(config.c_str(), config.size()); + } + + Memcache(const std::string &hostname, in_port_t port) + { + memc_= memcached(NULL, 0); + if (memc_) + { + memcached_server_add(memc_, hostname.c_str(), port); + } + } + + Memcache(memcached_st *clone) + { + memc_= memcached_clone(NULL, clone); + } + + Memcache(const Memcache &rhs) + { + memc_= memcached_clone(NULL, rhs.getImpl()); + } + + Memcache &operator=(const Memcache &rhs) + { + if (this != &rhs) + { + memcached_free(memc_); + memc_= memcached_clone(NULL, rhs.getImpl()); + } + + return *this; + } + + ~Memcache() + { + memcached_free(memc_); + } + + /** + * Get the internal memcached_st * + */ + const memcached_st *getImpl() const + { + return memc_; + } + + /** + * Return an error string for the given return structure. + * + * @param[in] rc a memcached_return_t structure + * @return error string corresponding to given return code in the library. + */ + const std::string getError(memcached_return_t rc) const + { + /* first parameter to strerror is unused */ + return memcached_strerror(NULL, rc); + } + + bool error(std::string& error_message) const + { + if (memcached_failed(memcached_last_error(memc_))) + { + error_message+= memcached_last_error_message(memc_); + return true; + } + + return false; + } + + bool error() const + { + if (memcached_failed(memcached_last_error(memc_))) + { + return true; + } + + return false; + } + + bool error(memcached_return_t& arg) const + { + arg= memcached_last_error(memc_); + return memcached_failed(arg); + } + + bool setBehavior(memcached_behavior_t flag, uint64_t data) + { + return (memcached_success(memcached_behavior_set(memc_, flag, data))); + } + + uint64_t getBehavior(memcached_behavior_t flag) + { + return memcached_behavior_get(memc_, flag); + } + + /** + * Configure the memcache object + * + * @param[in] in_config configuration + * @return true on success; false otherwise + */ + bool configure(const std::string &configuration) + { + memcached_st *new_memc= memcached(configuration.c_str(), configuration.size()); + + if (new_memc) + { + memcached_free(memc_); + memc_= new_memc; + + return true; + } + + return false; + } + + /** + * Add a server to the list of memcached servers to use. + * + * @param[in] server_name name of the server to add + * @param[in] port port number of server to add + * @return true on success; false otherwise + */ + bool addServer(const std::string &server_name, in_port_t port) + { + return memcached_success(memcached_server_add(memc_, server_name.c_str(), port)); + } + + /** + * Remove a server from the list of memcached servers to use. + * + * @param[in] server_name name of the server to remove + * @param[in] port port number of server to remove + * @return true on success; false otherwise + */ + bool removeServer(const std::string &server_name, in_port_t port) + { + std::string tmp_str; + std::ostringstream strstm; + tmp_str.append(","); + tmp_str.append(server_name); + tmp_str.append(":"); + strstm << port; + tmp_str.append(strstm.str()); + + //memcached_return_t rc= memcached_server_remove(server); + + return false; + } + + /** + * Fetches an individual value from the server. mget() must always + * be called before using this method. + * + * @param[in] key key of object to fetch + * @param[out] ret_val store returned object in this vector + * @return a memcached return structure + */ + memcached_return_t fetch(std::string &key, + std::vector &ret_val, + uint32_t &flags, + uint64_t &cas_value) + { + memcached_return_t rc; + + memcached_result_st *result; + if ((result= memcached_fetch_result(memc_, NULL, &rc))) + { + // Key + key.assign(memcached_result_key_value(result), memcached_result_key_length(result)); + + // Actual value, null terminated + ret_val.reserve(memcached_result_length(result) +1); + ret_val.assign(memcached_result_value(result), + memcached_result_value(result) +memcached_result_length(result) +1); + ret_val.resize(memcached_result_length(result)); + + // Misc + flags= memcached_result_flags(result); + cas_value= memcached_result_cas(result); + } + memcached_result_free(result); + + return rc; + } + + memcached_return_t fetch(std::string &key, + std::vector &ret_val) + { + uint32_t flags= 0; + uint64_t cas_value= 0; + + return fetch(key, ret_val, flags, cas_value); + } + + /** + * Fetches an individual value from the server. + * + * @param[in] key key of object whose value to get + * @param[out] ret_val object that is retrieved is stored in + * this vector + * @return true on success; false otherwise + */ + bool get(const std::string &key, std::vector &ret_val) + { + uint32_t flags= 0; + memcached_return_t rc; + size_t value_length= 0; + + char *value= memcached_get(memc_, key.c_str(), key.length(), + &value_length, &flags, &rc); + if (value != NULL && ret_val.empty()) + { + ret_val.reserve(value_length +1); // Always provide null + ret_val.assign(value, value +value_length +1); + ret_val.resize(value_length); + free(value); + + return true; + } + + return false; + } + + /** + * Fetches an individual from a server which is specified by + * the master_key parameter that is used for determining which + * server an object was stored in if key partitioning was + * used for storage. + * + * @param[in] master_key key that specifies server object is stored on + * @param[in] key key of object whose value to get + * @param[out] ret_val object that is retrieved is stored in + * this vector + * @return true on success; false otherwise + */ + bool getByKey(const std::string &master_key, + const std::string &key, + std::vector &ret_val) + { + uint32_t flags= 0; + memcached_return_t rc; + size_t value_length= 0; + + char *value= memcached_get_by_key(memc_, + master_key.c_str(), master_key.length(), + key.c_str(), key.length(), + &value_length, &flags, &rc); + if (value) + { + ret_val.reserve(value_length +1); // Always provide null + ret_val.assign(value, value +value_length +1); + ret_val.resize(value_length); + free(value); + + return true; + } + return false; + } + + /** + * Selects multiple keys at once. This method always + * works asynchronously. + * + * @param[in] keys vector of keys to select + * @return true if all keys are found + */ + bool mget(const std::vector& keys) + { + std::vector real_keys; + std::vector key_len; + /* + * Construct an array which will contain the length + * of each of the strings in the input vector. Also, to + * interface with the memcached C API, we need to convert + * the vector of std::string's to a vector of char *. + */ + real_keys.reserve(keys.size()); + key_len.reserve(keys.size()); + + std::vector::const_iterator it= keys.begin(); + + while (it != keys.end()) + { + real_keys.push_back(const_cast((*it).c_str())); + key_len.push_back((*it).length()); + ++it; + } + + /* + * If the std::vector of keys is empty then we cannot + * call memcached_mget as we will get undefined behavior. + */ + if (not real_keys.empty()) + { + return memcached_success(memcached_mget(memc_, &real_keys[0], &key_len[0], real_keys.size())); + } + + return false; + } + + /** + * Writes an object to the server. If the object already exists, it will + * overwrite the existing object. This method always returns true + * when using non-blocking mode unless a network error occurs. + * + * @param[in] key key of object to write to server + * @param[in] value value of object to write to server + * @param[in] expiration time to keep the object stored in the server for + * @param[in] flags flags to store with the object + * @return true on succcess; false otherwise + */ + bool set(const std::string &key, + const std::vector &value, + time_t expiration, + uint32_t flags) + { + memcached_return_t rc= memcached_set(memc_, + key.c_str(), key.length(), + &value[0], value.size(), + expiration, flags); + return memcached_success(rc); + } + + bool set(const std::string &key, + const char* value, const size_t value_length, + time_t expiration, + uint32_t flags) + { + memcached_return_t rc= memcached_set(memc_, + key.c_str(), key.length(), + value, value_length, + expiration, flags); + return memcached_success(rc); + } + + /** + * Writes an object to a server specified by the master_key parameter. + * If the object already exists, it will overwrite the existing object. + * + * @param[in] master_key key that specifies server to write to + * @param[in] key key of object to write to server + * @param[in] value value of object to write to server + * @param[in] expiration time to keep the object stored in the server for + * @param[in] flags flags to store with the object + * @return true on succcess; false otherwise + */ + bool setByKey(const std::string& master_key, + const std::string& key, + const std::vector &value, + time_t expiration, + uint32_t flags) + { + return memcached_success(memcached_set_by_key(memc_, master_key.c_str(), + master_key.length(), + key.c_str(), key.length(), + &value[0], value.size(), + expiration, + flags)); + } + + /** + * Writes a list of objects to the server. Objects are specified by + * 2 vectors - 1 vector of keys and 1 vector of values. + * + * @param[in] keys vector of keys of objects to write to server + * @param[in] values vector of values of objects to write to server + * @param[in] expiration time to keep the objects stored in server for + * @param[in] flags flags to store with the objects + * @return true on success; false otherwise + */ + bool setAll(const std::vector& keys, + const std::vector< std::vector *>& values, + time_t expiration, + uint32_t flags) + { + bool retval= true; + std::vector::const_iterator key_it= keys.begin(); + std::vector< std::vector *>::const_iterator val_it= values.begin(); + while (key_it != keys.end()) + { + retval= set((*key_it), *(*val_it), expiration, flags); + if (retval == false) + { + return retval; + } + ++key_it; + ++val_it; + } + return retval; + } + + /** + * Writes a list of objects to the server. Objects are specified by + * a map of keys to values. + * + * @param[in] key_value_map map of keys and values to store in server + * @param[in] expiration time to keep the objects stored in server for + * @param[in] flags flags to store with the objects + * @return true on success; false otherwise + */ + bool setAll(const std::map >& key_value_map, + time_t expiration, + uint32_t flags) + { + bool retval= true; + std::map >::const_iterator it= key_value_map.begin(); + + while (it != key_value_map.end()) + { + retval= set(it->first, it->second, expiration, flags); + if (retval == false) + { + // We should tell the user what the key that failed was + return false; + } + ++it; + } + + return true; + } + + /** + * Increment the value of the object associated with the specified + * key by the offset given. The resulting value is saved in the value + * parameter. + * + * @param[in] key key of object in server whose value to increment + * @param[in] offset amount to increment object's value by + * @param[out] value store the result of the increment here + * @return true on success; false otherwise + */ + bool increment(const std::string& key, uint32_t offset, uint64_t *value) + { + return memcached_success(memcached_increment(memc_, key.c_str(), key.length(), offset, value)); + } + + /** + * Decrement the value of the object associated with the specified + * key by the offset given. The resulting value is saved in the value + * parameter. + * + * @param[in] key key of object in server whose value to decrement + * @param[in] offset amount to increment object's value by + * @param[out] value store the result of the decrement here + * @return true on success; false otherwise + */ + bool decrement(const std::string& key, uint32_t offset, uint64_t *value) + { + return memcached_success(memcached_decrement(memc_, key.c_str(), + key.length(), + offset, value)); + } + + + /** + * Add an object with the specified key and value to the server. This + * function returns false if the object already exists on the server. + * + * @param[in] key key of object to add + * @param[in] value of object to add + * @return true on success; false otherwise + */ + bool add(const std::string& key, const std::vector& value) + { + return memcached_success(memcached_add(memc_, key.c_str(), key.length(), + &value[0], value.size(), 0, 0)); + } + + /** + * Add an object with the specified key and value to the server. This + * function returns false if the object already exists on the server. The + * server to add the object to is specified by the master_key parameter. + * + * @param[in[ master_key key of server to add object to + * @param[in] key key of object to add + * @param[in] value of object to add + * @return true on success; false otherwise + */ + bool addByKey(const std::string& master_key, + const std::string& key, + const std::vector& value) + { + return memcached_success(memcached_add_by_key(memc_, + master_key.c_str(), + master_key.length(), + key.c_str(), + key.length(), + &value[0], + value.size(), + 0, 0)); + } + + /** + * Replaces an object on the server. This method only succeeds + * if the object is already present on the server. + * + * @param[in] key key of object to replace + * @param[in[ value value to replace object with + * @return true on success; false otherwise + */ + bool replace(const std::string& key, const std::vector& value) + { + return memcached_success(memcached_replace(memc_, key.c_str(), key.length(), + &value[0], value.size(), + 0, 0)); + } + + /** + * Replaces an object on the server. This method only succeeds + * if the object is already present on the server. The server + * to replace the object on is specified by the master_key param. + * + * @param[in] master_key key of server to replace object on + * @param[in] key key of object to replace + * @param[in[ value value to replace object with + * @return true on success; false otherwise + */ + bool replaceByKey(const std::string& master_key, + const std::string& key, + const std::vector& value) + { + return memcached_success(memcached_replace_by_key(memc_, + master_key.c_str(), + master_key.length(), + key.c_str(), + key.length(), + &value[0], + value.size(), + 0, 0)); + } + + /** + * Places a segment of data before the last piece of data stored. + * + * @param[in] key key of object whose value we will prepend data to + * @param[in] value data to prepend to object's value + * @return true on success; false otherwise + */ + bool prepend(const std::string& key, const std::vector& value) + { + return memcached_success(memcached_prepend(memc_, key.c_str(), key.length(), + &value[0], value.size(), 0, 0)); + } + + /** + * Places a segment of data before the last piece of data stored. The + * server on which the object where we will be prepending data is stored + * on is specified by the master_key parameter. + * + * @param[in] master_key key of server where object is stored + * @param[in] key key of object whose value we will prepend data to + * @param[in] value data to prepend to object's value + * @return true on success; false otherwise + */ + bool prependByKey(const std::string& master_key, + const std::string& key, + const std::vector& value) + { + return memcached_success(memcached_prepend_by_key(memc_, + master_key.c_str(), + master_key.length(), + key.c_str(), + key.length(), + &value[0], + value.size(), + 0, + 0)); + } + + /** + * Places a segment of data at the end of the last piece of data stored. + * + * @param[in] key key of object whose value we will append data to + * @param[in] value data to append to object's value + * @return true on success; false otherwise + */ + bool append(const std::string& key, const std::vector& value) + { + return memcached_success(memcached_append(memc_, + key.c_str(), + key.length(), + &value[0], + value.size(), + 0, 0)); + } + + /** + * Places a segment of data at the end of the last piece of data stored. The + * server on which the object where we will be appending data is stored + * on is specified by the master_key parameter. + * + * @param[in] master_key key of server where object is stored + * @param[in] key key of object whose value we will append data to + * @param[in] value data to append to object's value + * @return true on success; false otherwise + */ + bool appendByKey(const std::string& master_key, + const std::string& key, + const std::vector &value) + { + return memcached_success(memcached_append_by_key(memc_, + master_key.c_str(), + master_key.length(), + key.c_str(), + key.length(), + &value[0], + value.size(), + 0, 0)); + } + + /** + * Overwrite data in the server as long as the cas_arg value + * is still the same in the server. + * + * @param[in] key key of object in server + * @param[in] value value to store for object in server + * @param[in] cas_arg "cas" value + */ + bool cas(const std::string& key, + const std::vector& value, + uint64_t cas_arg) + { + return memcached_success(memcached_cas(memc_, key.c_str(), key.length(), + &value[0], value.size(), + 0, 0, cas_arg)); + } + + /** + * Overwrite data in the server as long as the cas_arg value + * is still the same in the server. The server to use is + * specified by the master_key parameter. + * + * @param[in] master_key specifies server to operate on + * @param[in] key key of object in server + * @param[in] value value to store for object in server + * @param[in] cas_arg "cas" value + */ + bool casByKey(const std::string& master_key, + const std::string& key, + const std::vector &value, + uint64_t cas_arg) + { + return memcached_success(memcached_cas_by_key(memc_, + master_key.c_str(), + master_key.length(), + key.c_str(), + key.length(), + &value[0], + value.size(), + 0, 0, cas_arg)); + } + + /** + * Delete an object from the server specified by the key given. + * + * @param[in] key key of object to delete + * @return true on success; false otherwise + */ + bool remove(const std::string& key) + { + return memcached_success(memcached_delete(memc_, key.c_str(), key.length(), 0)); + } + + /** + * Delete an object from the server specified by the key given. + * + * @param[in] key key of object to delete + * @param[in] expiration time to delete the object after + * @return true on success; false otherwise + */ + bool remove(const std::string& key, time_t expiration) + { + return memcached_success(memcached_delete(memc_, + key.c_str(), + key.length(), + expiration)); + } + + /** + * Delete an object from the server specified by the key given. + * + * @param[in] master_key specifies server to remove object from + * @param[in] key key of object to delete + * @return true on success; false otherwise + */ + bool removeByKey(const std::string& master_key, + const std::string& key) + { + return memcached_success(memcached_delete_by_key(memc_, + master_key.c_str(), + master_key.length(), + key.c_str(), + key.length(), + 0)); + } + + /** + * Delete an object from the server specified by the key given. + * + * @param[in] master_key specifies server to remove object from + * @param[in] key key of object to delete + * @param[in] expiration time to delete the object after + * @return true on success; false otherwise + */ + bool removeByKey(const std::string& master_key, + const std::string& key, + time_t expiration) + { + return memcached_success(memcached_delete_by_key(memc_, + master_key.c_str(), + master_key.length(), + key.c_str(), + key.length(), + expiration)); + } + + /** + * Wipe the contents of memcached servers. + * + * @param[in] expiration time to wait until wiping contents of + * memcached servers + * @return true on success; false otherwise + */ + bool flush(time_t expiration= 0) + { + return memcached_success(memcached_flush(memc_, expiration)); + } + + /** + * Get the library version string. + * @return std::string containing a copy of the library version string. + */ + const std::string libVersion() const + { + const char *ver= memcached_lib_version(); + const std::string version(ver); + return version; + } + + /** + * Retrieve memcached statistics. Populate a std::map with the retrieved + * stats. Each server will map to another std::map of the key:value stats. + * + * @param[out] stats_map a std::map to be populated with the memcached + * stats + * @return true on success; false otherwise + */ + bool getStats(std::map< std::string, std::map >& stats_map) + { + memcached_return_t rc; + memcached_stat_st *stats= memcached_stat(memc_, NULL, &rc); + + if (rc != MEMCACHED_SUCCESS && + rc != MEMCACHED_SOME_ERRORS) + { + return false; + } + + uint32_t server_count= memcached_server_count(memc_); + + /* + * For each memcached server, construct a std::map for its stats and add + * it to the std::map of overall stats. + */ + for (uint32_t x= 0; x < server_count; x++) + { + const memcached_instance_st * instance= memcached_server_instance_by_position(memc_, x); + std::ostringstream strstm; + std::string server_name(memcached_server_name(instance)); + server_name.append(":"); + strstm << memcached_server_port(instance); + server_name.append(strstm.str()); + + std::map server_stats; + char **list= memcached_stat_get_keys(memc_, &stats[x], &rc); + for (char** ptr= list; *ptr; ptr++) + { + char *value= memcached_stat_get_value(memc_, &stats[x], *ptr, &rc); + server_stats[*ptr]= value; + free(value); + } + + stats_map[server_name]= server_stats; + free(list); + } + + memcached_stat_free(memc_, stats); + return true; + } + +private: + memcached_st *memc_; +}; + +} diff --git a/libmemcached-1.0/options.h b/libmemcached-1.0/options.h new file mode 100644 index 0000000..f5a6e06 --- /dev/null +++ b/libmemcached-1.0/options.h @@ -0,0 +1,49 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API + memcached_return_t libmemcached_check_configuration(const char *option_string, size_t length, char *error_buffer, size_t error_buffer_size); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached-1.0/parse.h b/libmemcached-1.0/parse.h new file mode 100644 index 0000000..a91f769 --- /dev/null +++ b/libmemcached-1.0/parse.h @@ -0,0 +1,23 @@ +/* LibMemcached + * Copyright (C) 2010 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: Work with fetching results + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API +memcached_server_list_st memcached_servers_parse(const char *server_strings); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached-1.0/platform.h b/libmemcached-1.0/platform.h new file mode 100644 index 0000000..efdf53f --- /dev/null +++ b/libmemcached-1.0/platform.h @@ -0,0 +1,62 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + + +#if defined(_WIN32) +# include +# include + +#ifndef HAVE_IN_PORT_T +typedef int in_port_t; +# define HAVE_IN_PORT_T 1 +#endif + +typedef SOCKET memcached_socket_t; + +#else +# include +# include +# include +# include +# include +# include + +typedef int memcached_socket_t; + +#endif /* _WIN32 */ diff --git a/libmemcached-1.0/quit.h b/libmemcached-1.0/quit.h new file mode 100644 index 0000000..90ff3ff --- /dev/null +++ b/libmemcached-1.0/quit.h @@ -0,0 +1,49 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API +void memcached_quit(memcached_st *ptr); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached-1.0/result.h b/libmemcached-1.0/result.h new file mode 100644 index 0000000..615957f --- /dev/null +++ b/libmemcached-1.0/result.h @@ -0,0 +1,89 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +/* Result Struct */ +LIBMEMCACHED_API +void memcached_result_free(memcached_result_st *result); + +LIBMEMCACHED_API +void memcached_result_reset(memcached_result_st *ptr); + +LIBMEMCACHED_API +memcached_result_st *memcached_result_create(const memcached_st *ptr, + memcached_result_st *result); + +LIBMEMCACHED_API +const char *memcached_result_key_value(const memcached_result_st *self); + +LIBMEMCACHED_API +size_t memcached_result_key_length(const memcached_result_st *self); + +LIBMEMCACHED_API +const char *memcached_result_value(const memcached_result_st *self); + +LIBMEMCACHED_API +char *memcached_result_take_value(memcached_result_st *self); + +LIBMEMCACHED_API +size_t memcached_result_length(const memcached_result_st *self); + +LIBMEMCACHED_API +uint32_t memcached_result_flags(const memcached_result_st *self); + +LIBMEMCACHED_API +uint64_t memcached_result_cas(const memcached_result_st *self); + +LIBMEMCACHED_API +memcached_return_t memcached_result_set_value(memcached_result_st *ptr, const char *value, size_t length); + +LIBMEMCACHED_API +void memcached_result_set_flags(memcached_result_st *self, uint32_t flags); + +LIBMEMCACHED_API +void memcached_result_set_expiration(memcached_result_st *self, time_t expiration); + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/libmemcached-1.0/return.h b/libmemcached-1.0/return.h new file mode 100644 index 0000000..781603b --- /dev/null +++ b/libmemcached-1.0/return.h @@ -0,0 +1,82 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +static inline bool memcached_success(memcached_return_t rc) +{ + return (rc == MEMCACHED_BUFFERED || + rc == MEMCACHED_DELETED || + rc == MEMCACHED_END || + rc == MEMCACHED_ITEM || + rc == MEMCACHED_STAT || + rc == MEMCACHED_STORED || + rc == MEMCACHED_SUCCESS || + rc == MEMCACHED_VALUE); +} + +static inline bool memcached_failed(memcached_return_t rc) +{ + return (rc != MEMCACHED_SUCCESS && + rc != MEMCACHED_END && + rc != MEMCACHED_STORED && + rc != MEMCACHED_STAT && + rc != MEMCACHED_DELETED && + rc != MEMCACHED_BUFFERED && + rc != MEMCACHED_VALUE); +} + +static inline bool memcached_fatal(memcached_return_t rc) +{ + return ( + rc != MEMCACHED_BUFFERED && + rc != MEMCACHED_CLIENT_ERROR && + rc != MEMCACHED_DATA_EXISTS && + rc != MEMCACHED_DELETED && + rc != MEMCACHED_E2BIG && + rc != MEMCACHED_END && + rc != MEMCACHED_ITEM && + rc != MEMCACHED_ERROR && + rc != MEMCACHED_NOTFOUND && + rc != MEMCACHED_NOTSTORED && + rc != MEMCACHED_SERVER_MEMORY_ALLOCATION_FAILURE && + rc != MEMCACHED_STAT && + rc != MEMCACHED_STORED && + rc != MEMCACHED_SUCCESS && + rc != MEMCACHED_VALUE); +} + +#define memcached_continue(__memcached_return_t) ((__memcached_return_t) == MEMCACHED_IN_PROGRESS) diff --git a/libmemcached-1.0/sasl.h b/libmemcached-1.0/sasl.h new file mode 100644 index 0000000..c308421 --- /dev/null +++ b/libmemcached-1.0/sasl.h @@ -0,0 +1,70 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#if defined(LIBMEMCACHED_WITH_SASL_SUPPORT) && LIBMEMCACHED_WITH_SASL_SUPPORT +#include +#else +#define sasl_callback_t void +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API +void memcached_set_sasl_callbacks(memcached_st *ptr, + const sasl_callback_t *callbacks); + +LIBMEMCACHED_API +memcached_return_t memcached_set_sasl_auth_data(memcached_st *ptr, + const char *username, + const char *password); + +LIBMEMCACHED_API +memcached_return_t memcached_destroy_sasl_auth_data(memcached_st *ptr); + + +LIBMEMCACHED_API +sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *ptr); + +#ifdef __cplusplus +} +#endif + +#include diff --git a/libmemcached-1.0/server.h b/libmemcached-1.0/server.h new file mode 100644 index 0000000..abd0bfb --- /dev/null +++ b/libmemcached-1.0/server.h @@ -0,0 +1,126 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#pragma once + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API +memcached_return_t memcached_server_cursor(const memcached_st *ptr, + const memcached_server_fn *callback, + void *context, + uint32_t number_of_callbacks); + +LIBMEMCACHED_API + const memcached_instance_st * memcached_server_by_key(memcached_st *ptr, + const char *key, + size_t key_length, + memcached_return_t *error); + +LIBMEMCACHED_API +void memcached_server_error_reset(memcached_server_st *ptr); + +LIBMEMCACHED_API +void memcached_server_free(memcached_server_st *ptr); + +LIBMEMCACHED_API +const memcached_instance_st * memcached_server_get_last_disconnect(const memcached_st *ptr); + + +LIBMEMCACHED_API +memcached_return_t memcached_server_add_udp(memcached_st *ptr, + const char *hostname, + in_port_t port); +LIBMEMCACHED_API +memcached_return_t memcached_server_add_unix_socket(memcached_st *ptr, + const char *filename); +LIBMEMCACHED_API +memcached_return_t memcached_server_add(memcached_st *ptr, + const char *hostname, in_port_t port); + +LIBMEMCACHED_API +memcached_return_t memcached_server_add_udp_with_weight(memcached_st *ptr, + const char *hostname, + in_port_t port, + uint32_t weight); +LIBMEMCACHED_API +memcached_return_t memcached_server_add_unix_socket_with_weight(memcached_st *ptr, + const char *filename, + uint32_t weight); +LIBMEMCACHED_API +memcached_return_t memcached_server_add_with_weight(memcached_st *ptr, const char *hostname, + in_port_t port, + uint32_t weight); + +/** + Operations on Single Servers. +*/ +LIBMEMCACHED_API +uint32_t memcached_server_response_count(const memcached_instance_st * self); + +LIBMEMCACHED_API +const char *memcached_server_name(const memcached_instance_st * self); + +LIBMEMCACHED_API +in_port_t memcached_server_port(const memcached_instance_st * self); + +LIBMEMCACHED_API +in_port_t memcached_server_srcport(const memcached_instance_st * self); + +LIBMEMCACHED_API +void memcached_instance_next_retry(const memcached_instance_st * self, const time_t absolute_time); + +LIBMEMCACHED_API +const char *memcached_server_type(const memcached_instance_st * ptr); + +LIBMEMCACHED_API +uint8_t memcached_server_major_version(const memcached_instance_st * ptr); + +LIBMEMCACHED_API +uint8_t memcached_server_minor_version(const memcached_instance_st * ptr); + +LIBMEMCACHED_API +uint8_t memcached_server_micro_version(const memcached_instance_st * ptr); + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/libmemcached-1.0/server_list.h b/libmemcached-1.0/server_list.h new file mode 100644 index 0000000..04bebab --- /dev/null +++ b/libmemcached-1.0/server_list.h @@ -0,0 +1,68 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + + +#ifdef __cplusplus +extern "C" { +#endif + +/* Server List Public functions */ +LIBMEMCACHED_API + void memcached_server_list_free(memcached_server_list_st ptr); + +LIBMEMCACHED_API + memcached_return_t memcached_server_push(memcached_st *ptr, const memcached_server_list_st list); + +LIBMEMCACHED_API + memcached_server_list_st memcached_server_list_append(memcached_server_list_st ptr, + const char *hostname, + in_port_t port, + memcached_return_t *error); +LIBMEMCACHED_API + memcached_server_list_st memcached_server_list_append_with_weight(memcached_server_list_st ptr, + const char *hostname, + in_port_t port, + uint32_t weight, + memcached_return_t *error); +LIBMEMCACHED_API + uint32_t memcached_server_list_count(const memcached_server_list_st ptr); + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/libmemcached-1.0/stats.h b/libmemcached-1.0/stats.h new file mode 100644 index 0000000..708064f --- /dev/null +++ b/libmemcached-1.0/stats.h @@ -0,0 +1,69 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API +void memcached_stat_free(const memcached_st *, memcached_stat_st *); + +LIBMEMCACHED_API +memcached_stat_st *memcached_stat(memcached_st *ptr, char *args, memcached_return_t *error); + +LIBMEMCACHED_API +memcached_return_t memcached_stat_servername(memcached_stat_st *memc_stat, char *args, + const char *hostname, in_port_t port); + +LIBMEMCACHED_API +char *memcached_stat_get_value(const memcached_st *ptr, memcached_stat_st *memc_stat, + const char *key, memcached_return_t *error); + +LIBMEMCACHED_API +char ** memcached_stat_get_keys(memcached_st *ptr, memcached_stat_st *memc_stat, + memcached_return_t *error); + +LIBMEMCACHED_API +memcached_return_t memcached_stat_execute(memcached_st *memc, const char *args, memcached_stat_fn func, void *context); + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/libmemcached-1.0/storage.h b/libmemcached-1.0/storage.h new file mode 100644 index 0000000..e634235 --- /dev/null +++ b/libmemcached-1.0/storage.h @@ -0,0 +1,131 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +/* All of the functions for adding data to the server */ +LIBMEMCACHED_API +memcached_return_t memcached_set(memcached_st *ptr, const char *key, size_t key_length, + const char *value, size_t value_length, + time_t expiration, + uint32_t flags); +LIBMEMCACHED_API +memcached_return_t memcached_add(memcached_st *ptr, const char *key, size_t key_length, + const char *value, size_t value_length, + time_t expiration, + uint32_t flags); +LIBMEMCACHED_API +memcached_return_t memcached_replace(memcached_st *ptr, const char *key, size_t key_length, + const char *value, size_t value_length, + time_t expiration, + uint32_t flags); +LIBMEMCACHED_API +memcached_return_t memcached_append(memcached_st *ptr, + const char *key, size_t key_length, + const char *value, size_t value_length, + time_t expiration, + uint32_t flags); +LIBMEMCACHED_API +memcached_return_t memcached_prepend(memcached_st *ptr, + const char *key, size_t key_length, + const char *value, size_t value_length, + time_t expiration, + uint32_t flags); +LIBMEMCACHED_API +memcached_return_t memcached_cas(memcached_st *ptr, + const char *key, size_t key_length, + const char *value, size_t value_length, + time_t expiration, + uint32_t flags, + uint64_t cas); + +LIBMEMCACHED_API +memcached_return_t memcached_set_by_key(memcached_st *ptr, + const char *group_key, size_t group_key_length, + const char *key, size_t key_length, + const char *value, size_t value_length, + time_t expiration, + uint32_t flags); + +LIBMEMCACHED_API +memcached_return_t memcached_add_by_key(memcached_st *ptr, + const char *group_key, size_t group_key_length, + const char *key, size_t key_length, + const char *value, size_t value_length, + time_t expiration, + uint32_t flags); + +LIBMEMCACHED_API +memcached_return_t memcached_replace_by_key(memcached_st *ptr, + const char *group_key, size_t group_key_length, + const char *key, size_t key_length, + const char *value, size_t value_length, + time_t expiration, + uint32_t flags); + +LIBMEMCACHED_API +memcached_return_t memcached_prepend_by_key(memcached_st *ptr, + const char *group_key, size_t group_key_length, + const char *key, size_t key_length, + const char *value, size_t value_length, + time_t expiration, + uint32_t flags); + +LIBMEMCACHED_API +memcached_return_t memcached_append_by_key(memcached_st *ptr, + const char *group_key, size_t group_key_length, + const char *key, size_t key_length, + const char *value, size_t value_length, + time_t expiration, + uint32_t flags); + +LIBMEMCACHED_API +memcached_return_t memcached_cas_by_key(memcached_st *ptr, + const char *group_key, size_t group_key_length, + const char *key, size_t key_length, + const char *value, size_t value_length, + time_t expiration, + uint32_t flags, + uint64_t cas); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached-1.0/strerror.h b/libmemcached-1.0/strerror.h new file mode 100644 index 0000000..16bf424 --- /dev/null +++ b/libmemcached-1.0/strerror.h @@ -0,0 +1,50 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API +const char *memcached_strerror(const memcached_st *ptr, memcached_return_t rc); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached-1.0/struct/allocator.h b/libmemcached-1.0/struct/allocator.h new file mode 100644 index 0000000..3ff6ade --- /dev/null +++ b/libmemcached-1.0/struct/allocator.h @@ -0,0 +1,46 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +struct memcached_allocator_t { + memcached_calloc_fn calloc; + memcached_free_fn free; + memcached_malloc_fn malloc; + memcached_realloc_fn realloc; + void *context; +}; diff --git a/libmemcached-1.0/struct/analysis.h b/libmemcached-1.0/struct/analysis.h new file mode 100644 index 0000000..09ccced --- /dev/null +++ b/libmemcached-1.0/struct/analysis.h @@ -0,0 +1,51 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +struct memcached_analysis_st { + memcached_st *root; + uint32_t average_item_size; + uint32_t longest_uptime; + uint32_t least_free_server; + uint32_t most_consumed_server; + uint32_t oldest_server; + double pool_hit_ratio; + uint64_t most_used_bytes; + uint64_t least_remaining_bytes; +}; + diff --git a/libmemcached-1.0/struct/callback.h b/libmemcached-1.0/struct/callback.h new file mode 100644 index 0000000..21b9676 --- /dev/null +++ b/libmemcached-1.0/struct/callback.h @@ -0,0 +1,44 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +struct memcached_callback_st { + memcached_execute_fn *callback; + void *context; + uint32_t number_of_callback; +}; diff --git a/libmemcached-1.0/struct/include.am b/libmemcached-1.0/struct/include.am new file mode 100644 index 0000000..fc2d922 --- /dev/null +++ b/libmemcached-1.0/struct/include.am @@ -0,0 +1,13 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +nobase_include_HEADERS+= libmemcached-1.0/struct/allocator.h +nobase_include_HEADERS+= libmemcached-1.0/struct/analysis.h +nobase_include_HEADERS+= libmemcached-1.0/struct/callback.h +nobase_include_HEADERS+= libmemcached-1.0/struct/memcached.h +nobase_include_HEADERS+= libmemcached-1.0/struct/result.h +nobase_include_HEADERS+= libmemcached-1.0/struct/sasl.h +nobase_include_HEADERS+= libmemcached-1.0/struct/server.h +nobase_include_HEADERS+= libmemcached-1.0/struct/stat.h +nobase_include_HEADERS+= libmemcached-1.0/struct/string.h diff --git a/libmemcached-1.0/struct/memcached.h b/libmemcached-1.0/struct/memcached.h new file mode 100644 index 0000000..a368bfe --- /dev/null +++ b/libmemcached-1.0/struct/memcached.h @@ -0,0 +1,128 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +struct memcached_st { + /** + @note these are static and should not change without a call to behavior. + */ + struct { + bool is_purging:1; + bool is_processing_input:1; + bool is_time_for_rebuild:1; + bool is_parsing:1; + } state; + + struct { + // Everything below here is pretty static. + bool auto_eject_hosts:1; + bool binary_protocol:1; + bool buffer_requests:1; + bool hash_with_namespace:1; + bool no_block:1; // Don't block + bool reply:1; + bool randomize_replica_read:1; + bool support_cas:1; + bool tcp_nodelay:1; + bool use_sort_hosts:1; + bool use_udp:1; + bool verify_key:1; + bool tcp_keepalive:1; + bool is_aes:1; + bool is_fetching_version:1; + bool not_used:1; + } flags; + + memcached_server_distribution_t distribution; + hashkit_st hashkit; + struct { + unsigned int version; + } server_info; + uint32_t number_of_hosts; + memcached_instance_st *servers; + memcached_instance_st *last_disconnected_server; + int32_t snd_timeout; + int32_t rcv_timeout; + uint32_t server_failure_limit; + uint32_t server_timeout_limit; + uint32_t io_msg_watermark; + uint32_t io_bytes_watermark; + uint32_t io_key_prefetch; + uint32_t tcp_keepidle; + int32_t poll_timeout; + int32_t connect_timeout; // How long we will wait on connect() before we will timeout + int32_t retry_timeout; + int32_t dead_timeout; + int send_size; + int recv_size; + void *user_data; + uint64_t query_id; + uint32_t number_of_replicas; + memcached_result_st result; + + struct { + bool weighted_; + uint32_t continuum_count; // Ketama + uint32_t continuum_points_counter; // Ketama + time_t next_distribution_rebuild; // Ketama + struct memcached_continuum_item_st *continuum; // Ketama + } ketama; + + struct memcached_virtual_bucket_t *virtual_bucket; + + struct memcached_allocator_t allocators; + + memcached_clone_fn on_clone; + memcached_cleanup_fn on_cleanup; + memcached_trigger_key_fn get_key_failure; + memcached_trigger_delete_key_fn delete_trigger; + memcached_callback_st *callbacks; + struct memcached_sasl_st sasl; + struct memcached_error_t *error_messages; + struct memcached_array_st *_namespace; + struct { + uint32_t initial_pool_size; + uint32_t max_pool_size; + int32_t version; // This is used by pool and others to determine if the memcached_st is out of date. + struct memcached_array_st *filename; + } configure; + struct { + bool is_allocated:1; + } options; + +}; diff --git a/libmemcached-1.0/struct/result.h b/libmemcached-1.0/struct/result.h new file mode 100644 index 0000000..c3bfddb --- /dev/null +++ b/libmemcached-1.0/struct/result.h @@ -0,0 +1,56 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +struct memcached_result_st { + uint32_t item_flags; + time_t item_expiration; + size_t key_length; + uint64_t item_cas; + struct memcached_st *root; + memcached_string_st value; + uint64_t numeric_value; + uint64_t count; + char item_key[MEMCACHED_MAX_KEY]; + struct { + bool is_allocated:1; + bool is_initialized:1; + } options; + /* Add result callback function */ +}; + diff --git a/libmemcached-1.0/struct/sasl.h b/libmemcached-1.0/struct/sasl.h new file mode 100644 index 0000000..da9eed3 --- /dev/null +++ b/libmemcached-1.0/struct/sasl.h @@ -0,0 +1,54 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#if defined(LIBMEMCACHED_WITH_SASL_SUPPORT) && LIBMEMCACHED_WITH_SASL_SUPPORT +#include +#else +#define sasl_callback_t void +#endif + +#pragma once + +struct memcached_sasl_st { + sasl_callback_t *callbacks; + /* + ** Did we allocate data inside the callbacks, or did the user + ** supply that. + */ + bool is_allocated; +}; + diff --git a/libmemcached-1.0/struct/server.h b/libmemcached-1.0/struct/server.h new file mode 100644 index 0000000..9337938 --- /dev/null +++ b/libmemcached-1.0/struct/server.h @@ -0,0 +1,100 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#pragma once + +#ifdef HAVE_NETDB_H +# include +#endif + +#ifdef NI_MAXHOST +# define MEMCACHED_NI_MAXHOST NI_MAXHOST +#else +# define MEMCACHED_NI_MAXHOST 1025 +#endif + +#ifdef NI_MAXSERV +# define MEMCACHED_NI_MAXSERV NI_MAXSERV +#else +# define MEMCACHED_NI_MAXSERV 32 +#endif + +enum memcached_server_state_t { + MEMCACHED_SERVER_STATE_NEW, // fd == -1, no address lookup has been done + MEMCACHED_SERVER_STATE_ADDRINFO, // ADDRRESS information has been gathered + MEMCACHED_SERVER_STATE_IN_PROGRESS, + MEMCACHED_SERVER_STATE_CONNECTED, + MEMCACHED_SERVER_STATE_IN_TIMEOUT, + MEMCACHED_SERVER_STATE_DISABLED +}; + +struct memcached_server_st { + struct { + bool is_allocated:1; + bool is_initialized:1; + bool is_shutting_down:1; + bool is_dead:1; + } options; + uint32_t number_of_hosts; + uint32_t cursor_active; + in_port_t port; + uint32_t io_bytes_sent; /* # bytes sent since last read */ + uint32_t request_id; + uint32_t server_failure_counter; + uint64_t server_failure_counter_query_id; + uint32_t server_timeout_counter; + uint64_t server_timeout_counter_query_id; + uint32_t weight; + uint32_t version; + enum memcached_server_state_t state; + struct { + uint32_t read; + uint32_t write; + uint32_t timeouts; + size_t _bytes_read; + } io_wait_count; + uint8_t major_version; // Default definition of UINT8_MAX means that it has not been set. + uint8_t micro_version; // ditto, and note that this is the third, not second version bit + uint8_t minor_version; // ditto + memcached_connection_t type; + time_t next_retry; + struct memcached_st *root; + uint64_t limit_maxbytes; + struct memcached_error_t *error_messages; + char hostname[MEMCACHED_NI_MAXHOST]; +}; diff --git a/libmemcached-1.0/struct/stat.h b/libmemcached-1.0/struct/stat.h new file mode 100644 index 0000000..acd4e21 --- /dev/null +++ b/libmemcached-1.0/struct/stat.h @@ -0,0 +1,68 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +struct memcached_stat_st { + unsigned long connection_structures; + unsigned long curr_connections; + unsigned long curr_items; + pid_t pid; + unsigned long pointer_size; + unsigned long rusage_system_microseconds; + unsigned long rusage_system_seconds; + unsigned long rusage_user_microseconds; + unsigned long rusage_user_seconds; + unsigned long threads; + unsigned long time; + unsigned long total_connections; + unsigned long total_items; + unsigned long uptime; + unsigned long long bytes; + unsigned long long bytes_read; + unsigned long long bytes_written; + unsigned long long cmd_get; + unsigned long long cmd_set; + unsigned long long evictions; + unsigned long long get_hits; + unsigned long long get_misses; + unsigned long long limit_maxbytes; + char version[MEMCACHED_VERSION_STRING_LENGTH]; + void *__future; // @todo create a new structure to place here for future usage + memcached_st *root; +}; + diff --git a/libmemcached-1.0/struct/string.h b/libmemcached-1.0/struct/string.h new file mode 100644 index 0000000..9edb637 --- /dev/null +++ b/libmemcached-1.0/struct/string.h @@ -0,0 +1,59 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +/** + Strings are always under our control so we make some assumptions + about them. + + 1) is_initialized is always valid. + 2) A string once intialized will always be, until free where we + unset this flag. + 3) A string always has a root. +*/ + +struct memcached_string_st { + char *end; + char *string; + size_t current_size; + struct memcached_st *root; + struct { + bool is_allocated:1; + bool is_initialized:1; + } options; +}; diff --git a/libmemcached-1.0/t/c_sasl_test.c b/libmemcached-1.0/t/c_sasl_test.c new file mode 100644 index 0000000..93f729d --- /dev/null +++ b/libmemcached-1.0/t/c_sasl_test.c @@ -0,0 +1,61 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached C sasl test app + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* + * @file @brief C dummy test, aka testing C linking, etc + */ + +#include + +#ifdef HAVE_SASL_SASL_H +#include +#endif + +#include + +int main(void) +{ + memcached_st *memc= memcached_create(NULL); + + if (memc == NULL) + { + return EXIT_FAILURE; + } + memcached_free(memc); + + return EXIT_SUCCESS; +} + diff --git a/libmemcached-1.0/t/c_test.c b/libmemcached-1.0/t/c_test.c new file mode 100644 index 0000000..40935fa --- /dev/null +++ b/libmemcached-1.0/t/c_test.c @@ -0,0 +1,61 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached C test app + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* + * @file @brief C dummy test, aka testing C linking, etc + */ + +#include + +#include + +int main(void) +{ + (void)memcached_success(MEMCACHED_SUCCESS); + (void)memcached_failed(MEMCACHED_SUCCESS); + (void)memcached_continue(MEMCACHED_SUCCESS); + + memcached_st *memc= memcached_create(NULL); + + if (memc == NULL) + { + return EXIT_FAILURE; + } + memcached_free(memc); + + return EXIT_SUCCESS; +} + diff --git a/libmemcached-1.0/t/cc_test.cc b/libmemcached-1.0/t/cc_test.cc new file mode 100644 index 0000000..71ee8c3 --- /dev/null +++ b/libmemcached-1.0/t/cc_test.cc @@ -0,0 +1,62 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached C++ test app + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* + * @file @brief C dummy test, aka testing C linking, etc + */ + +#include + +#include + +int main(void) +{ + (void)memcached_success(MEMCACHED_SUCCESS); + (void)memcached_failed(MEMCACHED_SUCCESS); + (void)memcached_continue(MEMCACHED_SUCCESS); + + memcached_st *memc= memcached_create(NULL); + + if (memc == NULL) + { + return EXIT_FAILURE; + } + + memcached_free(memc); + + return EXIT_SUCCESS; +} + diff --git a/libmemcached-1.0/t/include.am b/libmemcached-1.0/t/include.am new file mode 100644 index 0000000..2a6c512 --- /dev/null +++ b/libmemcached-1.0/t/include.am @@ -0,0 +1,32 @@ +# vim:ft=automake +# Copyright (C) 2011 Data Differential +# All rights reserved. +# +# Use and distribution licensed under the BSD license. See +# the COPYING file in the parent directory for full text. +# +# included from Top Level Makefile.am +# All paths should be given relative to the root + +LIBMEMCACHED_1_0_TEST_PATH= libmemcached-1.0/t + +if SHARED_ENABLED +# Test linking with C application +libmemcached_1_0_t_c_test_SOURCES= libmemcached-1.0/t/c_test.c +libmemcached_1_0_t_c_test_LDADD= libmemcached/libmemcached.la +check_PROGRAMS+= libmemcached-1.0/t/c_test +noinst_PROGRAMS+= libmemcached-1.0/t/c_test + +# Test linking with C application/SASL include +libmemcached_1_0_t_c_sasl_test_SOURCES= libmemcached-1.0/t/c_sasl_test.c +libmemcached_1_0_t_c_sasl_test_LDADD= libmemcached/libmemcached.la +check_PROGRAMS+= libmemcached-1.0/t/c_sasl_test +noinst_PROGRAMS+= libmemcached-1.0/t/c_sasl_test +else +endif + +# Test linking with C++ application +libmemcached_1_0_t_cc_test_SOURCES= libmemcached-1.0/t/cc_test.cc +libmemcached_1_0_t_cc_test_LDADD= libmemcached/libmemcached.la +check_PROGRAMS+= libmemcached-1.0/t/cc_test +noinst_PROGRAMS+= libmemcached-1.0/t/cc_test diff --git a/libmemcached-1.0/touch.h b/libmemcached-1.0/touch.h new file mode 100644 index 0000000..e143c03 --- /dev/null +++ b/libmemcached-1.0/touch.h @@ -0,0 +1,59 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + + +LIBMEMCACHED_API +memcached_return_t memcached_touch(memcached_st *ptr, + const char *key, size_t key_length, + time_t expiration); + +LIBMEMCACHED_API +memcached_return_t memcached_touch_by_key(memcached_st *ptr, + const char *group_key, size_t group_key_length, + const char *key, size_t key_length, + time_t expiration); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached-1.0/triggers.h b/libmemcached-1.0/triggers.h new file mode 100644 index 0000000..b331429 --- /dev/null +++ b/libmemcached-1.0/triggers.h @@ -0,0 +1,64 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +typedef memcached_return_t (*memcached_clone_fn)(memcached_st *destination, const memcached_st *source); +typedef memcached_return_t (*memcached_cleanup_fn)(const memcached_st *ptr); + +/** + Trigger functions. +*/ +typedef memcached_return_t (*memcached_trigger_key_fn)(const memcached_st *ptr, + const char *key, size_t key_length, + memcached_result_st *result); +typedef memcached_return_t (*memcached_trigger_delete_key_fn)(const memcached_st *ptr, + const char *key, size_t key_length); + +typedef memcached_return_t (*memcached_dump_fn)(const memcached_st *ptr, + const char *key, + size_t key_length, + void *context); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached-1.0/types.h b/libmemcached-1.0/types.h new file mode 100644 index 0000000..2c3f87a --- /dev/null +++ b/libmemcached-1.0/types.h @@ -0,0 +1,83 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#pragma once + +#ifdef __cplusplus + +struct memcached_st; +struct memcached_stat_st; +struct memcached_analysis_st; +struct memcached_result_st; +struct memcached_array_st; +struct memcached_error_t; + +// All of the flavors of memcache_server_st +struct memcached_server_st; +struct memcached_instance_st; +typedef struct memcached_instance_st memcached_instance_st; +typedef struct memcached_server_st *memcached_server_list_st; + +struct memcached_callback_st; + +// The following two structures are internal, and never exposed to users. +struct memcached_string_st; +struct memcached_string_t; +struct memcached_continuum_item_st; + +#else + +typedef struct memcached_st memcached_st; +typedef struct memcached_stat_st memcached_stat_st; +typedef struct memcached_analysis_st memcached_analysis_st; +typedef struct memcached_result_st memcached_result_st; +typedef struct memcached_array_st memcached_array_st; +typedef struct memcached_error_t memcached_error_t; + +// All of the flavors of memcache_server_st +typedef struct memcached_server_st memcached_server_st; +typedef struct memcached_instance_st memcached_instance_st; +typedef struct memcached_server_st *memcached_server_list_st; + +typedef struct memcached_callback_st memcached_callback_st; + +// The following two structures are internal, and never exposed to users. +typedef struct memcached_string_st memcached_string_st; +typedef struct memcached_string_t memcached_string_t; + +#endif diff --git a/libmemcached-1.0/types/behavior.h b/libmemcached-1.0/types/behavior.h new file mode 100644 index 0000000..a1bbfd2 --- /dev/null +++ b/libmemcached-1.0/types/behavior.h @@ -0,0 +1,85 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#pragma once + +enum memcached_behavior_t { + MEMCACHED_BEHAVIOR_NO_BLOCK, + MEMCACHED_BEHAVIOR_TCP_NODELAY, + MEMCACHED_BEHAVIOR_HASH, + MEMCACHED_BEHAVIOR_KETAMA, + MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE, + MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE, + MEMCACHED_BEHAVIOR_CACHE_LOOKUPS, + MEMCACHED_BEHAVIOR_SUPPORT_CAS, + MEMCACHED_BEHAVIOR_POLL_TIMEOUT, + MEMCACHED_BEHAVIOR_DISTRIBUTION, + MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, + MEMCACHED_BEHAVIOR_USER_DATA, + MEMCACHED_BEHAVIOR_SORT_HOSTS, + MEMCACHED_BEHAVIOR_VERIFY_KEY, + MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT, + MEMCACHED_BEHAVIOR_RETRY_TIMEOUT, + MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED, + MEMCACHED_BEHAVIOR_KETAMA_HASH, + MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, + MEMCACHED_BEHAVIOR_SND_TIMEOUT, + MEMCACHED_BEHAVIOR_RCV_TIMEOUT, + MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT, + MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK, + MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK, + MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH, + MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY, + MEMCACHED_BEHAVIOR_NOREPLY, + MEMCACHED_BEHAVIOR_USE_UDP, + MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS, + MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS, + MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ, + MEMCACHED_BEHAVIOR_CORK, + MEMCACHED_BEHAVIOR_TCP_KEEPALIVE, + MEMCACHED_BEHAVIOR_TCP_KEEPIDLE, + MEMCACHED_BEHAVIOR_LOAD_FROM_FILE, + MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS, + MEMCACHED_BEHAVIOR_DEAD_TIMEOUT, + MEMCACHED_BEHAVIOR_SERVER_TIMEOUT_LIMIT, + MEMCACHED_BEHAVIOR_MAX +}; + +#ifndef __cplusplus +typedef enum memcached_behavior_t memcached_behavior_t; +#endif diff --git a/libmemcached-1.0/types/callback.h b/libmemcached-1.0/types/callback.h new file mode 100644 index 0000000..d5481f5 --- /dev/null +++ b/libmemcached-1.0/types/callback.h @@ -0,0 +1,54 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#pragma once + +enum memcached_callback_t { + MEMCACHED_CALLBACK_PREFIX_KEY = 0, + MEMCACHED_CALLBACK_USER_DATA = 1, + MEMCACHED_CALLBACK_CLEANUP_FUNCTION = 2, + MEMCACHED_CALLBACK_CLONE_FUNCTION = 3, + MEMCACHED_CALLBACK_GET_FAILURE = 7, + MEMCACHED_CALLBACK_DELETE_TRIGGER = 8, + MEMCACHED_CALLBACK_MAX, + MEMCACHED_CALLBACK_NAMESPACE= MEMCACHED_CALLBACK_PREFIX_KEY +}; + +#ifndef __cplusplus +typedef enum memcached_callback_t memcached_callback_t; +#endif diff --git a/libmemcached-1.0/types/connection.h b/libmemcached-1.0/types/connection.h new file mode 100644 index 0000000..d2a072b --- /dev/null +++ b/libmemcached-1.0/types/connection.h @@ -0,0 +1,49 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#pragma once + +enum memcached_connection_t { + MEMCACHED_CONNECTION_TCP, + MEMCACHED_CONNECTION_UDP, + MEMCACHED_CONNECTION_UNIX_SOCKET +}; + +#ifndef __cplusplus +typedef enum memcached_connection_t memcached_connection_t; +#endif diff --git a/libmemcached-1.0/types/hash.h b/libmemcached-1.0/types/hash.h new file mode 100644 index 0000000..8eee4df --- /dev/null +++ b/libmemcached-1.0/types/hash.h @@ -0,0 +1,59 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#pragma once + +enum memcached_hash_t { + MEMCACHED_HASH_DEFAULT= 0, + MEMCACHED_HASH_MD5, + MEMCACHED_HASH_CRC, + MEMCACHED_HASH_FNV1_64, + MEMCACHED_HASH_FNV1A_64, + MEMCACHED_HASH_FNV1_32, + MEMCACHED_HASH_FNV1A_32, + MEMCACHED_HASH_HSIEH, + MEMCACHED_HASH_MURMUR, + MEMCACHED_HASH_JENKINS, + MEMCACHED_HASH_MURMUR3, + MEMCACHED_HASH_CUSTOM, + MEMCACHED_HASH_MAX +}; + +#ifndef __cplusplus +typedef enum memcached_hash_t memcached_hash_t; +#endif diff --git a/libmemcached-1.0/types/include.am b/libmemcached-1.0/types/include.am new file mode 100644 index 0000000..fa33046 --- /dev/null +++ b/libmemcached-1.0/types/include.am @@ -0,0 +1,8 @@ +# vim:ft=automake + +nobase_include_HEADERS+= libmemcached-1.0/types/behavior.h +nobase_include_HEADERS+= libmemcached-1.0/types/callback.h +nobase_include_HEADERS+= libmemcached-1.0/types/connection.h +nobase_include_HEADERS+= libmemcached-1.0/types/hash.h +nobase_include_HEADERS+= libmemcached-1.0/types/return.h +nobase_include_HEADERS+= libmemcached-1.0/types/server_distribution.h diff --git a/libmemcached-1.0/types/return.h b/libmemcached-1.0/types/return.h new file mode 100644 index 0000000..f4ec9b0 --- /dev/null +++ b/libmemcached-1.0/types/return.h @@ -0,0 +1,95 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +enum memcached_return_t { + MEMCACHED_SUCCESS, + MEMCACHED_FAILURE, + MEMCACHED_HOST_LOOKUP_FAILURE, // getaddrinfo() and getnameinfo() only + MEMCACHED_CONNECTION_FAILURE, + MEMCACHED_CONNECTION_BIND_FAILURE, // DEPRECATED, see MEMCACHED_HOST_LOOKUP_FAILURE + MEMCACHED_WRITE_FAILURE, + MEMCACHED_READ_FAILURE, + MEMCACHED_UNKNOWN_READ_FAILURE, + MEMCACHED_PROTOCOL_ERROR, + MEMCACHED_CLIENT_ERROR, + MEMCACHED_SERVER_ERROR, // Server returns "SERVER_ERROR" + MEMCACHED_ERROR, // Server returns "ERROR" + MEMCACHED_DATA_EXISTS, + MEMCACHED_DATA_DOES_NOT_EXIST, + MEMCACHED_NOTSTORED, + MEMCACHED_STORED, + MEMCACHED_NOTFOUND, + MEMCACHED_MEMORY_ALLOCATION_FAILURE, + MEMCACHED_PARTIAL_READ, + MEMCACHED_SOME_ERRORS, + MEMCACHED_NO_SERVERS, + MEMCACHED_END, + MEMCACHED_DELETED, + MEMCACHED_VALUE, + MEMCACHED_STAT, + MEMCACHED_ITEM, + MEMCACHED_ERRNO, + MEMCACHED_FAIL_UNIX_SOCKET, // DEPRECATED + MEMCACHED_NOT_SUPPORTED, + MEMCACHED_NO_KEY_PROVIDED, /* Deprecated. Use MEMCACHED_BAD_KEY_PROVIDED! */ + MEMCACHED_FETCH_NOTFINISHED, + MEMCACHED_TIMEOUT, + MEMCACHED_BUFFERED, + MEMCACHED_BAD_KEY_PROVIDED, + MEMCACHED_INVALID_HOST_PROTOCOL, + MEMCACHED_SERVER_MARKED_DEAD, + MEMCACHED_UNKNOWN_STAT_KEY, + MEMCACHED_E2BIG, + MEMCACHED_INVALID_ARGUMENTS, + MEMCACHED_KEY_TOO_BIG, + MEMCACHED_AUTH_PROBLEM, + MEMCACHED_AUTH_FAILURE, + MEMCACHED_AUTH_CONTINUE, + MEMCACHED_PARSE_ERROR, + MEMCACHED_PARSE_USER_ERROR, + MEMCACHED_DEPRECATED, + MEMCACHED_IN_PROGRESS, + MEMCACHED_SERVER_TEMPORARILY_DISABLED, + MEMCACHED_SERVER_MEMORY_ALLOCATION_FAILURE, + MEMCACHED_MAXIMUM_RETURN, /* Always add new error code before */ + MEMCACHED_CONNECTION_SOCKET_CREATE_FAILURE= MEMCACHED_ERROR +}; + +#ifndef __cplusplus +typedef enum memcached_return_t memcached_return_t; +#endif diff --git a/libmemcached-1.0/types/server_distribution.h b/libmemcached-1.0/types/server_distribution.h new file mode 100644 index 0000000..95e129f --- /dev/null +++ b/libmemcached-1.0/types/server_distribution.h @@ -0,0 +1,54 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#pragma once + +enum memcached_server_distribution_t { + MEMCACHED_DISTRIBUTION_MODULA, + MEMCACHED_DISTRIBUTION_CONSISTENT, + MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA, + MEMCACHED_DISTRIBUTION_RANDOM, + MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY, + MEMCACHED_DISTRIBUTION_CONSISTENT_WEIGHTED, + MEMCACHED_DISTRIBUTION_VIRTUAL_BUCKET, + MEMCACHED_DISTRIBUTION_CONSISTENT_MAX +}; + +#ifndef __cplusplus +typedef enum memcached_server_distribution_t memcached_server_distribution_t; +#endif diff --git a/libmemcached-1.0/verbosity.h b/libmemcached-1.0/verbosity.h new file mode 100644 index 0000000..2994648 --- /dev/null +++ b/libmemcached-1.0/verbosity.h @@ -0,0 +1,50 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API +memcached_return_t memcached_verbosity(memcached_st *ptr, uint32_t verbosity); + + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached-1.0/version.h b/libmemcached-1.0/version.h new file mode 100644 index 0000000..c443acc --- /dev/null +++ b/libmemcached-1.0/version.h @@ -0,0 +1,52 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API +memcached_return_t memcached_version(memcached_st *ptr); + +LIBMEMCACHED_API +const char * memcached_lib_version(void); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached-1.0/visibility.h b/libmemcached-1.0/visibility.h new file mode 100644 index 0000000..d4e4eea --- /dev/null +++ b/libmemcached-1.0/visibility.h @@ -0,0 +1,67 @@ +/* LibMemcached + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: Interface for memcached server. + * + * Author: Trond Norbye + * + */ + +/** + * @file + * @brief Visibility control macros + */ + +#pragma once + +/** + * + * LIBMEMCACHED_API is used for the public API symbols. It either DLL imports or + * DLL exports (or does nothing for static build). + * + * LIBMEMCACHED_LOCAL is used for non-api symbols. + */ + +#if defined(BUILDING_LIBMEMCACHEDINTERNAL) +# if defined(HAVE_VISIBILITY) && HAVE_VISIBILITY +# define LIBMEMCACHED_API __attribute__ ((visibility("default"))) +# define LIBMEMCACHED_LOCAL __attribute__ ((visibility("default"))) +# elif defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550) +# define LIBMEMCACHED_API __global +# define LIBMEMCACHED_LOCAL __global +# elif defined(_MSC_VER) +# define LIBMEMCACHED_API extern __declspec(dllexport) +# define LIBMEMCACHED_LOCAL extern __declspec(dllexport) +# else +# define LIBMEMCACHED_API +# define LIBMEMCACHED_LOCAL +# endif +#else +# if defined(BUILDING_LIBMEMCACHED) +# if defined(HAVE_VISIBILITY) && HAVE_VISIBILITY +# define LIBMEMCACHED_API __attribute__ ((visibility("default"))) +# define LIBMEMCACHED_LOCAL __attribute__ ((visibility("hidden"))) +# elif defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550) +# define LIBMEMCACHED_API __global +# define LIBMEMCACHED_LOCAL __hidden +# elif defined(_MSC_VER) +# define LIBMEMCACHED_API extern __declspec(dllexport) +# define LIBMEMCACHED_LOCAL +# else +# define LIBMEMCACHED_API +# define LIBMEMCACHED_LOCAL +# endif /* defined(HAVE_VISIBILITY) */ +# else /* defined(BUILDING_LIBMEMCACHED) */ +# if defined(_MSC_VER) +# define LIBMEMCACHED_API extern __declspec(dllimport) +# define LIBMEMCACHED_LOCAL +# else +# define LIBMEMCACHED_API +# define LIBMEMCACHED_LOCAL +# endif /* defined(_MSC_VER) */ +# endif /* defined(BUILDING_LIBMEMCACHED) */ +#endif /* defined(BUILDING_LIBMEMCACHEDINTERNAL) */ diff --git a/libmemcached/allocators.cc b/libmemcached/allocators.cc new file mode 100644 index 0000000..f1caf71 --- /dev/null +++ b/libmemcached/allocators.cc @@ -0,0 +1,154 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +void _libmemcached_free(const memcached_st*, void *mem, void*) +{ + if (mem) + { + std::free(mem); + } +} + +void *_libmemcached_malloc(const memcached_st *, size_t size, void *) +{ + return std::malloc(size); +} + +void *_libmemcached_realloc(const memcached_st*, void *mem, size_t size, void *) +{ + return std::realloc(mem, size); +} + +void *_libmemcached_calloc(const memcached_st *self, size_t nelem, size_t size, void *context) +{ + if (self->allocators.malloc != _libmemcached_malloc) + { + void *ret= _libmemcached_malloc(self, nelem * size, context); + if (ret) + { + memset(ret, 0, nelem * size); + } + + return ret; + } + + return std::calloc(nelem, size); +} + +struct memcached_allocator_t memcached_allocators_return_default(void) +{ + static struct memcached_allocator_t global_default_allocator= { _libmemcached_calloc, _libmemcached_free, _libmemcached_malloc, _libmemcached_realloc, 0 }; + return global_default_allocator; +} + +memcached_return_t memcached_set_memory_allocators(memcached_st *shell, + memcached_malloc_fn mem_malloc, + memcached_free_fn mem_free, + memcached_realloc_fn mem_realloc, + memcached_calloc_fn mem_calloc, + void *context) +{ + Memcached* self= memcached2Memcached(shell); + if (self == NULL) + { + return MEMCACHED_INVALID_ARGUMENTS; + } + + /* All should be set, or none should be set */ + if (mem_malloc == NULL and mem_free == NULL and mem_realloc == NULL and mem_calloc == NULL) + { + self->allocators= memcached_allocators_return_default(); + } + else if (mem_malloc == NULL or mem_free == NULL or mem_realloc == NULL or mem_calloc == NULL) + { + return memcached_set_error(*self, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, memcached_literal_param("NULL parameter provided for one or more allocators")); + } + else + { + self->allocators.malloc= mem_malloc; + self->allocators.free= mem_free; + self->allocators.realloc= mem_realloc; + self->allocators.calloc= mem_calloc; + self->allocators.context= context; + } + + return MEMCACHED_SUCCESS; +} + +void *memcached_get_memory_allocators_context(const memcached_st *shell) +{ + const Memcached* self= memcached2Memcached(shell); + if (self) + { + return self->allocators.context; + } + + return NULL; +} + +void memcached_get_memory_allocators(const memcached_st *shell, + memcached_malloc_fn *mem_malloc, + memcached_free_fn *mem_free, + memcached_realloc_fn *mem_realloc, + memcached_calloc_fn *mem_calloc) +{ + const Memcached* self= memcached2Memcached(shell); + if (self) + { + if (mem_malloc) + { + *mem_malloc= self->allocators.malloc; + } + + if (mem_free) + { + *mem_free= self->allocators.free; + } + + if (mem_realloc) + { + *mem_realloc= self->allocators.realloc; + } + + if (mem_calloc) + { + *mem_calloc= self->allocators.calloc; + } + } +} diff --git a/libmemcached/allocators.hpp b/libmemcached/allocators.hpp new file mode 100644 index 0000000..8f19624 --- /dev/null +++ b/libmemcached/allocators.hpp @@ -0,0 +1,47 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +void _libmemcached_free(const memcached_st *ptr, void *mem, void *context); + +void *_libmemcached_malloc(const memcached_st *ptr, const size_t size, void *context); + +void *_libmemcached_realloc(const memcached_st *ptr, void *mem, const size_t size, void *context); + +void *_libmemcached_calloc(const memcached_st *ptr, size_t nelem, size_t size, void *context); + +struct memcached_allocator_t memcached_allocators_return_default(void); diff --git a/libmemcached/analyze.cc b/libmemcached/analyze.cc new file mode 100644 index 0000000..c6ac15c --- /dev/null +++ b/libmemcached/analyze.cc @@ -0,0 +1,120 @@ +#include + +static void calc_largest_consumption(memcached_analysis_st *result, + const uint32_t server_num, + const uint64_t nbytes) +{ + if (result->most_used_bytes < nbytes) + { + result->most_used_bytes= nbytes; + result->most_consumed_server= server_num; + } +} + +static void calc_oldest_node(memcached_analysis_st *result, + const uint32_t server_num, + const uint32_t uptime) +{ + if (result->longest_uptime < uptime) + { + result->longest_uptime= uptime; + result->oldest_server= server_num; + } +} + +static void calc_least_free_node(memcached_analysis_st *result, + const uint32_t server_num, + const uint64_t max_allowed_bytes, + const uint64_t used_bytes) +{ + uint64_t remaining_bytes= max_allowed_bytes - used_bytes; + + if (result->least_remaining_bytes == 0 || + remaining_bytes < result->least_remaining_bytes) + { + result->least_remaining_bytes= remaining_bytes; + result->least_free_server= server_num; + } +} + +static void calc_average_item_size(memcached_analysis_st *result, + const uint64_t total_items, + const uint64_t total_bytes) +{ + if (total_items > 0 && total_bytes > 0) + { + result->average_item_size= (uint32_t) (total_bytes / total_items); + } +} + +static void calc_hit_ratio(memcached_analysis_st *result, + const uint64_t total_get_hits, + const uint64_t total_get_cmds) +{ + if (total_get_hits == 0 || total_get_cmds == 0) + { + result->pool_hit_ratio= 0; + return; + } + + double temp= double(total_get_hits) / total_get_cmds; + result->pool_hit_ratio= temp * 100; +} + +memcached_analysis_st *memcached_analyze(memcached_st *shell, + memcached_stat_st *memc_stat, + memcached_return_t *error) +{ + Memcached* memc= memcached2Memcached(shell); + uint64_t total_items= 0, total_bytes= 0; + uint64_t total_get_cmds= 0, total_get_hits= 0; + + if (memc == NULL or memc_stat == NULL) + { + return NULL; + } + + memcached_return_t not_used; + if (error == NULL) + { + error= ¬_used; + } + + *error= MEMCACHED_SUCCESS; + uint32_t server_count= memcached_server_count(memc); + memcached_analysis_st *result= (memcached_analysis_st*)libmemcached_xcalloc(memc, + memcached_server_count(memc), + memcached_analysis_st); + + if (result == NULL) + { + *error= MEMCACHED_MEMORY_ALLOCATION_FAILURE; + return NULL; + } + + result->root= memc; + + for (uint32_t x= 0; x < server_count; x++) + { + calc_largest_consumption(result, x, memc_stat[x].bytes); + calc_oldest_node(result, x, uint32_t(memc_stat[x].uptime)); + calc_least_free_node(result, x, + memc_stat[x].limit_maxbytes, + memc_stat[x].bytes); + + total_get_hits+= memc_stat[x].get_hits; + total_get_cmds+= memc_stat[x].cmd_get; + total_items+= memc_stat[x].curr_items; + total_bytes+= memc_stat[x].bytes; + } + + calc_average_item_size(result, total_items, total_bytes); + calc_hit_ratio(result, total_get_hits, total_get_cmds); + + return result; +} + +void memcached_analyze_free(memcached_analysis_st *ptr) +{ + libmemcached_free(ptr->root, ptr); +} diff --git a/libmemcached/array.c b/libmemcached/array.c new file mode 100644 index 0000000..cd472c3 --- /dev/null +++ b/libmemcached/array.c @@ -0,0 +1,128 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * LibMemcached + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include + +struct memcached_array_st +{ + Memcached *root; + size_t size; + char c_str[]; +}; + + +memcached_array_st *memcached_array_clone(Memcached *memc, const memcached_array_st *original) +{ + if (original) + { + return memcached_strcpy(memc, original->c_str, original->size); + } + + return NULL; +} + +memcached_array_st *memcached_strcpy(Memcached *memc, const char *str, size_t str_length) +{ + assert(memc); + assert(str); + assert(str_length); + + memcached_array_st *array= (struct memcached_array_st *)libmemcached_malloc(memc, sizeof(struct memcached_array_st) +str_length +1); + + if (array) + { + array->root= memc; + array->size= str_length; // We don't count the NULL ending + memcpy(array->c_str, str, str_length); + array->c_str[str_length]= 0; + } + + return array; +} + +bool memcached_array_is_null(memcached_array_st *array) +{ + if (array) + { + return false; + } + + return true; +} + +memcached_string_t memcached_array_to_string(memcached_array_st *array) +{ + assert(array); + assert(array->c_str); + assert(array->size); + memcached_string_t tmp; + tmp.c_str= array->c_str; + tmp.size= array->size; + + return tmp; +} + +void memcached_array_free(memcached_array_st *array) +{ + if (array) + { + WATCHPOINT_ASSERT(array->root); + libmemcached_free(array->root, array); + } +} + +size_t memcached_array_size(memcached_array_st *array) +{ + if (array) + { + return array->size; + } + + return 0; +} + +const char *memcached_array_string(memcached_array_st *array) +{ + if (array) + { + return array->c_str; + } + + return NULL; +} diff --git a/libmemcached/array.h b/libmemcached/array.h new file mode 100644 index 0000000..afb3f91 --- /dev/null +++ b/libmemcached/array.h @@ -0,0 +1,68 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * LibMemcached + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +memcached_array_st *memcached_array_clone(Memcached* memc, const memcached_array_st *original); + +memcached_array_st *memcached_strcpy(Memcached* memc, const char *str, size_t str_length); + +void memcached_array_free(memcached_array_st *array); + +size_t memcached_array_size(memcached_array_st *array); + +const char *memcached_array_string(memcached_array_st *array); + +memcached_string_t memcached_array_to_string(memcached_array_st *array); + +bool memcached_array_is_null(memcached_array_st *array); + +#ifdef __cplusplus +} // extern "C" +#endif + +#ifdef __cplusplus +#define memcached_print_array(X) static_cast(memcached_array_size(X)), memcached_array_string(X) +#define memcached_param_array(X) memcached_array_string(X), memcached_array_size(X) +#else +#define memcached_print_array(X) (int)memcached_array_size((X)), memcached_array_string((X)) +#define memcached_param_array(X) memcached_array_string(X), memcached_array_size(X) +#endif diff --git a/libmemcached/assert.hpp b/libmemcached/assert.hpp new file mode 100644 index 0000000..cd4a194 --- /dev/null +++ b/libmemcached/assert.hpp @@ -0,0 +1,93 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * libmcachedd client library. + * + * Copyright (C) 2011-2013 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +# include +#else +# include +#endif // __cplusplus + +#ifdef NDEBUG +# define assert_msg(__expr, __mesg) (void)(__expr); (void)(__mesg); +# define assert_vmsg(__expr, __mesg, ...) (void)(__expr); (void)(__mesg); +#else + +# ifdef _WIN32 +# include +# else +# include +# endif + +#ifdef __cplusplus +# include +# include +#else +# include +# include +#endif + +# include + +# define assert_msg(__expr, __mesg) \ +do \ +{ \ + if (not (__expr)) \ + { \ + fprintf(stderr, "\n%s:%d Assertion \"%s\" failed for function \"%s\" likely for %s\n", __FILE__, __LINE__, #__expr, __func__, (#__mesg));\ + custom_backtrace(); \ + abort(); \ + } \ +} while (0) + +# define assert_vmsg(__expr, __mesg, ...) \ +do \ +{ \ + if (not (__expr)) \ + { \ + size_t ask= snprintf(0, 0, (__mesg), __VA_ARGS__); \ + ask++; \ + char *_error_message= (char*)alloca(sizeof(char) * ask); \ + size_t _error_message_size= snprintf(_error_message, ask, (__mesg), __VA_ARGS__); \ + fprintf(stderr, "\n%s:%d Assertion '%s' failed for function '%s' [ %.*s ]\n", __FILE__, __LINE__, #__expr, __func__, int(_error_message_size), _error_message);\ + custom_backtrace(); \ + abort(); \ + } \ +} while (0) + +#endif // NDEBUG diff --git a/libmemcached/auto.cc b/libmemcached/auto.cc new file mode 100644 index 0000000..eae44a9 --- /dev/null +++ b/libmemcached/auto.cc @@ -0,0 +1,385 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +static void auto_response(memcached_instance_st* instance, const bool reply, memcached_return_t& rc, uint64_t* value) +{ + // If the message was successfully sent, then get the response, otherwise + // fail. + if (memcached_success(rc)) + { + if (reply == false) + { + *value= UINT64_MAX; + return; + } + + rc= memcached_response(instance, &instance->root->result); + } + + if (memcached_fatal(rc)) + { + assert(memcached_last_error(instance->root) != MEMCACHED_SUCCESS); + *value= UINT64_MAX; + } + else if (memcached_failed(rc)) + { + *value= UINT64_MAX; + } + else + { + assert(memcached_last_error(instance->root) != MEMCACHED_NOTFOUND); + *value= instance->root->result.numeric_value; + } +} + +static memcached_return_t text_incr_decr(memcached_instance_st* instance, + const bool is_incr, + const char *key, size_t key_length, + const uint64_t offset, + const bool reply) +{ + char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE]; + + int send_length= snprintf(buffer, sizeof(buffer), " %" PRIu64, offset); + if (size_t(send_length) >= sizeof(buffer) or send_length < 0) + { + return memcached_set_error(*instance, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT, + memcached_literal_param("snprintf(MEMCACHED_DEFAULT_COMMAND_SIZE)")); + } + + libmemcached_io_vector_st vector[]= + { + { NULL, 0 }, + { memcached_literal_param("incr ") }, + { memcached_array_string(instance->root->_namespace), memcached_array_size(instance->root->_namespace) }, + { key, key_length }, + { buffer, size_t(send_length) }, + { " noreply", reply ? 0 : memcached_literal_param_size(" noreply") }, + { memcached_literal_param("\r\n") } + }; + + if (is_incr == false) + { + vector[1].buffer= "decr "; + } + + return memcached_vdo(instance, vector, 7, true); +} + +static memcached_return_t binary_incr_decr(memcached_instance_st* instance, + protocol_binary_command cmd, + const char *key, const size_t key_length, + const uint64_t offset, + const uint64_t initial, + const uint32_t expiration, + const bool reply) +{ + if (reply == false) + { + if(cmd == PROTOCOL_BINARY_CMD_DECREMENT) + { + cmd= PROTOCOL_BINARY_CMD_DECREMENTQ; + } + + if(cmd == PROTOCOL_BINARY_CMD_INCREMENT) + { + cmd= PROTOCOL_BINARY_CMD_INCREMENTQ; + } + } + protocol_binary_request_incr request= {}; // = {.bytes= {0}}; + + initialize_binary_request(instance, request.message.header); + + request.message.header.request.opcode= cmd; + request.message.header.request.keylen= htons((uint16_t)(key_length + memcached_array_size(instance->root->_namespace))); + request.message.header.request.extlen= 20; + request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES; + request.message.header.request.bodylen= htonl((uint32_t)(key_length + memcached_array_size(instance->root->_namespace) +request.message.header.request.extlen)); + request.message.body.delta= memcached_htonll(offset); + request.message.body.initial= memcached_htonll(initial); + request.message.body.expiration= htonl((uint32_t) expiration); + + libmemcached_io_vector_st vector[]= + { + { NULL, 0 }, + { request.bytes, sizeof(request.bytes) }, + { memcached_array_string(instance->root->_namespace), memcached_array_size(instance->root->_namespace) }, + { key, key_length } + }; + + return memcached_vdo(instance, vector, 4, true); +} + +memcached_return_t memcached_increment(memcached_st *memc, + const char *key, size_t key_length, + uint32_t offset, + uint64_t *value) +{ + return memcached_increment_by_key(memc, key, key_length, key, key_length, offset, value); +} + +static memcached_return_t increment_decrement_by_key(const protocol_binary_command command, + Memcached *memc, + const char *group_key, size_t group_key_length, + const char *key, size_t key_length, + uint64_t offset, + uint64_t *value) +{ + uint64_t local_value; + if (value == NULL) + { + value= &local_value; + } + + memcached_return_t rc; + if (memcached_failed(rc= initialize_query(memc, true))) + { + return rc; + } + + if (memcached_is_encrypted(memc)) + { + return memcached_set_error(*memc, MEMCACHED_NOT_SUPPORTED, MEMCACHED_AT, + memcached_literal_param("Operation not allowed while encyrption is enabled")); + } + + if (memcached_failed(rc= memcached_key_test(*memc, (const char **)&key, &key_length, 1))) + { + return memcached_last_error(memc); + } + + uint32_t server_key= memcached_generate_hash_with_redistribution(memc, group_key, group_key_length); + memcached_instance_st* instance= memcached_instance_fetch(memc, server_key); + + bool reply= memcached_is_replying(instance->root); + + if (memcached_is_binary(memc)) + { + rc= binary_incr_decr(instance, command, + key, key_length, + uint64_t(offset), 0, MEMCACHED_EXPIRATION_NOT_ADD, + reply); + } + else + { + rc= text_incr_decr(instance, + command == PROTOCOL_BINARY_CMD_INCREMENT ? true : false, + key, key_length, + offset, reply); + } + + auto_response(instance, reply, rc, value); + + return rc; +} + +static memcached_return_t increment_decrement_with_initial_by_key(const protocol_binary_command command, + Memcached *memc, + const char *group_key, + size_t group_key_length, + const char *key, + size_t key_length, + uint64_t offset, + uint64_t initial, + time_t expiration, + uint64_t *value) +{ + uint64_t local_value; + if (value == NULL) + { + value= &local_value; + } + + memcached_return_t rc; + if (memcached_failed(rc= initialize_query(memc, true))) + { + return rc; + } + + if (memcached_is_encrypted(memc)) + { + return memcached_set_error(*memc, MEMCACHED_NOT_SUPPORTED, MEMCACHED_AT, + memcached_literal_param("Operation not allowed while encyrption is enabled")); + } + + if (memcached_failed(rc= memcached_key_test(*memc, (const char **)&key, &key_length, 1))) + { + return memcached_last_error(memc); + } + + uint32_t server_key= memcached_generate_hash_with_redistribution(memc, group_key, group_key_length); + memcached_instance_st* instance= memcached_instance_fetch(memc, server_key); + + bool reply= memcached_is_replying(instance->root); + + if (memcached_is_binary(memc)) + { + rc= binary_incr_decr(instance, command, + key, key_length, + offset, initial, uint32_t(expiration), + reply); + + } + else + { + rc= memcached_set_error(*memc, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, + memcached_literal_param("memcached_increment_with_initial_by_key() is not supported via the ASCII protocol")); + } + + auto_response(instance, reply, rc, value); + + return rc; +} + +memcached_return_t memcached_decrement(memcached_st *memc, + const char *key, size_t key_length, + uint32_t offset, + uint64_t *value) +{ + return memcached_decrement_by_key(memc, key, key_length, key, key_length, offset, value); +} + + +memcached_return_t memcached_increment_by_key(memcached_st *shell, + const char *group_key, size_t group_key_length, + const char *key, size_t key_length, + uint64_t offset, + uint64_t *value) +{ + Memcached* memc= memcached2Memcached(shell); + LIBMEMCACHED_MEMCACHED_INCREMENT_START(); + memcached_return_t rc= increment_decrement_by_key(PROTOCOL_BINARY_CMD_INCREMENT, + memc, + group_key, group_key_length, + key, key_length, + offset, value); + + LIBMEMCACHED_MEMCACHED_INCREMENT_END(); + + return rc; +} + +memcached_return_t memcached_decrement_by_key(memcached_st *shell, + const char *group_key, size_t group_key_length, + const char *key, size_t key_length, + uint64_t offset, + uint64_t *value) +{ + Memcached* memc= memcached2Memcached(shell); + LIBMEMCACHED_MEMCACHED_DECREMENT_START(); + memcached_return_t rc= increment_decrement_by_key(PROTOCOL_BINARY_CMD_DECREMENT, + memc, + group_key, group_key_length, + key, key_length, + offset, value); + LIBMEMCACHED_MEMCACHED_DECREMENT_END(); + + return rc; +} + +memcached_return_t memcached_increment_with_initial(memcached_st *memc, + const char *key, + size_t key_length, + uint64_t offset, + uint64_t initial, + time_t expiration, + uint64_t *value) +{ + return memcached_increment_with_initial_by_key(memc, key, key_length, + key, key_length, + offset, initial, expiration, value); +} + +memcached_return_t memcached_increment_with_initial_by_key(memcached_st *shell, + const char *group_key, + size_t group_key_length, + const char *key, + size_t key_length, + uint64_t offset, + uint64_t initial, + time_t expiration, + uint64_t *value) +{ + LIBMEMCACHED_MEMCACHED_INCREMENT_WITH_INITIAL_START(); + Memcached* memc= memcached2Memcached(shell); + memcached_return_t rc= increment_decrement_with_initial_by_key(PROTOCOL_BINARY_CMD_INCREMENT, + memc, + group_key, group_key_length, + key, key_length, + offset, initial, expiration, value); + LIBMEMCACHED_MEMCACHED_INCREMENT_WITH_INITIAL_END(); + + return rc; +} + +memcached_return_t memcached_decrement_with_initial(memcached_st *memc, + const char *key, + size_t key_length, + uint64_t offset, + uint64_t initial, + time_t expiration, + uint64_t *value) +{ + return memcached_decrement_with_initial_by_key(memc, key, key_length, + key, key_length, + offset, initial, expiration, value); +} + +memcached_return_t memcached_decrement_with_initial_by_key(memcached_st *shell, + const char *group_key, + size_t group_key_length, + const char *key, + size_t key_length, + uint64_t offset, + uint64_t initial, + time_t expiration, + uint64_t *value) +{ + LIBMEMCACHED_MEMCACHED_INCREMENT_WITH_INITIAL_START(); + Memcached* memc= memcached2Memcached(shell); + memcached_return_t rc= increment_decrement_with_initial_by_key(PROTOCOL_BINARY_CMD_DECREMENT, + memc, + group_key, group_key_length, + key, key_length, + offset, initial, expiration, value); + + LIBMEMCACHED_MEMCACHED_INCREMENT_WITH_INITIAL_END(); + + return rc; +} diff --git a/libmemcached/backtrace.cc b/libmemcached/backtrace.cc new file mode 100644 index 0000000..e171fbe --- /dev/null +++ b/libmemcached/backtrace.cc @@ -0,0 +1,131 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached client library. + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "mem_config.h" + +#include "libmemcached/backtrace.hpp" + +#include +#include +#include + +#if defined(HAVE_SHARED_ENABLED) && HAVE_SHARED_ENABLED + +#ifdef HAVE_EXECINFO_H +#include +#endif + +#ifdef HAVE_GCC_ABI_DEMANGLE +# include +# define USE_DEMANGLE 1 +#else +# define USE_DEMANGLE 0 +#endif + +#ifdef HAVE_DLFCN_H +# include +#endif + +const int MAX_DEPTH= 50; + +void custom_backtrace(void) +{ +#ifdef HAVE_EXECINFO_H + void *backtrace_buffer[MAX_DEPTH +1]; + + int stack_frames= backtrace(backtrace_buffer, MAX_DEPTH); + if (stack_frames) + { + char **symbollist= backtrace_symbols(backtrace_buffer, stack_frames); + if (symbollist) + { + for (int x= 0; x < stack_frames; x++) + { + bool was_demangled= false; + + if (USE_DEMANGLE) + { +#ifdef HAVE_DLFCN_H + Dl_info dlinfo; + if (dladdr(backtrace_buffer[x], &dlinfo)) + { + char demangled_buffer[1024]; + const char *called_in= ""; + if (dlinfo.dli_sname) + { + size_t demangled_size= sizeof(demangled_buffer); + int status; + char* demangled; + if ((demangled= abi::__cxa_demangle(dlinfo.dli_sname, demangled_buffer, &demangled_size, &status))) + { + called_in= demangled; + fprintf(stderr, "---> demangled: %s -> %s\n", demangled_buffer, demangled); + } + else + { + called_in= dlinfo.dli_sname; + } + + was_demangled= true; + fprintf(stderr, "#%d %p in %s at %s\n", + x, backtrace_buffer[x], + called_in, + dlinfo.dli_fname); + } + } +#endif + } + + if (was_demangled == false) + { + fprintf(stderr, "?%d %p in %s\n", x, backtrace_buffer[x], symbollist[x]); + } + } + + ::free(symbollist); + } + } +#endif // HAVE_EXECINFO_H +} + +#else // HAVE_SHARED_ENABLED + +void custom_backtrace(void) +{ + fprintf(stderr, "Backtrace null function called\n"); +} +#endif // AX_ENABLE_BACKTRACE diff --git a/libmemcached/backtrace.hpp b/libmemcached/backtrace.hpp new file mode 100644 index 0000000..a83d3ea --- /dev/null +++ b/libmemcached/backtrace.hpp @@ -0,0 +1,48 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * libmcachedd client library. + * + * Copyright (C) 2011-2013 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +void custom_backtrace(void); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached/behavior.cc b/libmemcached/behavior.cc new file mode 100644 index 0000000..b45e846 --- /dev/null +++ b/libmemcached/behavior.cc @@ -0,0 +1,724 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include + +#include +#include + +bool memcached_is_consistent_distribution(const Memcached* memc) +{ + switch (memc->distribution) + { + case MEMCACHED_DISTRIBUTION_CONSISTENT: + case MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA: + case MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY: + case MEMCACHED_DISTRIBUTION_CONSISTENT_WEIGHTED: + return true; + + case MEMCACHED_DISTRIBUTION_MODULA: + case MEMCACHED_DISTRIBUTION_RANDOM: + case MEMCACHED_DISTRIBUTION_VIRTUAL_BUCKET: + case MEMCACHED_DISTRIBUTION_CONSISTENT_MAX: + break; + } + + return false; +} + +/* + This function is used to modify the behavior of running client. + + We quit all connections so we can reset the sockets. +*/ + +memcached_return_t memcached_behavior_set(memcached_st *shell, + const memcached_behavior_t flag, + uint64_t data) +{ + Memcached* ptr= memcached2Memcached(shell); + if (ptr == NULL) + { + return MEMCACHED_INVALID_ARGUMENTS; + } + + switch (flag) + { + case MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS: + ptr->number_of_replicas= (uint32_t)data; + break; + + case MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK: + ptr->io_msg_watermark= (uint32_t) data; + break; + + case MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK: + ptr->io_bytes_watermark= (uint32_t)data; + break; + + case MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH: + ptr->io_key_prefetch = (uint32_t)data; + break; + + case MEMCACHED_BEHAVIOR_SND_TIMEOUT: + ptr->snd_timeout= (int32_t)data; + break; + + case MEMCACHED_BEHAVIOR_RCV_TIMEOUT: + ptr->rcv_timeout= (int32_t)data; + break; + + case MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS: + ptr->flags.auto_eject_hosts= bool(data); + + case MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT: + if (data == 0) + { + return memcached_set_error(*ptr, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, + memcached_literal_param("MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT requires a value greater then zero.")); + } + ptr->server_failure_limit= uint32_t(data); + break; + + case MEMCACHED_BEHAVIOR_SERVER_TIMEOUT_LIMIT: + ptr->server_timeout_limit= uint32_t(data); + break; + + case MEMCACHED_BEHAVIOR_BINARY_PROTOCOL: + send_quit(ptr); // We need t shutdown all of the connections to make sure we do the correct protocol + if (data) + { + ptr->flags.verify_key= false; + } + ptr->flags.binary_protocol= bool(data); + break; + + case MEMCACHED_BEHAVIOR_SUPPORT_CAS: + ptr->flags.support_cas= bool(data); + break; + + case MEMCACHED_BEHAVIOR_NO_BLOCK: + ptr->flags.no_block= bool(data); + send_quit(ptr); + break; + + case MEMCACHED_BEHAVIOR_BUFFER_REQUESTS: + if (memcached_is_udp(ptr)) + { + return memcached_set_error(*ptr, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, + memcached_literal_param("MEMCACHED_BEHAVIOR_BUFFER_REQUESTS cannot be set while MEMCACHED_BEHAVIOR_USE_UDP is enabled.")); + } + ptr->flags.buffer_requests= bool(data); + send_quit(ptr); + break; + + case MEMCACHED_BEHAVIOR_USE_UDP: + send_quit(ptr); // We need t shutdown all of the connections to make sure we do the correct protocol + ptr->flags.use_udp= bool(data); + if (bool(data)) + { + ptr->flags.reply= false; + ptr->flags.buffer_requests= false; + } + else + { + ptr->flags.reply= true; + } + break; + + case MEMCACHED_BEHAVIOR_TCP_NODELAY: + ptr->flags.tcp_nodelay= bool(data); + send_quit(ptr); + break; + + case MEMCACHED_BEHAVIOR_TCP_KEEPALIVE: + ptr->flags.tcp_keepalive= bool(data); + send_quit(ptr); + break; + + case MEMCACHED_BEHAVIOR_DISTRIBUTION: + return memcached_behavior_set_distribution(ptr, (memcached_server_distribution_t)data); + + case MEMCACHED_BEHAVIOR_KETAMA: + { + if (data) // Turn on + { + return memcached_behavior_set_distribution(ptr, MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA); + } + + return memcached_behavior_set_distribution(ptr, MEMCACHED_DISTRIBUTION_MODULA); + } + + case MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED: + { + if (bool(data) == false) + { + return memcached_behavior_set(ptr, MEMCACHED_BEHAVIOR_KETAMA, true); + } + + (void)memcached_behavior_set_key_hash(ptr, MEMCACHED_HASH_MD5); + (void)memcached_behavior_set_distribution_hash(ptr, MEMCACHED_HASH_MD5); + /** + @note We try to keep the same distribution going. This should be deprecated and rewritten. + */ + return memcached_behavior_set_distribution(ptr, MEMCACHED_DISTRIBUTION_CONSISTENT_WEIGHTED); + } + + case MEMCACHED_BEHAVIOR_HASH: + return memcached_behavior_set_key_hash(ptr, (memcached_hash_t)(data)); + + case MEMCACHED_BEHAVIOR_KETAMA_HASH: + return memcached_behavior_set_distribution_hash(ptr, (memcached_hash_t)(data)); + + case MEMCACHED_BEHAVIOR_CACHE_LOOKUPS: + return memcached_set_error(*ptr, MEMCACHED_DEPRECATED, MEMCACHED_AT, + memcached_literal_param("MEMCACHED_BEHAVIOR_CACHE_LOOKUPS has been deprecated.")); + + case MEMCACHED_BEHAVIOR_VERIFY_KEY: + if (ptr->flags.binary_protocol) + { + return memcached_set_error(*ptr, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, + memcached_literal_param("MEMCACHED_BEHAVIOR_VERIFY_KEY if the binary protocol has been enabled.")); + } + ptr->flags.verify_key= bool(data); + break; + + case MEMCACHED_BEHAVIOR_SORT_HOSTS: + { + ptr->flags.use_sort_hosts= bool(data); + return run_distribution(ptr); + } + + case MEMCACHED_BEHAVIOR_POLL_TIMEOUT: + ptr->poll_timeout= (int32_t)data; + break; + + case MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT: + ptr->connect_timeout= (int32_t)data; + break; + + case MEMCACHED_BEHAVIOR_RETRY_TIMEOUT: + ptr->retry_timeout= int32_t(data); + break; + + case MEMCACHED_BEHAVIOR_DEAD_TIMEOUT: + ptr->dead_timeout= int32_t(data); + break; + + case MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE: + ptr->send_size= (int32_t)data; + send_quit(ptr); + break; + + case MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE: + ptr->recv_size= (int32_t)data; + send_quit(ptr); + break; + + case MEMCACHED_BEHAVIOR_TCP_KEEPIDLE: + ptr->tcp_keepidle= (uint32_t)data; + send_quit(ptr); + break; + + case MEMCACHED_BEHAVIOR_USER_DATA: + return memcached_set_error(*ptr, MEMCACHED_DEPRECATED, MEMCACHED_AT, + memcached_literal_param("MEMCACHED_BEHAVIOR_USER_DATA deprecated.")); + + case MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY: + ptr->flags.hash_with_namespace= bool(data); + break; + + case MEMCACHED_BEHAVIOR_NOREPLY: + if (memcached_is_udp(ptr) and bool(data) == false) + { + return memcached_set_error(*ptr, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, + memcached_literal_param("MEMCACHED_BEHAVIOR_NOREPLY cannot be disabled while MEMCACHED_BEHAVIOR_USE_UDP is enabled.")); + } + // We reverse the logic here to make it easier to understand throughout the + // code. + ptr->flags.reply= bool(data) ? false : true; + break; + + case MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS: + ptr->flags.auto_eject_hosts= bool(data); + break; + + case MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ: + srandom((uint32_t) time(NULL)); + ptr->flags.randomize_replica_read= bool(data); + break; + + case MEMCACHED_BEHAVIOR_CORK: + return memcached_set_error(*ptr, MEMCACHED_DEPRECATED, MEMCACHED_AT, + memcached_literal_param("MEMCACHED_BEHAVIOR_CORK is now incorporated into the driver by default.")); + + case MEMCACHED_BEHAVIOR_LOAD_FROM_FILE: + return memcached_set_error(*ptr, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, + memcached_literal_param("MEMCACHED_BEHAVIOR_LOAD_FROM_FILE can not be set with memcached_behavior_set()")); + + case MEMCACHED_BEHAVIOR_MAX: + default: + /* Shouldn't get here */ + assert_msg(0, "Invalid behavior passed to memcached_behavior_set()"); + return memcached_set_error(*ptr, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, + memcached_literal_param("Invalid behavior passed to memcached_behavior_set()")); + } + + return MEMCACHED_SUCCESS; +} + +bool _is_auto_eject_host(const memcached_st *ptr) +{ + return ptr->flags.auto_eject_hosts; +} + +uint64_t memcached_behavior_get(memcached_st *shell, + const memcached_behavior_t flag) +{ + Memcached* ptr= memcached2Memcached(shell); + if (ptr == NULL) + { + return MEMCACHED_INVALID_ARGUMENTS; + } + + switch (flag) + { + case MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS: + return ptr->number_of_replicas; + + case MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK: + return ptr->io_msg_watermark; + + case MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK: + return ptr->io_bytes_watermark; + + case MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH: + return ptr->io_key_prefetch; + + case MEMCACHED_BEHAVIOR_BINARY_PROTOCOL: + return ptr->flags.binary_protocol; + + case MEMCACHED_BEHAVIOR_SUPPORT_CAS: + return ptr->flags.support_cas; + + case MEMCACHED_BEHAVIOR_CACHE_LOOKUPS: + return true; + + case MEMCACHED_BEHAVIOR_NO_BLOCK: + return ptr->flags.no_block; + + case MEMCACHED_BEHAVIOR_BUFFER_REQUESTS: + return ptr->flags.buffer_requests; + + case MEMCACHED_BEHAVIOR_USE_UDP: + return memcached_is_udp(ptr); + + case MEMCACHED_BEHAVIOR_TCP_NODELAY: + return ptr->flags.tcp_nodelay; + + case MEMCACHED_BEHAVIOR_VERIFY_KEY: + return ptr->flags.verify_key; + + case MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED: + if (memcached_is_consistent_distribution(ptr)) + { + return memcached_is_weighted_ketama(ptr); + } + return false; + + case MEMCACHED_BEHAVIOR_DISTRIBUTION: + return ptr->distribution; + + case MEMCACHED_BEHAVIOR_KETAMA: + return memcached_is_consistent_distribution(ptr); + + case MEMCACHED_BEHAVIOR_HASH: + return hashkit_get_function(&ptr->hashkit); + + case MEMCACHED_BEHAVIOR_KETAMA_HASH: + return hashkit_get_function(&ptr->hashkit); + + case MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS: + case MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT: + return ptr->server_failure_limit; + + case MEMCACHED_BEHAVIOR_SERVER_TIMEOUT_LIMIT: + return ptr->server_timeout_limit; + + case MEMCACHED_BEHAVIOR_SORT_HOSTS: + return ptr->flags.use_sort_hosts; + + case MEMCACHED_BEHAVIOR_POLL_TIMEOUT: + return (uint64_t)ptr->poll_timeout; + + case MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT: + return (uint64_t)ptr->connect_timeout; + + case MEMCACHED_BEHAVIOR_RETRY_TIMEOUT: + return (uint64_t)ptr->retry_timeout; + + case MEMCACHED_BEHAVIOR_DEAD_TIMEOUT: + return uint64_t(ptr->dead_timeout); + + case MEMCACHED_BEHAVIOR_SND_TIMEOUT: + return (uint64_t)ptr->snd_timeout; + + case MEMCACHED_BEHAVIOR_RCV_TIMEOUT: + return (uint64_t)ptr->rcv_timeout; + + case MEMCACHED_BEHAVIOR_TCP_KEEPIDLE: + return (uint64_t)ptr->tcp_keepidle; + + case MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE: + { + int sock_size= 0; + socklen_t sock_length= sizeof(int); + + if (ptr->send_size != -1) // If value is -1 then we are using the default + { + return (uint64_t) ptr->send_size; + } + + memcached_instance_st* instance= memcached_instance_fetch(ptr, 0); + + if (instance) // If we have an instance we test, otherwise we just set and pray + { + /* REFACTOR */ + /* We just try the first host, and if it is down we return zero */ + if (memcached_failed(memcached_connect(instance))) + { + return 0; + } + + if (memcached_failed(memcached_io_wait_for_write(instance))) + { + return 0; + } + + if (getsockopt(instance->fd, SOL_SOCKET, SO_SNDBUF, (char*)&sock_size, &sock_length) < 0) + { + memcached_set_errno(*ptr, get_socket_errno(), MEMCACHED_AT); + return 0; /* Zero means error */ + } + } + + return (uint64_t) sock_size; + } + + case MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE: + { + int sock_size= 0; + socklen_t sock_length= sizeof(int); + + if (ptr->recv_size != -1) // If value is -1 then we are using the default + return (uint64_t) ptr->recv_size; + + memcached_instance_st* instance= memcached_instance_fetch(ptr, 0); + + /** + @note REFACTOR + */ + if (instance) + { + /* We just try the first host, and if it is down we return zero */ + if (memcached_failed(memcached_connect(instance))) + { + return 0; + } + + if (memcached_failed(memcached_io_wait_for_write(instance))) + { + return 0; + } + + if (getsockopt(instance->fd, SOL_SOCKET, SO_RCVBUF, (char*)&sock_size, &sock_length) < 0) + { + memcached_set_errno(*ptr, get_socket_errno(), MEMCACHED_AT); + return 0; /* Zero means error */ + } + } + + return (uint64_t) sock_size; + } + + case MEMCACHED_BEHAVIOR_USER_DATA: + memcached_set_error(*ptr, MEMCACHED_DEPRECATED, MEMCACHED_AT, + memcached_literal_param("MEMCACHED_BEHAVIOR_USER_DATA deprecated.")); + return 0; + + case MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY: + return ptr->flags.hash_with_namespace; + + case MEMCACHED_BEHAVIOR_NOREPLY: + return ptr->flags.reply ? false : true; + + case MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS: + return ptr->flags.auto_eject_hosts; + + case MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ: + return ptr->flags.randomize_replica_read; + + case MEMCACHED_BEHAVIOR_CORK: +#ifdef HAVE_MSG_MORE + return true; +#else + return false; +#endif + + case MEMCACHED_BEHAVIOR_TCP_KEEPALIVE: + return ptr->flags.tcp_keepalive; + + case MEMCACHED_BEHAVIOR_LOAD_FROM_FILE: + return bool(memcached_parse_filename(ptr)); + + case MEMCACHED_BEHAVIOR_MAX: + default: + assert_msg(0, "Invalid behavior passed to memcached_behavior_get()"); + return 0; + } + + /* NOTREACHED */ +} + + +memcached_return_t memcached_behavior_set_distribution(memcached_st *shell, memcached_server_distribution_t type) +{ + Memcached* ptr= memcached2Memcached(shell); + if (ptr) + { + switch (type) + { + case MEMCACHED_DISTRIBUTION_MODULA: + break; + + case MEMCACHED_DISTRIBUTION_CONSISTENT: + case MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA: + memcached_set_weighted_ketama(ptr, false); + break; + + case MEMCACHED_DISTRIBUTION_RANDOM: + break; + + case MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY: + break; + + case MEMCACHED_DISTRIBUTION_CONSISTENT_WEIGHTED: + memcached_set_weighted_ketama(ptr, true); + break; + + case MEMCACHED_DISTRIBUTION_VIRTUAL_BUCKET: + break; + + default: + case MEMCACHED_DISTRIBUTION_CONSISTENT_MAX: + return memcached_set_error(*ptr, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, + memcached_literal_param("Invalid memcached_server_distribution_t")); + } + ptr->distribution= type; + + return run_distribution(ptr); + } + + return MEMCACHED_INVALID_ARGUMENTS; +} + + +memcached_server_distribution_t memcached_behavior_get_distribution(memcached_st *shell) +{ + Memcached* ptr= memcached2Memcached(shell); + if (ptr) + { + return ptr->distribution; + } + + return MEMCACHED_DISTRIBUTION_CONSISTENT_MAX; +} + +memcached_return_t memcached_behavior_set_key_hash(memcached_st *shell, memcached_hash_t type) +{ + Memcached* ptr= memcached2Memcached(shell); + if (ptr) + { + if (hashkit_success(hashkit_set_function(&ptr->hashkit, (hashkit_hash_algorithm_t)type))) + { + return MEMCACHED_SUCCESS; + } + + return memcached_set_error(*ptr, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, + memcached_literal_param("Invalid memcached_hash_t()")); + } + + return MEMCACHED_INVALID_ARGUMENTS; +} + +memcached_hash_t memcached_behavior_get_key_hash(memcached_st *shell) +{ + Memcached* ptr= memcached2Memcached(shell); + if (ptr) + { + return (memcached_hash_t)hashkit_get_function(&ptr->hashkit); + } + + return MEMCACHED_HASH_MAX; +} + +memcached_return_t memcached_behavior_set_distribution_hash(memcached_st *shell, memcached_hash_t type) +{ + Memcached* ptr= memcached2Memcached(shell); + if (ptr) + { + if (hashkit_success(hashkit_set_distribution_function(&ptr->hashkit, (hashkit_hash_algorithm_t)type))) + { + return MEMCACHED_SUCCESS; + } + + return memcached_set_error(*ptr, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, + memcached_literal_param("Invalid memcached_hash_t()")); + } + + return MEMCACHED_INVALID_ARGUMENTS; +} + +memcached_hash_t memcached_behavior_get_distribution_hash(memcached_st *shell) +{ + Memcached* ptr= memcached2Memcached(shell); + if (ptr) + { + return (memcached_hash_t)hashkit_get_function(&ptr->hashkit); + } + + return MEMCACHED_HASH_MAX; +} + +const char *libmemcached_string_behavior(const memcached_behavior_t flag) +{ + switch (flag) + { + case MEMCACHED_BEHAVIOR_SERVER_TIMEOUT_LIMIT: return "MEMCACHED_BEHAVIOR_SERVER_TIMEOUT_LIMIT"; + case MEMCACHED_BEHAVIOR_NO_BLOCK: return "MEMCACHED_BEHAVIOR_NO_BLOCK"; + case MEMCACHED_BEHAVIOR_TCP_NODELAY: return "MEMCACHED_BEHAVIOR_TCP_NODELAY"; + case MEMCACHED_BEHAVIOR_HASH: return "MEMCACHED_BEHAVIOR_HASH"; + case MEMCACHED_BEHAVIOR_KETAMA: return "MEMCACHED_BEHAVIOR_KETAMA"; + case MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE: return "MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE"; + case MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE: return "MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE"; + case MEMCACHED_BEHAVIOR_CACHE_LOOKUPS: return "MEMCACHED_BEHAVIOR_CACHE_LOOKUPS"; + case MEMCACHED_BEHAVIOR_SUPPORT_CAS: return "MEMCACHED_BEHAVIOR_SUPPORT_CAS"; + case MEMCACHED_BEHAVIOR_POLL_TIMEOUT: return "MEMCACHED_BEHAVIOR_POLL_TIMEOUT"; + case MEMCACHED_BEHAVIOR_DISTRIBUTION: return "MEMCACHED_BEHAVIOR_DISTRIBUTION"; + case MEMCACHED_BEHAVIOR_BUFFER_REQUESTS: return "MEMCACHED_BEHAVIOR_BUFFER_REQUESTS"; + case MEMCACHED_BEHAVIOR_USER_DATA: return "MEMCACHED_BEHAVIOR_USER_DATA"; + case MEMCACHED_BEHAVIOR_SORT_HOSTS: return "MEMCACHED_BEHAVIOR_SORT_HOSTS"; + case MEMCACHED_BEHAVIOR_VERIFY_KEY: return "MEMCACHED_BEHAVIOR_VERIFY_KEY"; + case MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT: return "MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT"; + case MEMCACHED_BEHAVIOR_RETRY_TIMEOUT: return "MEMCACHED_BEHAVIOR_RETRY_TIMEOUT"; + case MEMCACHED_BEHAVIOR_DEAD_TIMEOUT: return "MEMCACHED_BEHAVIOR_DEAD_TIMEOUT"; + case MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED: return "MEMCACHED_BEHAVIOR_KETAMA_WEIGHTED"; + case MEMCACHED_BEHAVIOR_KETAMA_HASH: return "MEMCACHED_BEHAVIOR_KETAMA_HASH"; + case MEMCACHED_BEHAVIOR_BINARY_PROTOCOL: return "MEMCACHED_BEHAVIOR_BINARY_PROTOCOL"; + case MEMCACHED_BEHAVIOR_SND_TIMEOUT: return "MEMCACHED_BEHAVIOR_SND_TIMEOUT"; + case MEMCACHED_BEHAVIOR_RCV_TIMEOUT: return "MEMCACHED_BEHAVIOR_RCV_TIMEOUT"; + case MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT: return "MEMCACHED_BEHAVIOR_SERVER_FAILURE_LIMIT"; + case MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK: return "MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK"; + case MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK: return "MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK"; + case MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH: return "MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH"; + case MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY: return "MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY"; + case MEMCACHED_BEHAVIOR_NOREPLY: return "MEMCACHED_BEHAVIOR_NOREPLY"; + case MEMCACHED_BEHAVIOR_USE_UDP: return "MEMCACHED_BEHAVIOR_USE_UDP"; + case MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS: return "MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS"; + case MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS: return "MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS"; + case MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS: return "MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS"; + case MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ: return "MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ"; + case MEMCACHED_BEHAVIOR_CORK: return "MEMCACHED_BEHAVIOR_CORK"; + case MEMCACHED_BEHAVIOR_TCP_KEEPALIVE: return "MEMCACHED_BEHAVIOR_TCP_KEEPALIVE"; + case MEMCACHED_BEHAVIOR_TCP_KEEPIDLE: return "MEMCACHED_BEHAVIOR_TCP_KEEPIDLE"; + case MEMCACHED_BEHAVIOR_LOAD_FROM_FILE: return "MEMCACHED_BEHAVIOR_LOAD_FROM_FILE"; + default: + case MEMCACHED_BEHAVIOR_MAX: return "INVALID memcached_behavior_t"; + } +} + +const char *libmemcached_string_distribution(const memcached_server_distribution_t flag) +{ + switch (flag) + { + case MEMCACHED_DISTRIBUTION_MODULA: return "MEMCACHED_DISTRIBUTION_MODULA"; + case MEMCACHED_DISTRIBUTION_CONSISTENT: return "MEMCACHED_DISTRIBUTION_CONSISTENT"; + case MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA: return "MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA"; + case MEMCACHED_DISTRIBUTION_RANDOM: return "MEMCACHED_DISTRIBUTION_RANDOM"; + case MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY: return "MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY"; + case MEMCACHED_DISTRIBUTION_CONSISTENT_WEIGHTED: return "MEMCACHED_DISTRIBUTION_CONSISTENT_WEIGHTED"; + case MEMCACHED_DISTRIBUTION_VIRTUAL_BUCKET: return "MEMCACHED_DISTRIBUTION_VIRTUAL_BUCKET"; + default: + case MEMCACHED_DISTRIBUTION_CONSISTENT_MAX: return "INVALID memcached_server_distribution_t"; + } +} + +memcached_return_t memcached_bucket_set(memcached_st *shell, + const uint32_t *host_map, + const uint32_t *forward_map, + const uint32_t buckets, + const uint32_t replicas) +{ + Memcached* self= memcached2Memcached(shell); + memcached_return_t rc; + + if (self == NULL) + { + return MEMCACHED_INVALID_ARGUMENTS; + } + + if (host_map == NULL) + { + return MEMCACHED_INVALID_ARGUMENTS; + } + + memcached_server_distribution_t old= memcached_behavior_get_distribution(self); + + if (memcached_failed(rc =memcached_behavior_set_distribution(self, MEMCACHED_DISTRIBUTION_VIRTUAL_BUCKET))) + { + return rc; + } + + if (memcached_failed(rc= memcached_virtual_bucket_create(self, host_map, forward_map, buckets, replicas))) + { + memcached_behavior_set_distribution(self, old); + } + + return rc; +} diff --git a/libmemcached/behavior.hpp b/libmemcached/behavior.hpp new file mode 100644 index 0000000..0b06c0c --- /dev/null +++ b/libmemcached/behavior.hpp @@ -0,0 +1,40 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +bool memcached_is_consistent_distribution(const memcached_st*); +bool _is_auto_eject_host(const memcached_st *ptr); diff --git a/libmemcached/byteorder.cc b/libmemcached/byteorder.cc new file mode 100644 index 0000000..9f11aa8 --- /dev/null +++ b/libmemcached/byteorder.cc @@ -0,0 +1,79 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "mem_config.h" +#include "libmemcached/byteorder.h" + +/* Byte swap a 64-bit number. */ +#ifndef swap64 +static inline uint64_t swap64(uint64_t in) +{ +#ifndef WORDS_BIGENDIAN + /* Little endian, flip the bytes around until someone makes a faster/better + * way to do this. */ + uint64_t rv= 0; + for (uint8_t x= 0; x < 8; ++x) + { + rv= (rv << 8) | (in & 0xff); + in >>= 8; + } + return rv; +#else + /* big-endian machines don't need byte swapping */ + return in; +#endif // WORDS_BIGENDIAN +} +#endif + + +uint64_t memcached_ntohll(uint64_t value) +{ +#ifdef HAVE_HTONLL + return ntohll(value); +#else + return swap64(value); +#endif +} + +uint64_t memcached_htonll(uint64_t value) +{ +#ifdef HAVE_HTONLL + return htonll(value); +#else + return swap64(value); +#endif +} diff --git a/libmemcached/byteorder.h b/libmemcached/byteorder.h new file mode 100644 index 0000000..a7d108d --- /dev/null +++ b/libmemcached/byteorder.h @@ -0,0 +1,50 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +uint64_t memcached_ntohll(uint64_t); + +uint64_t memcached_htonll(uint64_t); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached/callback.cc b/libmemcached/callback.cc new file mode 100644 index 0000000..a43eef9 --- /dev/null +++ b/libmemcached/callback.cc @@ -0,0 +1,160 @@ +/* LibMemcached + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: Change any of the possible callbacks. + * + */ + +#include +#include + +#ifndef __INTEL_COMPILER +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif + +/* + These functions provide data and function callback support +*/ + +memcached_return_t memcached_callback_set(memcached_st *shell, + const memcached_callback_t flag, + const void *data) +{ + Memcached* ptr= memcached2Memcached(shell); + if (ptr) + { + switch (flag) + { + case MEMCACHED_CALLBACK_PREFIX_KEY: + { + return memcached_set_namespace(*ptr, (char*)data, data ? strlen((char*)data) : 0); + } + + case MEMCACHED_CALLBACK_USER_DATA: + { + ptr->user_data= const_cast(data); + break; + } + + case MEMCACHED_CALLBACK_CLEANUP_FUNCTION: + { + memcached_cleanup_fn func= *(memcached_cleanup_fn *)&data; + ptr->on_cleanup= func; + break; + } + + case MEMCACHED_CALLBACK_CLONE_FUNCTION: + { + memcached_clone_fn func= *(memcached_clone_fn *)&data; + ptr->on_clone= func; + break; + } + + case MEMCACHED_CALLBACK_GET_FAILURE: + { + memcached_trigger_key_fn func= *(memcached_trigger_key_fn *)&data; + ptr->get_key_failure= func; + break; + } + + case MEMCACHED_CALLBACK_DELETE_TRIGGER: + { + if (data) // NULL would mean we are disabling. + { + if (memcached_behavior_get(ptr, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS)) + { + return memcached_set_error(*ptr, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, memcached_literal_param("Delete triggers cannot be used if buffering is enabled")); + } + + if (memcached_behavior_get(ptr, MEMCACHED_BEHAVIOR_NOREPLY)) + { + return memcached_set_error(*ptr, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, memcached_literal_param("Delete triggers cannot be used if MEMCACHED_BEHAVIOR_NOREPLY is set")); + } + } + + memcached_trigger_delete_key_fn func= *(memcached_trigger_delete_key_fn *)&data; + ptr->delete_trigger= func; + break; + } + + case MEMCACHED_CALLBACK_MAX: + return memcached_set_error(*ptr, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, memcached_literal_param("Invalid callback supplied")); + } + + return MEMCACHED_SUCCESS; + } + + return MEMCACHED_INVALID_ARGUMENTS; +} + +void *memcached_callback_get(memcached_st *shell, + const memcached_callback_t flag, + memcached_return_t *error) +{ + Memcached* ptr= memcached2Memcached(shell); + memcached_return_t local_error; + if (error == NULL) + { + error = &local_error; + } + + if (ptr == NULL) + { + *error= MEMCACHED_INVALID_ARGUMENTS; + return NULL; + } + + switch (flag) + { + case MEMCACHED_CALLBACK_PREFIX_KEY: + { + *error= MEMCACHED_SUCCESS; + if (ptr->_namespace) + { + return (void *)memcached_array_string(ptr->_namespace); + } + return NULL; + } + + case MEMCACHED_CALLBACK_USER_DATA: + { + *error= ptr->user_data ? MEMCACHED_SUCCESS : MEMCACHED_FAILURE; + return (void *)ptr->user_data; + } + + case MEMCACHED_CALLBACK_CLEANUP_FUNCTION: + { + *error= ptr->on_cleanup ? MEMCACHED_SUCCESS : MEMCACHED_FAILURE; + return *(void **)&ptr->on_cleanup; + } + + case MEMCACHED_CALLBACK_CLONE_FUNCTION: + { + *error= ptr->on_clone ? MEMCACHED_SUCCESS : MEMCACHED_FAILURE; + return *(void **)&ptr->on_clone; + } + + case MEMCACHED_CALLBACK_GET_FAILURE: + { + *error= ptr->get_key_failure ? MEMCACHED_SUCCESS : MEMCACHED_FAILURE; + return *(void **)&ptr->get_key_failure; + } + + case MEMCACHED_CALLBACK_DELETE_TRIGGER: + { + *error= ptr->delete_trigger ? MEMCACHED_SUCCESS : MEMCACHED_FAILURE; + return *(void **)&ptr->delete_trigger; + } + + case MEMCACHED_CALLBACK_MAX: + break; + } + + assert_msg(0, "Invalid callback passed to memcached_callback_get()"); + *error= MEMCACHED_FAILURE; + return NULL; +} diff --git a/libmemcached/common.h b/libmemcached/common.h new file mode 100644 index 0000000..897b096 --- /dev/null +++ b/libmemcached/common.h @@ -0,0 +1,222 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * LibMemcached + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* + Common include file for libmemached +*/ + +#pragma once + +#include + +#ifdef __cplusplus +# include +# include +# include +# include +# include +# include +# include +# include +#else +# ifdef HAVE_STDDEF_H +# include +# endif +# ifdef HAVE_STDLIB_H +# include +# endif +# ifdef HAVE_STDLIB_H +# include +# endif +# include +# ifdef HAVE_TIME_H +# include +# endif +# ifdef HAVE_ERRNO_H +# include +# endif +# ifdef HAVE_LIMITS_H +# include +# endif +#endif + +#ifdef HAVE_SYS_UN_H +# include +#endif + +#ifdef HAVE_SYS_TIME_H +# include +#endif + +#ifdef HAVE_FCNTL_H +# include +#endif + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + +#ifdef HAVE_UNISTD_H +# include +#endif + +#ifdef HAVE_SYS_SOCKET_H +# include +#endif + +#ifdef HAVE_STRINGS_H +# include +#endif + +#ifdef HAVE_DLFCN_H +# include +#endif + +#if defined(_WIN32) +# include "libmemcached/windows.hpp" +#endif + +#include +#include "libmemcached/watchpoint.h" +#include "libmemcached/is.h" +typedef struct memcached_st Memcached; + +#ifdef HAVE_POLL_H +# include +#else +# include "libmemcached/poll.h" +#endif + +#ifdef __cplusplus +memcached_instance_st* memcached_instance_fetch(memcached_st *ptr, uint32_t server_key); +#endif + +/* These are private not to be installed headers */ +#include "libmemcached/error.hpp" +#include "libmemcached/memory.h" +#include "libmemcached/io.h" +#ifdef __cplusplus +# include "libmemcached/string.hpp" +# include "libmemcached/memcached/protocol_binary.h" +# include "libmemcached/io.hpp" +# include "libmemcached/udp.hpp" +# include "libmemcached/do.hpp" +# include "libmemcached/socket.hpp" +# include "libmemcached/connect.hpp" +# include "libmemcached/allocators.hpp" +# include "libmemcached/hash.hpp" +# include "libmemcached/quit.hpp" +# include "libmemcached/instance.hpp" +# include "libmemcached/server_instance.h" +# include "libmemcached/server.hpp" +# include "libmemcached/flag.hpp" +# include "libmemcached/behavior.hpp" +# include "libmemcached/sasl.hpp" +# include "libmemcached/server_list.hpp" +#endif + +#include "libmemcached/internal.h" +#include "libmemcached/array.h" +#include "libmemcached/libmemcached_probes.h" +#include "libmemcached/byteorder.h" +#include "libmemcached/initialize_query.h" + +#ifdef __cplusplus +# include "libmemcached/response.h" +# include "libmemcached/namespace.h" +#else +# include "libmemcached/virtual_bucket.h" +#endif + +#ifdef __cplusplus +# include "libmemcached/backtrace.hpp" +# include "libmemcached/assert.hpp" +# include "libmemcached/server.hpp" +# include "libmemcached/key.hpp" +# include "libmemcached/encoding_key.h" +# include "libmemcached/result.h" +# include "libmemcached/version.hpp" +#endif + +#include "libmemcached/continuum.hpp" + +#if !defined(__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ < 96) + +#define likely(x) if((x)) +#define unlikely(x) if((x)) + +#else + +#define likely(x) if(__builtin_expect((x) != 0, 1)) +#define unlikely(x) if(__builtin_expect((x) != 0, 0)) +#endif + +#define MEMCACHED_BLOCK_SIZE 1024 +#define MEMCACHED_DEFAULT_COMMAND_SIZE 350 +#define SMALL_STRING_LEN 1024 +#define HUGE_STRING_LEN 8196 + +#ifdef __cplusplus +extern "C" { +#endif + +memcached_return_t run_distribution(memcached_st *ptr); + +#ifdef __cplusplus +static inline void memcached_server_response_increment(memcached_instance_st* instance) +{ + instance->events(POLLIN); + instance->cursor_active_++; +} +#endif + +#define memcached_server_response_decrement(A) (A)->cursor_active_-- +#define memcached_server_response_reset(A) (A)->cursor_active_=0 + +#define memcached_instance_response_increment(A) (A)->cursor_active_++ +#define memcached_instance_response_decrement(A) (A)->cursor_active_-- +#define memcached_instance_response_reset(A) (A)->cursor_active_=0 + +#ifdef __cplusplus +} +#endif + +#ifdef __cplusplus +bool memcached_purge(memcached_instance_st*); +memcached_instance_st* memcached_instance_by_position(const memcached_st *ptr, uint32_t server_key); +#endif diff --git a/libmemcached/connect.cc b/libmemcached/connect.cc new file mode 100644 index 0000000..52cd293 --- /dev/null +++ b/libmemcached/connect.cc @@ -0,0 +1,821 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#include + +#include + +#ifndef SOCK_CLOEXEC +# define SOCK_CLOEXEC 0 +#endif + +#ifndef SOCK_NONBLOCK +# define SOCK_NONBLOCK 0 +#endif + +#ifndef FD_CLOEXEC +# define FD_CLOEXEC 0 +#endif + +#ifndef SO_NOSIGPIPE +# define SO_NOSIGPIPE 0 +#endif + +#ifndef TCP_NODELAY +# define TCP_NODELAY 0 +#endif + +#ifndef TCP_KEEPIDLE +# define TCP_KEEPIDLE 0 +#endif + +static memcached_return_t connect_poll(memcached_instance_st* server, const int connection_error) +{ + struct pollfd fds[1]; + fds[0].fd= server->fd; + fds[0].events= server->events(); + fds[0].revents= 0; + + size_t loop_max= 5; + + if (server->root->poll_timeout == 0) + { + return memcached_set_error(*server, MEMCACHED_TIMEOUT, MEMCACHED_AT, + memcached_literal_param("The time to wait for a connection to be established was set to zero which produces a timeout to every call to poll().")); + } + + while (--loop_max) // Should only loop on cases of ERESTART or EINTR + { + int number_of; + if ((number_of= poll(fds, 1, server->root->connect_timeout)) == -1) + { + int local_errno= get_socket_errno(); // We cache in case closesocket() modifies errno + switch (local_errno) + { +#ifdef __linux__ + case ERESTART: +#endif + case EINTR: + continue; + + case EFAULT: + case ENOMEM: + return memcached_set_error(*server, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT); + + case EINVAL: + return memcached_set_error(*server, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT, + memcached_literal_param("RLIMIT_NOFILE exceeded, or if OSX the timeout value was invalid")); + + default: // This should not happen + break; + } + + assert_msg(server->fd != INVALID_SOCKET, "poll() was passed an invalid file descriptor"); + server->reset_socket(); + server->state= MEMCACHED_SERVER_STATE_NEW; + + return memcached_set_errno(*server, local_errno, MEMCACHED_AT); + } + + if (number_of == 0) + { + if (connection_error == EINPROGRESS) + { + int err; + socklen_t len= sizeof(err); + if (getsockopt(server->fd, SOL_SOCKET, SO_ERROR, (char*)&err, &len) == -1) + { + return memcached_set_errno(*server, errno, MEMCACHED_AT, memcached_literal_param("getsockopt() error'ed while looking for error connect_poll(EINPROGRESS)")); + } + + // If Zero, my hero, we just fail to a generic MEMCACHED_TIMEOUT error + if (err != 0) + { + return memcached_set_errno(*server, err, MEMCACHED_AT, memcached_literal_param("getsockopt() found the error from poll() after connect() returned EINPROGRESS.")); + } + } + + return memcached_set_error(*server, MEMCACHED_TIMEOUT, MEMCACHED_AT, memcached_literal_param("(number_of == 0)")); + } + + assert (number_of == 1); + + if (fds[0].revents & POLLERR or + fds[0].revents & POLLHUP or + fds[0].revents & POLLNVAL) + { + int err; + socklen_t len= sizeof (err); + if (getsockopt(fds[0].fd, SOL_SOCKET, SO_ERROR, (char*)&err, &len) == -1) + { + return memcached_set_errno(*server, errno, MEMCACHED_AT, memcached_literal_param("getsockopt() errored while looking up error state from poll()")); + } + + // We check the value to see what happened wth the socket. + if (err == 0) // Should not happen + { + return MEMCACHED_SUCCESS; + } + errno= err; + + return memcached_set_errno(*server, err, MEMCACHED_AT, memcached_literal_param("getsockopt() found the error from poll() during connect.")); + } + assert(fds[0].revents & POLLOUT); + + if (fds[0].revents & POLLOUT and connection_error == EINPROGRESS) + { + int err; + socklen_t len= sizeof(err); + if (getsockopt(server->fd, SOL_SOCKET, SO_ERROR, (char*)&err, &len) == -1) + { + return memcached_set_errno(*server, errno, MEMCACHED_AT); + } + + if (err == 0) + { + return MEMCACHED_SUCCESS; + } + + return memcached_set_errno(*server, err, MEMCACHED_AT, memcached_literal_param("getsockopt() found the error from poll() after connect() returned EINPROGRESS.")); + } + + break; // We only have the loop setup for errno types that require restart + } + + // This should only be possible from ERESTART or EINTR; + return memcached_set_errno(*server, connection_error, MEMCACHED_AT, memcached_literal_param("connect_poll() was exhausted")); +} + +static memcached_return_t set_hostinfo(memcached_instance_st* server) +{ + assert(server->type != MEMCACHED_CONNECTION_UNIX_SOCKET); + server->clear_addrinfo(); + + char str_port[MEMCACHED_NI_MAXSERV]= { 0 }; + errno= 0; + int length= snprintf(str_port, MEMCACHED_NI_MAXSERV, "%u", uint32_t(server->port())); + if (length >= MEMCACHED_NI_MAXSERV or length <= 0 or errno != 0) + { + return memcached_set_error(*server, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT, + memcached_literal_param("snprintf(NI_MAXSERV)")); + } + + struct addrinfo hints; + memset(&hints, 0, sizeof(struct addrinfo)); + + hints.ai_family= AF_UNSPEC; + if (memcached_is_udp(server->root)) + { + hints.ai_protocol= IPPROTO_UDP; + hints.ai_socktype= SOCK_DGRAM; + } + else + { + hints.ai_socktype= SOCK_STREAM; + hints.ai_protocol= IPPROTO_TCP; + } + + assert(server->address_info == NULL); + assert(server->address_info_next == NULL); + int errcode; + assert(server->hostname()); + switch(errcode= getaddrinfo(server->hostname(), str_port, &hints, &server->address_info)) + { + case 0: + server->address_info_next= server->address_info; + server->state= MEMCACHED_SERVER_STATE_ADDRINFO; + break; + + case EAI_AGAIN: + return memcached_set_error(*server, MEMCACHED_TIMEOUT, MEMCACHED_AT, memcached_string_make_from_cstr(gai_strerror(errcode))); + + case EAI_SYSTEM: + server->clear_addrinfo(); + return memcached_set_errno(*server, errno, MEMCACHED_AT, memcached_literal_param("getaddrinfo(EAI_SYSTEM)")); + + case EAI_BADFLAGS: + server->clear_addrinfo(); + return memcached_set_error(*server, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, memcached_literal_param("getaddrinfo(EAI_BADFLAGS)")); + + case EAI_MEMORY: + server->clear_addrinfo(); + return memcached_set_error(*server, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT, memcached_literal_param("getaddrinfo(EAI_MEMORY)")); + + default: + { + server->clear_addrinfo(); + return memcached_set_error(*server, MEMCACHED_HOST_LOOKUP_FAILURE, MEMCACHED_AT, memcached_string_make_from_cstr(gai_strerror(errcode))); + } + } + + return MEMCACHED_SUCCESS; +} + +static inline void set_socket_nonblocking(memcached_instance_st* server) +{ +#if defined(_WIN32) + u_long arg= 1; + if (ioctlsocket(server->fd, FIONBIO, &arg) == SOCKET_ERROR) + { + memcached_set_errno(*server, get_socket_errno(), NULL); + } +#else + int flags; + + if (SOCK_NONBLOCK == 0) + { + do + { + flags= fcntl(server->fd, F_GETFL, 0); + } while (flags == -1 && (errno == EINTR || errno == EAGAIN)); + + if (flags == -1) + { + memcached_set_errno(*server, errno, NULL); + } + else if ((flags & O_NONBLOCK) == 0) + { + int rval; + + do + { + rval= fcntl(server->fd, F_SETFL, flags | O_NONBLOCK); + } while (rval == -1 && (errno == EINTR or errno == EAGAIN)); + + if (rval == -1) + { + memcached_set_errno(*server, errno, NULL); + } + } + } +#endif +} + +static bool set_socket_options(memcached_instance_st* server) +{ + assert_msg(server->fd != INVALID_SOCKET, "invalid socket was passed to set_socket_options()"); + +#ifdef HAVE_FCNTL + // If SOCK_CLOEXEC exists then we don't need to call the following + if (SOCK_CLOEXEC == 0) + { + if (FD_CLOEXEC) + { + int flags; + do + { + flags= fcntl(server->fd, F_GETFD, 0); + } while (flags == -1 and (errno == EINTR or errno == EAGAIN)); + + if (flags != -1) + { + int rval; + do + { + rval= fcntl (server->fd, F_SETFD, flags | FD_CLOEXEC); + } while (rval == -1 && (errno == EINTR or errno == EAGAIN)); + // we currently ignore the case where rval is -1 + } + } + } +#endif + + if (memcached_is_udp(server->root)) + { + return true; + } + +#ifdef HAVE_SNDTIMEO + if (server->root->snd_timeout > 0) + { + struct timeval waittime; + + waittime.tv_sec= server->root->snd_timeout / 1000000; + waittime.tv_usec= server->root->snd_timeout % 1000000; + + int error= setsockopt(server->fd, SOL_SOCKET, SO_SNDTIMEO, + (char*)&waittime, (socklen_t)sizeof(struct timeval)); + (void)error; + assert(error == 0); + } +#endif + +#ifdef HAVE_RCVTIMEO + if (server->root->rcv_timeout > 0) + { + struct timeval waittime; + + waittime.tv_sec= server->root->rcv_timeout / 1000000; + waittime.tv_usec= server->root->rcv_timeout % 1000000; + + int error= setsockopt(server->fd, SOL_SOCKET, SO_RCVTIMEO, + (char*)&waittime, (socklen_t)sizeof(struct timeval)); + (void)(error); + assert(error == 0); + } +#endif + + +#if defined(_WIN32) +#else +# if defined(SO_NOSIGPIPE) + if (SO_NOSIGPIPE) + { + int set= 1; + int error= setsockopt(server->fd, SOL_SOCKET, SO_NOSIGPIPE, (void *)&set, sizeof(int)); + + assert(error == 0); + + // This is not considered a fatal error + if (error == -1) + { +#if 0 + perror("setsockopt(SO_NOSIGPIPE)"); +#endif + } + } +# endif // SO_NOSIGPIPE +#endif // _WIN32 + + if (server->root->flags.no_block) + { + struct linger linger; + + linger.l_onoff= 1; + linger.l_linger= 0; /* By default on close() just drop the socket */ + int error= setsockopt(server->fd, SOL_SOCKET, SO_LINGER, + (char*)&linger, (socklen_t)sizeof(struct linger)); + (void)(error); + assert(error == 0); + } + + if (TCP_NODELAY) + { + if (server->root->flags.tcp_nodelay) + { + int flag= 1; + + int error= setsockopt(server->fd, IPPROTO_TCP, TCP_NODELAY, + (char*)&flag, (socklen_t)sizeof(int)); + (void)(error); + assert(error == 0); + } + } + + if (server->root->flags.tcp_keepalive) + { + int flag= 1; + + int error= setsockopt(server->fd, SOL_SOCKET, SO_KEEPALIVE, + (char*)&flag, (socklen_t)sizeof(int)); + (void)(error); + assert(error == 0); + } + + if (TCP_KEEPIDLE) + { + if (server->root->tcp_keepidle > 0) + { + int error= setsockopt(server->fd, IPPROTO_TCP, TCP_KEEPIDLE, + (char*)&server->root->tcp_keepidle, (socklen_t)sizeof(int)); + (void)(error); + assert(error == 0); + } + } + + if (server->root->send_size > 0) + { + int error= setsockopt(server->fd, SOL_SOCKET, SO_SNDBUF, + (char*)&server->root->send_size, (socklen_t)sizeof(int)); + (void)(error); + assert(error == 0); + } + + if (server->root->recv_size > 0) + { + int error= setsockopt(server->fd, SOL_SOCKET, SO_RCVBUF, + (char*)&server->root->recv_size, (socklen_t)sizeof(int)); + (void)(error); + assert(error == 0); + } + + /* libmemcached will always use nonblocking IO to avoid write deadlocks */ + set_socket_nonblocking(server); + + return true; +} + +static memcached_return_t unix_socket_connect(memcached_instance_st* server) +{ +#ifndef _WIN32 + WATCHPOINT_ASSERT(server->fd == INVALID_SOCKET); + + do { + int type= SOCK_STREAM; + if (SOCK_CLOEXEC) + { + type|= SOCK_CLOEXEC; + } + + if (SOCK_NONBLOCK) + { + type|= SOCK_NONBLOCK; + } + + if ((server->fd= socket(AF_UNIX, type, 0)) == -1) + { + return memcached_set_errno(*server, errno, NULL); + } + + struct sockaddr_un servAddr; + + memset(&servAddr, 0, sizeof (struct sockaddr_un)); + servAddr.sun_family= AF_UNIX; + strncpy(servAddr.sun_path, server->hostname(), sizeof(servAddr.sun_path)); /* Copy filename */ + + if (connect(server->fd, (struct sockaddr *)&servAddr, sizeof(servAddr)) == -1) + { + switch (errno) + { + case EINPROGRESS: + case EALREADY: + server->events(POLLOUT); + break; + + case EINTR: + server->reset_socket(); + continue; + + case EISCONN: /* We were spinning waiting on connect */ + { + assert(0); // Programmer error + server->reset_socket(); + continue; + } + + default: + WATCHPOINT_ERRNO(errno); + server->reset_socket(); + return memcached_set_errno(*server, errno, MEMCACHED_AT); + } + } + } while (0); + server->state= MEMCACHED_SERVER_STATE_CONNECTED; + + WATCHPOINT_ASSERT(server->fd != INVALID_SOCKET); + + return MEMCACHED_SUCCESS; +#else + (void)server; + return MEMCACHED_NOT_SUPPORTED; +#endif +} + +static memcached_return_t network_connect(memcached_instance_st* server) +{ + bool timeout_error_occured= false; + + WATCHPOINT_ASSERT(server->fd == INVALID_SOCKET); + WATCHPOINT_ASSERT(server->cursor_active_ == 0); + + /* + We want to check both of these because if address_info_next has been fully tried, we want to do a new lookup to make sure we have picked up on any new DNS information. + */ + if (server->address_info == NULL or server->address_info_next == NULL) + { + WATCHPOINT_ASSERT(server->state == MEMCACHED_SERVER_STATE_NEW); + server->address_info_next= NULL; + memcached_return_t rc= set_hostinfo(server); + + if (memcached_failed(rc)) + { + return rc; + } + } + + assert(server->address_info_next); + assert(server->address_info); + + /* Create the socket */ + while (server->address_info_next and server->fd == INVALID_SOCKET) + { + /* Memcache server does not support IPV6 in udp mode, so skip if not ipv4 */ + if (memcached_is_udp(server->root) and server->address_info_next->ai_family != AF_INET) + { + server->address_info_next= server->address_info_next->ai_next; + continue; + } + + int type= server->address_info_next->ai_socktype; + if (SOCK_CLOEXEC) + { + type|= SOCK_CLOEXEC; + } + + if (SOCK_NONBLOCK) + { + type|= SOCK_NONBLOCK; + } + + server->fd= socket(server->address_info_next->ai_family, + type, + server->address_info_next->ai_protocol); + + if (int(server->fd) == SOCKET_ERROR) + { + return memcached_set_errno(*server, get_socket_errno(), NULL); + } + + if (set_socket_options(server) == false) + { + server->reset_socket(); + return MEMCACHED_CONNECTION_FAILURE; + } + + /* connect to server */ + if ((connect(server->fd, server->address_info_next->ai_addr, server->address_info_next->ai_addrlen) != SOCKET_ERROR)) + { + server->state= MEMCACHED_SERVER_STATE_CONNECTED; + return MEMCACHED_SUCCESS; + } + + /* An error occurred */ + int local_error= get_socket_errno(); + switch (local_error) + { + case ETIMEDOUT: + timeout_error_occured= true; + break; + + case EAGAIN: +#if EWOULDBLOCK != EAGAIN + case EWOULDBLOCK: +#endif + case EINPROGRESS: // nonblocking mode - first return + case EALREADY: // nonblocking mode - subsequent returns + { + server->events(POLLOUT); + server->state= MEMCACHED_SERVER_STATE_IN_PROGRESS; + memcached_return_t rc= connect_poll(server, local_error); + + if (memcached_success(rc)) + { + server->state= MEMCACHED_SERVER_STATE_CONNECTED; + return MEMCACHED_SUCCESS; + } + + // A timeout here is treated as an error, we will not retry + if (rc == MEMCACHED_TIMEOUT) + { + timeout_error_occured= true; + } + } + break; + + case EISCONN: // we are connected :-) + WATCHPOINT_ASSERT(0); // This is a programmer's error + break; + + case EINTR: // Special case, we retry ai_addr + WATCHPOINT_ASSERT(server->fd != INVALID_SOCKET); + server->reset_socket(); + continue; + + case ECONNREFUSED: + // Probably not running service + + default: + break; + } + + WATCHPOINT_ASSERT(server->fd != INVALID_SOCKET); + server->reset_socket(); + server->address_info_next= server->address_info_next->ai_next; + } + + WATCHPOINT_ASSERT(server->fd == INVALID_SOCKET); + + if (timeout_error_occured) + { + server->reset_socket(); + } + + WATCHPOINT_STRING("Never got a good file descriptor"); + + if (memcached_has_current_error(*server)) + { + return memcached_instance_error_return(server); + } + + if (timeout_error_occured and server->state < MEMCACHED_SERVER_STATE_IN_PROGRESS) + { + return memcached_set_error(*server, MEMCACHED_TIMEOUT, MEMCACHED_AT, + memcached_literal_param("if (timeout_error_occured and server->state < MEMCACHED_SERVER_STATE_IN_PROGRESS)")); + } + + return memcached_set_error(*server, MEMCACHED_CONNECTION_FAILURE, MEMCACHED_AT); /* The last error should be from connect() */ +} + + +/* + backoff_handling() + + Based on time/failure count fail the connect without trying. This prevents waiting in a state where + we get caught spending cycles just waiting. +*/ +static memcached_return_t backoff_handling(memcached_instance_st* server, bool& in_timeout) +{ + struct timeval curr_time; + bool _gettime_success= (gettimeofday(&curr_time, NULL) == 0); + + /* + If we hit server_failure_limit then something is completely wrong about the server. + + 1) If autoeject is enabled we do that. + 2) If not? We go into timeout again, there is much else to do :( + */ + if (server->server_failure_counter >= server->root->server_failure_limit) + { + /* + We just auto_eject if we hit this point + */ + if (_is_auto_eject_host(server->root)) + { + set_last_disconnected_host(server); + + // Retry dead servers if requested + if (_gettime_success and server->root->dead_timeout > 0) + { + server->next_retry= curr_time.tv_sec +server->root->dead_timeout; + + // We only retry dead servers once before assuming failure again + server->server_failure_counter= server->root->server_failure_limit -1; + } + + memcached_return_t rc; + if (memcached_failed(rc= run_distribution((memcached_st *)server->root))) + { + return memcached_set_error(*server, rc, MEMCACHED_AT, memcached_literal_param("Backoff handling failed during run_distribution")); + } + + return memcached_set_error(*server, MEMCACHED_SERVER_MARKED_DEAD, MEMCACHED_AT); + } + + server->state= MEMCACHED_SERVER_STATE_IN_TIMEOUT; + + // Sanity check/setting + if (server->next_retry == 0) + { + server->next_retry= 1; + } + } + + if (server->state == MEMCACHED_SERVER_STATE_IN_TIMEOUT) + { + /* + If next_retry is less then our current time, then we reset and try everything again. + */ + if (_gettime_success and server->next_retry < curr_time.tv_sec) + { + server->state= MEMCACHED_SERVER_STATE_NEW; + server->server_timeout_counter= 0; + } + else + { + return memcached_set_error(*server, MEMCACHED_SERVER_TEMPORARILY_DISABLED, MEMCACHED_AT); + } + + in_timeout= true; + } + + return MEMCACHED_SUCCESS; +} + +static memcached_return_t _memcached_connect(memcached_instance_st* server, const bool set_last_disconnected) +{ + assert(server); + if (server->fd != INVALID_SOCKET) + { + return MEMCACHED_SUCCESS; + } + + LIBMEMCACHED_MEMCACHED_CONNECT_START(); + + bool in_timeout= false; + memcached_return_t rc; + if (memcached_failed(rc= backoff_handling(server, in_timeout))) + { + set_last_disconnected_host(server); + return rc; + } + + if (LIBMEMCACHED_WITH_SASL_SUPPORT and server->root->sasl.callbacks and memcached_is_udp(server->root)) + { + return memcached_set_error(*server, MEMCACHED_INVALID_HOST_PROTOCOL, MEMCACHED_AT, memcached_literal_param("SASL is not supported for UDP connections")); + } + + if (server->hostname()[0] == '/') + { + server->type= MEMCACHED_CONNECTION_UNIX_SOCKET; + } + + /* We need to clean up the multi startup piece */ + switch (server->type) + { + case MEMCACHED_CONNECTION_UDP: + case MEMCACHED_CONNECTION_TCP: + rc= network_connect(server); + +#if defined(LIBMEMCACHED_WITH_SASL_SUPPORT) + if (LIBMEMCACHED_WITH_SASL_SUPPORT) + { + if (server->fd != INVALID_SOCKET and server->root->sasl.callbacks) + { + rc= memcached_sasl_authenticate_connection(server); + if (memcached_failed(rc) and server->fd != INVALID_SOCKET) + { + WATCHPOINT_ASSERT(server->fd != INVALID_SOCKET); + server->reset_socket(); + } + } + } +#endif + break; + + case MEMCACHED_CONNECTION_UNIX_SOCKET: + rc= unix_socket_connect(server); + break; + } + + if (memcached_success(rc)) + { + server->mark_server_as_clean(); + memcached_version_instance(server); + return rc; + } + else if (set_last_disconnected) + { + set_last_disconnected_host(server); + if (memcached_has_current_error(*server)) + { + memcached_mark_server_for_timeout(server); + assert(memcached_failed(memcached_instance_error_return(server))); + } + else + { + memcached_set_error(*server, rc, MEMCACHED_AT); + memcached_mark_server_for_timeout(server); + } + + LIBMEMCACHED_MEMCACHED_CONNECT_END(); + + if (in_timeout) + { + char buffer[1024]; + int snprintf_length= snprintf(buffer, sizeof(buffer), "%s:%d", server->hostname(), int(server->port())); + return memcached_set_error(*server, MEMCACHED_SERVER_TEMPORARILY_DISABLED, MEMCACHED_AT, buffer, snprintf_length); + } + } + + return rc; +} + +memcached_return_t memcached_connect(memcached_instance_st* server) +{ + return _memcached_connect(server, true); +} diff --git a/libmemcached/connect.hpp b/libmemcached/connect.hpp new file mode 100644 index 0000000..d1dafe5 --- /dev/null +++ b/libmemcached/connect.hpp @@ -0,0 +1,40 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#pragma once + +memcached_return_t memcached_connect(memcached_instance_st*); diff --git a/libmemcached/continuum.hpp b/libmemcached/continuum.hpp new file mode 100644 index 0000000..e39fcdc --- /dev/null +++ b/libmemcached/continuum.hpp @@ -0,0 +1,46 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * LibMemcached + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +/* string value */ +struct memcached_continuum_item_st +{ + uint32_t index; + uint32_t value; +}; diff --git a/libmemcached/csl/common.h b/libmemcached/csl/common.h new file mode 100644 index 0000000..60b27d6 --- /dev/null +++ b/libmemcached/csl/common.h @@ -0,0 +1,52 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Configure Scripting Language + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + + +#ifndef YY_EXTRA_TYPE +# define YY_EXTRA_TYPE Context* +#endif + +#ifndef YY_TYPEDEF_YY_SCANNER_T +# define YY_TYPEDEF_YY_SCANNER_T +typedef void* yyscan_t; +#endif + +#include +#include + diff --git a/libmemcached/csl/context.cc b/libmemcached/csl/context.cc new file mode 100644 index 0000000..16852d5 --- /dev/null +++ b/libmemcached/csl/context.cc @@ -0,0 +1,138 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Configure Scripting Language + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include + +void Context::abort(const char *error_arg, yytokentype last_token, const char *last_token_str) +{ + rc= MEMCACHED_PARSE_ERROR; + (void)last_token; + + if (error_arg) + { + memcached_set_parser_error(*memc, MEMCACHED_AT, "%s", error_arg); + return; + } + + if (last_token_str) + { + memcached_set_parser_error(*memc, MEMCACHED_AT, "%s", last_token_str); + return; + } + + memcached_set_parser_error(*memc, MEMCACHED_AT, "unknown parsing error"); +} + +void Context::error(const char *error_arg, yytokentype last_token, const char *last_token_str) +{ + rc= MEMCACHED_PARSE_ERROR; + if (not error_arg) + { + memcached_set_parser_error(*memc, MEMCACHED_AT, "Unknown error occured during parsing (%s)", last_token_str ? last_token_str : " "); + return; + } + + if (error_arg and strcmp(error_arg, "memory exhausted") == 0) + { + (void)memcached_set_error(*memc, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT, memcached_string_make_from_cstr(error_arg)); + return; + } + + // We now test if it is something other then a syntax error, if it we + // return a generic message + if (error_arg and strcmp(error_arg, "syntax error") == 0) + { } + else if (error_arg) + { + memcached_set_parser_error(*memc, MEMCACHED_AT, "Error occured during parsing (%s)", error_arg); + return; + } + + if (last_token == UNKNOWN_OPTION and begin) + { + memcached_set_parser_error(*memc, MEMCACHED_AT, "Unknown option: %s", begin); + } + else if (last_token == UNKNOWN) + { + memcached_set_parser_error(*memc, MEMCACHED_AT, "Error occured durring parsing, an unknown token was found."); + } + else + { + memcached_set_parser_error(*memc, MEMCACHED_AT, "Error occured while parsing (%s)", last_token_str ? last_token_str : " "); + } +} + +void Context::hostname(const char *str, size_t size, server_t& server_) +{ + size_t copy_length= size_t(NI_MAXHOST) > size ? size : size_t(NI_MAXHOST); + memcpy(_hostname, str, copy_length); + _hostname[copy_length]= 0; + + server_.port= MEMCACHED_DEFAULT_PORT; + server_.weight= 1; + server_.c_str= _hostname; + server_.size= size; +} + +bool Context::string_buffer(const char *str, size_t size, memcached_string_t& string_) +{ + if (memcached_string_set(_string_buffer, str, size)) + { + string_.c_str= memcached_string_value(_string_buffer); + string_.size= memcached_string_length(_string_buffer); + + return true; + } + + return false; +} + +bool Context::set_hash(memcached_hash_t hash) +{ + if (_has_hash) + { + return false; + } + + if ((memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, hash)) != MEMCACHED_SUCCESS) + { + return false; + } + + return _has_hash= true; +} diff --git a/libmemcached/csl/context.h b/libmemcached/csl/context.h new file mode 100644 index 0000000..8517fdf --- /dev/null +++ b/libmemcached/csl/context.h @@ -0,0 +1,138 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Configure Scripting Language + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include "libmemcached/csl/common.h" +#include "libmemcached/csl/parser.h" + +class Context +{ +public: + Context(const char *option_string, size_t option_string_length, memcached_st *memc_, + memcached_return_t &rc_arg) : + previous_token(END), + scanner(NULL), + buf(option_string), + begin(NULL), + pos(0), + length(option_string_length), + memc(memc_), + rc(rc_arg), + _is_server(false), + _end(false), + _has_hash(false) + { + _hostname[0]= 0; + init_scanner(); + rc= MEMCACHED_SUCCESS; + + memc->state.is_parsing= true; + memcached_string_create(memc, + &_string_buffer, + 1024); + } + + bool end() + { + return _end; + } + + void start(); + + void set_end() + { + rc= MEMCACHED_SUCCESS; + _end= true; + } + + bool set_hash(memcached_hash_t hash); + + void set_server() + { + _is_server= true; + } + + void unset_server() + { + _is_server= false; + } + + bool is_server() const + { + return _is_server; + } + + void hostname(const char*, size_t, server_t&); + + bool string_buffer(const char*, size_t, memcached_string_t&); + + const char *hostname() const + { + return _hostname; + } + + void abort(const char *, yytokentype, const char *); + void error(const char *, yytokentype, const char* ); + + ~Context() + { + memcached_string_free(&_string_buffer); + destroy_scanner(); + memc->state.is_parsing= false; + } + + yytokentype previous_token; + void *scanner; + const char *buf; + const char *begin; + size_t pos; + size_t length; + memcached_st *memc; + memcached_return_t &rc; + +protected: + void init_scanner(); + void destroy_scanner(); + +private: + bool _is_server; + bool _end; + char _hostname[NI_MAXHOST]; + bool _has_hash; + memcached_string_st _string_buffer; +}; diff --git a/libmemcached/csl/include.am b/libmemcached/csl/include.am new file mode 100644 index 0000000..6848991 --- /dev/null +++ b/libmemcached/csl/include.am @@ -0,0 +1,39 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +DISTCLEANFILES+= libmemcached/csl/parser.output + +noinst_HEADERS+= libmemcached/csl/common.h +noinst_HEADERS+= libmemcached/csl/context.h +noinst_HEADERS+= libmemcached/csl/parser.h +noinst_HEADERS+= libmemcached/csl/scanner.h +noinst_HEADERS+= libmemcached/csl/server.h +noinst_HEADERS+= libmemcached/csl/symbol.h + +libmemcached_libmemcached_la_SOURCES+= libmemcached/csl/context.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/csl/parser.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/csl/scanner.cc + +EXTRA_DIST+= libmemcached/csl/parser.yy +EXTRA_DIST+= libmemcached/csl/scanner.l + +MAINTAINERCLEANFILES+= libmemcached/csl/parser.h +MAINTAINERCLEANFILES+= libmemcached/csl/parser.cc +MAINTAINERCLEANFILES+= libmemcached/csl/scanner.h +MAINTAINERCLEANFILES+= libmemcached/csl/scanner.cc + +BUILT_SOURCES+= libmemcached/csl/parser.cc +BUILT_SOURCES+= libmemcached/csl/parser.h +BUILT_SOURCES+= libmemcached/csl/scanner.cc +BUILT_SOURCES+= libmemcached/csl/scanner.h + +libmemcached/csl/parser.h: libmemcached/csl/parser.cc + +libmemcached/csl/parser.cc: libmemcached/csl/parser.yy libmemcached/csl/scanner.l libmemcached/csl/scanner.h + $(AM_V_YACC)$(am__skipyacc) $(YACC) $(YLFLAGS) $(AM_YFLAGS) -o $@ $< + +libmemcached/csl/scanner.h: libmemcached/csl/scanner.cc + +libmemcached/csl/scanner.cc: libmemcached/csl/scanner.l libmemcached/csl/parser.yy + $(AM_V_GEN)$(LEX) $< diff --git a/libmemcached/csl/parser.cc b/libmemcached/csl/parser.cc new file mode 100644 index 0000000..54aad2f --- /dev/null +++ b/libmemcached/csl/parser.cc @@ -0,0 +1,2368 @@ +/* A Bison parser, made by GNU Bison 2.7. */ + +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. + + This program 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 3 of the License, or + (at your option) any later version. + + This program 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 . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.7" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 1 + +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + + +/* Substitute the variable and function names. */ +#define yyparse config_parse +#define yylex config_lex +#define yyerror config_error +#define yylval config_lval +#define yychar config_char +#define yydebug config_debug +#define yynerrs config_nerrs + +/* Copy the first part of user declarations. */ +/* Line 371 of yacc.c */ +#line 37 "libmemcached/csl/parser.yy" + + +#include + +class Context; + +/* Line 371 of yacc.c */ +#line 60 "libmemcached/csl/parser.yy" + + +#include + +#include +#include +#include + +#ifndef __INTEL_COMPILER +# pragma GCC diagnostic ignored "-Wold-style-cast" +#endif + +#ifndef __INTEL_COMPILER +# ifndef __clang__ +# pragma GCC diagnostic ignored "-Wlogical-op" +# pragma GCC diagnostic ignored "-Wunsafe-loop-optimizations" +# endif +#endif + +int conf_lex(YYSTYPE* lvalp, void* scanner); + +#define select_yychar(__context) yychar == UNKNOWN ? ( (__context)->previous_token == END ? UNKNOWN : (__context)->previous_token ) : yychar + +#define stryytname(__yytokentype) ((__yytokentype) < YYNTOKENS ) ? yytname[(__yytokentype)] : "" + +#define parser_abort(__context, __error_message) do { (__context)->abort((__error_message), yytokentype(select_yychar(__context)), stryytname(YYTRANSLATE(select_yychar(__context)))); YYABORT; } while (0) + +// This is bison calling error. +inline void __config_error(Context *context, yyscan_t *scanner, const char *error, int last_token, const char *last_token_str) +{ + if (not context->end()) + { + context->error(error, yytokentype(last_token), last_token_str); + } + else + { + context->error(error, yytokentype(last_token), last_token_str); + } +} + +#define config_error(__context, __scanner, __error_msg) do { __config_error((__context), (__scanner), (__error_msg), select_yychar(__context), stryytname(YYTRANSLATE(select_yychar(__context)))); } while (0) + + + +/* Line 371 of yacc.c */ +#line 128 "libmemcached/csl/parser.cc" + +# ifndef YY_NULL +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULL nullptr +# else +# define YY_NULL 0 +# endif +# endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 1 +#endif + +/* In a future release of Bison, this section will be replaced + by #include "parser.h". */ +#ifndef YY_CONFIG_LIBMEMCACHED_CSL_PARSER_H_INCLUDED +# define YY_CONFIG_LIBMEMCACHED_CSL_PARSER_H_INCLUDED +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 1 +#endif +#if YYDEBUG +extern int config_debug; +#endif + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + COMMENT = 258, + END = 259, + CSL_ERROR = 260, + RESET = 261, + PARSER_DEBUG = 262, + INCLUDE = 263, + CONFIGURE_FILE = 264, + EMPTY_LINE = 265, + SERVER = 266, + CSL_SOCKET = 267, + SERVERS = 268, + SERVERS_OPTION = 269, + UNKNOWN_OPTION = 270, + UNKNOWN = 271, + BINARY_PROTOCOL = 272, + BUFFER_REQUESTS = 273, + CONNECT_TIMEOUT = 274, + DISTRIBUTION = 275, + HASH = 276, + HASH_WITH_NAMESPACE = 277, + IO_BYTES_WATERMARK = 278, + IO_KEY_PREFETCH = 279, + IO_MSG_WATERMARK = 280, + KETAMA_HASH = 281, + KETAMA_WEIGHTED = 282, + NOREPLY = 283, + NUMBER_OF_REPLICAS = 284, + POLL_TIMEOUT = 285, + RANDOMIZE_REPLICA_READ = 286, + RCV_TIMEOUT = 287, + REMOVE_FAILED_SERVERS = 288, + RETRY_TIMEOUT = 289, + SND_TIMEOUT = 290, + SOCKET_RECV_SIZE = 291, + SOCKET_SEND_SIZE = 292, + SORT_HOSTS = 293, + SUPPORT_CAS = 294, + USER_DATA = 295, + USE_UDP = 296, + VERIFY_KEY = 297, + _TCP_KEEPALIVE = 298, + _TCP_KEEPIDLE = 299, + _TCP_NODELAY = 300, + FETCH_VERSION = 301, + NAMESPACE = 302, + POOL_MIN = 303, + POOL_MAX = 304, + MD5 = 305, + CRC = 306, + FNV1_64 = 307, + FNV1A_64 = 308, + FNV1_32 = 309, + FNV1A_32 = 310, + HSIEH = 311, + MURMUR = 312, + JENKINS = 313, + CONSISTENT = 314, + MODULA = 315, + RANDOM = 316, + CSL_TRUE = 317, + CSL_FALSE = 318, + CSL_FLOAT = 319, + NUMBER = 320, + PORT = 321, + WEIGHT_START = 322, + IPADDRESS = 323, + HOSTNAME = 324, + STRING = 325, + QUOTED_STRING = 326, + FILE_PATH = 327 + }; +#endif + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED + +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +#endif + + +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int config_parse (void *YYPARSE_PARAM); +#else +int config_parse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int config_parse (class Context *context, yyscan_t *scanner); +#else +int config_parse (); +#endif +#endif /* ! YYPARSE_PARAM */ + +#endif /* !YY_CONFIG_LIBMEMCACHED_CSL_PARSER_H_INCLUDED */ + +/* Copy the second part of user declarations. */ + +/* Line 390 of yacc.c */ +#line 264 "libmemcached/csl/parser.cc" + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) +# endif +# endif +# ifndef YY_ +# define YY_(Msgid) Msgid +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(E) ((void) (E)) +#else +# define YYUSE(E) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(N) (N) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int yyi) +#else +static int +YYID (yyi) + int yyi; +#endif +{ + return yyi; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +# define YYCOPY_NEEDED 1 + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) + +#endif + +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from SRC to DST. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 72 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 75 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 76 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 12 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 68 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 86 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 327 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 75, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 64, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 65, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 66, + 67, 68, 69, 70, 71, 72, 73, 74 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint8 yyprhs[] = +{ + 0, 0, 3, 5, 9, 11, 13, 15, 17, 19, + 21, 23, 27, 32, 37, 41, 44, 47, 50, 52, + 55, 57, 60, 65, 68, 71, 73, 75, 77, 79, + 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, + 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, + 121, 123, 124, 126, 127, 129, 131, 133, 135, 137, + 139, 141, 143, 145, 147, 149, 151, 153, 155 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int8 yyrhs[] = +{ + 77, 0, -1, 78, -1, 77, 75, 78, -1, 79, + -1, 3, -1, 10, -1, 4, -1, 5, -1, 6, + -1, 7, -1, 8, 75, 86, -1, 11, 71, 83, + 84, -1, 11, 70, 83, 84, -1, 12, 86, 84, + -1, 9, 86, -1, 48, 67, -1, 49, 67, -1, + 80, -1, 47, 86, -1, 46, -1, 20, 87, -1, + 20, 87, 64, 85, -1, 21, 85, -1, 81, 67, + -1, 82, -1, 40, -1, 33, -1, 19, -1, 25, + -1, 23, -1, 24, -1, 29, -1, 30, -1, 32, + -1, 34, -1, 35, -1, 36, -1, 37, -1, 17, + -1, 18, -1, 22, -1, 28, -1, 31, -1, 38, + -1, 39, -1, 45, -1, 43, -1, 44, -1, 41, + -1, 42, -1, -1, 68, -1, -1, 69, -1, 50, + -1, 51, -1, 52, -1, 53, -1, 54, -1, 55, + -1, 56, -1, 57, -1, 58, -1, 72, -1, 73, + -1, 59, -1, 60, -1, 61, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const yytype_uint16 yyrline[] = +{ + 0, 203, 203, 204, 208, 210, 212, 214, 219, 224, + 228, 232, 243, 253, 263, 272, 276, 280, 284, 288, + 300, 304, 317, 330, 337, 344, 353, 359, 363, 367, + 371, 375, 379, 383, 387, 391, 395, 399, 403, 410, + 414, 418, 422, 426, 430, 434, 438, 442, 446, 450, + 454, 461, 462, 467, 468, 473, 477, 481, 485, 489, + 493, 497, 501, 505, 512, 516, 523, 527, 531 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || 1 +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "COMMENT", "END", "CSL_ERROR", "RESET", + "PARSER_DEBUG", "INCLUDE", "CONFIGURE_FILE", "EMPTY_LINE", "SERVER", + "CSL_SOCKET", "SERVERS", "SERVERS_OPTION", "UNKNOWN_OPTION", "UNKNOWN", + "BINARY_PROTOCOL", "BUFFER_REQUESTS", "CONNECT_TIMEOUT", "DISTRIBUTION", + "HASH", "HASH_WITH_NAMESPACE", "IO_BYTES_WATERMARK", "IO_KEY_PREFETCH", + "IO_MSG_WATERMARK", "KETAMA_HASH", "KETAMA_WEIGHTED", "NOREPLY", + "NUMBER_OF_REPLICAS", "POLL_TIMEOUT", "RANDOMIZE_REPLICA_READ", + "RCV_TIMEOUT", "REMOVE_FAILED_SERVERS", "RETRY_TIMEOUT", "SND_TIMEOUT", + "SOCKET_RECV_SIZE", "SOCKET_SEND_SIZE", "SORT_HOSTS", "SUPPORT_CAS", + "USER_DATA", "USE_UDP", "VERIFY_KEY", "_TCP_KEEPALIVE", "_TCP_KEEPIDLE", + "_TCP_NODELAY", "FETCH_VERSION", "NAMESPACE", "POOL_MIN", "POOL_MAX", + "MD5", "CRC", "FNV1_64", "FNV1A_64", "FNV1_32", "FNV1A_32", "HSIEH", + "MURMUR", "JENKINS", "CONSISTENT", "MODULA", "RANDOM", "CSL_TRUE", + "CSL_FALSE", "','", "'='", "CSL_FLOAT", "NUMBER", "PORT", "WEIGHT_START", + "IPADDRESS", "HOSTNAME", "STRING", "QUOTED_STRING", "FILE_PATH", "' '", + "$accept", "begin", "statement", "expression", "behaviors", + "behavior_number", "behavior_boolean", "optional_port", + "optional_weight", "hash", "string", "distribution", YY_NULL +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 44, 61, 319, 320, 321, 322, + 323, 324, 325, 326, 327, 32 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 76, 77, 77, 78, 78, 78, 78, 78, 78, + 78, 78, 79, 79, 79, 79, 79, 79, 79, 80, + 80, 80, 80, 80, 80, 80, 80, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 81, 81, 81, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 83, 83, 84, 84, 85, 85, 85, 85, 85, + 85, 85, 85, 85, 86, 86, 87, 87, 87 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 1, 3, 1, 1, 1, 1, 1, 1, + 1, 3, 4, 4, 3, 2, 2, 2, 1, 2, + 1, 2, 4, 2, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1 +}; + +/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 0, 5, 7, 8, 9, 10, 0, 0, 6, 0, + 0, 39, 40, 28, 0, 0, 41, 30, 31, 29, + 42, 32, 33, 43, 34, 27, 35, 36, 37, 38, + 44, 45, 26, 49, 50, 47, 48, 46, 20, 0, + 0, 0, 0, 2, 4, 18, 0, 25, 0, 64, + 65, 15, 51, 51, 53, 66, 67, 68, 21, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 23, 19, + 16, 17, 1, 0, 24, 11, 52, 53, 53, 54, + 14, 0, 3, 13, 12, 22 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = +{ + -1, 42, 43, 44, 45, 46, 47, 77, 80, 68, + 51, 58 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -62 +static const yytype_int8 yypact[] = +{ + -2, -62, -62, -62, -62, -62, -61, -24, -62, -20, + -24, -62, -62, -62, -48, 13, -62, -62, -62, -62, + -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, + -62, -62, -62, -62, -62, -62, -62, -62, -62, -24, + -42, -15, 0, -62, -62, -62, -11, -62, -24, -62, + -62, -62, -10, -10, -12, -62, -62, -62, -5, -62, + -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, + -62, -62, -62, -2, -62, -62, -62, -12, -12, -62, + -62, 13, -62, -62, -62, -62 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int8 yypgoto[] = +{ + -62, -62, -13, -62, -62, -62, -62, 8, -23, -9, + 14, -62 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -1 +static const yytype_uint8 yytable[] = +{ + 72, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 55, 56, 57, 48, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 54, 70, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 49, 50, + 52, 53, 71, 69, 83, 84, 74, 79, 76, 81, + 82, 78, 75, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 85, 0, 0, 73 +}; + +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-62))) + +#define yytable_value_is_error(Yytable_value) \ + YYID (0) + +static const yytype_int8 yycheck[] = +{ + 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 59, 60, 61, 75, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 10, 67, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 72, 73, + 70, 71, 67, 39, 77, 78, 67, 69, 68, 64, + 73, 53, 48, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 81, -1, -1, 75 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 77, 78, 79, 80, 81, 82, 75, 72, + 73, 86, 70, 71, 86, 59, 60, 61, 87, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 85, 86, + 67, 67, 0, 75, 67, 86, 68, 83, 83, 69, + 84, 64, 78, 84, 84, 85 +}; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. However, + YYFAIL appears to be in use. Nevertheless, it is formally deprecated + in Bison 2.4.2's NEWS entry, where a plan to phase it out is + discussed. */ + +#define YYFAIL goto yyerrlab +#if defined YYFAIL + /* This is here to suppress warnings from the GCC cpp's + -Wunused-macros. Normally we don't worry about that warning, but + some users do, and we want to make it easy for users to remove + YYFAIL uses, which will produce warnings from Bison 2.5. */ +#endif + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (context, scanner, YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (YYID (0)) + +/* Error token number */ +#define YYTERROR 1 +#define YYERRCODE 256 + + +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif + + +/* YYLEX -- calling `yylex' with the right arguments. */ +#ifdef YYLEX_PARAM +# define YYLEX yylex (&yylval, YYLEX_PARAM) +#else +# define YYLEX yylex (&yylval, scanner) +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (YYID (0)) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, context, scanner); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, class Context *context, yyscan_t *scanner) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep, context, scanner) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; + class Context *context; + yyscan_t *scanner; +#endif +{ + FILE *yyo = yyoutput; + YYUSE (yyo); + if (!yyvaluep) + return; + YYUSE (context); + YYUSE (scanner); +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, class Context *context, yyscan_t *scanner) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep, context, scanner) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; + class Context *context; + yyscan_t *scanner; +#endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep, context, scanner); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +#else +static void +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (YYID (0)) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_reduce_print (YYSTYPE *yyvsp, int yyrule, class Context *context, yyscan_t *scanner) +#else +static void +yy_reduce_print (yyvsp, yyrule, context, scanner) + YYSTYPE *yyvsp; + int yyrule; + class Context *context; + yyscan_t *scanner; +#endif +{ + int yynrhs = yyr2[yyrule]; + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , context, scanner); + YYFPRINTF (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyvsp, Rule, context, scanner); \ +} while (YYID (0)) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static YYSIZE_T +yystrlen (const char *yystr) +#else +static YYSIZE_T +yystrlen (yystr) + const char *yystr; +#endif +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static char * +yystpcpy (char *yydest, const char *yysrc) +#else +static char * +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +#endif +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) +{ + YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = YY_NULL; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - Assume YYFAIL is not used. It's too flawed to consider. See + + for details. YYERROR is fine as it does not invoke this + function. + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) + { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } + } + + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } + + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; + } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; +} +#endif /* YYERROR_VERBOSE */ + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, class Context *context, yyscan_t *scanner) +#else +static void +yydestruct (yymsg, yytype, yyvaluep, context, scanner) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; + class Context *context; + yyscan_t *scanner; +#endif +{ + YYUSE (yyvaluep); + YYUSE (context); + YYUSE (scanner); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + switch (yytype) + { + + default: + break; + } +} + + + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif +#else /* ! YYPARSE_PARAM */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (class Context *context, yyscan_t *scanner) +#else +int +yyparse (context, scanner) + class Context *context; + yyscan_t *scanner; +#endif +#endif +{ +/* The lookahead symbol. */ +int yychar; + + +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") +#else +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +static YYSTYPE yyval_default; +# define YY_INITIAL_VALUE(Value) = Value +#endif +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); + + /* Number of syntax errors so far. */ + int yynerrs; + + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. + + Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + + YYSIZE_T yystacksize; + + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken = 0; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; + yystacksize = YYINITDEPTH; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + if (yystate == YYFINAL) + YYACCEPT; + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to lookahead token. */ + yyn = yypact[yystate]; + if (yypact_value_is_default (yyn)) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token. */ + yychar = YYEMPTY; + + yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 4: +/* Line 1792 of yacc.c */ +#line 209 "libmemcached/csl/parser.yy" + { } + break; + + case 5: +/* Line 1792 of yacc.c */ +#line 211 "libmemcached/csl/parser.yy" + { } + break; + + case 6: +/* Line 1792 of yacc.c */ +#line 213 "libmemcached/csl/parser.yy" + { } + break; + + case 7: +/* Line 1792 of yacc.c */ +#line 215 "libmemcached/csl/parser.yy" + { + context->set_end(); + YYACCEPT; + } + break; + + case 8: +/* Line 1792 of yacc.c */ +#line 220 "libmemcached/csl/parser.yy" + { + context->rc= MEMCACHED_PARSE_USER_ERROR; + parser_abort(context, "ERROR called directly"); + } + break; + + case 9: +/* Line 1792 of yacc.c */ +#line 225 "libmemcached/csl/parser.yy" + { + memcached_reset(context->memc); + } + break; + + case 10: +/* Line 1792 of yacc.c */ +#line 229 "libmemcached/csl/parser.yy" + { + yydebug= 1; + } + break; + + case 11: +/* Line 1792 of yacc.c */ +#line 233 "libmemcached/csl/parser.yy" + { + if ((context->rc= memcached_parse_configure_file(*context->memc, (yyvsp[(3) - (3)].string).c_str, (yyvsp[(3) - (3)].string).size)) != MEMCACHED_SUCCESS) + { + parser_abort(context, "Failed to parse configuration file"); + } + } + break; + + case 12: +/* Line 1792 of yacc.c */ +#line 244 "libmemcached/csl/parser.yy" + { + if (memcached_failed(context->rc= memcached_server_add_with_weight(context->memc, (yyvsp[(2) - (4)].server).c_str, (yyvsp[(3) - (4)].number), uint32_t((yyvsp[(4) - (4)].number))))) + { + char buffer[1024]; + snprintf(buffer, sizeof(buffer), "Failed to add server: %s:%u", (yyvsp[(2) - (4)].server).c_str, uint32_t((yyvsp[(3) - (4)].number))); + parser_abort(context, buffer); + } + context->unset_server(); + } + break; + + case 13: +/* Line 1792 of yacc.c */ +#line 254 "libmemcached/csl/parser.yy" + { + if (memcached_failed(context->rc= memcached_server_add_with_weight(context->memc, (yyvsp[(2) - (4)].server).c_str, (yyvsp[(3) - (4)].number), uint32_t((yyvsp[(4) - (4)].number))))) + { + char buffer[1024]; + snprintf(buffer, sizeof(buffer), "Failed to add server: %s:%u", (yyvsp[(2) - (4)].server).c_str, uint32_t((yyvsp[(3) - (4)].number))); + parser_abort(context, buffer); + } + context->unset_server(); + } + break; + + case 14: +/* Line 1792 of yacc.c */ +#line 264 "libmemcached/csl/parser.yy" + { + if (memcached_failed(context->rc= memcached_server_add_unix_socket_with_weight(context->memc, (yyvsp[(2) - (3)].string).c_str, uint32_t((yyvsp[(3) - (3)].number))))) + { + char buffer[1024]; + snprintf(buffer, sizeof(buffer), "Failed to add socket: %s", (yyvsp[(2) - (3)].string).c_str); + parser_abort(context, buffer); + } + } + break; + + case 15: +/* Line 1792 of yacc.c */ +#line 273 "libmemcached/csl/parser.yy" + { + memcached_set_configuration_file(context->memc, (yyvsp[(2) - (2)].string).c_str, (yyvsp[(2) - (2)].string).size); + } + break; + + case 16: +/* Line 1792 of yacc.c */ +#line 277 "libmemcached/csl/parser.yy" + { + context->memc->configure.initial_pool_size= uint32_t((yyvsp[(2) - (2)].number)); + } + break; + + case 17: +/* Line 1792 of yacc.c */ +#line 281 "libmemcached/csl/parser.yy" + { + context->memc->configure.max_pool_size= uint32_t((yyvsp[(2) - (2)].number)); + } + break; + + case 19: +/* Line 1792 of yacc.c */ +#line 289 "libmemcached/csl/parser.yy" + { + if (memcached_callback_get(context->memc, MEMCACHED_CALLBACK_PREFIX_KEY, NULL)) + { + parser_abort(context, "--NAMESPACE can only be called once"); + } + + if ((context->rc= memcached_set_namespace(*context->memc, (yyvsp[(2) - (2)].string).c_str, (yyvsp[(2) - (2)].string).size)) != MEMCACHED_SUCCESS) + { + parser_abort(context, memcached_last_error_message(context->memc)); + } + } + break; + + case 20: +/* Line 1792 of yacc.c */ +#line 301 "libmemcached/csl/parser.yy" + { + memcached_flag(*context->memc, MEMCACHED_FLAG_IS_FETCHING_VERSION, true); + } + break; + + case 21: +/* Line 1792 of yacc.c */ +#line 305 "libmemcached/csl/parser.yy" + { + // Check to see if DISTRIBUTION has already been set + if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, (yyvsp[(2) - (2)].distribution))) != MEMCACHED_SUCCESS) + { + parser_abort(context, "--DISTRIBUTION can only be called once"); + } + + if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, (yyvsp[(2) - (2)].distribution))) != MEMCACHED_SUCCESS) + { + parser_abort(context, memcached_last_error_message(context->memc));; + } + } + break; + + case 22: +/* Line 1792 of yacc.c */ +#line 318 "libmemcached/csl/parser.yy" + { + // Check to see if DISTRIBUTION has already been set + if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, (yyvsp[(2) - (4)].distribution))) != MEMCACHED_SUCCESS) + { + parser_abort(context, "--DISTRIBUTION can only be called once"); + } + + if ((context->rc= memcached_behavior_set_distribution_hash(context->memc, (yyvsp[(4) - (4)].hash))) != MEMCACHED_SUCCESS) + { + parser_abort(context, "Unable to set the hash for the DISTRIBUTION requested"); + } + } + break; + + case 23: +/* Line 1792 of yacc.c */ +#line 331 "libmemcached/csl/parser.yy" + { + if (context->set_hash((yyvsp[(2) - (2)].hash)) == false) + { + parser_abort(context, "--HASH can only be set once"); + } + } + break; + + case 24: +/* Line 1792 of yacc.c */ +#line 338 "libmemcached/csl/parser.yy" + { + if ((context->rc= memcached_behavior_set(context->memc, (yyvsp[(1) - (2)].behavior), (yyvsp[(2) - (2)].number))) != MEMCACHED_SUCCESS) + { + parser_abort(context, "Unable to set behavior"); + } + } + break; + + case 25: +/* Line 1792 of yacc.c */ +#line 345 "libmemcached/csl/parser.yy" + { + if ((context->rc= memcached_behavior_set(context->memc, (yyvsp[(1) - (1)].behavior), true)) != MEMCACHED_SUCCESS) + { + char buffer[1024]; + snprintf(buffer, sizeof(buffer), "Could not set: %s", libmemcached_string_behavior((yyvsp[(1) - (1)].behavior))); + parser_abort(context, buffer); + } + } + break; + + case 26: +/* Line 1792 of yacc.c */ +#line 354 "libmemcached/csl/parser.yy" + { + } + break; + + case 27: +/* Line 1792 of yacc.c */ +#line 360 "libmemcached/csl/parser.yy" + { + (yyval.behavior)= MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS; + } + break; + + case 28: +/* Line 1792 of yacc.c */ +#line 364 "libmemcached/csl/parser.yy" + { + (yyval.behavior)= MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT; + } + break; + + case 29: +/* Line 1792 of yacc.c */ +#line 368 "libmemcached/csl/parser.yy" + { + (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK; + } + break; + + case 30: +/* Line 1792 of yacc.c */ +#line 372 "libmemcached/csl/parser.yy" + { + (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK; + } + break; + + case 31: +/* Line 1792 of yacc.c */ +#line 376 "libmemcached/csl/parser.yy" + { + (yyval.behavior)= MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH; + } + break; + + case 32: +/* Line 1792 of yacc.c */ +#line 380 "libmemcached/csl/parser.yy" + { + (yyval.behavior)= MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS; + } + break; + + case 33: +/* Line 1792 of yacc.c */ +#line 384 "libmemcached/csl/parser.yy" + { + (yyval.behavior)= MEMCACHED_BEHAVIOR_POLL_TIMEOUT; + } + break; + + case 34: +/* Line 1792 of yacc.c */ +#line 388 "libmemcached/csl/parser.yy" + { + (yyval.behavior)= MEMCACHED_BEHAVIOR_RCV_TIMEOUT; + } + break; + + case 35: +/* Line 1792 of yacc.c */ +#line 392 "libmemcached/csl/parser.yy" + { + (yyval.behavior)= MEMCACHED_BEHAVIOR_RETRY_TIMEOUT; + } + break; + + case 36: +/* Line 1792 of yacc.c */ +#line 396 "libmemcached/csl/parser.yy" + { + (yyval.behavior)= MEMCACHED_BEHAVIOR_SND_TIMEOUT; + } + break; + + case 37: +/* Line 1792 of yacc.c */ +#line 400 "libmemcached/csl/parser.yy" + { + (yyval.behavior)= MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE; + } + break; + + case 38: +/* Line 1792 of yacc.c */ +#line 404 "libmemcached/csl/parser.yy" + { + (yyval.behavior)= MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE; + } + break; + + case 39: +/* Line 1792 of yacc.c */ +#line 411 "libmemcached/csl/parser.yy" + { + (yyval.behavior)= MEMCACHED_BEHAVIOR_BINARY_PROTOCOL; + } + break; + + case 40: +/* Line 1792 of yacc.c */ +#line 415 "libmemcached/csl/parser.yy" + { + (yyval.behavior)= MEMCACHED_BEHAVIOR_BUFFER_REQUESTS; + } + break; + + case 41: +/* Line 1792 of yacc.c */ +#line 419 "libmemcached/csl/parser.yy" + { + (yyval.behavior)= MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY; + } + break; + + case 42: +/* Line 1792 of yacc.c */ +#line 423 "libmemcached/csl/parser.yy" + { + (yyval.behavior)= MEMCACHED_BEHAVIOR_NOREPLY; + } + break; + + case 43: +/* Line 1792 of yacc.c */ +#line 427 "libmemcached/csl/parser.yy" + { + (yyval.behavior)= MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ; + } + break; + + case 44: +/* Line 1792 of yacc.c */ +#line 431 "libmemcached/csl/parser.yy" + { + (yyval.behavior)= MEMCACHED_BEHAVIOR_SORT_HOSTS; + } + break; + + case 45: +/* Line 1792 of yacc.c */ +#line 435 "libmemcached/csl/parser.yy" + { + (yyval.behavior)= MEMCACHED_BEHAVIOR_SUPPORT_CAS; + } + break; + + case 46: +/* Line 1792 of yacc.c */ +#line 439 "libmemcached/csl/parser.yy" + { + (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_NODELAY; + } + break; + + case 47: +/* Line 1792 of yacc.c */ +#line 443 "libmemcached/csl/parser.yy" + { + (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPALIVE; + } + break; + + case 48: +/* Line 1792 of yacc.c */ +#line 447 "libmemcached/csl/parser.yy" + { + (yyval.behavior)= MEMCACHED_BEHAVIOR_TCP_KEEPIDLE; + } + break; + + case 49: +/* Line 1792 of yacc.c */ +#line 451 "libmemcached/csl/parser.yy" + { + (yyval.behavior)= MEMCACHED_BEHAVIOR_USE_UDP; + } + break; + + case 50: +/* Line 1792 of yacc.c */ +#line 455 "libmemcached/csl/parser.yy" + { + (yyval.behavior)= MEMCACHED_BEHAVIOR_VERIFY_KEY; + } + break; + + case 51: +/* Line 1792 of yacc.c */ +#line 461 "libmemcached/csl/parser.yy" + { (yyval.number)= MEMCACHED_DEFAULT_PORT;} + break; + + case 52: +/* Line 1792 of yacc.c */ +#line 463 "libmemcached/csl/parser.yy" + { } + break; + + case 53: +/* Line 1792 of yacc.c */ +#line 467 "libmemcached/csl/parser.yy" + { (yyval.number)= 1; } + break; + + case 54: +/* Line 1792 of yacc.c */ +#line 469 "libmemcached/csl/parser.yy" + { } + break; + + case 55: +/* Line 1792 of yacc.c */ +#line 474 "libmemcached/csl/parser.yy" + { + (yyval.hash)= MEMCACHED_HASH_MD5; + } + break; + + case 56: +/* Line 1792 of yacc.c */ +#line 478 "libmemcached/csl/parser.yy" + { + (yyval.hash)= MEMCACHED_HASH_CRC; + } + break; + + case 57: +/* Line 1792 of yacc.c */ +#line 482 "libmemcached/csl/parser.yy" + { + (yyval.hash)= MEMCACHED_HASH_FNV1_64; + } + break; + + case 58: +/* Line 1792 of yacc.c */ +#line 486 "libmemcached/csl/parser.yy" + { + (yyval.hash)= MEMCACHED_HASH_FNV1A_64; + } + break; + + case 59: +/* Line 1792 of yacc.c */ +#line 490 "libmemcached/csl/parser.yy" + { + (yyval.hash)= MEMCACHED_HASH_FNV1_32; + } + break; + + case 60: +/* Line 1792 of yacc.c */ +#line 494 "libmemcached/csl/parser.yy" + { + (yyval.hash)= MEMCACHED_HASH_FNV1A_32; + } + break; + + case 61: +/* Line 1792 of yacc.c */ +#line 498 "libmemcached/csl/parser.yy" + { + (yyval.hash)= MEMCACHED_HASH_HSIEH; + } + break; + + case 62: +/* Line 1792 of yacc.c */ +#line 502 "libmemcached/csl/parser.yy" + { + (yyval.hash)= MEMCACHED_HASH_MURMUR; + } + break; + + case 63: +/* Line 1792 of yacc.c */ +#line 506 "libmemcached/csl/parser.yy" + { + (yyval.hash)= MEMCACHED_HASH_JENKINS; + } + break; + + case 64: +/* Line 1792 of yacc.c */ +#line 513 "libmemcached/csl/parser.yy" + { + (yyval.string)= (yyvsp[(1) - (1)].string); + } + break; + + case 65: +/* Line 1792 of yacc.c */ +#line 517 "libmemcached/csl/parser.yy" + { + (yyval.string)= (yyvsp[(1) - (1)].string); + } + break; + + case 66: +/* Line 1792 of yacc.c */ +#line 524 "libmemcached/csl/parser.yy" + { + (yyval.distribution)= MEMCACHED_DISTRIBUTION_CONSISTENT; + } + break; + + case 67: +/* Line 1792 of yacc.c */ +#line 528 "libmemcached/csl/parser.yy" + { + (yyval.distribution)= MEMCACHED_DISTRIBUTION_MODULA; + } + break; + + case 68: +/* Line 1792 of yacc.c */ +#line 532 "libmemcached/csl/parser.yy" + { + (yyval.distribution)= MEMCACHED_DISTRIBUTION_RANDOM; + } + break; + + +/* Line 1792 of yacc.c */ +#line 2130 "libmemcached/csl/parser.cc" + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (context, scanner, YY_("syntax error")); +#else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) + { + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (context, scanner, yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; + } +# undef YYSYNTAX_ERROR +#endif + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval, context, scanner); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + yystos[yystate], yyvsp, context, scanner); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#if !defined yyoverflow || YYERROR_VERBOSE +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (context, scanner, YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval, context, scanner); + } + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp, context, scanner); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); +} + + +/* Line 2055 of yacc.c */ +#line 537 "libmemcached/csl/parser.yy" + + +void Context::start() +{ + config_parse(this, (void **)scanner); +} + diff --git a/libmemcached/csl/parser.h b/libmemcached/csl/parser.h new file mode 100644 index 0000000..f46eab7 --- /dev/null +++ b/libmemcached/csl/parser.h @@ -0,0 +1,144 @@ +/* A Bison parser, made by GNU Bison 2.7. */ + +/* Bison interface for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. + + This program 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 3 of the License, or + (at your option) any later version. + + This program 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 . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +#ifndef YY_CONFIG_LIBMEMCACHED_CSL_PARSER_H_INCLUDED +# define YY_CONFIG_LIBMEMCACHED_CSL_PARSER_H_INCLUDED +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 1 +#endif +#if YYDEBUG +extern int config_debug; +#endif + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + COMMENT = 258, + END = 259, + CSL_ERROR = 260, + RESET = 261, + PARSER_DEBUG = 262, + INCLUDE = 263, + CONFIGURE_FILE = 264, + EMPTY_LINE = 265, + SERVER = 266, + CSL_SOCKET = 267, + SERVERS = 268, + SERVERS_OPTION = 269, + UNKNOWN_OPTION = 270, + UNKNOWN = 271, + BINARY_PROTOCOL = 272, + BUFFER_REQUESTS = 273, + CONNECT_TIMEOUT = 274, + DISTRIBUTION = 275, + HASH = 276, + HASH_WITH_NAMESPACE = 277, + IO_BYTES_WATERMARK = 278, + IO_KEY_PREFETCH = 279, + IO_MSG_WATERMARK = 280, + KETAMA_HASH = 281, + KETAMA_WEIGHTED = 282, + NOREPLY = 283, + NUMBER_OF_REPLICAS = 284, + POLL_TIMEOUT = 285, + RANDOMIZE_REPLICA_READ = 286, + RCV_TIMEOUT = 287, + REMOVE_FAILED_SERVERS = 288, + RETRY_TIMEOUT = 289, + SND_TIMEOUT = 290, + SOCKET_RECV_SIZE = 291, + SOCKET_SEND_SIZE = 292, + SORT_HOSTS = 293, + SUPPORT_CAS = 294, + USER_DATA = 295, + USE_UDP = 296, + VERIFY_KEY = 297, + _TCP_KEEPALIVE = 298, + _TCP_KEEPIDLE = 299, + _TCP_NODELAY = 300, + FETCH_VERSION = 301, + NAMESPACE = 302, + POOL_MIN = 303, + POOL_MAX = 304, + MD5 = 305, + CRC = 306, + FNV1_64 = 307, + FNV1A_64 = 308, + FNV1_32 = 309, + FNV1A_32 = 310, + HSIEH = 311, + MURMUR = 312, + JENKINS = 313, + CONSISTENT = 314, + MODULA = 315, + RANDOM = 316, + CSL_TRUE = 317, + CSL_FALSE = 318, + CSL_FLOAT = 319, + NUMBER = 320, + PORT = 321, + WEIGHT_START = 322, + IPADDRESS = 323, + HOSTNAME = 324, + STRING = 325, + QUOTED_STRING = 326, + FILE_PATH = 327 + }; +#endif + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED + +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +#endif + + +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int config_parse (void *YYPARSE_PARAM); +#else +int config_parse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int config_parse (class Context *context, yyscan_t *scanner); +#else +int config_parse (); +#endif +#endif /* ! YYPARSE_PARAM */ + +#endif /* !YY_CONFIG_LIBMEMCACHED_CSL_PARSER_H_INCLUDED */ diff --git a/libmemcached/csl/parser.yy b/libmemcached/csl/parser.yy new file mode 100644 index 0000000..dd9c720 --- /dev/null +++ b/libmemcached/csl/parser.yy @@ -0,0 +1,543 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +%{ + +#include + +class Context; + +%} + +%error-verbose +%debug +%defines +%expect 0 +%output "libmemcached/csl/parser.cc" +%defines "libmemcached/csl/parser.h" +%lex-param { yyscan_t *scanner } +%name-prefix="config_" +%parse-param { class Context *context } +%parse-param { yyscan_t *scanner } +%pure-parser +%require "2.5" +%start begin +%verbose + +%{ + +#include + +#include +#include +#include + +#ifndef __INTEL_COMPILER +# pragma GCC diagnostic ignored "-Wold-style-cast" +#endif + +#ifndef __INTEL_COMPILER +# ifndef __clang__ +# pragma GCC diagnostic ignored "-Wlogical-op" +# pragma GCC diagnostic ignored "-Wunsafe-loop-optimizations" +# endif +#endif + +int conf_lex(YYSTYPE* lvalp, void* scanner); + +#define select_yychar(__context) yychar == UNKNOWN ? ( (__context)->previous_token == END ? UNKNOWN : (__context)->previous_token ) : yychar + +#define stryytname(__yytokentype) ((__yytokentype) < YYNTOKENS ) ? yytname[(__yytokentype)] : "" + +#define parser_abort(__context, __error_message) do { (__context)->abort((__error_message), yytokentype(select_yychar(__context)), stryytname(YYTRANSLATE(select_yychar(__context)))); YYABORT; } while (0) + +// This is bison calling error. +inline void __config_error(Context *context, yyscan_t *scanner, const char *error, int last_token, const char *last_token_str) +{ + if (not context->end()) + { + context->error(error, yytokentype(last_token), last_token_str); + } + else + { + context->error(error, yytokentype(last_token), last_token_str); + } +} + +#define config_error(__context, __scanner, __error_msg) do { __config_error((__context), (__scanner), (__error_msg), select_yychar(__context), stryytname(YYTRANSLATE(select_yychar(__context)))); } while (0) + + +%} + +%token COMMENT +%token END +%token CSL_ERROR +%token RESET +%token PARSER_DEBUG +%token INCLUDE +%token CONFIGURE_FILE +%token EMPTY_LINE +%token SERVER +%token CSL_SOCKET +%token SERVERS +%token SERVERS_OPTION +%token UNKNOWN_OPTION +%token UNKNOWN + +/* All behavior options */ +%token BINARY_PROTOCOL +%token BUFFER_REQUESTS +%token CONNECT_TIMEOUT +%token DISTRIBUTION +%token HASH +%token HASH_WITH_NAMESPACE +%token IO_BYTES_WATERMARK +%token IO_KEY_PREFETCH +%token IO_MSG_WATERMARK +%token KETAMA_HASH +%token KETAMA_WEIGHTED +%token NOREPLY +%token NUMBER_OF_REPLICAS +%token POLL_TIMEOUT +%token RANDOMIZE_REPLICA_READ +%token RCV_TIMEOUT +%token REMOVE_FAILED_SERVERS +%token RETRY_TIMEOUT +%token SND_TIMEOUT +%token SOCKET_RECV_SIZE +%token SOCKET_SEND_SIZE +%token SORT_HOSTS +%token SUPPORT_CAS +%token USER_DATA +%token USE_UDP +%token VERIFY_KEY +%token _TCP_KEEPALIVE +%token _TCP_KEEPIDLE +%token _TCP_NODELAY +%token FETCH_VERSION + +/* Callbacks */ +%token NAMESPACE + +/* Pool */ +%token POOL_MIN +%token POOL_MAX + +/* Hash types */ +%token MD5 +%token CRC +%token FNV1_64 +%token FNV1A_64 +%token FNV1_32 +%token FNV1A_32 +%token HSIEH +%token MURMUR +%token JENKINS + +/* Distributions */ +%token CONSISTENT +%token MODULA +%token RANDOM + +/* Boolean values */ +%token CSL_TRUE +%token CSL_FALSE + +%nonassoc ',' +%nonassoc '=' + +%token CSL_FLOAT +%token NUMBER +%token PORT +%token WEIGHT_START +%token IPADDRESS +%token HOSTNAME +%token STRING +%token QUOTED_STRING +%token FILE_PATH + +%type behavior_boolean +%type behavior_number +%type distribution +%type hash +%type optional_port +%type optional_weight +%type string + +%% + +begin: + statement + | begin ' ' statement + ; + +statement: + expression + { } + | COMMENT + { } + | EMPTY_LINE + { } + | END + { + context->set_end(); + YYACCEPT; + } + | CSL_ERROR + { + context->rc= MEMCACHED_PARSE_USER_ERROR; + parser_abort(context, "ERROR called directly"); + } + | RESET + { + memcached_reset(context->memc); + } + | PARSER_DEBUG + { + yydebug= 1; + } + | INCLUDE ' ' string + { + if ((context->rc= memcached_parse_configure_file(*context->memc, $3.c_str, $3.size)) != MEMCACHED_SUCCESS) + { + parser_abort(context, "Failed to parse configuration file"); + } + } + ; + + +expression: + SERVER HOSTNAME optional_port optional_weight + { + if (memcached_failed(context->rc= memcached_server_add_with_weight(context->memc, $2.c_str, $3, uint32_t($4)))) + { + char buffer[1024]; + snprintf(buffer, sizeof(buffer), "Failed to add server: %s:%u", $2.c_str, uint32_t($3)); + parser_abort(context, buffer); + } + context->unset_server(); + } + | SERVER IPADDRESS optional_port optional_weight + { + if (memcached_failed(context->rc= memcached_server_add_with_weight(context->memc, $2.c_str, $3, uint32_t($4)))) + { + char buffer[1024]; + snprintf(buffer, sizeof(buffer), "Failed to add server: %s:%u", $2.c_str, uint32_t($3)); + parser_abort(context, buffer); + } + context->unset_server(); + } + | CSL_SOCKET string optional_weight + { + if (memcached_failed(context->rc= memcached_server_add_unix_socket_with_weight(context->memc, $2.c_str, uint32_t($3)))) + { + char buffer[1024]; + snprintf(buffer, sizeof(buffer), "Failed to add socket: %s", $2.c_str); + parser_abort(context, buffer); + } + } + | CONFIGURE_FILE string + { + memcached_set_configuration_file(context->memc, $2.c_str, $2.size); + } + | POOL_MIN NUMBER + { + context->memc->configure.initial_pool_size= uint32_t($2); + } + | POOL_MAX NUMBER + { + context->memc->configure.max_pool_size= uint32_t($2); + } + | behaviors + ; + +behaviors: + NAMESPACE string + { + if (memcached_callback_get(context->memc, MEMCACHED_CALLBACK_PREFIX_KEY, NULL)) + { + parser_abort(context, "--NAMESPACE can only be called once"); + } + + if ((context->rc= memcached_set_namespace(*context->memc, $2.c_str, $2.size)) != MEMCACHED_SUCCESS) + { + parser_abort(context, memcached_last_error_message(context->memc)); + } + } + | FETCH_VERSION + { + memcached_flag(*context->memc, MEMCACHED_FLAG_IS_FETCHING_VERSION, true); + } + | DISTRIBUTION distribution + { + // Check to see if DISTRIBUTION has already been set + if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, $2)) != MEMCACHED_SUCCESS) + { + parser_abort(context, "--DISTRIBUTION can only be called once"); + } + + if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, $2)) != MEMCACHED_SUCCESS) + { + parser_abort(context, memcached_last_error_message(context->memc));; + } + } + | DISTRIBUTION distribution ',' hash + { + // Check to see if DISTRIBUTION has already been set + if ((context->rc= memcached_behavior_set(context->memc, MEMCACHED_BEHAVIOR_DISTRIBUTION, $2)) != MEMCACHED_SUCCESS) + { + parser_abort(context, "--DISTRIBUTION can only be called once"); + } + + if ((context->rc= memcached_behavior_set_distribution_hash(context->memc, $4)) != MEMCACHED_SUCCESS) + { + parser_abort(context, "Unable to set the hash for the DISTRIBUTION requested"); + } + } + | HASH hash + { + if (context->set_hash($2) == false) + { + parser_abort(context, "--HASH can only be set once"); + } + } + | behavior_number NUMBER + { + if ((context->rc= memcached_behavior_set(context->memc, $1, $2)) != MEMCACHED_SUCCESS) + { + parser_abort(context, "Unable to set behavior"); + } + } + | behavior_boolean + { + if ((context->rc= memcached_behavior_set(context->memc, $1, true)) != MEMCACHED_SUCCESS) + { + char buffer[1024]; + snprintf(buffer, sizeof(buffer), "Could not set: %s", libmemcached_string_behavior($1)); + parser_abort(context, buffer); + } + } + | USER_DATA + { + } + ; + +behavior_number: + REMOVE_FAILED_SERVERS + { + $$= MEMCACHED_BEHAVIOR_REMOVE_FAILED_SERVERS; + } + | CONNECT_TIMEOUT + { + $$= MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT; + } + | IO_MSG_WATERMARK + { + $$= MEMCACHED_BEHAVIOR_IO_MSG_WATERMARK; + } + | IO_BYTES_WATERMARK + { + $$= MEMCACHED_BEHAVIOR_IO_BYTES_WATERMARK; + } + | IO_KEY_PREFETCH + { + $$= MEMCACHED_BEHAVIOR_IO_KEY_PREFETCH; + } + | NUMBER_OF_REPLICAS + { + $$= MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS; + } + | POLL_TIMEOUT + { + $$= MEMCACHED_BEHAVIOR_POLL_TIMEOUT; + } + | RCV_TIMEOUT + { + $$= MEMCACHED_BEHAVIOR_RCV_TIMEOUT; + } + | RETRY_TIMEOUT + { + $$= MEMCACHED_BEHAVIOR_RETRY_TIMEOUT; + } + | SND_TIMEOUT + { + $$= MEMCACHED_BEHAVIOR_SND_TIMEOUT; + } + | SOCKET_RECV_SIZE + { + $$= MEMCACHED_BEHAVIOR_SOCKET_RECV_SIZE; + } + | SOCKET_SEND_SIZE + { + $$= MEMCACHED_BEHAVIOR_SOCKET_SEND_SIZE; + } + ; + +behavior_boolean: + BINARY_PROTOCOL + { + $$= MEMCACHED_BEHAVIOR_BINARY_PROTOCOL; + } + | BUFFER_REQUESTS + { + $$= MEMCACHED_BEHAVIOR_BUFFER_REQUESTS; + } + | HASH_WITH_NAMESPACE + { + $$= MEMCACHED_BEHAVIOR_HASH_WITH_PREFIX_KEY; + } + | NOREPLY + { + $$= MEMCACHED_BEHAVIOR_NOREPLY; + } + | RANDOMIZE_REPLICA_READ + { + $$= MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ; + } + | SORT_HOSTS + { + $$= MEMCACHED_BEHAVIOR_SORT_HOSTS; + } + | SUPPORT_CAS + { + $$= MEMCACHED_BEHAVIOR_SUPPORT_CAS; + } + | _TCP_NODELAY + { + $$= MEMCACHED_BEHAVIOR_TCP_NODELAY; + } + | _TCP_KEEPALIVE + { + $$= MEMCACHED_BEHAVIOR_TCP_KEEPALIVE; + } + | _TCP_KEEPIDLE + { + $$= MEMCACHED_BEHAVIOR_TCP_KEEPIDLE; + } + | USE_UDP + { + $$= MEMCACHED_BEHAVIOR_USE_UDP; + } + | VERIFY_KEY + { + $$= MEMCACHED_BEHAVIOR_VERIFY_KEY; + } + + +optional_port: + { $$= MEMCACHED_DEFAULT_PORT;} + | PORT + { }; + ; + +optional_weight: + { $$= 1; } + | WEIGHT_START + { } + ; + +hash: + MD5 + { + $$= MEMCACHED_HASH_MD5; + } + | CRC + { + $$= MEMCACHED_HASH_CRC; + } + | FNV1_64 + { + $$= MEMCACHED_HASH_FNV1_64; + } + | FNV1A_64 + { + $$= MEMCACHED_HASH_FNV1A_64; + } + | FNV1_32 + { + $$= MEMCACHED_HASH_FNV1_32; + } + | FNV1A_32 + { + $$= MEMCACHED_HASH_FNV1A_32; + } + | HSIEH + { + $$= MEMCACHED_HASH_HSIEH; + } + | MURMUR + { + $$= MEMCACHED_HASH_MURMUR; + } + | JENKINS + { + $$= MEMCACHED_HASH_JENKINS; + } + ; + +string: + STRING + { + $$= $1; + } + | QUOTED_STRING + { + $$= $1; + } + ; + +distribution: + CONSISTENT + { + $$= MEMCACHED_DISTRIBUTION_CONSISTENT; + } + | MODULA + { + $$= MEMCACHED_DISTRIBUTION_MODULA; + } + | RANDOM + { + $$= MEMCACHED_DISTRIBUTION_RANDOM; + } + ; + +%% + +void Context::start() +{ + config_parse(this, (void **)scanner); +} + diff --git a/libmemcached/csl/scanner.cc b/libmemcached/csl/scanner.cc new file mode 100644 index 0000000..bb324ec --- /dev/null +++ b/libmemcached/csl/scanner.cc @@ -0,0 +1,2938 @@ +#line 2 "libmemcached/csl/scanner.cc" +#line 39 "libmemcached/csl/scanner.l" + +#include +#include +#include +#include + +#ifndef __INTEL_COMPILER +#pragma GCC diagnostic ignored "-Wold-style-cast" +#pragma GCC diagnostic ignored "-Wsign-compare" +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wmissing-declarations" +#pragma GCC diagnostic ignored "-Wunused-result" +#pragma GCC diagnostic ignored "-Wmissing-noreturn" +#endif + +#ifdef __clang__ +#pragma GCC diagnostic ignored "-Wshorten-64-to-32" +#endif + +#ifndef __INTEL_COMPILER +#ifndef __clang__ +#pragma GCC diagnostic ignored "-Wlogical-op" +#endif +#endif + + + + +#line 32 "libmemcached/csl/scanner.cc" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 37 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) + +#define YY_USE_CONST + +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* An opaque pointer. */ +#ifndef YY_TYPEDEF_YY_SCANNER_T +#define YY_TYPEDEF_YY_SCANNER_T +typedef void* yyscan_t; +#endif + +/* For convenience, these vars (plus the bison vars far below) + are macros in the reentrant scanner. */ +#define yyin yyg->yyin_r +#define yyout yyg->yyout_r +#define yyextra yyg->yyextra_r +#define yyleng yyg->yyleng_r +#define yytext yyg->yytext_r +#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) +#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) +#define yy_flex_debug yyg->yy_flex_debug_r + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN yyg->yy_start = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START ((yyg->yy_start - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE config_restart(yyin ,yyscanner ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#define YY_BUF_SIZE 16384 +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via config_restart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ + ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] + +void config_restart (FILE *input_file ,yyscan_t yyscanner ); +void config__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +YY_BUFFER_STATE config__create_buffer (FILE *file,int size ,yyscan_t yyscanner ); +void config__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void config__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void config_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +void config_pop_buffer_state (yyscan_t yyscanner ); + +static void config_ensure_buffer_stack (yyscan_t yyscanner ); +static void config__load_buffer_state (yyscan_t yyscanner ); +static void config__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); + +#define YY_FLUSH_BUFFER config__flush_buffer(YY_CURRENT_BUFFER ,yyscanner) + +YY_BUFFER_STATE config__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); +YY_BUFFER_STATE config__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); +YY_BUFFER_STATE config__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); + +void *config_alloc (yy_size_t ,yyscan_t yyscanner ); +void *config_realloc (void *,yy_size_t ,yyscan_t yyscanner ); +void config_free (void * ,yyscan_t yyscanner ); + +#define yy_new_buffer config__create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + config_ensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + config__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + config_ensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + config__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define config_wrap(yyscanner) 1 +#define YY_SKIP_YYWRAP + +typedef unsigned char YY_CHAR; + +typedef int yy_state_type; + +#define yytext_ptr yytext_r + +static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); +static int yy_get_next_buffer (yyscan_t yyscanner ); +static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (size_t) (yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; + +#define YY_NUM_RULES 66 +#define YY_END_OF_BUFFER 67 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[538] = + { 0, + 0, 0, 67, 65, 5, 5, 1, 65, 65, 65, + 2, 65, 65, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 65, 65, 65, 0, 64, 0, 49, + 0, 0, 0, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 6, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, 49, 4, + 63, 63, 2, 3, 63, 54, 63, 63, 45, 63, + 63, 63, 63, 63, 64, 0, 63, 53, 63, 63, + 63, 63, 63, 63, 49, 49, 49, 49, 49, 49, + + 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 4, 0, 63, 2, 3, + 63, 0, 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 47, 49, 49, 49, 49, 49, 49, + 0, 49, 49, 49, 49, 49, 49, 49, 49, 49, + 49, 49, 49, 49, 49, 49, 49, 49, 4, 63, + 63, 3, 63, 63, 43, 48, 63, 0, 59, 63, + 63, 63, 63, 63, 42, 63, 49, 49, 49, 49, + 49, 49, 49, 0, 0, 0, 49, 49, 49, 49, + 49, 49, 0, 49, 49, 49, 0, 49, 49, 49, + + 0, 0, 49, 49, 4, 0, 63, 3, 63, 63, + 0, 63, 63, 63, 63, 51, 60, 52, 63, 49, + 49, 49, 49, 49, 49, 0, 15, 0, 0, 0, + 49, 49, 49, 0, 0, 49, 0, 49, 49, 49, + 0, 49, 0, 49, 0, 0, 0, 0, 49, 4, + 62, 63, 63, 63, 63, 63, 57, 55, 41, 61, + 44, 49, 49, 49, 49, 49, 0, 0, 0, 0, + 0, 49, 49, 49, 0, 0, 49, 0, 49, 0, + 49, 0, 49, 0, 49, 0, 0, 0, 0, 49, + 62, 63, 63, 58, 56, 0, 0, 49, 49, 49, + + 0, 0, 0, 0, 0, 49, 19, 0, 0, 0, + 0, 49, 0, 0, 0, 7, 0, 0, 8, 0, + 49, 0, 0, 34, 0, 0, 62, 63, 46, 0, + 0, 49, 0, 49, 0, 0, 0, 0, 0, 49, + 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 50, 0, 0, + 49, 0, 49, 0, 0, 0, 0, 0, 49, 0, + 0, 38, 37, 49, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, + 0, 49, 0, 0, 0, 0, 0, 39, 0, 0, + + 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, + 0, 0, 36, 0, 0, 0, 0, 49, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 30, 0, 0, 33, 0, 0, 0, 0, + 49, 0, 0, 0, 0, 0, 0, 0, 0, 23, + 0, 0, 26, 0, 0, 0, 32, 0, 0, 0, + 0, 13, 40, 0, 0, 0, 0, 0, 21, 0, + 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 25, 0, 0, 9, + 10, 11, 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 12, 0, 0, 17, 0, 0, 0, 0, + 0, 0, 0, 0, 18, 0, 0, 0, 27, 28, + 0, 0, 0, 0, 0, 14, 16, 20, 0, 0, + 0, 0, 0, 0, 22, 24, 0 + } ; + +static yyconst flex_int32_t yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 4, 1, 5, 6, 1, 1, 1, 1, 1, + 1, 1, 1, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 11, 11, 11, 18, 1, 1, + 19, 1, 20, 1, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 1, 47, 1, 1, 48, 1, 49, 50, 51, 52, + + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst flex_int32_t yy_meta[75] = + { 0, + 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, + 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2 + } ; + +static yyconst flex_int16_t yy_base[543] = + { 0, + 0, 615, 615, 1763, 1763, 1763, 1763, 70, 603, 579, + 67, 74, 0, 57, 52, 59, 73, 58, 64, 74, + 585, 77, 79, 77, 65, 581, 101, 1763, 579, 138, + 202, 215, 217, 230, 237, 250, 252, 259, 261, 268, + 281, 288, 296, 309, 318, 380, 326, 354, 356, 362, + 364, 400, 406, 561, 1763, 454, 253, 73, 80, 85, + 90, 78, 372, 79, 326, 398, 92, 77, 94, 457, + 411, 520, 533, 486, 504, 437, 546, 548, 553, 558, + 564, 570, 578, 583, 595, 643, 0, 611, 619, 624, + 631, 661, 668, 673, 123, 132, 237, 235, 240, 248, + + 552, 295, 302, 315, 402, 363, 359, 423, 392, 412, + 542, 417, 443, 461, 449, 688, 719, 732, 745, 757, + 770, 776, 778, 783, 789, 795, 804, 806, 812, 841, + 848, 850, 856, 703, 468, 544, 551, 534, 584, 581, + 844, 605, 631, 642, 633, 636, 663, 551, 654, 656, + 653, 532, 666, 762, 770, 531, 781, 810, 908, 921, + 879, 928, 907, 942, 944, 949, 951, 956, 958, 963, + 973, 980, 986, 1005, 1011, 1017, 802, 816, 813, 823, + 833, 846, 126, 833, 854, 841, 846, 850, 875, 522, + 519, 913, 935, 935, 939, 977, 969, 992, 518, 983, + + 1002, 982, 511, 1006, 1056, 1073, 1086, 1763, 1071, 1099, + 1101, 1115, 1121, 1108, 1133, 1135, 1143, 1145, 1150, 1002, + 1011, 1105, 1122, 1117, 449, 1114, 1763, 1122, 1119, 1139, + 1131, 1136, 1133, 1135, 1143, 1144, 1149, 1154, 447, 1142, + 1153, 1144, 1158, 1149, 1163, 1162, 1177, 1178, 1164, 1763, + 1227, 1213, 1240, 1215, 1246, 1259, 1248, 1261, 1268, 1274, + 1276, 444, 442, 1178, 1194, 1230, 1216, 1242, 1247, 441, + 436, 1266, 1244, 435, 1261, 1274, 1262, 1259, 432, 1257, + 407, 1265, 287, 1266, 1262, 1279, 1281, 1270, 1287, 410, + 1330, 1343, 1345, 1350, 1352, 1276, 1283, 1290, 409, 1296, + + 1337, 1324, 1327, 1331, 1325, 1346, 0, 1336, 1340, 1330, + 1341, 1330, 1354, 1354, 1352, 1763, 1357, 1346, 1763, 1347, + 387, 1351, 1363, 1763, 1349, 1375, 1413, 1415, 1420, 1381, + 1401, 1405, 1391, 1392, 1398, 1409, 384, 1400, 1418, 1416, + 1416, 1418, 372, 336, 1419, 1410, 1425, 1415, 1414, 1425, + 1426, 1412, 1430, 1461, 1424, 1436, 1450, 1483, 1451, 1450, + 346, 1460, 1464, 1455, 342, 1452, 1471, 1457, 327, 337, + 1463, 1763, 1763, 335, 1458, 1471, 1476, 1461, 1481, 1471, + 1467, 1486, 1476, 1485, 1490, 1763, 1467, 1473, 1475, 1493, + 1487, 1503, 1513, 1509, 1524, 1520, 1524, 1763, 1512, 1510, + + 1514, 1513, 1522, 1520, 1516, 1515, 1534, 1763, 1520, 1531, + 1529, 1517, 1763, 1528, 1539, 1536, 1542, 1534, 1534, 1551, + 1535, 1551, 1556, 1573, 1559, 1576, 320, 1577, 1564, 319, + 329, 325, 1763, 1564, 1582, 1763, 1585, 1570, 1578, 1576, + 305, 1578, 1580, 1589, 1575, 1583, 1581, 302, 1582, 1763, + 1595, 1580, 1763, 1582, 1584, 1599, 1763, 1590, 1588, 1606, + 1591, 1763, 1763, 1625, 1616, 1632, 1636, 1626, 1763, 1629, + 280, 266, 1633, 1634, 1763, 1632, 1626, 262, 1626, 1628, + 1635, 1641, 1632, 1642, 1643, 1634, 1763, 1628, 1629, 1763, + 1763, 1763, 260, 1640, 1656, 253, 1648, 1657, 1658, 1659, + + 1662, 1663, 1763, 1685, 1672, 1763, 243, 1690, 1692, 1676, + 237, 221, 1694, 1687, 1763, 1680, 229, 1678, 1763, 1763, + 1696, 217, 208, 1684, 1698, 1763, 1763, 1763, 1699, 1687, + 1705, 1688, 1704, 202, 1763, 1763, 1763, 1756, 154, 1758, + 131, 1760 + } ; + +static yyconst flex_int16_t yy_def[543] = + { 0, + 537, 1, 537, 537, 537, 537, 537, 538, 537, 537, + 539, 537, 539, 539, 539, 539, 539, 539, 539, 539, + 539, 539, 539, 539, 539, 540, 538, 537, 538, 537, + 537, 541, 541, 541, 537, 541, 541, 541, 541, 541, + 541, 541, 541, 541, 541, 542, 541, 541, 541, 541, + 541, 541, 541, 540, 537, 30, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 537, + 541, 541, 541, 537, 541, 541, 541, 541, 541, 541, + 541, 541, 541, 541, 541, 542, 86, 541, 541, 541, + 541, 541, 541, 541, 56, 56, 56, 56, 56, 56, + + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 537, 541, 541, 541, 537, + 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, + 541, 541, 541, 541, 56, 56, 56, 56, 56, 56, + 537, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 537, 541, + 541, 537, 541, 541, 541, 541, 541, 541, 541, 541, + 541, 541, 541, 541, 541, 541, 56, 56, 56, 56, + 56, 56, 56, 537, 537, 537, 56, 56, 56, 56, + 56, 56, 537, 56, 56, 56, 537, 56, 56, 56, + + 537, 537, 56, 56, 537, 541, 541, 537, 541, 541, + 541, 541, 541, 541, 541, 541, 541, 541, 541, 56, + 56, 56, 56, 56, 56, 537, 537, 537, 537, 537, + 56, 56, 56, 537, 537, 56, 537, 56, 56, 56, + 537, 56, 537, 56, 537, 537, 537, 537, 56, 537, + 541, 541, 541, 541, 541, 541, 541, 541, 541, 541, + 541, 56, 56, 56, 56, 56, 537, 537, 537, 537, + 537, 56, 56, 56, 537, 537, 56, 537, 56, 537, + 56, 537, 56, 537, 56, 537, 537, 537, 537, 56, + 541, 541, 541, 541, 541, 537, 537, 56, 56, 56, + + 537, 537, 537, 537, 537, 56, 56, 537, 537, 537, + 537, 56, 537, 537, 537, 537, 537, 537, 537, 537, + 56, 537, 537, 537, 537, 537, 541, 541, 541, 537, + 537, 56, 537, 56, 537, 537, 537, 537, 537, 56, + 537, 537, 537, 537, 56, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 541, 537, 537, + 56, 537, 56, 537, 537, 537, 537, 537, 56, 537, + 537, 537, 537, 56, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 56, 537, 537, 537, 537, 537, 537, 537, 537, + + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 56, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 56, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 0, 537, 537, 537, + 537, 537 + } ; + +static yyconst flex_int16_t yy_nxt[1838] = + { 0, + 4, 5, 6, 7, 8, 4, 7, 9, 4, 10, + 11, 11, 11, 11, 11, 11, 11, 12, 7, 4, + 13, 13, 14, 15, 16, 17, 13, 18, 19, 20, + 13, 21, 22, 13, 13, 13, 13, 23, 24, 25, + 13, 13, 13, 13, 13, 13, 4, 4, 13, 13, + 14, 15, 16, 17, 13, 18, 19, 20, 13, 21, + 22, 13, 13, 13, 13, 23, 24, 25, 13, 13, + 13, 13, 13, 13, 28, 33, 39, 34, 34, 34, + 34, 34, 34, 34, 35, 35, 35, 35, 35, 35, + 35, 36, 40, 41, 37, 38, 43, 44, 45, 50, + + 47, 52, 53, 51, 39, 28, 42, 97, 98, 99, + 100, 48, 101, 105, 113, 114, 29, 49, 115, 36, + 40, 41, 37, 38, 43, 44, 45, 50, 47, 52, + 53, 51, 71, 226, 42, 97, 98, 99, 100, 48, + 101, 105, 113, 114, 227, 49, 115, 29, 56, 56, + 56, 56, 56, 56, 56, 32, 135, 136, 56, 57, + 58, 59, 56, 60, 56, 61, 62, 56, 56, 56, + 56, 63, 56, 64, 56, 65, 66, 67, 68, 69, + 56, 56, 56, 56, 135, 136, 56, 57, 58, 59, + 56, 60, 56, 61, 62, 56, 56, 56, 56, 63, + + 56, 64, 56, 65, 66, 67, 68, 69, 56, 56, + 56, 56, 70, 70, 70, 70, 70, 70, 70, 32, + 536, 32, 32, 32, 32, 32, 528, 72, 72, 72, + 72, 72, 72, 72, 32, 527, 524, 32, 33, 520, + 73, 73, 73, 73, 73, 73, 73, 74, 74, 74, + 74, 74, 74, 74, 32, 519, 32, 32, 32, 32, + 32, 515, 32, 32, 32, 32, 32, 32, 32, 32, + 137, 506, 32, 138, 76, 32, 32, 32, 503, 139, + 492, 95, 78, 75, 487, 32, 140, 486, 32, 32, + 77, 79, 32, 96, 318, 32, 32, 32, 137, 32, + + 32, 138, 76, 32, 32, 319, 32, 139, 32, 95, + 78, 75, 80, 32, 140, 32, 32, 32, 77, 79, + 469, 96, 32, 462, 82, 32, 32, 142, 32, 81, + 32, 83, 455, 32, 32, 32, 454, 453, 450, 143, + 80, 88, 401, 32, 399, 398, 106, 144, 107, 394, + 108, 84, 82, 390, 373, 142, 32, 81, 32, 83, + 32, 32, 32, 32, 32, 32, 32, 143, 32, 32, + 32, 32, 32, 32, 106, 144, 107, 89, 108, 84, + 27, 27, 27, 27, 85, 27, 27, 86, 86, 27, + 372, 366, 102, 90, 353, 91, 147, 27, 27, 27, + + 148, 32, 92, 32, 32, 89, 103, 32, 32, 32, + 32, 32, 104, 32, 32, 32, 333, 326, 32, 32, + 102, 90, 109, 91, 147, 316, 29, 86, 148, 151, + 92, 110, 111, 145, 103, 152, 146, 93, 112, 314, + 104, 32, 308, 305, 32, 32, 94, 32, 304, 297, + 109, 296, 155, 32, 280, 149, 267, 151, 32, 110, + 111, 145, 150, 152, 146, 93, 112, 116, 116, 116, + 116, 116, 116, 116, 94, 56, 56, 56, 156, 56, + 155, 56, 56, 149, 32, 157, 158, 56, 177, 56, + 150, 56, 56, 56, 56, 56, 120, 120, 120, 120, + + 120, 120, 120, 56, 56, 56, 156, 56, 32, 56, + 56, 32, 32, 157, 158, 56, 177, 56, 248, 56, + 56, 56, 56, 56, 32, 243, 235, 32, 117, 234, + 118, 118, 118, 118, 118, 118, 118, 32, 201, 197, + 32, 33, 121, 119, 119, 119, 119, 119, 119, 119, + 32, 32, 32, 32, 32, 32, 32, 32, 193, 141, + 32, 32, 32, 55, 153, 32, 32, 32, 32, 178, + 121, 32, 32, 181, 32, 125, 179, 32, 32, 154, + 32, 537, 32, 55, 180, 32, 32, 32, 123, 46, + 32, 32, 153, 122, 126, 32, 124, 178, 31, 32, + + 32, 181, 32, 32, 179, 32, 182, 154, 183, 127, + 30, 32, 180, 128, 537, 32, 123, 32, 32, 32, + 26, 537, 126, 32, 124, 32, 32, 32, 32, 187, + 32, 32, 32, 537, 182, 32, 183, 127, 32, 32, + 537, 128, 32, 27, 27, 27, 27, 85, 27, 27, + 86, 86, 27, 537, 131, 188, 130, 187, 32, 129, + 27, 27, 27, 189, 190, 32, 32, 191, 32, 32, + 537, 32, 32, 537, 537, 32, 32, 32, 32, 537, + 32, 32, 131, 188, 130, 132, 192, 129, 194, 29, + 86, 189, 190, 195, 196, 191, 198, 134, 159, 159, + + 159, 159, 159, 159, 159, 537, 537, 32, 32, 133, + 32, 32, 537, 132, 192, 32, 194, 537, 537, 537, + 32, 195, 196, 32, 198, 134, 32, 32, 537, 160, + 160, 160, 160, 160, 160, 160, 32, 133, 537, 32, + 117, 537, 161, 161, 161, 161, 161, 161, 161, 32, + 32, 537, 32, 32, 537, 119, 119, 119, 119, 119, + 119, 119, 537, 537, 537, 537, 32, 162, 162, 162, + 162, 162, 162, 162, 32, 537, 537, 32, 32, 32, + 32, 537, 32, 32, 32, 32, 32, 32, 202, 537, + 32, 32, 32, 32, 537, 537, 32, 32, 163, 32, + + 164, 199, 32, 32, 165, 200, 537, 166, 32, 167, + 32, 32, 32, 32, 32, 537, 32, 32, 203, 32, + 32, 537, 169, 32, 537, 32, 163, 537, 164, 199, + 32, 537, 165, 200, 171, 166, 168, 167, 204, 220, + 221, 222, 32, 172, 170, 32, 203, 223, 32, 32, + 169, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 537, 171, 32, 32, 184, 204, 220, 221, 222, + 224, 172, 170, 225, 185, 223, 186, 228, 229, 230, + 176, 173, 174, 32, 231, 232, 32, 117, 32, 175, + 537, 537, 537, 184, 537, 32, 537, 32, 224, 233, + + 537, 225, 185, 32, 186, 228, 229, 230, 176, 173, + 174, 32, 231, 232, 32, 32, 537, 175, 205, 205, + 205, 205, 205, 205, 205, 32, 32, 233, 32, 206, + 537, 207, 207, 207, 207, 207, 207, 207, 208, 208, + 208, 208, 208, 208, 208, 209, 32, 236, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 537, 32, 32, 32, 32, 32, 32, 32, 212, + 32, 32, 213, 209, 237, 236, 238, 32, 537, 210, + 32, 32, 537, 239, 32, 537, 214, 32, 32, 32, + 32, 32, 537, 32, 32, 537, 32, 537, 211, 537, + + 216, 240, 237, 32, 238, 32, 215, 210, 241, 32, + 32, 239, 32, 32, 214, 32, 242, 244, 32, 32, + 32, 32, 247, 217, 32, 32, 537, 32, 216, 240, + 537, 249, 245, 32, 215, 246, 241, 218, 537, 537, + 537, 537, 537, 537, 242, 244, 262, 537, 263, 537, + 247, 217, 32, 537, 219, 537, 537, 537, 32, 249, + 245, 537, 537, 246, 32, 218, 250, 250, 250, 250, + 250, 250, 250, 537, 262, 32, 263, 32, 32, 32, + 32, 32, 219, 251, 251, 251, 251, 251, 251, 251, + 32, 537, 537, 32, 206, 537, 252, 252, 252, 252, + + 252, 252, 252, 32, 537, 32, 32, 32, 32, 32, + 253, 537, 32, 537, 255, 32, 32, 256, 32, 32, + 32, 537, 32, 32, 537, 32, 537, 257, 32, 32, + 537, 264, 259, 32, 537, 258, 254, 32, 253, 32, + 32, 32, 32, 32, 265, 266, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 268, 32, 32, 264, + 259, 269, 32, 270, 254, 271, 272, 273, 32, 537, + 274, 260, 265, 266, 275, 276, 277, 278, 279, 281, + 32, 282, 32, 283, 268, 284, 285, 286, 261, 269, + 32, 270, 32, 271, 272, 273, 287, 32, 274, 260, + + 288, 289, 275, 276, 277, 278, 279, 281, 290, 282, + 537, 283, 537, 284, 285, 286, 261, 32, 298, 32, + 32, 206, 32, 32, 287, 537, 537, 537, 288, 289, + 537, 32, 537, 299, 32, 32, 290, 291, 291, 291, + 291, 291, 291, 291, 32, 537, 298, 32, 32, 293, + 32, 300, 32, 32, 32, 32, 32, 301, 294, 537, + 32, 299, 32, 32, 292, 32, 32, 32, 32, 32, + 302, 303, 32, 295, 32, 32, 32, 293, 32, 300, + 32, 32, 32, 32, 32, 301, 306, 32, 307, 309, + 312, 313, 292, 32, 310, 32, 315, 317, 302, 303, + + 320, 321, 311, 322, 323, 324, 32, 325, 32, 537, + 537, 330, 537, 537, 306, 32, 307, 309, 312, 313, + 331, 32, 310, 32, 315, 317, 537, 332, 320, 321, + 311, 322, 323, 324, 32, 325, 334, 32, 32, 330, + 327, 327, 327, 327, 327, 327, 327, 32, 331, 32, + 32, 32, 32, 32, 32, 332, 32, 32, 32, 32, + 32, 335, 537, 336, 334, 337, 338, 339, 340, 537, + 341, 537, 342, 343, 344, 345, 328, 32, 346, 347, + 348, 349, 329, 350, 351, 352, 354, 355, 356, 335, + 32, 336, 32, 337, 338, 339, 340, 32, 341, 32, + + 342, 343, 344, 345, 328, 357, 346, 347, 348, 349, + 329, 350, 351, 352, 354, 355, 356, 32, 359, 32, + 32, 32, 32, 32, 32, 360, 537, 32, 32, 361, + 362, 363, 537, 357, 537, 364, 365, 367, 368, 537, + 369, 370, 371, 374, 375, 376, 359, 377, 378, 379, + 380, 381, 382, 360, 358, 385, 386, 361, 362, 363, + 32, 537, 32, 364, 365, 367, 368, 32, 369, 370, + 371, 374, 375, 376, 387, 377, 378, 379, 380, 381, + 382, 383, 358, 385, 386, 388, 389, 32, 391, 384, + 32, 32, 392, 393, 395, 396, 397, 400, 402, 403, + + 404, 405, 387, 406, 407, 408, 409, 410, 411, 383, + 412, 413, 414, 388, 389, 415, 391, 384, 416, 417, + 392, 393, 395, 396, 397, 400, 402, 403, 404, 405, + 32, 406, 407, 408, 409, 410, 411, 418, 412, 413, + 414, 419, 420, 415, 421, 422, 416, 417, 423, 424, + 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, + 435, 436, 437, 438, 439, 418, 440, 441, 442, 419, + 420, 443, 421, 422, 444, 445, 423, 424, 425, 426, + 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, + 437, 438, 439, 446, 440, 441, 442, 447, 448, 443, + + 449, 451, 444, 445, 452, 456, 457, 458, 459, 460, + 461, 463, 464, 465, 466, 467, 468, 470, 471, 472, + 473, 446, 474, 475, 476, 447, 448, 477, 449, 451, + 478, 479, 452, 456, 457, 458, 459, 460, 461, 463, + 464, 465, 466, 467, 468, 470, 471, 472, 473, 480, + 474, 475, 476, 481, 482, 477, 483, 484, 478, 479, + 485, 488, 489, 490, 491, 493, 494, 495, 496, 497, + 498, 499, 500, 501, 502, 504, 505, 480, 507, 508, + 509, 481, 482, 510, 483, 484, 511, 512, 485, 488, + 489, 490, 491, 493, 494, 495, 496, 497, 498, 499, + + 500, 501, 502, 504, 505, 513, 507, 508, 509, 514, + 516, 510, 517, 518, 511, 512, 521, 522, 523, 525, + 526, 529, 530, 531, 532, 533, 534, 535, 537, 537, + 537, 537, 537, 513, 537, 537, 537, 514, 516, 537, + 517, 518, 537, 537, 521, 522, 523, 525, 526, 529, + 530, 531, 532, 533, 534, 535, 27, 27, 54, 54, + 87, 87, 3, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537 + } ; + +static yyconst flex_int16_t yy_chk[1838] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 8, 11, 15, 11, 11, 11, + 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, + 12, 14, 16, 17, 14, 14, 18, 19, 20, 23, + + 22, 24, 25, 23, 15, 27, 17, 58, 59, 60, + 61, 22, 62, 64, 67, 68, 8, 22, 69, 14, + 16, 17, 14, 14, 18, 19, 20, 23, 22, 24, + 25, 23, 541, 183, 17, 58, 59, 60, 61, 22, + 62, 64, 67, 68, 183, 22, 69, 27, 30, 30, + 30, 30, 30, 30, 30, 539, 95, 96, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 95, 96, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, + + 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 31, 31, 31, 31, 31, 31, 31, 32, + 534, 33, 32, 32, 33, 33, 523, 33, 33, 33, + 33, 33, 33, 33, 34, 522, 517, 34, 34, 512, + 34, 34, 34, 34, 34, 34, 34, 35, 35, 35, + 35, 35, 35, 35, 36, 511, 37, 36, 36, 37, + 37, 507, 32, 38, 33, 39, 38, 38, 39, 39, + 97, 496, 40, 98, 37, 40, 40, 34, 493, 99, + 478, 57, 39, 36, 472, 41, 100, 471, 41, 41, + 38, 40, 42, 57, 283, 42, 42, 36, 97, 37, + + 43, 98, 37, 43, 43, 283, 38, 99, 39, 57, + 39, 36, 41, 44, 100, 40, 44, 44, 38, 40, + 448, 57, 45, 441, 43, 45, 45, 102, 41, 42, + 47, 44, 432, 47, 47, 42, 431, 430, 427, 103, + 41, 47, 374, 43, 370, 369, 65, 104, 65, 365, + 65, 45, 43, 361, 344, 102, 44, 42, 48, 44, + 49, 48, 48, 49, 49, 45, 50, 103, 51, 50, + 50, 51, 51, 47, 65, 104, 65, 48, 65, 45, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 343, 337, 63, 49, 321, 50, 106, 46, 46, 46, + + 107, 48, 51, 49, 52, 48, 63, 52, 52, 50, + 53, 51, 63, 53, 53, 71, 299, 290, 71, 71, + 63, 49, 66, 50, 106, 281, 46, 46, 107, 109, + 51, 66, 66, 105, 63, 110, 105, 52, 66, 279, + 63, 76, 274, 271, 76, 76, 53, 52, 270, 263, + 66, 262, 112, 53, 239, 108, 225, 109, 71, 66, + 66, 105, 108, 110, 105, 52, 66, 70, 70, 70, + 70, 70, 70, 70, 53, 56, 56, 56, 113, 56, + 112, 56, 56, 108, 76, 114, 115, 56, 135, 56, + 108, 56, 56, 56, 56, 56, 74, 74, 74, 74, + + 74, 74, 74, 56, 56, 56, 113, 56, 75, 56, + 56, 75, 75, 114, 115, 56, 135, 56, 203, 56, + 56, 56, 56, 56, 72, 199, 191, 72, 72, 190, + 72, 72, 72, 72, 72, 72, 72, 73, 156, 152, + 73, 73, 75, 73, 73, 73, 73, 73, 73, 73, + 77, 75, 78, 77, 77, 78, 78, 79, 148, 101, + 79, 79, 80, 54, 111, 80, 80, 72, 81, 136, + 75, 81, 81, 138, 82, 81, 137, 82, 82, 111, + 73, 29, 83, 26, 137, 83, 83, 84, 78, 21, + 84, 84, 111, 77, 82, 78, 80, 136, 10, 85, + + 79, 138, 85, 85, 137, 80, 139, 111, 140, 83, + 9, 81, 137, 84, 3, 88, 78, 82, 88, 88, + 2, 0, 82, 89, 80, 83, 89, 89, 90, 142, + 84, 90, 90, 0, 139, 91, 140, 83, 91, 91, + 0, 84, 85, 86, 86, 86, 86, 86, 86, 86, + 86, 86, 86, 0, 91, 143, 90, 142, 88, 89, + 86, 86, 86, 144, 145, 92, 89, 146, 92, 92, + 0, 90, 93, 0, 0, 93, 93, 94, 91, 0, + 94, 94, 91, 143, 90, 92, 147, 89, 149, 86, + 86, 144, 145, 150, 151, 146, 153, 94, 116, 116, + + 116, 116, 116, 116, 116, 0, 0, 134, 92, 93, + 134, 134, 0, 92, 147, 93, 149, 0, 0, 0, + 94, 150, 151, 117, 153, 94, 117, 117, 0, 117, + 117, 117, 117, 117, 117, 117, 118, 93, 0, 118, + 118, 0, 118, 118, 118, 118, 118, 118, 118, 119, + 134, 0, 119, 119, 0, 119, 119, 119, 119, 119, + 119, 119, 0, 0, 0, 0, 117, 120, 120, 120, + 120, 120, 120, 120, 121, 0, 0, 121, 121, 118, + 122, 0, 123, 122, 122, 123, 123, 124, 157, 0, + 124, 124, 119, 125, 0, 0, 125, 125, 121, 126, + + 122, 154, 126, 126, 123, 155, 0, 124, 127, 125, + 128, 127, 127, 128, 128, 0, 129, 121, 157, 129, + 129, 0, 126, 122, 0, 123, 121, 0, 122, 154, + 124, 0, 123, 155, 128, 124, 125, 125, 158, 177, + 178, 179, 126, 129, 127, 130, 157, 180, 130, 130, + 126, 127, 131, 128, 132, 131, 131, 132, 132, 129, + 133, 0, 128, 133, 133, 141, 158, 177, 178, 179, + 181, 129, 127, 182, 141, 180, 141, 184, 185, 186, + 133, 130, 131, 161, 187, 188, 161, 161, 130, 132, + 0, 0, 0, 141, 0, 131, 0, 132, 181, 189, + + 0, 182, 141, 133, 141, 184, 185, 186, 133, 130, + 131, 163, 187, 188, 163, 163, 0, 132, 159, 159, + 159, 159, 159, 159, 159, 160, 161, 189, 160, 160, + 0, 160, 160, 160, 160, 160, 160, 160, 162, 162, + 162, 162, 162, 162, 162, 163, 164, 192, 165, 164, + 164, 165, 165, 166, 163, 167, 166, 166, 167, 167, + 168, 0, 169, 168, 168, 169, 169, 170, 160, 168, + 170, 170, 168, 163, 193, 192, 194, 171, 0, 164, + 171, 171, 0, 195, 172, 0, 170, 172, 172, 164, + 173, 165, 0, 173, 173, 0, 166, 0, 167, 0, + + 172, 196, 193, 168, 194, 169, 171, 164, 197, 174, + 170, 195, 174, 174, 170, 175, 198, 200, 175, 175, + 171, 176, 202, 173, 176, 176, 0, 172, 172, 196, + 0, 204, 201, 173, 171, 201, 197, 174, 0, 0, + 0, 0, 0, 0, 198, 200, 220, 0, 221, 0, + 202, 173, 174, 0, 176, 0, 0, 0, 175, 204, + 201, 0, 0, 201, 176, 174, 205, 205, 205, 205, + 205, 205, 205, 0, 220, 209, 221, 206, 209, 209, + 206, 206, 176, 206, 206, 206, 206, 206, 206, 206, + 207, 0, 0, 207, 207, 0, 207, 207, 207, 207, + + 207, 207, 207, 210, 0, 211, 210, 210, 211, 211, + 209, 0, 214, 0, 211, 214, 214, 211, 209, 212, + 206, 0, 212, 212, 0, 213, 0, 212, 213, 213, + 0, 222, 214, 207, 0, 213, 210, 215, 209, 216, + 215, 215, 216, 216, 223, 224, 210, 217, 211, 218, + 217, 217, 218, 218, 219, 214, 226, 219, 219, 222, + 214, 228, 212, 229, 210, 230, 231, 232, 213, 0, + 233, 215, 223, 224, 234, 235, 236, 237, 238, 240, + 215, 241, 216, 242, 226, 243, 244, 245, 219, 228, + 217, 229, 218, 230, 231, 232, 246, 219, 233, 215, + + 247, 248, 234, 235, 236, 237, 238, 240, 249, 241, + 0, 242, 0, 243, 244, 245, 219, 252, 264, 254, + 252, 252, 254, 254, 246, 0, 0, 0, 247, 248, + 0, 251, 0, 265, 251, 251, 249, 251, 251, 251, + 251, 251, 251, 251, 253, 0, 264, 253, 253, 254, + 255, 266, 257, 255, 255, 257, 257, 267, 255, 0, + 252, 265, 254, 256, 253, 258, 256, 256, 258, 258, + 268, 269, 259, 256, 251, 259, 259, 254, 260, 266, + 261, 260, 260, 261, 261, 267, 272, 253, 273, 275, + 277, 278, 253, 255, 276, 257, 280, 282, 268, 269, + + 284, 285, 276, 286, 287, 288, 256, 289, 258, 0, + 0, 296, 0, 0, 272, 259, 273, 275, 277, 278, + 297, 260, 276, 261, 280, 282, 0, 298, 284, 285, + 276, 286, 287, 288, 291, 289, 300, 291, 291, 296, + 291, 291, 291, 291, 291, 291, 291, 292, 297, 293, + 292, 292, 293, 293, 294, 298, 295, 294, 294, 295, + 295, 301, 0, 302, 300, 303, 304, 305, 306, 0, + 308, 0, 309, 310, 311, 312, 292, 291, 313, 314, + 315, 317, 293, 318, 318, 320, 322, 323, 325, 301, + 292, 302, 293, 303, 304, 305, 306, 294, 308, 295, + + 309, 310, 311, 312, 292, 326, 313, 314, 315, 317, + 293, 318, 318, 320, 322, 323, 325, 327, 330, 328, + 327, 327, 328, 328, 329, 331, 0, 329, 329, 332, + 333, 334, 0, 326, 0, 335, 336, 338, 339, 0, + 340, 341, 342, 345, 346, 347, 330, 348, 349, 350, + 351, 352, 353, 331, 328, 355, 356, 332, 333, 334, + 327, 0, 328, 335, 336, 338, 339, 329, 340, 341, + 342, 345, 346, 347, 357, 348, 349, 350, 351, 352, + 353, 354, 328, 355, 356, 359, 360, 358, 362, 354, + 358, 358, 363, 364, 366, 367, 368, 371, 375, 376, + + 377, 378, 357, 379, 380, 381, 382, 383, 384, 354, + 385, 387, 388, 359, 360, 389, 362, 354, 390, 391, + 363, 364, 366, 367, 368, 371, 375, 376, 377, 378, + 358, 379, 380, 381, 382, 383, 384, 392, 385, 387, + 388, 393, 394, 389, 395, 396, 390, 391, 397, 399, + 400, 401, 402, 403, 404, 405, 406, 407, 409, 410, + 411, 412, 414, 415, 416, 392, 417, 418, 419, 393, + 394, 420, 395, 396, 421, 422, 397, 399, 400, 401, + 402, 403, 404, 405, 406, 407, 409, 410, 411, 412, + 414, 415, 416, 423, 417, 418, 419, 424, 425, 420, + + 426, 428, 421, 422, 429, 434, 435, 437, 438, 439, + 440, 442, 443, 444, 445, 446, 447, 449, 451, 452, + 454, 423, 455, 456, 458, 424, 425, 459, 426, 428, + 460, 461, 429, 434, 435, 437, 438, 439, 440, 442, + 443, 444, 445, 446, 447, 449, 451, 452, 454, 464, + 455, 456, 458, 465, 466, 459, 467, 468, 460, 461, + 470, 473, 474, 476, 477, 479, 480, 481, 482, 483, + 484, 485, 486, 488, 489, 494, 495, 464, 497, 498, + 499, 465, 466, 500, 467, 468, 501, 502, 470, 473, + 474, 476, 477, 479, 480, 481, 482, 483, 484, 485, + + 486, 488, 489, 494, 495, 504, 497, 498, 499, 505, + 508, 500, 509, 510, 501, 502, 513, 514, 516, 518, + 521, 524, 525, 529, 530, 531, 532, 533, 0, 0, + 0, 0, 0, 504, 0, 0, 0, 505, 508, 0, + 509, 510, 0, 0, 513, 514, 516, 518, 521, 524, + 525, 529, 530, 531, 532, 533, 538, 538, 540, 540, + 542, 542, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537, 537, 537, 537, + 537, 537, 537, 537, 537, 537, 537 + } ; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +#line 1 "libmemcached/csl/scanner.l" +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#line 68 "libmemcached/csl/scanner.l" +#define PARAM config_get_extra(yyscanner) + +#define get_lex_chars(buffer, result, max_size, context) \ +{ \ + if (context->pos >= context->length) \ + { \ + result= YY_NULL; \ + } \ + else \ + { \ + result= (int)(context->length - context->pos); \ + (size_t)result > (size_t)max_size ? result= max_size : 0; \ + memcpy(buffer, context->buf + context->pos, result); \ + context->pos += result; \ + } \ +} + +#define YY_FATAL_ERROR(msg) \ +{ \ +} + + +#define YY_INPUT(buffer, result, max_size) get_lex_chars(buffer, result, max_size, PARAM) + +#define YY_NO_INPUT 1 +#line 1108 "libmemcached/csl/scanner.cc" + +#define INITIAL 0 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +/* Holds the entire state of the reentrant scanner. */ +struct yyguts_t + { + + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; + + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + yy_size_t yy_n_chars; + yy_size_t yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char* yy_last_accepting_cpos; + + int yylineno_r; + int yy_flex_debug_r; + + char *yytext_r; + int yy_more_flag; + int yy_more_len; + + YYSTYPE * yylval_r; + + }; /* end struct yyguts_t */ + +static int yy_init_globals (yyscan_t yyscanner ); + + /* This must go here because YYSTYPE and YYLTYPE are included + * from bison output in section 1.*/ + # define yylval yyg->yylval_r + +int config_lex_init (yyscan_t* scanner); + +int config_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int config_lex_destroy (yyscan_t yyscanner ); + +int config_get_debug (yyscan_t yyscanner ); + +void config_set_debug (int debug_flag ,yyscan_t yyscanner ); + +YY_EXTRA_TYPE config_get_extra (yyscan_t yyscanner ); + +void config_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); + +FILE *config_get_in (yyscan_t yyscanner ); + +void config_set_in (FILE * in_str ,yyscan_t yyscanner ); + +FILE *config_get_out (yyscan_t yyscanner ); + +void config_set_out (FILE * out_str ,yyscan_t yyscanner ); + +yy_size_t config_get_leng (yyscan_t yyscanner ); + +char *config_get_text (yyscan_t yyscanner ); + +int config_get_lineno (yyscan_t yyscanner ); + +void config_set_lineno (int line_number ,yyscan_t yyscanner ); + +int config_get_column (yyscan_t yyscanner ); + +void config_set_column (int column_no ,yyscan_t yyscanner ); + +YYSTYPE * config_get_lval (yyscan_t yyscanner ); + +void config_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int config_wrap (yyscan_t yyscanner ); +#else +extern int config_wrap (yyscan_t yyscanner ); +#endif +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (yyscan_t yyscanner ); +#else +static int input (yyscan_t yyscanner ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int config_lex \ + (YYSTYPE * yylval_param ,yyscan_t yyscanner); + +#define YY_DECL int config_lex \ + (YYSTYPE * yylval_param , yyscan_t yyscanner) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + if ( yyleng > 0 ) \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ + (yytext[yyleng - 1] == '\n'); \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + +#line 109 "libmemcached/csl/scanner.l" + + + +#line 1350 "libmemcached/csl/scanner.cc" + + yylval = yylval_param; + + if ( !yyg->yy_init ) + { + yyg->yy_init = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! yyg->yy_start ) + yyg->yy_start = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + config_ensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + config__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + } + + config__load_buffer_state(yyscanner ); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; + yy_current_state += YY_AT_BOL(); +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 538 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } + while ( yy_current_state != 537 ); + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 112 "libmemcached/csl/scanner.l" +{ return yytext[0];} + YY_BREAK +case 2: +YY_RULE_SETUP +#line 114 "libmemcached/csl/scanner.l" +{ yylval->number= atoi(yytext); return (NUMBER); } + YY_BREAK +case 3: +YY_RULE_SETUP +#line 116 "libmemcached/csl/scanner.l" +{ yylval->number= atoi(yytext +1); return PORT; } + YY_BREAK +case 4: +YY_RULE_SETUP +#line 118 "libmemcached/csl/scanner.l" +{ yylval->number= atoi(yytext +2); return WEIGHT_START; } + YY_BREAK +case 5: +/* rule 5 can match eol */ +YY_RULE_SETUP +#line 120 "libmemcached/csl/scanner.l" +; /* skip whitespace */ + YY_BREAK +case 6: +*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ +yyg->yy_c_buf_p = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up yytext again */ +YY_RULE_SETUP +#line 123 "libmemcached/csl/scanner.l" +{ + return COMMENT; + } + YY_BREAK +case 7: +YY_RULE_SETUP +#line 127 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; yyextra->set_server(); return yyextra->previous_token= SERVER; } + YY_BREAK +case 8: +YY_RULE_SETUP +#line 129 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= CSL_SOCKET; } + YY_BREAK +case 9: +YY_RULE_SETUP +#line 131 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= BINARY_PROTOCOL; } + YY_BREAK +case 10: +YY_RULE_SETUP +#line 132 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= BUFFER_REQUESTS; } + YY_BREAK +case 11: +YY_RULE_SETUP +#line 133 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= CONFIGURE_FILE; } + YY_BREAK +case 12: +YY_RULE_SETUP +#line 134 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= CONNECT_TIMEOUT; } + YY_BREAK +case 13: +YY_RULE_SETUP +#line 135 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= DISTRIBUTION; } + YY_BREAK +case 14: +YY_RULE_SETUP +#line 136 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= HASH_WITH_NAMESPACE; } + YY_BREAK +case 15: +YY_RULE_SETUP +#line 137 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= HASH; } + YY_BREAK +case 16: +YY_RULE_SETUP +#line 138 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= IO_BYTES_WATERMARK; } + YY_BREAK +case 17: +YY_RULE_SETUP +#line 139 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= IO_KEY_PREFETCH; } + YY_BREAK +case 18: +YY_RULE_SETUP +#line 140 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= IO_MSG_WATERMARK; } + YY_BREAK +case 19: +YY_RULE_SETUP +#line 141 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= NOREPLY; } + YY_BREAK +case 20: +YY_RULE_SETUP +#line 142 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= NUMBER_OF_REPLICAS; } + YY_BREAK +case 21: +YY_RULE_SETUP +#line 143 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= POLL_TIMEOUT; } + YY_BREAK +case 22: +YY_RULE_SETUP +#line 144 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= RANDOMIZE_REPLICA_READ; } + YY_BREAK +case 23: +YY_RULE_SETUP +#line 145 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= RCV_TIMEOUT; } + YY_BREAK +case 24: +YY_RULE_SETUP +#line 146 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= REMOVE_FAILED_SERVERS; } + YY_BREAK +case 25: +YY_RULE_SETUP +#line 147 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= RETRY_TIMEOUT; } + YY_BREAK +case 26: +YY_RULE_SETUP +#line 148 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= SND_TIMEOUT; } + YY_BREAK +case 27: +YY_RULE_SETUP +#line 149 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= SOCKET_RECV_SIZE; } + YY_BREAK +case 28: +YY_RULE_SETUP +#line 150 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= SOCKET_SEND_SIZE; } + YY_BREAK +case 29: +YY_RULE_SETUP +#line 151 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= SORT_HOSTS; } + YY_BREAK +case 30: +YY_RULE_SETUP +#line 152 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= SUPPORT_CAS; } + YY_BREAK +case 31: +YY_RULE_SETUP +#line 153 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= _TCP_KEEPALIVE; } + YY_BREAK +case 32: +YY_RULE_SETUP +#line 154 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= _TCP_KEEPIDLE; } + YY_BREAK +case 33: +YY_RULE_SETUP +#line 155 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= _TCP_NODELAY; } + YY_BREAK +case 34: +YY_RULE_SETUP +#line 156 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= USE_UDP; } + YY_BREAK +case 35: +YY_RULE_SETUP +#line 157 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= USER_DATA; } + YY_BREAK +case 36: +YY_RULE_SETUP +#line 158 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= VERIFY_KEY; } + YY_BREAK +case 37: +YY_RULE_SETUP +#line 160 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= POOL_MIN; } + YY_BREAK +case 38: +YY_RULE_SETUP +#line 161 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= POOL_MAX; } + YY_BREAK +case 39: +YY_RULE_SETUP +#line 163 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= NAMESPACE; } + YY_BREAK +case 40: +YY_RULE_SETUP +#line 165 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= FETCH_VERSION; } + YY_BREAK +case 41: +YY_RULE_SETUP +#line 167 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= INCLUDE; } + YY_BREAK +case 42: +YY_RULE_SETUP +#line 168 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= RESET; } + YY_BREAK +case 43: +YY_RULE_SETUP +#line 169 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= PARSER_DEBUG; } + YY_BREAK +case 44: +YY_RULE_SETUP +#line 170 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= SERVERS; } + YY_BREAK +case 45: +YY_RULE_SETUP +#line 171 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= END; } + YY_BREAK +case 46: +YY_RULE_SETUP +#line 172 "libmemcached/csl/scanner.l" +{ yyextra->begin= yytext; return yyextra->previous_token= CSL_ERROR; } + YY_BREAK +case 47: +YY_RULE_SETUP +#line 174 "libmemcached/csl/scanner.l" +{ return yyextra->previous_token= CSL_TRUE; } + YY_BREAK +case 48: +YY_RULE_SETUP +#line 175 "libmemcached/csl/scanner.l" +{ return yyextra->previous_token= CSL_FALSE; } + YY_BREAK +case 49: +YY_RULE_SETUP +#line 178 "libmemcached/csl/scanner.l" +{ + yyextra->begin= yytext; + return UNKNOWN_OPTION; + } + YY_BREAK +case 50: +YY_RULE_SETUP +#line 183 "libmemcached/csl/scanner.l" +{ return CONSISTENT; } + YY_BREAK +case 51: +YY_RULE_SETUP +#line 184 "libmemcached/csl/scanner.l" +{ return MODULA; } + YY_BREAK +case 52: +YY_RULE_SETUP +#line 185 "libmemcached/csl/scanner.l" +{ return RANDOM; } + YY_BREAK +case 53: +YY_RULE_SETUP +#line 187 "libmemcached/csl/scanner.l" +{ return MD5; } + YY_BREAK +case 54: +YY_RULE_SETUP +#line 188 "libmemcached/csl/scanner.l" +{ return CRC; } + YY_BREAK +case 55: +YY_RULE_SETUP +#line 189 "libmemcached/csl/scanner.l" +{ return FNV1_64; } + YY_BREAK +case 56: +YY_RULE_SETUP +#line 190 "libmemcached/csl/scanner.l" +{ return FNV1A_64; } + YY_BREAK +case 57: +YY_RULE_SETUP +#line 191 "libmemcached/csl/scanner.l" +{ return FNV1_32; } + YY_BREAK +case 58: +YY_RULE_SETUP +#line 192 "libmemcached/csl/scanner.l" +{ return FNV1A_32; } + YY_BREAK +case 59: +YY_RULE_SETUP +#line 193 "libmemcached/csl/scanner.l" +{ return HSIEH; } + YY_BREAK +case 60: +YY_RULE_SETUP +#line 194 "libmemcached/csl/scanner.l" +{ return MURMUR; } + YY_BREAK +case 61: +YY_RULE_SETUP +#line 195 "libmemcached/csl/scanner.l" +{ return JENKINS; } + YY_BREAK +case 62: +YY_RULE_SETUP +#line 197 "libmemcached/csl/scanner.l" +{ + yyextra->hostname(yytext, yyleng, yylval->server); + return IPADDRESS; + } + YY_BREAK +case 63: +YY_RULE_SETUP +#line 202 "libmemcached/csl/scanner.l" +{ + if (yyextra->is_server()) + { + yyextra->hostname(yytext, yyleng, yylval->server); + + return HOSTNAME; + } + + yyextra->string_buffer(yytext, yyleng, yylval->string); + + return STRING; + } + YY_BREAK +case 64: +/* rule 64 can match eol */ +YY_RULE_SETUP +#line 215 "libmemcached/csl/scanner.l" +{ + config_get_text(yyscanner)[yyleng -1]= 0; + yyextra->string_buffer(yytext +1, yyleng -2, yylval->string); + return QUOTED_STRING; + } + YY_BREAK +case 65: +YY_RULE_SETUP +#line 221 "libmemcached/csl/scanner.l" +{ + yyextra->begin= yytext; + return UNKNOWN; + } + YY_BREAK +case 66: +YY_RULE_SETUP +#line 226 "libmemcached/csl/scanner.l" +YY_FATAL_ERROR( "flex scanner jammed" ); + YY_BREAK +#line 1793 "libmemcached/csl/scanner.cc" +case YY_STATE_EOF(INITIAL): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * config_lex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_END_OF_FILE: + { + yyg->yy_did_buffer_switch_on_eof = 0; + + if ( config_wrap(yyscanner ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = + yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +} /* end of config_lex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = yyg->yytext_ptr; + register int number_to_move, i; + int ret_val; + + if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else + { + yy_size_t num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; + + int yy_c_buf_p_offset = + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + yy_size_t new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + config_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + yyg->yy_n_chars, num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if ( yyg->yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + config_restart(yyin ,yyscanner); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) config_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (yyscan_t yyscanner) +{ + register yy_state_type yy_current_state; + register char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_current_state = yyg->yy_start; + yy_current_state += YY_AT_BOL(); + + for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 538 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) +{ + register int yy_is_jam; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ + register char *yy_cp = yyg->yy_c_buf_p; + + register YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 538 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 537); + + (void)yyg; + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (yyscan_t yyscanner) +#else + static int input (yyscan_t yyscanner) +#endif + +{ + int c; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else + { /* need more input */ + yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + config_restart(yyin ,yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( config_wrap(yyscanner ) ) + return EOF; + + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(yyscanner); +#else + return input(yyscanner); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + offset; + break; + } + } + } + + c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; + + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * @param yyscanner The scanner object. + * @note This function does not reset the start condition to @c INITIAL . + */ + void config_restart (FILE * input_file , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( ! YY_CURRENT_BUFFER ){ + config_ensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + config__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + } + + config__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); + config__load_buffer_state(yyscanner ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * @param yyscanner The scanner object. + */ + void config__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * config_pop_buffer_state(); + * config_push_buffer_state(new_buffer); + */ + config_ensure_buffer_stack (yyscanner); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + config__load_buffer_state(yyscanner ); + + /* We don't actually know whether we did this switch during + * EOF (config_wrap()) processing, but the only time this flag + * is looked at is after config_wrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; +} + +static void config__load_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * @param yyscanner The scanner object. + * @return the allocated buffer state. + */ + YY_BUFFER_STATE config__create_buffer (FILE * file, int size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) config_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in config__create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) config_alloc(b->yy_buf_size + 2 ,yyscanner ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in config__create_buffer()" ); + + b->yy_is_our_buffer = 1; + + config__init_buffer(b,file ,yyscanner); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with config__create_buffer() + * @param yyscanner The scanner object. + */ + void config__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + config_free((void *) b->yy_ch_buf ,yyscanner ); + + config_free((void *) b ,yyscanner ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a config_restart() or at EOF. + */ + static void config__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) + +{ + int oerrno = errno; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + config__flush_buffer(b ,yyscanner); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then config__init_buffer was _probably_ + * called from config_restart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * @param yyscanner The scanner object. + */ + void config__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + config__load_buffer_state(yyscanner ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * @param yyscanner The scanner object. + */ +void config_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (new_buffer == NULL) + return; + + config_ensure_buffer_stack(yyscanner); + + /* This block is copied from config__switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from config__switch_to_buffer. */ + config__load_buffer_state(yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * @param yyscanner The scanner object. + */ +void config_pop_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + config__delete_buffer(YY_CURRENT_BUFFER ,yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + config__load_buffer_state(yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void config_ensure_buffer_stack (yyscan_t yyscanner) +{ + yy_size_t num_to_alloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; + yyg->yy_buffer_stack = (struct yy_buffer_state**)config_alloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in config_ensure_buffer_stack()" ); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state**)config_realloc + (yyg->yy_buffer_stack, + num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in config_ensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); + yyg->yy_buffer_stack_max = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE config__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) config_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in config__scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + config__switch_to_buffer(b ,yyscanner ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to config_lex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * config__scan_bytes() instead. + */ +YY_BUFFER_STATE config__scan_string (yyconst char * yystr , yyscan_t yyscanner) +{ + + return config__scan_bytes(yystr,strlen(yystr) ,yyscanner); +} + +/** Setup the input buffer state to scan the given bytes. The next call to config_lex() will + * scan from a @e copy of @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE config__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + yy_size_t i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = _yybytes_len + 2; + buf = (char *) config_alloc(n ,yyscanner ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in config__scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = config__scan_buffer(buf,n ,yyscanner); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in config__scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) +{ + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the user-defined data for this scanner. + * @param yyscanner The scanner object. + */ +YY_EXTRA_TYPE config_get_extra (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyextra; +} + +/** Get the current line number. + * @param yyscanner The scanner object. + */ +int config_get_lineno (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yylineno; +} + +/** Get the current column number. + * @param yyscanner The scanner object. + */ +int config_get_column (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yycolumn; +} + +/** Get the input stream. + * @param yyscanner The scanner object. + */ +FILE *config_get_in (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyin; +} + +/** Get the output stream. + * @param yyscanner The scanner object. + */ +FILE *config_get_out (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyout; +} + +/** Get the length of the current token. + * @param yyscanner The scanner object. + */ +yy_size_t config_get_leng (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyleng; +} + +/** Get the current token. + * @param yyscanner The scanner object. + */ + +char *config_get_text (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yytext; +} + +/** Set the user-defined data. This data is never touched by the scanner. + * @param user_defined The data to be associated with this scanner. + * @param yyscanner The scanner object. + */ +void config_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyextra = user_defined ; +} + +/** Set the current line number. + * @param line_number + * @param yyscanner The scanner object. + */ +void config_set_lineno (int line_number , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* lineno is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "config_set_lineno called with no buffer" ); + + yylineno = line_number; +} + +/** Set the current column. + * @param line_number + * @param yyscanner The scanner object. + */ +void config_set_column (int column_no , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* column is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + YY_FATAL_ERROR( "config_set_column called with no buffer" ); + + yycolumn = column_no; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * @param yyscanner The scanner object. + * @see config__switch_to_buffer + */ +void config_set_in (FILE * in_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyin = in_str ; +} + +void config_set_out (FILE * out_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyout = out_str ; +} + +int config_get_debug (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yy_flex_debug; +} + +void config_set_debug (int bdebug , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_flex_debug = bdebug ; +} + +/* Accessor methods for yylval and yylloc */ + +YYSTYPE * config_get_lval (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yylval; +} + +void config_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yylval = yylval_param; +} + +/* User-visible API */ + +/* config_lex_init is special because it creates the scanner itself, so it is + * the ONLY reentrant function that doesn't take the scanner as the last argument. + * That's why we explicitly handle the declaration, instead of using our macros. + */ + +int config_lex_init(yyscan_t* ptr_yy_globals) + +{ + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } + + *ptr_yy_globals = (yyscan_t) config_alloc ( sizeof( struct yyguts_t ), NULL ); + + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } + + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + + return yy_init_globals ( *ptr_yy_globals ); +} + +/* config_lex_init_extra has the same functionality as config_lex_init, but follows the + * convention of taking the scanner as the last argument. Note however, that + * this is a *pointer* to a scanner, as it will be allocated by this call (and + * is the reason, too, why this function also must handle its own declaration). + * The user defined value in the first argument will be available to config_alloc in + * the yyextra field. + */ + +int config_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) + +{ + struct yyguts_t dummy_yyguts; + + config_set_extra (yy_user_defined, &dummy_yyguts); + + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } + + *ptr_yy_globals = (yyscan_t) config_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); + + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } + + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + + config_set_extra (yy_user_defined, *ptr_yy_globals); + + return yy_init_globals ( *ptr_yy_globals ); +} + +static int yy_init_globals (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from config_lex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = 0; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = (char *) 0; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; + +/* Defined in main.c */ +#ifdef YY_STDINIT + yyin = stdin; + yyout = stdout; +#else + yyin = (FILE *) 0; + yyout = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * config_lex_init() + */ + return 0; +} + +/* config_lex_destroy is for both reentrant and non-reentrant scanners. */ +int config_lex_destroy (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + config__delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); + YY_CURRENT_BUFFER_LVALUE = NULL; + config_pop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + config_free(yyg->yy_buffer_stack ,yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + config_free(yyg->yy_start_stack ,yyscanner ); + yyg->yy_start_stack = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * config_lex() is called, initialization will occur. */ + yy_init_globals( yyscanner); + + /* Destroy the main struct (reentrant only). */ + config_free ( yyscanner , yyscanner ); + yyscanner = NULL; + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) +{ + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) +{ + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *config_alloc (yy_size_t size , yyscan_t yyscanner) +{ + return (void *) malloc( size ); +} + +void *config_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner) +{ + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); +} + +void config_free (void * ptr , yyscan_t yyscanner) +{ + free( (char *) ptr ); /* see config_realloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 226 "libmemcached/csl/scanner.l" + + + +void Context::init_scanner() +{ + config_lex_init(&scanner); + config_set_extra(this,scanner); +} + +void Context::destroy_scanner() +{ + (void)yy_fatal_error; // Removes warning about unused yy_fatal_error() + config_lex_destroy(scanner); +} + + diff --git a/libmemcached/csl/scanner.h b/libmemcached/csl/scanner.h new file mode 100644 index 0000000..c0291fb --- /dev/null +++ b/libmemcached/csl/scanner.h @@ -0,0 +1,374 @@ +#ifndef config_HEADER_H +#define config_HEADER_H 1 +#define config_IN_HEADER 1 + +#line 6 "libmemcached/csl/scanner.h" +#line 39 "libmemcached/csl/scanner.l" + +#include +#include +#include +#include + +#ifndef __INTEL_COMPILER +#pragma GCC diagnostic ignored "-Wold-style-cast" +#pragma GCC diagnostic ignored "-Wsign-compare" +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wmissing-declarations" +#pragma GCC diagnostic ignored "-Wunused-result" +#pragma GCC diagnostic ignored "-Wmissing-noreturn" +#endif + +#ifdef __clang__ +#pragma GCC diagnostic ignored "-Wshorten-64-to-32" +#endif + +#ifndef __INTEL_COMPILER +#ifndef __clang__ +#pragma GCC diagnostic ignored "-Wlogical-op" +#endif +#endif + + + + +#line 36 "libmemcached/csl/scanner.h" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 37 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! C99 */ + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) + +#define YY_USE_CONST + +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* An opaque pointer. */ +#ifndef YY_TYPEDEF_YY_SCANNER_T +#define YY_TYPEDEF_YY_SCANNER_T +typedef void* yyscan_t; +#endif + +/* For convenience, these vars (plus the bison vars far below) + are macros in the reentrant scanner. */ +#define yyin yyg->yyin_r +#define yyout yyg->yyout_r +#define yyextra yyg->yyextra_r +#define yyleng yyg->yyleng_r +#define yytext yyg->yytext_r +#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) +#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) +#define yy_flex_debug yyg->yy_flex_debug_r + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#define YY_BUF_SIZE 16384 +#endif + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + yy_size_t yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +void config_restart (FILE *input_file ,yyscan_t yyscanner ); +void config__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +YY_BUFFER_STATE config__create_buffer (FILE *file,int size ,yyscan_t yyscanner ); +void config__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void config__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void config_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +void config_pop_buffer_state (yyscan_t yyscanner ); + +YY_BUFFER_STATE config__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); +YY_BUFFER_STATE config__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); +YY_BUFFER_STATE config__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); + +void *config_alloc (yy_size_t ,yyscan_t yyscanner ); +void *config_realloc (void *,yy_size_t ,yyscan_t yyscanner ); +void config_free (void * ,yyscan_t yyscanner ); + +/* Begin user sect3 */ + +#define config_wrap(yyscanner) 1 +#define YY_SKIP_YYWRAP + +#define yytext_ptr yytext_r + +#ifdef YY_HEADER_EXPORT_START_CONDITIONS +#define INITIAL 0 + +#endif + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +int config_lex_init (yyscan_t* scanner); + +int config_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int config_lex_destroy (yyscan_t yyscanner ); + +int config_get_debug (yyscan_t yyscanner ); + +void config_set_debug (int debug_flag ,yyscan_t yyscanner ); + +YY_EXTRA_TYPE config_get_extra (yyscan_t yyscanner ); + +void config_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); + +FILE *config_get_in (yyscan_t yyscanner ); + +void config_set_in (FILE * in_str ,yyscan_t yyscanner ); + +FILE *config_get_out (yyscan_t yyscanner ); + +void config_set_out (FILE * out_str ,yyscan_t yyscanner ); + +yy_size_t config_get_leng (yyscan_t yyscanner ); + +char *config_get_text (yyscan_t yyscanner ); + +int config_get_lineno (yyscan_t yyscanner ); + +void config_set_lineno (int line_number ,yyscan_t yyscanner ); + +int config_get_column (yyscan_t yyscanner ); + +void config_set_column (int column_no ,yyscan_t yyscanner ); + +YYSTYPE * config_get_lval (yyscan_t yyscanner ); + +void config_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int config_wrap (yyscan_t yyscanner ); +#else +extern int config_wrap (yyscan_t yyscanner ); +#endif +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); +#endif + +#ifndef YY_NO_INPUT + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int config_lex \ + (YYSTYPE * yylval_param ,yyscan_t yyscanner); + +#define YY_DECL int config_lex \ + (YYSTYPE * yylval_param , yyscan_t yyscanner) +#endif /* !YY_DECL */ + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + +#undef YY_NEW_FILE +#undef YY_FLUSH_BUFFER +#undef yy_set_bol +#undef yy_new_buffer +#undef yy_set_interactive +#undef YY_DO_BEFORE_ACTION + +#ifdef YY_DECL_IS_OURS +#undef YY_DECL_IS_OURS +#undef YY_DECL +#endif + +#line 226 "libmemcached/csl/scanner.l" + + +#line 373 "libmemcached/csl/scanner.h" +#undef config_IN_HEADER +#endif /* config_HEADER_H */ diff --git a/libmemcached/csl/scanner.l b/libmemcached/csl/scanner.l new file mode 100644 index 0000000..bb233d6 --- /dev/null +++ b/libmemcached/csl/scanner.l @@ -0,0 +1,239 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +%top{ + +#include +#include +#include +#include + +#ifndef __INTEL_COMPILER +#pragma GCC diagnostic ignored "-Wold-style-cast" +#pragma GCC diagnostic ignored "-Wsign-compare" +#pragma GCC diagnostic ignored "-Wunused-parameter" +#pragma GCC diagnostic ignored "-Wmissing-declarations" +#pragma GCC diagnostic ignored "-Wunused-result" +#pragma GCC diagnostic ignored "-Wmissing-noreturn" +#endif + +#ifdef __clang__ +#pragma GCC diagnostic ignored "-Wshorten-64-to-32" +#endif + +#ifndef __INTEL_COMPILER +#ifndef __clang__ +#pragma GCC diagnostic ignored "-Wlogical-op" +#endif +#endif + +} + + +%{ +#define PARAM yyget_extra(yyscanner) + +#define get_lex_chars(buffer, result, max_size, context) \ +{ \ + if (context->pos >= context->length) \ + { \ + result= YY_NULL; \ + } \ + else \ + { \ + result= (int)(context->length - context->pos); \ + (size_t)result > (size_t)max_size ? result= max_size : 0; \ + memcpy(buffer, context->buf + context->pos, result); \ + context->pos += result; \ + } \ +} + +#define YY_FATAL_ERROR(msg) \ +{ \ +} + + +#define YY_INPUT(buffer, result, max_size) get_lex_chars(buffer, result, max_size, PARAM) + +%} + +%option nostdinit +%option 8bit +%option warn +%option bison-bridge +%option never-interactive +%option case-insensitive +%option nodefault +%option noinput +%option nounput +%option noyywrap +%option outfile="libmemcached/csl/scanner.cc" header-file="libmemcached/csl/scanner.h" +%option perf-report +%option prefix="config_" +%option reentrant + +%% + + +=|,|[ ] { return yytext[0];} + +[[:digit:]]+ { yylval->number= atoi(yytext); return (NUMBER); } + +:[[:digit:]]{1,5} { yylval->number= atoi(yytext +1); return PORT; } + +"/?"[[:digit:]]{1,5} { yylval->number= atoi(yytext +2); return WEIGHT_START; } + +[\t\r\n] ; /* skip whitespace */ + + +^#.*$ { + return COMMENT; + } + +"--SERVER=" { yyextra->begin= yytext; yyextra->set_server(); return yyextra->previous_token= SERVER; } + +"--SOCKET=" { yyextra->begin= yytext; return yyextra->previous_token= CSL_SOCKET; } + +"--BINARY-PROTOCOL" { yyextra->begin= yytext; return yyextra->previous_token= BINARY_PROTOCOL; } +"--BUFFER-REQUESTS" { yyextra->begin= yytext; return yyextra->previous_token= BUFFER_REQUESTS; } +"--CONFIGURE-FILE=" { yyextra->begin= yytext; return yyextra->previous_token= CONFIGURE_FILE; } +"--CONNECT-TIMEOUT=" { yyextra->begin= yytext; return yyextra->previous_token= CONNECT_TIMEOUT; } +"--DISTRIBUTION=" { yyextra->begin= yytext; return yyextra->previous_token= DISTRIBUTION; } +"--HASH-WITH-NAMESPACE" { yyextra->begin= yytext; return yyextra->previous_token= HASH_WITH_NAMESPACE; } +"--HASH=" { yyextra->begin= yytext; return yyextra->previous_token= HASH; } +"--IO-BYTES-WATERMARK=" { yyextra->begin= yytext; return yyextra->previous_token= IO_BYTES_WATERMARK; } +"--IO-KEY-PREFETCH=" { yyextra->begin= yytext; return yyextra->previous_token= IO_KEY_PREFETCH; } +"--IO-MSG-WATERMARK=" { yyextra->begin= yytext; return yyextra->previous_token= IO_MSG_WATERMARK; } +"--NOREPLY" { yyextra->begin= yytext; return yyextra->previous_token= NOREPLY; } +"--NUMBER-OF-REPLICAS=" { yyextra->begin= yytext; return yyextra->previous_token= NUMBER_OF_REPLICAS; } +"--POLL-TIMEOUT=" { yyextra->begin= yytext; return yyextra->previous_token= POLL_TIMEOUT; } +"--RANDOMIZE-REPLICA-READ" { yyextra->begin= yytext; return yyextra->previous_token= RANDOMIZE_REPLICA_READ; } +"--RCV-TIMEOUT=" { yyextra->begin= yytext; return yyextra->previous_token= RCV_TIMEOUT; } +"--REMOVE-FAILED-SERVERS=" { yyextra->begin= yytext; return yyextra->previous_token= REMOVE_FAILED_SERVERS; } +"--RETRY-TIMEOUT=" { yyextra->begin= yytext; return yyextra->previous_token= RETRY_TIMEOUT; } +"--SND-TIMEOUT=" { yyextra->begin= yytext; return yyextra->previous_token= SND_TIMEOUT; } +"--SOCKET-RECV-SIZE=" { yyextra->begin= yytext; return yyextra->previous_token= SOCKET_RECV_SIZE; } +"--SOCKET-SEND-SIZE=" { yyextra->begin= yytext; return yyextra->previous_token= SOCKET_SEND_SIZE; } +"--SORT-HOSTS" { yyextra->begin= yytext; return yyextra->previous_token= SORT_HOSTS; } +"--SUPPORT-CAS" { yyextra->begin= yytext; return yyextra->previous_token= SUPPORT_CAS; } +"--TCP-KEEPALIVE" { yyextra->begin= yytext; return yyextra->previous_token= _TCP_KEEPALIVE; } +"--TCP-KEEPIDLE" { yyextra->begin= yytext; return yyextra->previous_token= _TCP_KEEPIDLE; } +"--TCP-NODELAY" { yyextra->begin= yytext; return yyextra->previous_token= _TCP_NODELAY; } +"--USE-UDP" { yyextra->begin= yytext; return yyextra->previous_token= USE_UDP; } +"--USER-DATA" { yyextra->begin= yytext; return yyextra->previous_token= USER_DATA; } +"--VERIFY-KEY" { yyextra->begin= yytext; return yyextra->previous_token= VERIFY_KEY; } + +"--POOL-MIN=" { yyextra->begin= yytext; return yyextra->previous_token= POOL_MIN; } +"--POOL-MAX=" { yyextra->begin= yytext; return yyextra->previous_token= POOL_MAX; } + +"--NAMESPACE=" { yyextra->begin= yytext; return yyextra->previous_token= NAMESPACE; } + +"--FETCH-VERSION" { yyextra->begin= yytext; return yyextra->previous_token= FETCH_VERSION; } + +INCLUDE { yyextra->begin= yytext; return yyextra->previous_token= INCLUDE; } +RESET { yyextra->begin= yytext; return yyextra->previous_token= RESET; } +DEBUG { yyextra->begin= yytext; return yyextra->previous_token= PARSER_DEBUG; } +SERVERS { yyextra->begin= yytext; return yyextra->previous_token= SERVERS; } +END { yyextra->begin= yytext; return yyextra->previous_token= END; } +CSL_ERROR { yyextra->begin= yytext; return yyextra->previous_token= CSL_ERROR; } + +TRUE { return yyextra->previous_token= CSL_TRUE; } +FALSE { return yyextra->previous_token= CSL_FALSE; } + + +"--"[[:alnum:]]* { + yyextra->begin= yytext; + return UNKNOWN_OPTION; + } + +CONSISTENT { return CONSISTENT; } +MODULA { return MODULA; } +RANDOM { return RANDOM; } + +MD5 { return MD5; } +CRC { return CRC; } +FNV1_64 { return FNV1_64; } +FNV1A_64 { return FNV1A_64; } +FNV1_32 { return FNV1_32; } +FNV1A_32 { return FNV1A_32; } +HSIEH { return HSIEH; } +MURMUR { return MURMUR; } +JENKINS { return JENKINS; } + +(([[:digit:]]{1,3}"."){3}([[:digit:]]{1,3})) { + yyextra->hostname(yytext, yyleng, yylval->server); + return IPADDRESS; + } + +[[:alnum:]]["."[:alnum:]_-]+[[:alnum:]] { + if (yyextra->is_server()) + { + yyextra->hostname(yytext, yyleng, yylval->server); + + return HOSTNAME; + } + + yyextra->string_buffer(yytext, yyleng, yylval->string); + + return STRING; + } + +L?\"(\\.|[^\\"])*\" { + yyget_text(yyscanner)[yyleng -1]= 0; + yyextra->string_buffer(yytext +1, yyleng -2, yylval->string); + return QUOTED_STRING; + } + +. { + yyextra->begin= yytext; + return UNKNOWN; + } + +%% + +void Context::init_scanner() +{ + yylex_init(&scanner); + yyset_extra(this, scanner); +} + +void Context::destroy_scanner() +{ + (void)yy_fatal_error; // Removes warning about unused yy_fatal_error() + yylex_destroy(scanner); +} + diff --git a/libmemcached/csl/server.h b/libmemcached/csl/server.h new file mode 100644 index 0000000..21915d6 --- /dev/null +++ b/libmemcached/csl/server.h @@ -0,0 +1,52 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Configure Scripting Language + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include + +#ifdef HAVE_ARPA_INET_H +# include +#endif + +struct server_t +{ + const char *c_str; + size_t size; + in_port_t port; + uint32_t weight; +}; diff --git a/libmemcached/csl/symbol.h b/libmemcached/csl/symbol.h new file mode 100644 index 0000000..423d93f --- /dev/null +++ b/libmemcached/csl/symbol.h @@ -0,0 +1,55 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Configure Scripting Language + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include + +union YYSTYPE +{ + long long number; + memcached_string_t string; + memcached_string_t option; + double double_number; + memcached_server_distribution_t distribution; + memcached_hash_t hash; + memcached_behavior_t behavior; + bool boolean; + server_t server; +}; + +typedef union YYSTYPE YYSTYPE; diff --git a/libmemcached/delete.cc b/libmemcached/delete.cc new file mode 100644 index 0000000..55a8b4c --- /dev/null +++ b/libmemcached/delete.cc @@ -0,0 +1,221 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include + +memcached_return_t memcached_delete(memcached_st *shell, const char *key, size_t key_length, + time_t expiration) +{ + return memcached_delete_by_key(shell, key, key_length, key, key_length, expiration); +} + +static inline memcached_return_t ascii_delete(memcached_instance_st* instance, + uint32_t , + const char *key, + const size_t key_length, + const bool reply, + const bool is_buffering) +{ + libmemcached_io_vector_st vector[]= + { + { NULL, 0 }, + { memcached_literal_param("delete ") }, + { memcached_array_string(instance->root->_namespace), memcached_array_size(instance->root->_namespace) }, + { key, key_length }, + { " noreply", reply ? 0 : memcached_literal_param_size(" noreply") }, + { memcached_literal_param("\r\n") } + }; + + /* Send command header, only flush if we are NOT buffering */ + return memcached_vdo(instance, vector, 6, is_buffering ? false : true); +} + +static inline memcached_return_t binary_delete(memcached_instance_st* instance, + uint32_t server_key, + const char *key, + const size_t key_length, + const bool reply, + const bool is_buffering) +{ + protocol_binary_request_delete request= {}; + + bool should_flush= is_buffering ? false : true; + + initialize_binary_request(instance, request.message.header); + + if (reply) + { + request.message.header.request.opcode= PROTOCOL_BINARY_CMD_DELETE; + } + else + { + request.message.header.request.opcode= PROTOCOL_BINARY_CMD_DELETEQ; + } + request.message.header.request.keylen= htons(uint16_t(key_length + memcached_array_size(instance->root->_namespace))); + request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES; + request.message.header.request.bodylen= htonl(uint32_t(key_length + memcached_array_size(instance->root->_namespace))); + + libmemcached_io_vector_st vector[]= + { + { NULL, 0 }, + { request.bytes, sizeof(request.bytes) }, + { memcached_array_string(instance->root->_namespace), memcached_array_size(instance->root->_namespace) }, + { key, key_length } + }; + + memcached_return_t rc; + if (memcached_fatal(rc= memcached_vdo(instance, vector, 4, should_flush))) + { + assert(memcached_last_error(instance->root) != MEMCACHED_SUCCESS); + memcached_io_reset(instance); + } + + if (memcached_has_replicas(instance)) + { + request.message.header.request.opcode= PROTOCOL_BINARY_CMD_DELETEQ; + + for (uint32_t x= 0; x < memcached_has_replicas(instance); ++x) + { + ++server_key; + + if (server_key == memcached_server_count(instance->root)) + { + server_key= 0; + } + + memcached_instance_st* replica= memcached_instance_fetch(instance->root, server_key); + + if (memcached_fatal(memcached_vdo(replica, vector, 4, should_flush))) + { + assert(memcached_last_error(instance->root) != MEMCACHED_SUCCESS); + memcached_io_reset(replica); + } + else + { + memcached_server_response_decrement(replica); + } + } + } + + return rc; +} + +memcached_return_t memcached_delete_by_key(memcached_st *shell, + const char *group_key, size_t group_key_length, + const char *key, size_t key_length, + time_t expiration) +{ + Memcached* memc= memcached2Memcached(shell); + LIBMEMCACHED_MEMCACHED_DELETE_START(); + + memcached_return_t rc; + if (memcached_fatal(rc= initialize_query(memc, true))) + { + return rc; + } + + if (memcached_fatal(rc= memcached_key_test(*memc, (const char **)&key, &key_length, 1))) + { + return memcached_last_error(memc); + } + + if (expiration) + { + return memcached_set_error(*memc, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, + memcached_literal_param("Memcached server version does not allow expiration of deleted items")); + } + + uint32_t server_key= memcached_generate_hash_with_redistribution(memc, group_key, group_key_length); + memcached_instance_st* instance= memcached_instance_fetch(memc, server_key); + + bool is_buffering= memcached_is_buffering(instance->root); + bool is_replying= memcached_is_replying(instance->root); + + // If a delete trigger exists, we need a response, so no buffering/noreply + if (memc->delete_trigger) + { + if (is_buffering) + { + return memcached_set_error(*memc, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, + memcached_literal_param("Delete triggers cannot be used if buffering is enabled")); + } + + if (is_replying == false) + { + return memcached_set_error(*memc, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, + memcached_literal_param("Delete triggers cannot be used if MEMCACHED_BEHAVIOR_NOREPLY is set")); + } + } + + if (memcached_is_binary(memc)) + { + rc= binary_delete(instance, server_key, key, key_length, is_replying, is_buffering); + } + else + { + rc= ascii_delete(instance, server_key, key, key_length, is_replying, is_buffering); + } + + if (rc == MEMCACHED_SUCCESS) + { + if (is_buffering == true) + { + rc= MEMCACHED_BUFFERED; + } + else if (is_replying == false) + { + rc= MEMCACHED_SUCCESS; + } + else + { + char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE]; + rc= memcached_response(instance, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, NULL); + if (rc == MEMCACHED_DELETED) + { + rc= MEMCACHED_SUCCESS; + if (memc->delete_trigger) + { + memc->delete_trigger(memc, key, key_length); + } + } + } + } + + LIBMEMCACHED_MEMCACHED_DELETE_END(); + return rc; +} diff --git a/libmemcached/do.cc b/libmemcached/do.cc new file mode 100644 index 0000000..9ba513f --- /dev/null +++ b/libmemcached/do.cc @@ -0,0 +1,113 @@ +/* LibMemcached + * Copyright (C) 2006-2010 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: + * + */ + +#include + +static memcached_return_t _vdo_udp(memcached_instance_st* instance, + libmemcached_io_vector_st vector[], + const size_t count) +{ +#ifndef __MINGW32__ + if (vector[0].buffer or vector[0].length) + { + return memcached_set_error(*instance->root, MEMCACHED_NOT_SUPPORTED, MEMCACHED_AT, + memcached_literal_param("UDP messages was attempted, but vector was not setup for it")); + } + + struct msghdr msg; + memset(&msg, 0, sizeof(msg)); + + increment_udp_message_id(instance); + vector[0].buffer= instance->write_buffer; + vector[0].length= UDP_DATAGRAM_HEADER_LENGTH; + + msg.msg_iov= (struct iovec*)vector; +#ifdef __APPLE__ + msg.msg_iovlen= int(count); +#else + msg.msg_iovlen= count; +#endif + + uint32_t retry= 5; + while (--retry) + { + ssize_t sendmsg_length= ::sendmsg(instance->fd, &msg, 0); + if (sendmsg_length > 0) + { + break; + } + else if (sendmsg_length < 0) + { + if (errno == EMSGSIZE) + { + return memcached_set_error(*instance, MEMCACHED_WRITE_FAILURE, MEMCACHED_AT); + } + + return memcached_set_errno(*instance, errno, MEMCACHED_AT); + } + } + + return MEMCACHED_SUCCESS; +#else + (void)instance; + (void)vector; + (void)count; + return MEMCACHED_FAILURE; +#endif +} + +memcached_return_t memcached_vdo(memcached_instance_st* instance, + libmemcached_io_vector_st vector[], + const size_t count, + const bool with_flush) +{ + memcached_return_t rc; + + assert_msg(vector, "Invalid vector passed"); + + if (memcached_failed(rc= memcached_connect(instance))) + { + WATCHPOINT_ERROR(rc); + assert_msg(instance->error_messages, "memcached_connect() returned an error but the Instance showed none."); + return rc; + } + + /* + ** Since non buffering ops in UDP mode dont check to make sure they will fit + ** before they start writing, if there is any data in buffer, clear it out, + ** otherwise we might get a partial write. + **/ + if (memcached_is_udp(instance->root)) + { + return _vdo_udp(instance, vector, count); + } + + bool sent_success= memcached_io_writev(instance, vector, count, with_flush); + if (sent_success == false) + { + assert(memcached_last_error(instance->root) == MEMCACHED_SUCCESS); + if (memcached_last_error(instance->root) == MEMCACHED_SUCCESS) + { + assert(memcached_last_error(instance->root) != MEMCACHED_SUCCESS); + return memcached_set_error(*instance, MEMCACHED_WRITE_FAILURE, MEMCACHED_AT); + } + else + { + rc= memcached_last_error(instance->root); + } + } + else if (memcached_is_replying(instance->root)) + { + memcached_server_response_increment(instance); + } + + return rc; +} diff --git a/libmemcached/do.hpp b/libmemcached/do.hpp new file mode 100644 index 0000000..d2dc667 --- /dev/null +++ b/libmemcached/do.hpp @@ -0,0 +1,43 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011-2013 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +memcached_return_t memcached_vdo(memcached_instance_st*, + libmemcached_io_vector_st vector[], + const size_t count, + const bool with_flush); diff --git a/libmemcached/dump.cc b/libmemcached/dump.cc new file mode 100644 index 0000000..8ddb2ee --- /dev/null +++ b/libmemcached/dump.cc @@ -0,0 +1,159 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* + We use this to dump all keys. + + At this point we only support a callback method. This could be optimized by first + calling items and finding active slabs. For the moment though we just loop through + all slabs on servers and "grab" the keys. +*/ + +#include + +static memcached_return_t ascii_dump(Memcached *memc, memcached_dump_fn *callback, void *context, uint32_t number_of_callbacks) +{ + /* MAX_NUMBER_OF_SLAB_CLASSES is defined to 200 in Memcached 1.4.10 */ + for (uint32_t x= 0; x < 200; x++) + { + char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE]; + int buffer_length= snprintf(buffer, sizeof(buffer), "%u", x); + if (size_t(buffer_length) >= sizeof(buffer) or buffer_length < 0) + { + return memcached_set_error(*memc, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT, + memcached_literal_param("snprintf(MEMCACHED_DEFAULT_COMMAND_SIZE)")); + } + + // @NOTE the hard coded zero means "no limit" + libmemcached_io_vector_st vector[]= + { + { memcached_literal_param("stats cachedump ") }, + { buffer, size_t(buffer_length) }, + { memcached_literal_param(" 0\r\n") } + }; + + // Send message to all servers + for (uint32_t server_key= 0; server_key < memcached_server_count(memc); server_key++) + { + memcached_instance_st* instance= memcached_instance_fetch(memc, server_key); + + memcached_return_t vdo_rc; + if (memcached_success((vdo_rc= memcached_vdo(instance, vector, 3, true)))) + { + // We have sent the message to the server successfully + } + else + { + return vdo_rc; + } + } + + // Collect the returned items + memcached_instance_st* instance; + memcached_return_t read_ret= MEMCACHED_SUCCESS; + while ((instance= memcached_io_get_readable_server(memc, read_ret))) + { + memcached_return_t response_rc= memcached_response(instance, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, NULL); + if (response_rc == MEMCACHED_ITEM) + { + char *string_ptr, *end_ptr; + + string_ptr= buffer; + string_ptr+= 5; /* Move past ITEM */ + + for (end_ptr= string_ptr; isgraph(*end_ptr); end_ptr++) {} ; + + char *key= string_ptr; + key[(size_t)(end_ptr-string_ptr)]= 0; + + for (uint32_t callback_counter= 0; callback_counter < number_of_callbacks; callback_counter++) + { + memcached_return_t callback_rc= (*callback[callback_counter])(memc, key, (size_t)(end_ptr-string_ptr), context); + if (callback_rc != MEMCACHED_SUCCESS) + { + // @todo build up a message for the error from the value + memcached_set_error(*instance, callback_rc, MEMCACHED_AT); + break; + } + } + } + else if (response_rc == MEMCACHED_END) + { + // All items have been returned + } + else if (response_rc == MEMCACHED_SERVER_ERROR or response_rc == MEMCACHED_CLIENT_ERROR or response_rc == MEMCACHED_ERROR) + { + /* If we try to request stats cachedump for a slab class that is too big + * the server will return an incorrect error message: + * "MEMCACHED_SERVER_ERROR failed to allocate memory" + * This isn't really a fatal error, so let's just skip it. I want to + * fix the return value from the memcached server to a CLIENT_ERROR, + * so let's add support for that as well right now. + */ + assert(response_rc == MEMCACHED_SUCCESS); // Just fail + return response_rc; + } + else + { + // IO error of some sort must have occurred + return response_rc; + } + } + } + + return memcached_has_current_error(*memc) ? MEMCACHED_SOME_ERRORS : MEMCACHED_SUCCESS; +} + +memcached_return_t memcached_dump(memcached_st *shell, memcached_dump_fn *callback, void *context, uint32_t number_of_callbacks) +{ + Memcached* ptr= memcached2Memcached(shell); + memcached_return_t rc; + if (memcached_failed(rc= initialize_query(ptr, true))) + { + return rc; + } + + /* + No support for Binary protocol yet + @todo Fix this so that we just flush, switch to ascii, and then go back to binary. + */ + if (memcached_is_binary(ptr)) + { + return memcached_set_error(*ptr, MEMCACHED_NOT_SUPPORTED, MEMCACHED_AT, memcached_literal_param("Binary protocol is not supported for memcached_dump()")); + } + + return ascii_dump(ptr, callback, context, number_of_callbacks); +} diff --git a/libmemcached/encoding_key.cc b/libmemcached/encoding_key.cc new file mode 100644 index 0000000..1e17d50 --- /dev/null +++ b/libmemcached/encoding_key.cc @@ -0,0 +1,56 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011-2013 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include + +static void _set_encoding_key(Memcached& memc, const char *key, size_t key_length) +{ + hashkit_key(&memc.hashkit, key, key_length); +} + +memcached_return_t memcached_set_encoding_key(memcached_st* shell, const char *key, size_t key_length) +{ + Memcached* memc= memcached2Memcached(shell); + if (memc) + { + _set_encoding_key(*memc, key, key_length); + return MEMCACHED_SUCCESS; + } + + return MEMCACHED_INVALID_ARGUMENTS; +} diff --git a/libmemcached/encoding_key.h b/libmemcached/encoding_key.h new file mode 100644 index 0000000..a2c47b0 --- /dev/null +++ b/libmemcached/encoding_key.h @@ -0,0 +1,48 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + + memcached_string_t memcached_encoding_key(Memcached&); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached/error.cc b/libmemcached/error.cc new file mode 100644 index 0000000..ab17926 --- /dev/null +++ b/libmemcached/error.cc @@ -0,0 +1,676 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * LibMemcached + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +#include "libmemcached/assert.hpp" + +#include +#include +#include + +#define MAX_ERROR_LENGTH 2048 +struct memcached_error_t +{ + Memcached *root; + uint64_t query_id; + struct memcached_error_t *next; + memcached_return_t rc; + int local_errno; + size_t size; + char message[MAX_ERROR_LENGTH]; +}; + +static void _set(memcached_instance_st& server, Memcached& memc) +{ + if (server.error_messages and server.error_messages->query_id != server.root->query_id) + { + memcached_error_free(server); + } + + if (memc.error_messages) + { + if (memc.error_messages->rc == MEMCACHED_TIMEOUT) + { + server.io_wait_count.timeouts++; + } + + memcached_error_t *error= libmemcached_xmalloc(&memc, memcached_error_t); + if (error) + { + memcpy(error, memc.error_messages, sizeof(memcached_error_t)); + error->next= server.error_messages; + server.error_messages= error; + } + } +} + +#if 0 +static int error_log_fd= -1; +#endif + +static void _set(Memcached& memc, memcached_string_t *str, memcached_return_t &rc, const char *at, int local_errno= 0) +{ + if (memc.error_messages && memc.error_messages->query_id != memc.query_id) + { + memcached_error_free(memc); + } + + if (memcached_fatal(rc) or rc == MEMCACHED_CLIENT_ERROR) + { + // For memory allocation we use our error since it is a bit more specific + if (local_errno == ENOMEM and rc == MEMCACHED_ERRNO) + { + rc= MEMCACHED_MEMORY_ALLOCATION_FAILURE; + } + + if (rc == MEMCACHED_MEMORY_ALLOCATION_FAILURE) + { + local_errno= ENOMEM; + } + + if (rc == MEMCACHED_ERRNO and not local_errno) + { + local_errno= errno; + rc= MEMCACHED_ERRNO; + } + + if (rc == MEMCACHED_ERRNO and local_errno == ENOTCONN) + { + rc= MEMCACHED_CONNECTION_FAILURE; + } + + if (rc == MEMCACHED_ERRNO and local_errno == ECONNRESET) + { + rc= MEMCACHED_CONNECTION_FAILURE; + } + + if (local_errno == EINVAL) + { + rc= MEMCACHED_INVALID_ARGUMENTS; + } + + if (local_errno == ECONNREFUSED) + { + rc= MEMCACHED_CONNECTION_FAILURE; + } + + if (rc == MEMCACHED_TIMEOUT) + { + } + + memcached_error_t *error= libmemcached_xmalloc(&memc, memcached_error_t); + if (error == NULL) // Bad business if this happens + { + assert_msg(error, "libmemcached_xmalloc() failed to allocate a memcached_error_t"); + return; + } + + error->root= &memc; + error->query_id= memc.query_id; + error->rc= rc; + error->local_errno= local_errno; + + // MEMCACHED_CLIENT_ERROR is a special case because it is an error coming from the server + if (rc == MEMCACHED_CLIENT_ERROR) + { + assert(str); + assert(str->size); + if (str and str->size) + { + assert(error->local_errno == 0); + error->local_errno= 0; + + error->size= (int)snprintf(error->message, MAX_ERROR_LENGTH, "(%p) %.*s", + error->root, + int(str->size), str->c_str); + } + } + else if (local_errno) + { + const char *errmsg_ptr; + char errmsg[MAX_ERROR_LENGTH]; + errmsg[0]= 0; + errmsg_ptr= errmsg; + +#if defined(STRERROR_R_CHAR_P) && STRERROR_R_CHAR_P + errmsg_ptr= strerror_r(local_errno, errmsg, sizeof(errmsg)); +#elif defined(HAVE_STRERROR_R) && HAVE_STRERROR_R + strerror_r(local_errno, errmsg, sizeof(errmsg)); + errmsg_ptr= errmsg; +#elif defined(HAVE_STRERROR) && HAVE_STRERROR + snprintf(errmsg, sizeof(errmsg), "%s", strerror(local_errno)); + errmsg_ptr= errmsg; +#endif + + if (str and str->size and local_errno) + { + error->size= (int)snprintf(error->message, MAX_ERROR_LENGTH, "(%p) %s(%s), %.*s -> %s", + error->root, + memcached_strerror(&memc, rc), + errmsg_ptr, + memcached_string_printf(*str), at); + } + else + { + error->size= (int)snprintf(error->message, MAX_ERROR_LENGTH, "(%p) %s(%s) -> %s", + error->root, + memcached_strerror(&memc, rc), + errmsg_ptr, + at); + } + } + else if (rc == MEMCACHED_PARSE_ERROR and str and str->size) + { + error->size= (int)snprintf(error->message, MAX_ERROR_LENGTH, "(%p) %.*s -> %s", + error->root, + int(str->size), str->c_str, at); + } + else if (str and str->size) + { + error->size= (int)snprintf(error->message, MAX_ERROR_LENGTH, "(%p) %s, %.*s -> %s", + error->root, + memcached_strerror(&memc, rc), + int(str->size), str->c_str, at); + } + else + { + error->size= (int)snprintf(error->message, MAX_ERROR_LENGTH, "(%p) %s -> %s", + error->root, + memcached_strerror(&memc, rc), at); + } + + error->next= memc.error_messages; + memc.error_messages= error; + } + +#if 0 + if (error_log_fd == -1) + { +// unlink("/tmp/libmemcachd.log"); + if ((error_log_fd= open("/tmp/libmemcachd.log", O_CREAT | O_WRONLY | O_APPEND, 0644)) < 0) + { + perror("open"); + error_log_fd= -1; + } + } + ::write(error_log_fd, error->message, error->size); + ::write(error_log_fd, "\n", 1); +#endif +} + +memcached_return_t memcached_set_error(Memcached& memc, memcached_return_t rc, const char *at, const char *str, size_t length) +{ + assert_msg(rc != MEMCACHED_ERRNO, "Programmer error, MEMCACHED_ERRNO was set to be returned to client"); + memcached_string_t tmp= { str, length }; + return memcached_set_error(memc, rc, at, tmp); +} + +memcached_return_t memcached_set_error(memcached_instance_st& self, memcached_return_t rc, const char *at, const char *str, size_t length) +{ + assert_msg(rc != MEMCACHED_ERRNO, "Programmer error, MEMCACHED_ERRNO was set to be returned to client"); + assert_msg(rc != MEMCACHED_SOME_ERRORS, "Programmer error, MEMCACHED_SOME_ERRORS was about to be set on a Instance"); + + memcached_string_t tmp= { str, length }; + return memcached_set_error(self, rc, at, tmp); +} + +#ifndef __INTEL_COMPILER +#pragma GCC diagnostic ignored "-Wformat-nonliteral" +#endif + +memcached_return_t memcached_set_error(Memcached& memc, memcached_return_t rc, const char *at, memcached_string_t& str) +{ + assert_msg(rc != MEMCACHED_ERRNO, "Programmer error, MEMCACHED_ERRNO was set to be returned to client"); + if (memcached_fatal(rc)) + { + _set(memc, &str, rc, at); + } + + return rc; +} + +memcached_return_t memcached_set_parser_error(Memcached& memc, + const char *at, + const char *format, ...) +{ + va_list args; + + char buffer[BUFSIZ]; + va_start(args, format); + int length= vsnprintf(buffer, sizeof(buffer), format, args); + va_end(args); + + return memcached_set_error(memc, MEMCACHED_PARSE_ERROR, at, buffer, length); +} + +static inline size_t append_host_to_string(memcached_instance_st& self, char* buffer, const size_t buffer_length) +{ + size_t size= 0; + switch (self.type) + { + case MEMCACHED_CONNECTION_TCP: + case MEMCACHED_CONNECTION_UDP: + size+= snprintf(buffer, buffer_length, " host: %s:%d", + self.hostname(), int(self.port())); + break; + + case MEMCACHED_CONNECTION_UNIX_SOCKET: + size+= snprintf(buffer, buffer_length, " socket: %s", + self.hostname()); + break; + } + + return size; +} + +memcached_return_t memcached_set_error(memcached_instance_st& self, memcached_return_t rc, const char *at, memcached_string_t& str) +{ + assert_msg(rc != MEMCACHED_ERRNO, "Programmer error, MEMCACHED_ERRNO was set to be returned to client"); + assert_msg(rc != MEMCACHED_SOME_ERRORS, "Programmer error, MEMCACHED_SOME_ERRORS was about to be set on a memcached_instance_st"); + if (memcached_fatal(rc) == false and rc != MEMCACHED_CLIENT_ERROR) + { + return rc; + } + + char hostname_port_message[MAX_ERROR_LENGTH]; + char* hostname_port_message_ptr= hostname_port_message; + int size= 0; + if (str.size) + { + size= snprintf(hostname_port_message_ptr, sizeof(hostname_port_message), "%.*s, ", + memcached_string_printf(str)); + hostname_port_message_ptr+= size; + } + + size+= append_host_to_string(self, hostname_port_message_ptr, sizeof(hostname_port_message) -size); + + memcached_string_t error_host= { hostname_port_message, size_t(size) }; + + assert_msg(self.root, "Programmer error, root was not set on instance"); + if (self.root) + { + _set(*self.root, &error_host, rc, at); + _set(self, (*self.root)); + assert(self.error_messages); + assert(self.root->error_messages); + assert(self.error_messages->rc == self.root->error_messages->rc); + } + + return rc; +} + +memcached_return_t memcached_set_error(memcached_instance_st& self, memcached_return_t rc, const char *at) +{ + assert_msg(rc != MEMCACHED_SOME_ERRORS, "Programmer error, MEMCACHED_SOME_ERRORS was about to be set on a memcached_instance_st"); + if (memcached_fatal(rc) == false) + { + return rc; + } + + char hostname_port[MEMCACHED_NI_MAXHOST +MEMCACHED_NI_MAXSERV + sizeof("host : ")]; + size_t size= append_host_to_string(self, hostname_port, sizeof(hostname_port)); + + memcached_string_t error_host= { hostname_port, size}; + + if (self.root) + { + _set(*self.root, &error_host, rc, at); + _set(self, *self.root); + } + + return rc; +} + +memcached_return_t memcached_set_error(Memcached& self, memcached_return_t rc, const char *at) +{ + assert_msg(rc != MEMCACHED_ERRNO, "Programmer error, MEMCACHED_ERRNO was set to be returned to client"); + if (memcached_fatal(rc) == false) + { + return rc; + } + + _set(self, NULL, rc, at); + + return rc; +} + +memcached_return_t memcached_set_errno(Memcached& self, int local_errno, const char *at, const char *str, size_t length) +{ + memcached_string_t tmp= { str, length }; + return memcached_set_errno(self, local_errno, at, tmp); +} + +memcached_return_t memcached_set_errno(memcached_instance_st& self, int local_errno, const char *at, const char *str, size_t length) +{ + memcached_string_t tmp= { str, length }; + return memcached_set_errno(self, local_errno, at, tmp); +} + +memcached_return_t memcached_set_errno(Memcached& self, int local_errno, const char *at) +{ + if (local_errno == 0) + { + return MEMCACHED_SUCCESS; + } + + memcached_return_t rc= MEMCACHED_ERRNO; + _set(self, NULL, rc, at, local_errno); + + return rc; +} + +memcached_return_t memcached_set_errno(Memcached& memc, int local_errno, const char *at, memcached_string_t& str) +{ + if (local_errno == 0) + { + return MEMCACHED_SUCCESS; + } + + memcached_return_t rc= MEMCACHED_ERRNO; + _set(memc, &str, rc, at, local_errno); + + return rc; +} + +memcached_return_t memcached_set_errno(memcached_instance_st& self, int local_errno, const char *at, memcached_string_t& str) +{ + if (local_errno == 0) + { + return MEMCACHED_SUCCESS; + } + + char hostname_port_message[MAX_ERROR_LENGTH]; + char* hostname_port_message_ptr= hostname_port_message; + size_t size= 0; + if (str.size) + { + size= snprintf(hostname_port_message_ptr, sizeof(hostname_port_message), "%.*s, ", memcached_string_printf(str)); + } + size+= append_host_to_string(self, hostname_port_message_ptr, sizeof(hostname_port_message) -size); + + memcached_string_t error_host= { hostname_port_message, size }; + + memcached_return_t rc= MEMCACHED_ERRNO; + if (self.root == NULL) + { + return rc; + } + + _set(*self.root, &error_host, rc, at, local_errno); + _set(self, (*self.root)); + +#if 0 + if (self.root->error_messages->rc != self.error_messages->rc) + { + fprintf(stderr, "%s:%d %s != %s\n", __FILE__, __LINE__, + memcached_strerror(NULL, self.root->error_messages->rc), + memcached_strerror(NULL, self.error_messages->rc)); + } +#endif + + return rc; +} + +memcached_return_t memcached_set_errno(memcached_instance_st& self, int local_errno, const char *at) +{ + if (local_errno == 0) + { + return MEMCACHED_SUCCESS; + } + + char hostname_port_message[MAX_ERROR_LENGTH]; + size_t size= append_host_to_string(self, hostname_port_message, sizeof(hostname_port_message)); + + memcached_string_t error_host= { hostname_port_message, size }; + + memcached_return_t rc= MEMCACHED_ERRNO; + if (self.root == NULL) + { + return rc; + } + + _set(*self.root, &error_host, rc, at, local_errno); + _set(self, (*self.root)); + + return rc; +} + +static void _error_print(const memcached_error_t *error) +{ + if (error == NULL) + { + return; + } + + if (error->size == 0) + { + fprintf(stderr, "\t%s\n", memcached_strerror(NULL, error->rc) ); + } + else + { + fprintf(stderr, "\t%s %s\n", memcached_strerror(NULL, error->rc), error->message); + } + + _error_print(error->next); +} + +void memcached_error_print(const Memcached *shell) +{ + const Memcached* self= memcached2Memcached(shell); + if (self == NULL) + { + return; + } + + _error_print(self->error_messages); + + for (uint32_t x= 0; x < memcached_server_count(self); x++) + { + memcached_instance_st* instance= memcached_instance_by_position(self, x); + + _error_print(instance->error_messages); + } +} + +static void _error_free(memcached_error_t *error) +{ + if (error) + { + _error_free(error->next); + + libmemcached_free(error->root, error); + } +} + +void memcached_error_free(Memcached& self) +{ + _error_free(self.error_messages); + self.error_messages= NULL; +} + +void memcached_error_free(memcached_instance_st& self) +{ + _error_free(self.error_messages); + self.error_messages= NULL; +} + +void memcached_error_free(memcached_server_st& self) +{ + _error_free(self.error_messages); + self.error_messages= NULL; +} + +const char *memcached_error(const memcached_st *memc) +{ + return memcached_last_error_message(memc); +} + +const char *memcached_last_error_message(const memcached_st *shell) +{ + const Memcached* memc= memcached2Memcached(shell); + if (memc) + { + if (memc->error_messages) + { + if (memc->error_messages->size and memc->error_messages->message[0]) + { + return memc->error_messages->message; + } + + return memcached_strerror(memc, memc->error_messages->rc); + } + + return memcached_strerror(memc, MEMCACHED_SUCCESS); + } + + return memcached_strerror(memc, MEMCACHED_INVALID_ARGUMENTS); +} + +bool memcached_has_current_error(Memcached &memc) +{ + if (memc.error_messages + and memc.error_messages->query_id == memc.query_id + and memcached_failed(memc.error_messages->rc)) + { + return true; + } + + return false; +} + +bool memcached_has_current_error(memcached_instance_st& server) +{ + return memcached_has_current_error(*(server.root)); +} + +memcached_return_t memcached_last_error(const memcached_st *shell) +{ + const Memcached* memc= memcached2Memcached(shell); + if (memc) + { + if (memc->error_messages) + { + return memc->error_messages->rc; + } + + return MEMCACHED_SUCCESS; + } + + return MEMCACHED_INVALID_ARGUMENTS; +} + +int memcached_last_error_errno(const memcached_st *shell) +{ + const Memcached* memc= memcached2Memcached(shell); + if (memc == NULL) + { + return 0; + } + + if (memc->error_messages == NULL) + { + return 0; + } + + return memc->error_messages->local_errno; +} + +const char *memcached_server_error(const memcached_instance_st * server) +{ + if (server == NULL) + { + return NULL; + } + + if (server->error_messages == NULL) + { + return memcached_strerror(server->root, MEMCACHED_SUCCESS); + } + + if (server->error_messages->size == 0) + { + return memcached_strerror(server->root, server->error_messages->rc); + } + + return server->error_messages->message; +} + + +memcached_error_t *memcached_error_copy(const memcached_instance_st& server) +{ + if (server.error_messages == NULL) + { + return NULL; + } + + memcached_error_t *error= libmemcached_xmalloc(server.root, memcached_error_t); + memcpy(error, server.error_messages, sizeof(memcached_error_t)); + error->next= NULL; + + return error; +} + +memcached_return_t memcached_server_error_return(const memcached_instance_st * ptr) +{ + if (ptr == NULL) + { + return MEMCACHED_INVALID_ARGUMENTS; + } + + if (ptr and ptr->error_messages) + { + return ptr->error_messages->rc; + } + + return MEMCACHED_SUCCESS; +} + +memcached_return_t memcached_instance_error_return(memcached_instance_st* instance) +{ + if (instance == NULL) + { + return MEMCACHED_INVALID_ARGUMENTS; + } + + if (instance and instance->error_messages) + { + return instance->error_messages->rc; + } + + return MEMCACHED_SUCCESS; +} diff --git a/libmemcached/error.hpp b/libmemcached/error.hpp new file mode 100644 index 0000000..847dbc2 --- /dev/null +++ b/libmemcached/error.hpp @@ -0,0 +1,90 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * LibMemcached + * + * Copyright (C) 2011-2013 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libmemcached/common.h" + +#pragma once + +#ifdef __cplusplus + +#define STRINGIFY(x) #x +#define TOSTRING(x) STRINGIFY(x) +#define MEMCACHED_AT __FILE__ ":" TOSTRING(__LINE__) + +memcached_return_t memcached_set_parser_error(Memcached& memc, + const char *at, + const char *format, ...); + +memcached_return_t memcached_set_error(Memcached&, memcached_return_t rc, const char *at); + +memcached_return_t memcached_set_error(memcached_instance_st&, memcached_return_t rc, const char *at); + +memcached_return_t memcached_set_error(Memcached&, memcached_return_t rc, const char *at, const char *str, size_t length); + +memcached_return_t memcached_set_error(memcached_instance_st&, memcached_return_t rc, const char *at, const char *str, size_t length); + +memcached_return_t memcached_set_error(Memcached& memc, memcached_return_t rc, const char *at, memcached_string_t& str); + +memcached_return_t memcached_set_error(memcached_instance_st&, memcached_return_t rc, const char *at, memcached_string_t& str); + +memcached_return_t memcached_set_errno(Memcached& memc, int local_errno, const char *at, memcached_string_t& str); + +memcached_return_t memcached_set_errno(memcached_instance_st&, int local_errno, const char *at, memcached_string_t& str); + +memcached_return_t memcached_set_errno(Memcached& memc, int local_errno, const char *at, const char *str, size_t length); + +memcached_return_t memcached_set_errno(memcached_instance_st&, int local_errno, const char *at, const char *str, size_t length); + +memcached_return_t memcached_set_errno(Memcached& memc, int local_errno, const char *at); + +memcached_return_t memcached_set_errno(memcached_instance_st&, int local_errno, const char *at); + +bool memcached_has_current_error(Memcached&); + +bool memcached_has_current_error(memcached_instance_st&); + +void memcached_error_free(Memcached&); + +void memcached_error_free(memcached_server_st&); + +void memcached_error_free(memcached_instance_st& self); + +memcached_error_t *memcached_error_copy(const memcached_instance_st&); + +memcached_return_t memcached_instance_error_return(memcached_instance_st*); + +#endif diff --git a/libmemcached/exist.cc b/libmemcached/exist.cc new file mode 100644 index 0000000..3afb42d --- /dev/null +++ b/libmemcached/exist.cc @@ -0,0 +1,164 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +static memcached_return_t ascii_exist(Memcached *memc, memcached_instance_st* instance, const char *key, size_t key_length) +{ + libmemcached_io_vector_st vector[]= + { + { NULL, 0 }, + { memcached_literal_param("add ") }, + { memcached_array_string(memc->_namespace), memcached_array_size(memc->_namespace) }, + { key, key_length }, + { memcached_literal_param(" 0") }, + { memcached_literal_param(" 2678400") }, + { memcached_literal_param(" 0") }, + { memcached_literal_param("\r\n") }, + { memcached_literal_param("\r\n") } + }; + + /* Send command header */ + memcached_return_t rc; + if (memcached_fatal(rc= memcached_vdo(instance, vector, 9, true))) + { + return rc; + } + + char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE]; + rc= memcached_response(instance, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, NULL); + + if (rc == MEMCACHED_NOTSTORED) + { + rc= MEMCACHED_SUCCESS; + } + + if (rc == MEMCACHED_STORED) + { + rc= MEMCACHED_NOTFOUND; + } + + return rc; +} + +static memcached_return_t binary_exist(Memcached *memc, memcached_instance_st* instance, const char *key, size_t key_length) +{ + protocol_binary_request_set request= {}; + size_t send_length= sizeof(request.bytes); + + initialize_binary_request(instance, request.message.header); + + request.message.header.request.opcode= PROTOCOL_BINARY_CMD_ADD; + request.message.header.request.keylen= htons((uint16_t)(key_length + memcached_array_size(memc->_namespace))); + request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES; + request.message.header.request.extlen= 8; + request.message.body.flags= 0; + request.message.body.expiration= htonl(2678400); + + request.message.header.request.bodylen= htonl((uint32_t) (key_length + +memcached_array_size(memc->_namespace) + +request.message.header.request.extlen)); + + libmemcached_io_vector_st vector[]= + { + { NULL, 0 }, + { request.bytes, send_length }, + { memcached_array_string(memc->_namespace), memcached_array_size(memc->_namespace) }, + { key, key_length } + }; + + /* write the header */ + memcached_return_t rc; + if (memcached_fatal(rc= memcached_vdo(instance, vector, 4, true))) + { + return rc; + } + + rc= memcached_response(instance, NULL, 0, NULL); + + if (rc == MEMCACHED_SUCCESS) + { + rc= MEMCACHED_NOTFOUND; + } + + if (rc == MEMCACHED_DATA_EXISTS) + { + rc= MEMCACHED_SUCCESS; + } + + return rc; +} + +memcached_return_t memcached_exist(memcached_st *memc, const char *key, size_t key_length) +{ + return memcached_exist_by_key(memc, key, key_length, key, key_length); +} + +memcached_return_t memcached_exist_by_key(memcached_st *shell, + const char *group_key, size_t group_key_length, + const char *key, size_t key_length) +{ + Memcached* memc= memcached2Memcached(shell); + memcached_return_t rc; + if (memcached_failed(rc= initialize_query(memc, true))) + { + return rc; + } + + if (memcached_is_udp(memc)) + { + return memcached_set_error(*memc, MEMCACHED_NOT_SUPPORTED, MEMCACHED_AT); + } + + uint32_t server_key= memcached_generate_hash_with_redistribution(memc, group_key, group_key_length); + memcached_instance_st* instance= memcached_instance_fetch(memc, server_key); + + if (memcached_is_binary(memc)) + { + rc= binary_exist(memc, instance, key, key_length); + } + else + { + rc= ascii_exist(memc, instance, key, key_length); + } + + if (memcached_fatal(rc)) + { + memcached_io_reset(instance); + } + + return rc; +} diff --git a/libmemcached/fetch.cc b/libmemcached/fetch.cc new file mode 100644 index 0000000..d795109 --- /dev/null +++ b/libmemcached/fetch.cc @@ -0,0 +1,320 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +char *memcached_fetch(memcached_st *shell, char *key, size_t *key_length, + size_t *value_length, + uint32_t *flags, + memcached_return_t *error) +{ + Memcached* ptr= memcached2Memcached(shell); + memcached_return_t unused; + if (error == NULL) + { + error= &unused; + } + + if (memcached_is_udp(ptr)) + { + if (value_length) + { + *value_length= 0; + } + + if (key_length) + { + *key_length= 0; + } + + if (flags) + { + *flags= 0; + } + + if (key) + { + *key= 0; + } + + *error= MEMCACHED_NOT_SUPPORTED; + return NULL; + } + + memcached_result_st *result_buffer= &ptr->result; + result_buffer= memcached_fetch_result(ptr, result_buffer, error); + if (result_buffer == NULL or memcached_failed(*error)) + { + WATCHPOINT_ASSERT(result_buffer == NULL); + if (value_length) + { + *value_length= 0; + } + + if (key_length) + { + *key_length= 0; + } + + if (flags) + { + *flags= 0; + } + + if (key) + { + *key= 0; + } + + return NULL; + } + + if (value_length) + { + *value_length= memcached_string_length(&result_buffer->value); + } + + if (key) + { + if (result_buffer->key_length > MEMCACHED_MAX_KEY) + { + *error= MEMCACHED_KEY_TOO_BIG; + if (value_length) + { + *value_length= 0; + } + + if (key_length) + { + *key_length= 0; + } + + if (flags) + { + *flags= 0; + } + + if (key) + { + *key= 0; + } + + return NULL; + } + + strncpy(key, result_buffer->item_key, result_buffer->key_length); // For the binary protocol we will cut off the key :( + if (key_length) + { + *key_length= result_buffer->key_length; + } + } + + if (flags) + { + *flags= result_buffer->item_flags; + } + + return memcached_string_take_value(&result_buffer->value); +} + +memcached_result_st *memcached_fetch_result(memcached_st *ptr, + memcached_result_st *result, + memcached_return_t *error) +{ + memcached_return_t unused; + if (error == NULL) + { + error= &unused; + } + + if (ptr == NULL) + { + *error= MEMCACHED_INVALID_ARGUMENTS; + return NULL; + } + + if (memcached_is_udp(ptr)) + { + *error= MEMCACHED_NOT_SUPPORTED; + return NULL; + } + + if (result == NULL) + { + // If we have already initialized (ie it is in use) our internal, we + // create one. + if (memcached_is_initialized(&ptr->result)) + { + if ((result= memcached_result_create(ptr, NULL)) == NULL) + { + *error= MEMCACHED_MEMORY_ALLOCATION_FAILURE; + return NULL; + } + } + else + { + result= memcached_result_create(ptr, &ptr->result); + } + } + + *error= MEMCACHED_MAXIMUM_RETURN; // We use this to see if we ever go into the loop + memcached_instance_st *server; + memcached_return_t read_ret= MEMCACHED_SUCCESS; + bool connection_failures= false; + while ((server= memcached_io_get_readable_server(ptr, read_ret))) + { + char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE]; + *error= memcached_response(server, buffer, sizeof(buffer), result); + + if (*error == MEMCACHED_IN_PROGRESS) + { + continue; + } + else if (*error == MEMCACHED_CONNECTION_FAILURE) + { + connection_failures= true; + continue; + } + else if (*error == MEMCACHED_SUCCESS) + { + result->count++; + return result; + } + else if (*error == MEMCACHED_END) + { + memcached_server_response_reset(server); + } + else if (*error != MEMCACHED_NOTFOUND) + { + break; + } + } + + if (*error == MEMCACHED_NOTFOUND and result->count) + { + *error= MEMCACHED_END; + } + else if (*error == MEMCACHED_MAXIMUM_RETURN and result->count) + { + *error= MEMCACHED_END; + } + else if (*error == MEMCACHED_MAXIMUM_RETURN) // while() loop was never entered + { + *error= MEMCACHED_NOTFOUND; + } + else if (connection_failures) + { + /* + If we have a connection failure to some servers, the caller may + wish to treat that differently to getting a definitive NOT_FOUND + from all servers, so return MEMCACHED_CONNECTION_FAILURE to allow + that. + */ + *error= MEMCACHED_CONNECTION_FAILURE; + } + else if (*error == MEMCACHED_SUCCESS) + { + *error= MEMCACHED_END; + } + else if (result->count == 0) + { + *error= MEMCACHED_NOTFOUND; + } + + /* We have completed reading data */ + if (memcached_is_allocated(result)) + { + memcached_result_free(result); + } + else + { + result->count= 0; + memcached_string_reset(&result->value); + } + + return NULL; +} + +memcached_return_t memcached_fetch_execute(memcached_st *shell, + memcached_execute_fn *callback, + void *context, + uint32_t number_of_callbacks) +{ + Memcached* ptr= memcached2Memcached(shell); + memcached_result_st *result= &ptr->result; + memcached_return_t rc; + bool some_errors= false; + + while ((result= memcached_fetch_result(ptr, result, &rc))) + { + if (memcached_failed(rc) and rc == MEMCACHED_NOTFOUND) + { + continue; + } + else if (memcached_failed(rc)) + { + memcached_set_error(*ptr, rc, MEMCACHED_AT); + some_errors= true; + continue; + } + + for (uint32_t x= 0; x < number_of_callbacks; x++) + { + memcached_return_t ret= (*callback[x])(ptr, result, context); + if (memcached_failed(ret)) + { + some_errors= true; + memcached_set_error(*ptr, ret, MEMCACHED_AT); + break; + } + } + } + + if (some_errors) + { + return MEMCACHED_SOME_ERRORS; + } + + // If we were able to run all keys without issue we return + // MEMCACHED_SUCCESS + if (memcached_success(rc)) + { + return MEMCACHED_SUCCESS; + } + + return rc; +} diff --git a/libmemcached/flag.cc b/libmemcached/flag.cc new file mode 100644 index 0000000..09b401e --- /dev/null +++ b/libmemcached/flag.cc @@ -0,0 +1,156 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +bool memcached_flag(const memcached_st& memc, const memcached_flag_t flag) +{ + switch (flag) + { + case MEMCACHED_FLAG_AUTO_EJECT_HOSTS: + return memcached_is_auto_eject_hosts(&memc); + + case MEMCACHED_FLAG_BINARY_PROTOCOL: + return memcached_is_binary(&memc); + + case MEMCACHED_FLAG_BUFFER_REQUESTS: + return memcached_is_buffering(&memc); + + case MEMCACHED_FLAG_HASH_WITH_NAMESPACE: + return memcached_is_hash_with_namespace(&memc); + + case MEMCACHED_FLAG_NO_BLOCK: + return memcached_is_no_block(&memc); + + case MEMCACHED_FLAG_REPLY: + return memcached_is_replying(&memc); + + case MEMCACHED_FLAG_RANDOMIZE_REPLICA_READ: + return memcached_is_randomize_replica_read(&memc); + + case MEMCACHED_FLAG_SUPPORT_CAS: + return memcached_is_cas(&memc); + + case MEMCACHED_FLAG_TCP_NODELAY: + return memcached_is_tcp_nodelay(&memc); + + case MEMCACHED_FLAG_USE_SORT_HOSTS: + return memcached_is_use_sort_hosts(&memc); + + case MEMCACHED_FLAG_USE_UDP: + return memcached_is_udp(&memc); + + case MEMCACHED_FLAG_VERIFY_KEY: + return memcached_is_verify_key(&memc); + + case MEMCACHED_FLAG_TCP_KEEPALIVE: + return memcached_is_use_sort_hosts(&memc); + + case MEMCACHED_FLAG_IS_AES: + return memcached_is_aes(&memc); + + case MEMCACHED_FLAG_IS_FETCHING_VERSION: + return memcached_is_fetching_version(&memc); + } + + abort(); +} + +void memcached_flag(memcached_st& memc, const memcached_flag_t flag, const bool arg) +{ + switch (flag) + { + case MEMCACHED_FLAG_AUTO_EJECT_HOSTS: + memcached_set_auto_eject_hosts(memc, arg); + break; + + case MEMCACHED_FLAG_BINARY_PROTOCOL: + memcached_set_binary(memc, arg); + break; + + case MEMCACHED_FLAG_BUFFER_REQUESTS: + memcached_set_buffering(memc, arg); + break; + + case MEMCACHED_FLAG_HASH_WITH_NAMESPACE: + memcached_set_hash_with_namespace(memc, arg); + break; + + case MEMCACHED_FLAG_NO_BLOCK: + memcached_set_no_block(memc, arg); + break; + + case MEMCACHED_FLAG_REPLY: + memcached_set_replying(memc, arg); + break; + + case MEMCACHED_FLAG_RANDOMIZE_REPLICA_READ: + memcached_set_randomize_replica_read(memc, arg); + break; + + case MEMCACHED_FLAG_SUPPORT_CAS: + memcached_set_cas(memc, arg); + break; + + case MEMCACHED_FLAG_TCP_NODELAY: + memcached_set_tcp_nodelay(memc, arg); + break; + + case MEMCACHED_FLAG_USE_SORT_HOSTS: + memcached_set_use_sort_hosts(memc, arg); + break; + + case MEMCACHED_FLAG_USE_UDP: + memcached_set_udp(memc, arg); + break; + + case MEMCACHED_FLAG_VERIFY_KEY: + memcached_set_verify_key(memc, arg); + break; + + case MEMCACHED_FLAG_TCP_KEEPALIVE: + memcached_set_use_sort_hosts(memc, arg); + break; + + case MEMCACHED_FLAG_IS_AES: + memcached_set_aes(memc, arg); + break; + + case MEMCACHED_FLAG_IS_FETCHING_VERSION: + memcached_set_fetching_version(memc, arg); + break; + } +} diff --git a/libmemcached/flag.hpp b/libmemcached/flag.hpp new file mode 100644 index 0000000..6efe2ef --- /dev/null +++ b/libmemcached/flag.hpp @@ -0,0 +1,59 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +enum memcached_flag_t +{ + MEMCACHED_FLAG_AUTO_EJECT_HOSTS, + MEMCACHED_FLAG_BINARY_PROTOCOL, + MEMCACHED_FLAG_BUFFER_REQUESTS, + MEMCACHED_FLAG_HASH_WITH_NAMESPACE, + MEMCACHED_FLAG_NO_BLOCK, + MEMCACHED_FLAG_REPLY, + MEMCACHED_FLAG_RANDOMIZE_REPLICA_READ, + MEMCACHED_FLAG_SUPPORT_CAS, + MEMCACHED_FLAG_TCP_NODELAY, + MEMCACHED_FLAG_USE_SORT_HOSTS, + MEMCACHED_FLAG_USE_UDP, + MEMCACHED_FLAG_VERIFY_KEY, + MEMCACHED_FLAG_TCP_KEEPALIVE, + MEMCACHED_FLAG_IS_AES, + MEMCACHED_FLAG_IS_FETCHING_VERSION +}; + +bool memcached_flag(const memcached_st&, const memcached_flag_t); +void memcached_flag(memcached_st&, const memcached_flag_t, const bool); diff --git a/libmemcached/flush.cc b/libmemcached/flush.cc new file mode 100644 index 0000000..cbb66bf --- /dev/null +++ b/libmemcached/flush.cc @@ -0,0 +1,173 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +static memcached_return_t memcached_flush_binary(Memcached *ptr, + time_t expiration, + const bool reply) +{ + protocol_binary_request_flush request= {}; + + request.message.header.request.opcode= PROTOCOL_BINARY_CMD_FLUSH; + request.message.header.request.extlen= 4; + request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES; + request.message.header.request.bodylen= htonl(request.message.header.request.extlen); + request.message.body.expiration= htonl((uint32_t) expiration); + + memcached_return_t rc= MEMCACHED_SUCCESS; + + for (uint32_t x= 0; x < memcached_server_count(ptr); x++) + { + memcached_instance_st* instance= memcached_instance_fetch(ptr, x); + initialize_binary_request(instance, request.message.header); + + if (reply) + { + request.message.header.request.opcode= PROTOCOL_BINARY_CMD_FLUSH; + } + else + { + request.message.header.request.opcode= PROTOCOL_BINARY_CMD_FLUSHQ; + } + + libmemcached_io_vector_st vector[]= + { + { NULL, 0 }, + { request.bytes, sizeof(request.bytes) } + }; + + memcached_return_t rrc; + if (memcached_failed(rrc= memcached_vdo(instance, vector, 2, true))) + { + if (instance->error_messages == NULL or instance->root->error_messages == NULL) + { + memcached_set_error(*instance, rrc, MEMCACHED_AT); + } + memcached_io_reset(instance); + rc= MEMCACHED_SOME_ERRORS; + } + } + + for (uint32_t x= 0; x < memcached_server_count(ptr); x++) + { + memcached_instance_st* instance= memcached_instance_fetch(ptr, x); + + if (instance->response_count() > 0) + { + (void)memcached_response(instance, NULL, 0, NULL); + } + } + + return rc; +} + +static memcached_return_t memcached_flush_textual(Memcached *ptr, + time_t expiration, + const bool reply) +{ + char buffer[MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH +1]; + int send_length= 0; + if (expiration) + { + send_length= snprintf(buffer, sizeof(buffer), "%llu", (unsigned long long)expiration); + } + + if (size_t(send_length) >= sizeof(buffer) or send_length < 0) + { + return memcached_set_error(*ptr, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT, + memcached_literal_param("snprintf(MEMCACHED_DEFAULT_COMMAND_SIZE)")); + } + + memcached_return_t rc= MEMCACHED_SUCCESS; + for (uint32_t x= 0; x < memcached_server_count(ptr); x++) + { + memcached_instance_st* instance= memcached_instance_fetch(ptr, x); + + libmemcached_io_vector_st vector[]= + { + { NULL, 0 }, + { memcached_literal_param("flush_all ") }, + { buffer, size_t(send_length) }, + { " noreply", reply ? 0 : memcached_literal_param_size(" noreply") }, + { memcached_literal_param("\r\n") } + }; + + memcached_return_t rrc= memcached_vdo(instance, vector, 5, true); + if (memcached_success(rrc) and reply == true) + { + char response_buffer[MEMCACHED_DEFAULT_COMMAND_SIZE]; + rrc= memcached_response(instance, response_buffer, sizeof(response_buffer), NULL); + } + + if (memcached_failed(rrc)) + { + // If an error has already been reported, then don't add to it + if (instance->error_messages == NULL or instance->root->error_messages == NULL) + { + memcached_set_error(*instance, rrc, MEMCACHED_AT); + } + rc= MEMCACHED_SOME_ERRORS; + } + } + + return rc; +} + +memcached_return_t memcached_flush(memcached_st *shell, time_t expiration) +{ + Memcached* ptr= memcached2Memcached(shell); + memcached_return_t rc; + if (memcached_failed(rc= initialize_query(ptr, true))) + { + return rc; + } + + bool reply= memcached_is_replying(ptr); + + LIBMEMCACHED_MEMCACHED_FLUSH_START(); + if (memcached_is_binary(ptr)) + { + rc= memcached_flush_binary(ptr, expiration, reply); + } + else + { + rc= memcached_flush_textual(ptr, expiration, reply); + } + LIBMEMCACHED_MEMCACHED_FLUSH_END(); + + return rc; +} diff --git a/libmemcached/flush_buffers.cc b/libmemcached/flush_buffers.cc new file mode 100644 index 0000000..24f7c0d --- /dev/null +++ b/libmemcached/flush_buffers.cc @@ -0,0 +1,71 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +memcached_return_t memcached_flush_buffers(memcached_st *shell) +{ + Memcached* memc= memcached2Memcached(shell); + if (memc) + { + memcached_return_t ret= MEMCACHED_SUCCESS; + + for (uint32_t x= 0; x < memcached_server_count(memc); ++x) + { + memcached_instance_st* instance= memcached_instance_fetch(memc, x); + + if (instance->write_buffer_offset != 0) + { + if (instance->fd == INVALID_SOCKET and + (ret= memcached_connect(instance)) != MEMCACHED_SUCCESS) + { + WATCHPOINT_ERROR(ret); + return ret; + } + + if (memcached_io_write(instance) == false) + { + ret= MEMCACHED_SOME_ERRORS; + } + } + } + + return ret; + } + + return MEMCACHED_INVALID_ARGUMENTS; +} diff --git a/libmemcached/get.cc b/libmemcached/get.cc new file mode 100644 index 0000000..86d8cf2 --- /dev/null +++ b/libmemcached/get.cc @@ -0,0 +1,738 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011-2013 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +/* + What happens if no servers exist? +*/ +char *memcached_get(memcached_st *ptr, const char *key, + size_t key_length, + size_t *value_length, + uint32_t *flags, + memcached_return_t *error) +{ + return memcached_get_by_key(ptr, NULL, 0, key, key_length, value_length, + flags, error); +} + +static memcached_return_t __mget_by_key_real(memcached_st *ptr, + const char *group_key, + size_t group_key_length, + const char * const *keys, + const size_t *key_length, + size_t number_of_keys, + const bool mget_mode); +char *memcached_get_by_key(memcached_st *shell, + const char *group_key, + size_t group_key_length, + const char *key, size_t key_length, + size_t *value_length, + uint32_t *flags, + memcached_return_t *error) +{ + Memcached* ptr= memcached2Memcached(shell); + memcached_return_t unused; + if (error == NULL) + { + error= &unused; + } + + uint64_t query_id= 0; + if (ptr) + { + query_id= ptr->query_id; + } + + /* Request the key */ + *error= __mget_by_key_real(ptr, group_key, group_key_length, + (const char * const *)&key, &key_length, + 1, false); + if (ptr) + { + assert_msg(ptr->query_id == query_id +1, "Programmer error, the query_id was not incremented."); + } + + if (memcached_failed(*error)) + { + if (ptr) + { + if (memcached_has_current_error(*ptr)) // Find the most accurate error + { + *error= memcached_last_error(ptr); + } + } + + if (value_length) + { + *value_length= 0; + } + + return NULL; + } + + char *value= memcached_fetch(ptr, NULL, NULL, + value_length, flags, error); + assert_msg(ptr->query_id == query_id +1, "Programmer error, the query_id was not incremented."); + + /* This is for historical reasons */ + if (*error == MEMCACHED_END) + { + *error= MEMCACHED_NOTFOUND; + } + if (value == NULL) + { + if (ptr->get_key_failure and *error == MEMCACHED_NOTFOUND) + { + memcached_result_st key_failure_result; + memcached_result_st* result_ptr= memcached_result_create(ptr, &key_failure_result); + memcached_return_t rc= ptr->get_key_failure(ptr, key, key_length, result_ptr); + + /* On all failure drop to returning NULL */ + if (rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED) + { + if (rc == MEMCACHED_BUFFERED) + { + uint64_t latch; /* We use latch to track the state of the original socket */ + latch= memcached_behavior_get(ptr, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS); + if (latch == 0) + { + memcached_behavior_set(ptr, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, 1); + } + + rc= memcached_set(ptr, key, key_length, + (memcached_result_value(result_ptr)), + (memcached_result_length(result_ptr)), + 0, + (memcached_result_flags(result_ptr))); + + if (rc == MEMCACHED_BUFFERED and latch == 0) + { + memcached_behavior_set(ptr, MEMCACHED_BEHAVIOR_BUFFER_REQUESTS, 0); + } + } + else + { + rc= memcached_set(ptr, key, key_length, + (memcached_result_value(result_ptr)), + (memcached_result_length(result_ptr)), + 0, + (memcached_result_flags(result_ptr))); + } + + if (rc == MEMCACHED_SUCCESS or rc == MEMCACHED_BUFFERED) + { + *error= rc; + *value_length= memcached_result_length(result_ptr); + *flags= memcached_result_flags(result_ptr); + char *result_value= memcached_string_take_value(&result_ptr->value); + memcached_result_free(result_ptr); + + return result_value; + } + } + + memcached_result_free(result_ptr); + } + assert_msg(ptr->query_id == query_id +1, "Programmer error, the query_id was not incremented."); + + return NULL; + } + + return value; +} + +memcached_return_t memcached_mget(memcached_st *ptr, + const char * const *keys, + const size_t *key_length, + size_t number_of_keys) +{ + return memcached_mget_by_key(ptr, NULL, 0, keys, key_length, number_of_keys); +} + +static memcached_return_t binary_mget_by_key(memcached_st *ptr, + const uint32_t master_server_key, + const bool is_group_key_set, + const char * const *keys, + const size_t *key_length, + const size_t number_of_keys, + const bool mget_mode); + +static memcached_return_t __mget_by_key_real(memcached_st *ptr, + const char *group_key, + const size_t group_key_length, + const char * const *keys, + const size_t *key_length, + size_t number_of_keys, + const bool mget_mode) +{ + bool failures_occured_in_sending= false; + const char *get_command= "get"; + uint8_t get_command_length= 3; + unsigned int master_server_key= (unsigned int)-1; /* 0 is a valid server id! */ + + memcached_return_t rc; + if (memcached_failed(rc= initialize_query(ptr, true))) + { + return rc; + } + + if (memcached_is_udp(ptr)) + { + return memcached_set_error(*ptr, MEMCACHED_NOT_SUPPORTED, MEMCACHED_AT); + } + + LIBMEMCACHED_MEMCACHED_MGET_START(); + + if (number_of_keys == 0) + { + return memcached_set_error(*ptr, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, memcached_literal_param("Numbers of keys provided was zero")); + } + + if (memcached_failed((rc= memcached_key_test(*ptr, keys, key_length, number_of_keys)))) + { + assert(memcached_last_error(ptr) == rc); + + return rc; + } + + bool is_group_key_set= false; + if (group_key and group_key_length) + { + master_server_key= memcached_generate_hash_with_redistribution(ptr, group_key, group_key_length); + is_group_key_set= true; + } + + /* + Here is where we pay for the non-block API. We need to remove any data sitting + in the queue before we start our get. + + It might be optimum to bounce the connection if count > some number. + */ + for (uint32_t x= 0; x < memcached_server_count(ptr); x++) + { + memcached_instance_st* instance= memcached_instance_fetch(ptr, x); + + if (instance->response_count()) + { + char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE]; + + if (ptr->flags.no_block) + { + memcached_io_write(instance); + } + + while(instance->response_count()) + { + (void)memcached_response(instance, buffer, MEMCACHED_DEFAULT_COMMAND_SIZE, &ptr->result); + } + } + } + + if (memcached_is_binary(ptr)) + { + return binary_mget_by_key(ptr, master_server_key, is_group_key_set, keys, + key_length, number_of_keys, mget_mode); + } + + if (ptr->flags.support_cas) + { + get_command= "gets"; + get_command_length= 4; + } + + /* + If a server fails we warn about errors and start all over with sending keys + to the server. + */ + WATCHPOINT_ASSERT(rc == MEMCACHED_SUCCESS); + size_t hosts_connected= 0; + for (uint32_t x= 0; x < number_of_keys; x++) + { + uint32_t server_key; + + if (is_group_key_set) + { + server_key= master_server_key; + } + else + { + server_key= memcached_generate_hash_with_redistribution(ptr, keys[x], key_length[x]); + } + + memcached_instance_st* instance= memcached_instance_fetch(ptr, server_key); + + libmemcached_io_vector_st vector[]= + { + { get_command, get_command_length }, + { memcached_literal_param(" ") }, + { memcached_array_string(ptr->_namespace), memcached_array_size(ptr->_namespace) }, + { keys[x], key_length[x] } + }; + + + if (instance->response_count() == 0) + { + rc= memcached_connect(instance); + + if (memcached_failed(rc)) + { + memcached_set_error(*instance, rc, MEMCACHED_AT); + continue; + } + hosts_connected++; + + if ((memcached_io_writev(instance, vector, 1, false)) == false) + { + failures_occured_in_sending= true; + continue; + } + WATCHPOINT_ASSERT(instance->cursor_active_ == 0); + memcached_instance_response_increment(instance); + WATCHPOINT_ASSERT(instance->cursor_active_ == 1); + } + + { + if ((memcached_io_writev(instance, (vector + 1), 3, false)) == false) + { + memcached_instance_response_reset(instance); + failures_occured_in_sending= true; + continue; + } + } + } + + if (hosts_connected == 0) + { + LIBMEMCACHED_MEMCACHED_MGET_END(); + + if (memcached_failed(rc)) + { + return rc; + } + + return memcached_set_error(*ptr, MEMCACHED_NO_SERVERS, MEMCACHED_AT); + } + + + /* + Should we muddle on if some servers are dead? + */ + bool success_happened= false; + for (uint32_t x= 0; x < memcached_server_count(ptr); x++) + { + memcached_instance_st* instance= memcached_instance_fetch(ptr, x); + + if (instance->response_count()) + { + /* We need to do something about non-connnected hosts in the future */ + if ((memcached_io_write(instance, "\r\n", 2, true)) == -1) + { + failures_occured_in_sending= true; + } + else + { + success_happened= true; + } + } + } + + LIBMEMCACHED_MEMCACHED_MGET_END(); + + if (failures_occured_in_sending and success_happened) + { + return MEMCACHED_SOME_ERRORS; + } + + if (success_happened) + { + return MEMCACHED_SUCCESS; + } + + return MEMCACHED_FAILURE; // Complete failure occurred +} + +memcached_return_t memcached_mget_by_key(memcached_st *shell, + const char *group_key, + size_t group_key_length, + const char * const *keys, + const size_t *key_length, + size_t number_of_keys) +{ + Memcached* ptr= memcached2Memcached(shell); + return __mget_by_key_real(ptr, group_key, group_key_length, keys, key_length, number_of_keys, true); +} + +memcached_return_t memcached_mget_execute(memcached_st *ptr, + const char * const *keys, + const size_t *key_length, + size_t number_of_keys, + memcached_execute_fn *callback, + void *context, + unsigned int number_of_callbacks) +{ + return memcached_mget_execute_by_key(ptr, NULL, 0, keys, key_length, + number_of_keys, callback, + context, number_of_callbacks); +} + +memcached_return_t memcached_mget_execute_by_key(memcached_st *shell, + const char *group_key, + size_t group_key_length, + const char * const *keys, + const size_t *key_length, + size_t number_of_keys, + memcached_execute_fn *callback, + void *context, + unsigned int number_of_callbacks) +{ + Memcached* ptr= memcached2Memcached(shell); + memcached_return_t rc; + if (memcached_failed(rc= initialize_query(ptr, false))) + { + return rc; + } + + if (memcached_is_udp(ptr)) + { + return memcached_set_error(*ptr, MEMCACHED_NOT_SUPPORTED, MEMCACHED_AT); + } + + if (memcached_is_binary(ptr) == false) + { + return memcached_set_error(*ptr, MEMCACHED_NOT_SUPPORTED, MEMCACHED_AT, + memcached_literal_param("ASCII protocol is not supported for memcached_mget_execute_by_key()")); + } + + memcached_callback_st *original_callbacks= ptr->callbacks; + memcached_callback_st cb= { + callback, + context, + number_of_callbacks + }; + + ptr->callbacks= &cb; + rc= memcached_mget_by_key(ptr, group_key, group_key_length, keys, + key_length, number_of_keys); + ptr->callbacks= original_callbacks; + + return rc; +} + +static memcached_return_t simple_binary_mget(memcached_st *ptr, + const uint32_t master_server_key, + bool is_group_key_set, + const char * const *keys, + const size_t *key_length, + const size_t number_of_keys, const bool mget_mode) +{ + memcached_return_t rc= MEMCACHED_NOTFOUND; + + bool flush= (number_of_keys == 1); + + if (memcached_failed(rc= memcached_key_test(*ptr, keys, key_length, number_of_keys))) + { + return rc; + } + + /* + If a server fails we warn about errors and start all over with sending keys + to the server. + */ + for (uint32_t x= 0; x < number_of_keys; ++x) + { + uint32_t server_key; + + if (is_group_key_set) + { + server_key= master_server_key; + } + else + { + server_key= memcached_generate_hash_with_redistribution(ptr, keys[x], key_length[x]); + } + + memcached_instance_st* instance= memcached_instance_fetch(ptr, server_key); + + if (instance->response_count() == 0) + { + rc= memcached_connect(instance); + if (memcached_failed(rc)) + { + continue; + } + } + + protocol_binary_request_getk request= { }; //= {.bytes= {0}}; + initialize_binary_request(instance, request.message.header); + if (mget_mode) + { + request.message.header.request.opcode= PROTOCOL_BINARY_CMD_GETKQ; + } + else + { + request.message.header.request.opcode= PROTOCOL_BINARY_CMD_GETK; + } + +#if 0 + { + memcached_return_t vk= memcached_validate_key_length(key_length[x], ptr->flags.binary_protocol); + if (memcached_failed(rc= memcached_key_test(*memc, (const char **)&key, &key_length, 1))) + { + memcached_set_error(ptr, vk, MEMCACHED_AT, memcached_literal_param("Key was too long.")); + + if (x > 0) + { + memcached_io_reset(instance); + } + + return vk; + } + } +#endif + + request.message.header.request.keylen= htons((uint16_t)(key_length[x] + memcached_array_size(ptr->_namespace))); + request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES; + request.message.header.request.bodylen= htonl((uint32_t)( key_length[x] + memcached_array_size(ptr->_namespace))); + + libmemcached_io_vector_st vector[]= + { + { request.bytes, sizeof(request.bytes) }, + { memcached_array_string(ptr->_namespace), memcached_array_size(ptr->_namespace) }, + { keys[x], key_length[x] } + }; + + if (memcached_io_writev(instance, vector, 3, flush) == false) + { + memcached_server_response_reset(instance); + rc= MEMCACHED_SOME_ERRORS; + continue; + } + + /* We just want one pending response per server */ + memcached_server_response_reset(instance); + memcached_server_response_increment(instance); + if ((x > 0 and x == ptr->io_key_prefetch) and memcached_flush_buffers(ptr) != MEMCACHED_SUCCESS) + { + rc= MEMCACHED_SOME_ERRORS; + } + } + + if (mget_mode) + { + /* + Send a noop command to flush the buffers + */ + protocol_binary_request_noop request= {}; //= {.bytes= {0}}; + request.message.header.request.opcode= PROTOCOL_BINARY_CMD_NOOP; + request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES; + + for (uint32_t x= 0; x < memcached_server_count(ptr); ++x) + { + memcached_instance_st* instance= memcached_instance_fetch(ptr, x); + + if (instance->response_count()) + { + initialize_binary_request(instance, request.message.header); + if ((memcached_io_write(instance) == false) or + (memcached_io_write(instance, request.bytes, sizeof(request.bytes), true) == -1)) + { + memcached_instance_response_reset(instance); + memcached_io_reset(instance); + rc= MEMCACHED_SOME_ERRORS; + } + } + } + } + + return rc; +} + +static memcached_return_t replication_binary_mget(memcached_st *ptr, + uint32_t* hash, + bool* dead_servers, + const char *const *keys, + const size_t *key_length, + const size_t number_of_keys) +{ + memcached_return_t rc= MEMCACHED_NOTFOUND; + uint32_t start= 0; + uint64_t randomize_read= memcached_behavior_get(ptr, MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ); + + if (randomize_read) + { + start= (uint32_t)random() % (uint32_t)(ptr->number_of_replicas + 1); + } + + /* Loop for each replica */ + for (uint32_t replica= 0; replica <= ptr->number_of_replicas; ++replica) + { + bool success= true; + + for (uint32_t x= 0; x < number_of_keys; ++x) + { + if (hash[x] == memcached_server_count(ptr)) + { + continue; /* Already successfully sent */ + } + + uint32_t server= hash[x] +replica; + + /* In case of randomized reads */ + if (randomize_read and ((server + start) <= (hash[x] + ptr->number_of_replicas))) + { + server+= start; + } + + while (server >= memcached_server_count(ptr)) + { + server -= memcached_server_count(ptr); + } + + if (dead_servers[server]) + { + continue; + } + + memcached_instance_st* instance= memcached_instance_fetch(ptr, server); + + if (instance->response_count() == 0) + { + rc= memcached_connect(instance); + + if (memcached_failed(rc)) + { + memcached_io_reset(instance); + dead_servers[server]= true; + success= false; + continue; + } + } + + protocol_binary_request_getk request= {}; + initialize_binary_request(instance, request.message.header); + request.message.header.request.opcode= PROTOCOL_BINARY_CMD_GETK; + request.message.header.request.keylen= htons((uint16_t)(key_length[x] + memcached_array_size(ptr->_namespace))); + request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES; + request.message.header.request.bodylen= htonl((uint32_t)(key_length[x] + memcached_array_size(ptr->_namespace))); + + /* + * We need to disable buffering to actually know that the request was + * successfully sent to the server (so that we should expect a result + * back). It would be nice to do this in buffered mode, but then it + * would be complex to handle all error situations if we got to send + * some of the messages, and then we failed on writing out some others + * and we used the callback interface from memcached_mget_execute so + * that we might have processed some of the responses etc. For now, + * just make sure we work _correctly_ + */ + libmemcached_io_vector_st vector[]= + { + { request.bytes, sizeof(request.bytes) }, + { memcached_array_string(ptr->_namespace), memcached_array_size(ptr->_namespace) }, + { keys[x], key_length[x] } + }; + + if (memcached_io_writev(instance, vector, 3, true) == false) + { + memcached_io_reset(instance); + dead_servers[server]= true; + success= false; + continue; + } + + memcached_server_response_increment(instance); + hash[x]= memcached_server_count(ptr); + } + + if (success) + { + break; + } + } + + return rc; +} + +static memcached_return_t binary_mget_by_key(memcached_st *ptr, + const uint32_t master_server_key, + bool is_group_key_set, + const char * const *keys, + const size_t *key_length, + const size_t number_of_keys, + const bool mget_mode) +{ + if (ptr->number_of_replicas == 0) + { + return simple_binary_mget(ptr, master_server_key, is_group_key_set, + keys, key_length, number_of_keys, mget_mode); + } + + uint32_t* hash= libmemcached_xvalloc(ptr, number_of_keys, uint32_t); + bool* dead_servers= libmemcached_xcalloc(ptr, memcached_server_count(ptr), bool); + + if (hash == NULL or dead_servers == NULL) + { + libmemcached_free(ptr, hash); + libmemcached_free(ptr, dead_servers); + return MEMCACHED_MEMORY_ALLOCATION_FAILURE; + } + + if (is_group_key_set) + { + for (size_t x= 0; x < number_of_keys; x++) + { + hash[x]= master_server_key; + } + } + else + { + for (size_t x= 0; x < number_of_keys; x++) + { + hash[x]= memcached_generate_hash_with_redistribution(ptr, keys[x], key_length[x]); + } + } + + memcached_return_t rc= replication_binary_mget(ptr, hash, dead_servers, keys, + key_length, number_of_keys); + + WATCHPOINT_IFERROR(rc); + libmemcached_free(ptr, hash); + libmemcached_free(ptr, dead_servers); + + return MEMCACHED_SUCCESS; +} diff --git a/libmemcached/hash.cc b/libmemcached/hash.cc new file mode 100644 index 0000000..4e02312 --- /dev/null +++ b/libmemcached/hash.cc @@ -0,0 +1,195 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#include + +#include + +#include + +uint32_t memcached_generate_hash_value(const char *key, size_t key_length, memcached_hash_t hash_algorithm) +{ + return libhashkit_digest(key, key_length, (hashkit_hash_algorithm_t)hash_algorithm); +} + +static inline uint32_t generate_hash(const Memcached *ptr, const char *key, size_t key_length) +{ + return hashkit_digest(&ptr->hashkit, key, key_length); +} + +static uint32_t dispatch_host(const Memcached *ptr, uint32_t hash) +{ + switch (ptr->distribution) + { + case MEMCACHED_DISTRIBUTION_CONSISTENT: + case MEMCACHED_DISTRIBUTION_CONSISTENT_WEIGHTED: + case MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA: + case MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY: + { + uint32_t num= ptr->ketama.continuum_points_counter; + WATCHPOINT_ASSERT(ptr->ketama.continuum); + + memcached_continuum_item_st *begin, *end, *left, *right, *middle; + begin= left= ptr->ketama.continuum; + end= right= ptr->ketama.continuum + num; + + while (left < right) + { + middle= left + (right - left) / 2; + if (middle->value < hash) + left= middle + 1; + else + right= middle; + } + if (right == end) + right= begin; + return right->index; + } + case MEMCACHED_DISTRIBUTION_MODULA: + return hash % memcached_server_count(ptr); + case MEMCACHED_DISTRIBUTION_RANDOM: + return (uint32_t) random() % memcached_server_count(ptr); + case MEMCACHED_DISTRIBUTION_VIRTUAL_BUCKET: + { + return memcached_virtual_bucket_get(ptr, hash); + } + default: + case MEMCACHED_DISTRIBUTION_CONSISTENT_MAX: + WATCHPOINT_ASSERT(0); /* We have added a distribution without extending the logic */ + return hash % memcached_server_count(ptr); + } + /* NOTREACHED */ +} + +/* + One version is public and will not modify the distribution hash, the other will. +*/ +static inline uint32_t _generate_hash_wrapper(const Memcached *ptr, const char *key, size_t key_length) +{ + WATCHPOINT_ASSERT(memcached_server_count(ptr)); + + if (memcached_server_count(ptr) == 1) + return 0; + + if (ptr->flags.hash_with_namespace) + { + size_t temp_length= memcached_array_size(ptr->_namespace) + key_length; + char temp[MEMCACHED_MAX_KEY]; + + if (temp_length > MEMCACHED_MAX_KEY -1) + return 0; + + strncpy(temp, memcached_array_string(ptr->_namespace), memcached_array_size(ptr->_namespace)); + strncpy(temp + memcached_array_size(ptr->_namespace), key, key_length); + + return generate_hash(ptr, temp, temp_length); + } + else + { + return generate_hash(ptr, key, key_length); + } +} + +static inline void _regen_for_auto_eject(Memcached *ptr) +{ + if (_is_auto_eject_host(ptr) && ptr->ketama.next_distribution_rebuild) + { + struct timeval now; + + if (gettimeofday(&now, NULL) == 0 and + now.tv_sec > ptr->ketama.next_distribution_rebuild) + { + run_distribution(ptr); + } + } +} + +void memcached_autoeject(memcached_st *ptr) +{ + _regen_for_auto_eject(ptr); +} + +uint32_t memcached_generate_hash_with_redistribution(memcached_st *ptr, const char *key, size_t key_length) +{ + uint32_t hash= _generate_hash_wrapper(ptr, key, key_length); + + _regen_for_auto_eject(ptr); + + return dispatch_host(ptr, hash); +} + +uint32_t memcached_generate_hash(const memcached_st *shell, const char *key, size_t key_length) +{ + const Memcached* ptr= memcached2Memcached(shell); + if (ptr) + { + return dispatch_host(ptr, _generate_hash_wrapper(ptr, key, key_length)); + } + + return UINT32_MAX; +} + +const hashkit_st *memcached_get_hashkit(const memcached_st *shell) +{ + const Memcached* ptr= memcached2Memcached(shell); + if (ptr) + { + return &ptr->hashkit; + } + + return NULL; +} + +memcached_return_t memcached_set_hashkit(memcached_st *shell, hashkit_st *hashk) +{ + Memcached* self= memcached2Memcached(shell); + if (self) + { + hashkit_free(&self->hashkit); + hashkit_clone(&self->hashkit, hashk); + + return MEMCACHED_SUCCESS; + } + + return MEMCACHED_INVALID_ARGUMENTS; +} + +const char * libmemcached_string_hash(memcached_hash_t type) +{ + return libhashkit_string_hash((hashkit_hash_algorithm_t)type); +} diff --git a/libmemcached/hash.hpp b/libmemcached/hash.hpp new file mode 100644 index 0000000..bf450ee --- /dev/null +++ b/libmemcached/hash.hpp @@ -0,0 +1,40 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +uint32_t memcached_generate_hash_with_redistribution(memcached_st *ptr, const char *key, size_t key_length); diff --git a/libmemcached/hosts.cc b/libmemcached/hosts.cc new file mode 100644 index 0000000..75bfbee --- /dev/null +++ b/libmemcached/hosts.cc @@ -0,0 +1,605 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include "libmemcached/assert.hpp" + +#include +#include + +/* Protoypes (static) */ +static memcached_return_t update_continuum(Memcached *ptr); + +static int compare_servers(const void *p1, const void *p2) +{ + const memcached_instance_st * a= (const memcached_instance_st *)p1; + const memcached_instance_st * b= (const memcached_instance_st *)p2; + + int return_value= strcmp(a->_hostname, b->_hostname); + + if (return_value == 0) + { + return_value= int(a->port() - b->port()); + } + + return return_value; +} + +static void sort_hosts(Memcached *ptr) +{ + if (memcached_server_count(ptr)) + { + qsort(memcached_instance_list(ptr), memcached_server_count(ptr), sizeof(memcached_instance_st), compare_servers); + } +} + + +memcached_return_t run_distribution(Memcached *ptr) +{ + if (ptr->flags.use_sort_hosts) + { + sort_hosts(ptr); + } + + switch (ptr->distribution) + { + case MEMCACHED_DISTRIBUTION_CONSISTENT: + case MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA: + case MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY: + case MEMCACHED_DISTRIBUTION_CONSISTENT_WEIGHTED: + return update_continuum(ptr); + + case MEMCACHED_DISTRIBUTION_VIRTUAL_BUCKET: + case MEMCACHED_DISTRIBUTION_MODULA: + break; + + case MEMCACHED_DISTRIBUTION_RANDOM: + srandom((uint32_t) time(NULL)); + break; + + case MEMCACHED_DISTRIBUTION_CONSISTENT_MAX: + default: + assert_msg(0, "Invalid distribution type passed to run_distribution()"); + } + + return MEMCACHED_SUCCESS; +} + +static uint32_t ketama_server_hash(const char *key, size_t key_length, uint32_t alignment) +{ + unsigned char results[16]; + + libhashkit_md5_signature((unsigned char*)key, key_length, results); + + return ((uint32_t) (results[3 + alignment * 4] & 0xFF) << 24) + | ((uint32_t) (results[2 + alignment * 4] & 0xFF) << 16) + | ((uint32_t) (results[1 + alignment * 4] & 0xFF) << 8) + | (results[0 + alignment * 4] & 0xFF); +} + +static int continuum_item_cmp(const void *t1, const void *t2) +{ + memcached_continuum_item_st *ct1= (memcached_continuum_item_st *)t1; + memcached_continuum_item_st *ct2= (memcached_continuum_item_st *)t2; + + /* Why 153? Hmmm... */ + WATCHPOINT_ASSERT(ct1->value != 153); + if (ct1->value == ct2->value) + { + return 0; + } + else if (ct1->value > ct2->value) + { + return 1; + } + else + { + return -1; + } +} + +static memcached_return_t update_continuum(Memcached *ptr) +{ + uint32_t continuum_index= 0; + uint32_t pointer_counter= 0; + uint32_t pointer_per_server= MEMCACHED_POINTS_PER_SERVER; + uint32_t pointer_per_hash= 1; + uint32_t live_servers= 0; + struct timeval now; + + if (gettimeofday(&now, NULL)) + { + return memcached_set_errno(*ptr, errno, MEMCACHED_AT); + } + + memcached_instance_st* list= memcached_instance_list(ptr); + + /* count live servers (those without a retry delay set) */ + bool is_auto_ejecting= _is_auto_eject_host(ptr); + if (is_auto_ejecting) + { + live_servers= 0; + ptr->ketama.next_distribution_rebuild= 0; + for (uint32_t host_index= 0; host_index < memcached_server_count(ptr); ++host_index) + { + if (list[host_index].next_retry <= now.tv_sec) + { + live_servers++; + } + else + { + if (ptr->ketama.next_distribution_rebuild == 0 or list[host_index].next_retry < ptr->ketama.next_distribution_rebuild) + { + ptr->ketama.next_distribution_rebuild= list[host_index].next_retry; + } + } + } + } + else + { + live_servers= memcached_server_count(ptr); + } + + uint32_t points_per_server= (uint32_t) (memcached_is_weighted_ketama(ptr) ? MEMCACHED_POINTS_PER_SERVER_KETAMA : MEMCACHED_POINTS_PER_SERVER); + + if (live_servers == 0) + { + return MEMCACHED_SUCCESS; + } + + if (live_servers > ptr->ketama.continuum_count) + { + memcached_continuum_item_st *new_ptr; + + new_ptr= libmemcached_xrealloc(ptr, ptr->ketama.continuum, (live_servers + MEMCACHED_CONTINUUM_ADDITION) * points_per_server, memcached_continuum_item_st); + + if (new_ptr == 0) + { + return MEMCACHED_MEMORY_ALLOCATION_FAILURE; + } + + ptr->ketama.continuum= new_ptr; + ptr->ketama.continuum_count= live_servers + MEMCACHED_CONTINUUM_ADDITION; + } + assert_msg(ptr->ketama.continuum, "Programmer Error, empty ketama continuum"); + + uint64_t total_weight= 0; + if (memcached_is_weighted_ketama(ptr)) + { + for (uint32_t host_index = 0; host_index < memcached_server_count(ptr); ++host_index) + { + if (is_auto_ejecting == false or list[host_index].next_retry <= now.tv_sec) + { + total_weight += list[host_index].weight; + } + } + } + + for (uint32_t host_index= 0; host_index < memcached_server_count(ptr); ++host_index) + { + if (is_auto_ejecting and list[host_index].next_retry > now.tv_sec) + { + continue; + } + + if (memcached_is_weighted_ketama(ptr)) + { + float pct= (float)list[host_index].weight / (float)total_weight; + pointer_per_server= (uint32_t) ((::floor((float) (pct * MEMCACHED_POINTS_PER_SERVER_KETAMA / 4 * (float)live_servers + 0.0000000001))) * 4); + pointer_per_hash= 4; + if (DEBUG) + { + printf("ketama_weighted:%s|%d|%llu|%u\n", + list[host_index]._hostname, + list[host_index].port(), + (unsigned long long)list[host_index].weight, + pointer_per_server); + } + } + + + if (ptr->distribution == MEMCACHED_DISTRIBUTION_CONSISTENT_KETAMA_SPY) + { + for (uint32_t pointer_index= 0; + pointer_index < pointer_per_server / pointer_per_hash; + pointer_index++) + { + char sort_host[1 +MEMCACHED_NI_MAXHOST +1 +MEMCACHED_NI_MAXSERV +1 + MEMCACHED_NI_MAXSERV ]= ""; + int sort_host_length; + + // Spymemcached ketema key format is: hostname/ip:port-index + // If hostname is not available then: /ip:port-index + sort_host_length= snprintf(sort_host, sizeof(sort_host), + "/%s:%u-%u", + list[host_index]._hostname, + (uint32_t)list[host_index].port(), + pointer_index); + + if (size_t(sort_host_length) >= sizeof(sort_host) or sort_host_length < 0) + { + return memcached_set_error(*ptr, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT, + memcached_literal_param("snprintf(sizeof(sort_host))")); + } + + if (DEBUG) + { + fprintf(stdout, "update_continuum: key is %s\n", sort_host); + } + + if (memcached_is_weighted_ketama(ptr)) + { + for (uint32_t x= 0; x < pointer_per_hash; x++) + { + uint32_t value= ketama_server_hash(sort_host, (size_t)sort_host_length, x); + ptr->ketama.continuum[continuum_index].index= host_index; + ptr->ketama.continuum[continuum_index++].value= value; + } + } + else + { + uint32_t value= hashkit_digest(&ptr->hashkit, sort_host, (size_t)sort_host_length); + ptr->ketama.continuum[continuum_index].index= host_index; + ptr->ketama.continuum[continuum_index++].value= value; + } + } + } + else + { + for (uint32_t pointer_index= 1; + pointer_index <= pointer_per_server / pointer_per_hash; + pointer_index++) + { + char sort_host[MEMCACHED_NI_MAXHOST +1 +MEMCACHED_NI_MAXSERV +1 +MEMCACHED_NI_MAXSERV]= ""; + int sort_host_length; + + if (list[host_index].port() == MEMCACHED_DEFAULT_PORT) + { + sort_host_length= snprintf(sort_host, sizeof(sort_host), + "%s-%u", + list[host_index]._hostname, + pointer_index - 1); + } + else + { + sort_host_length= snprintf(sort_host, sizeof(sort_host), + "%s:%u-%u", + list[host_index]._hostname, + (uint32_t)list[host_index].port(), + pointer_index - 1); + } + + if (size_t(sort_host_length) >= sizeof(sort_host) or sort_host_length < 0) + { + return memcached_set_error(*ptr, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT, + memcached_literal_param("snprintf(sizeof(sort_host)))")); + } + + if (memcached_is_weighted_ketama(ptr)) + { + for (uint32_t x = 0; x < pointer_per_hash; x++) + { + uint32_t value= ketama_server_hash(sort_host, (size_t)sort_host_length, x); + ptr->ketama.continuum[continuum_index].index= host_index; + ptr->ketama.continuum[continuum_index++].value= value; + } + } + else + { + uint32_t value= hashkit_digest(&ptr->hashkit, sort_host, (size_t)sort_host_length); + ptr->ketama.continuum[continuum_index].index= host_index; + ptr->ketama.continuum[continuum_index++].value= value; + } + } + } + + pointer_counter+= pointer_per_server; + } + + assert_msg(ptr, "Programmer Error, no valid ptr"); + assert_msg(ptr->ketama.continuum, "Programmer Error, empty ketama continuum"); + assert_msg(memcached_server_count(ptr) * MEMCACHED_POINTS_PER_SERVER <= MEMCACHED_CONTINUUM_SIZE, "invalid size information being given to qsort()"); + ptr->ketama.continuum_points_counter= pointer_counter; + qsort(ptr->ketama.continuum, ptr->ketama.continuum_points_counter, sizeof(memcached_continuum_item_st), continuum_item_cmp); + + if (DEBUG) + { + for (uint32_t pointer_index= 0; memcached_server_count(ptr) && pointer_index < ((live_servers * MEMCACHED_POINTS_PER_SERVER) - 1); pointer_index++) + { + WATCHPOINT_ASSERT(ptr->ketama.continuum[pointer_index].value <= ptr->ketama.continuum[pointer_index + 1].value); + } + } + + return MEMCACHED_SUCCESS; +} + +static memcached_return_t server_add(Memcached *memc, + const memcached_string_t& hostname, + in_port_t port, + uint32_t weight, + memcached_connection_t type) +{ + assert_msg(memc, "Programmer mistake, somehow server_add() was passed a NULL memcached_st"); + + if (memc->number_of_hosts) + { + assert(memcached_instance_list(memc)); + } + + if (memcached_instance_list(memc)) + { + assert(memc->number_of_hosts); + } + + uint32_t host_list_size= memc->number_of_hosts +1; + memcached_instance_st* new_host_list= libmemcached_xrealloc(memc, memcached_instance_list(memc), host_list_size, memcached_instance_st); + + if (new_host_list == NULL) + { + return memcached_set_error(*memc, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT); + } + + memcached_instance_set(memc, new_host_list, host_list_size); + assert(memc->number_of_hosts == host_list_size); + + /* TODO: Check return type */ + memcached_instance_st* instance= memcached_instance_fetch(memc, memcached_server_count(memc) -1); + + if (__instance_create_with(memc, instance, hostname, port, weight, type) == NULL) + { + return memcached_set_error(*memc, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT); + } + + if (weight > 1) + { + if (memcached_is_consistent_distribution(memc)) + { + memcached_set_weighted_ketama(memc, true); + } + } + + return run_distribution(memc); +} + + +memcached_return_t memcached_server_push(memcached_st *shell, const memcached_server_list_st list) +{ + if (list == NULL) + { + return MEMCACHED_SUCCESS; + } + + Memcached* ptr= memcached2Memcached(shell); + if (ptr) + { + uint32_t original_host_size= memcached_server_count(ptr); + uint32_t count= memcached_server_list_count(list); + uint32_t host_list_size= count +original_host_size; + + memcached_instance_st* new_host_list= libmemcached_xrealloc(ptr, memcached_instance_list(ptr), host_list_size, memcached_instance_st); + + if (new_host_list == NULL) + { + return MEMCACHED_MEMORY_ALLOCATION_FAILURE; + } + + memcached_instance_set(ptr, new_host_list, host_list_size); + + ptr->state.is_parsing= true; + for (uint32_t x= 0; x < count; ++x, ++original_host_size) + { + WATCHPOINT_ASSERT(list[x].hostname[0] != 0); + + // We have extended the array, and now we will find it, and use it. + memcached_instance_st* instance= memcached_instance_fetch(ptr, original_host_size); + WATCHPOINT_ASSERT(instance); + + memcached_string_t hostname= { memcached_string_make_from_cstr(list[x].hostname) }; + if (__instance_create_with(ptr, instance, + hostname, + list[x].port, list[x].weight, list[x].type) == NULL) + { + ptr->state.is_parsing= false; + return memcached_set_error(*ptr, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT); + } + + if (list[x].weight > 1) + { + memcached_set_weighted_ketama(ptr, true); + } + } + ptr->state.is_parsing= false; + + return run_distribution(ptr); + } + + return MEMCACHED_INVALID_ARGUMENTS; +} + +memcached_return_t memcached_instance_push(memcached_st *ptr, const struct memcached_instance_st* list, uint32_t number_of_hosts) +{ + if (list == NULL) + { + return MEMCACHED_SUCCESS; + } + + uint32_t original_host_size= memcached_server_count(ptr); + uint32_t host_list_size= number_of_hosts +original_host_size; + memcached_instance_st* new_host_list= libmemcached_xrealloc(ptr, memcached_instance_list(ptr), host_list_size, memcached_instance_st); + + if (new_host_list == NULL) + { + return MEMCACHED_MEMORY_ALLOCATION_FAILURE; + } + + memcached_instance_set(ptr, new_host_list, host_list_size); + + // We don't bother with lookups for this operation + ptr->state.is_parsing= true; + + // We use original_host_size since size will now point to the first new + // instance allocated. + for (uint32_t x= 0; x < number_of_hosts; ++x, ++original_host_size) + { + WATCHPOINT_ASSERT(list[x]._hostname[0] != 0); + + // We have extended the array, and now we will find it, and use it. + memcached_instance_st* instance= memcached_instance_fetch(ptr, original_host_size); + WATCHPOINT_ASSERT(instance); + + memcached_string_t hostname= { memcached_string_make_from_cstr(list[x]._hostname) }; + if (__instance_create_with(ptr, instance, + hostname, + list[x].port(), list[x].weight, list[x].type) == NULL) + { + ptr->state.is_parsing= false; + return memcached_set_error(*ptr, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT); + } + + if (list[x].weight > 1) + { + memcached_set_weighted_ketama(ptr, true); + } + } + ptr->state.is_parsing= false; + + return run_distribution(ptr); +} + +memcached_return_t memcached_server_add_unix_socket(memcached_st *ptr, + const char *filename) +{ + return memcached_server_add_unix_socket_with_weight(ptr, filename, 0); +} + +memcached_return_t memcached_server_add_unix_socket_with_weight(memcached_st *shell, + const char *filename, + uint32_t weight) +{ + Memcached* ptr= memcached2Memcached(shell); + if (ptr) + { + memcached_string_t _filename= { memcached_string_make_from_cstr(filename) }; + if (memcached_is_valid_filename(_filename) == false) + { + return memcached_set_error(*ptr, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, memcached_literal_param("Invalid filename for socket provided")); + } + + return server_add(ptr, _filename, 0, weight, MEMCACHED_CONNECTION_UNIX_SOCKET); + } + + return MEMCACHED_FAILURE; +} + +memcached_return_t memcached_server_add_udp(memcached_st *ptr, + const char *hostname, + in_port_t port) +{ + return memcached_server_add_udp_with_weight(ptr, hostname, port, 0); +} + +memcached_return_t memcached_server_add_udp_with_weight(memcached_st *shell, + const char *, + in_port_t, + uint32_t) +{ + Memcached* self= memcached2Memcached(shell); + if (self) + { + return memcached_set_error(*self, MEMCACHED_DEPRECATED, MEMCACHED_AT); + } + + return MEMCACHED_INVALID_ARGUMENTS; +} + +memcached_return_t memcached_server_add(memcached_st *shell, + const char *hostname, + in_port_t port) +{ + return memcached_server_add_with_weight(shell, hostname, port, 0); +} + +memcached_return_t memcached_server_add_with_weight(memcached_st *shell, + const char *hostname, + in_port_t port, + uint32_t weight) +{ + Memcached* ptr= memcached2Memcached(shell); + if (ptr == NULL) + { + return MEMCACHED_INVALID_ARGUMENTS; + } + + if (port == 0) + { + port= MEMCACHED_DEFAULT_PORT; + } + + size_t hostname_length= hostname ? strlen(hostname) : 0; + if (hostname_length == 0) + { + hostname= "localhost"; + hostname_length= memcached_literal_param_size("localhost"); + } + + memcached_string_t _hostname= { hostname, hostname_length }; + + if (memcached_is_valid_servername(_hostname) == false) + { + return memcached_set_error(*ptr, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, memcached_literal_param("Invalid hostname provided")); + } + + return server_add(ptr, _hostname, port, weight, _hostname.c_str[0] == '/' ? MEMCACHED_CONNECTION_UNIX_SOCKET : MEMCACHED_CONNECTION_TCP); +} + +memcached_return_t memcached_server_add_parsed(memcached_st *ptr, + const char *hostname, + size_t hostname_length, + in_port_t port, + uint32_t weight) +{ + char buffer[MEMCACHED_NI_MAXHOST]= { 0 }; + + memcpy(buffer, hostname, hostname_length); + buffer[hostname_length]= 0; + + memcached_string_t _hostname= { buffer, hostname_length }; + + return server_add(ptr, _hostname, + port, + weight, + MEMCACHED_CONNECTION_TCP); +} diff --git a/libmemcached/include.am b/libmemcached/include.am new file mode 100644 index 0000000..1eccc36 --- /dev/null +++ b/libmemcached/include.am @@ -0,0 +1,155 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +libmemcached_libmemcached_la_SOURCES= + +include libmemcached/csl/include.am + +EXTRA_DIST+= libmemcached/libmemcached_probes.d +EXTRA_DIST+= libmemcached/memcached/README.txt + +nobase_include_HEADERS+= libmemcached/memcached.h +nobase_include_HEADERS+= libmemcached/memcached.hpp +nobase_include_HEADERS+= libmemcached/util.h + +noinst_HEADERS+= libmemcached/array.h +noinst_HEADERS+= libmemcached/assert.hpp +noinst_HEADERS+= libmemcached/backtrace.hpp +noinst_HEADERS+= libmemcached/behavior.hpp +noinst_HEADERS+= libmemcached/byteorder.h +noinst_HEADERS+= libmemcached/common.h +noinst_HEADERS+= libmemcached/connect.hpp +noinst_HEADERS+= libmemcached/continuum.hpp +noinst_HEADERS+= libmemcached/do.hpp +noinst_HEADERS+= libmemcached/encoding_key.h +noinst_HEADERS+= libmemcached/error.hpp +noinst_HEADERS+= libmemcached/flag.hpp +noinst_HEADERS+= libmemcached/initialize_query.h +noinst_HEADERS+= libmemcached/instance.hpp +noinst_HEADERS+= libmemcached/internal.h +noinst_HEADERS+= libmemcached/io.h +noinst_HEADERS+= libmemcached/io.hpp +noinst_HEADERS+= libmemcached/is.h +noinst_HEADERS+= libmemcached/key.hpp +noinst_HEADERS+= libmemcached/libmemcached_probes.h +noinst_HEADERS+= libmemcached/memcached/protocol_binary.h +noinst_HEADERS+= libmemcached/memcached/vbucket.h +noinst_HEADERS+= libmemcached/memory.h +noinst_HEADERS+= libmemcached/namespace.h +noinst_HEADERS+= libmemcached/options.hpp +noinst_HEADERS+= libmemcached/poll.h +noinst_HEADERS+= libmemcached/response.h +noinst_HEADERS+= libmemcached/result.h +noinst_HEADERS+= libmemcached/sasl.hpp +noinst_HEADERS+= libmemcached/server.hpp +noinst_HEADERS+= libmemcached/server_instance.h +noinst_HEADERS+= libmemcached/socket.hpp +noinst_HEADERS+= libmemcached/string.hpp +noinst_HEADERS+= libmemcached/udp.hpp +noinst_HEADERS+= libmemcached/version.hpp +noinst_HEADERS+= libmemcached/virtual_bucket.h +noinst_HEADERS+= libmemcached/watchpoint.h +noinst_HEADERS+= libmemcached/windows.hpp + +lib_LTLIBRARIES+= libmemcached/libmemcached.la +EXTRA_libmemcached_libmemcached_la_DEPENDENCIES= +libmemcached_libmemcached_la_LIBADD= +libmemcached_libmemcached_la_LDFLAGS= +libmemcached_libmemcached_la_CFLAGS= +libmemcached_libmemcached_la_CXXFLAGS= + +libmemcached_libmemcached_la_CFLAGS+= -DBUILDING_LIBMEMCACHED +libmemcached_libmemcached_la_CXXFLAGS+= -DBUILDING_LIBMEMCACHED + +if BUILD_WIN32 +libmemcached_libmemcached_la_CFLAGS+= -DBUILDING_HASHKIT +libmemcached_libmemcached_la_CXXFLAGS+= -DBUILDING_HASHKIT +libmemcached_libmemcached_la_LIBADD+= -lmingw32 +libmemcached_libmemcached_la_LIBADD+= -lws2_32 +endif + +libmemcached_libmemcached_la_SOURCES+= libmemcached/instance.cc +libmemcached_libmemcached_la_SOURCES+= ${libhashkit_libhashkit_la_SOURCES} +libmemcached_libmemcached_la_SOURCES+= libmemcached/allocators.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/allocators.hpp +libmemcached_libmemcached_la_SOURCES+= libmemcached/analyze.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/array.c +libmemcached_libmemcached_la_SOURCES+= libmemcached/auto.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/backtrace.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/behavior.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/byteorder.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/callback.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/connect.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/delete.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/do.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/dump.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/error.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/exist.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/fetch.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/flag.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/flush.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/flush_buffers.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/get.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/hash.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/hash.hpp +libmemcached_libmemcached_la_SOURCES+= libmemcached/hosts.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/initialize_query.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/io.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/key.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/memcached.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/encoding_key.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/namespace.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/options.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/parse.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/poll.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/purge.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/quit.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/quit.hpp +libmemcached_libmemcached_la_SOURCES+= libmemcached/response.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/result.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/sasl.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/server.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/server_list.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/server_list.hpp +libmemcached_libmemcached_la_SOURCES+= libmemcached/stats.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/storage.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/strerror.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/string.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/touch.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/udp.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/verbosity.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/version.cc +libmemcached_libmemcached_la_SOURCES+= libmemcached/virtual_bucket.c + +libmemcached/options.cc: libmemcached/csl/parser.h + +libmemcached_libmemcached_la_LDFLAGS+= -version-info ${MEMCACHED_LIBRARY_VERSION} +libmemcached_libmemcached_la_LIBADD+= @lt_cv_dlopen_libs@ + +if HAVE_SASL +libmemcached_libmemcached_la_CFLAGS+= @PTHREAD_CFLAGS@ +libmemcached_libmemcached_la_CXXFLAGS+= @PTHREAD_CFLAGS@ +libmemcached_libmemcached_la_LIBADD+= @PTHREAD_LIBS@ +libmemcached_libmemcached_la_LIBADD+= @SASL_LIB@ +endif + +if HAVE_DTRACE +BUILT_SOURCES+= libmemcached/dtrace_probes.h +CLEANFILES+= libmemcached/dtrace_probes.h +CLEANFILES+= libmemcached/libmemcached_probes.o + +EXTRA_libmemcached_libmemcached_la_DEPENDENCIES += libmemcached/libmemcached_probes.o +libmemcached_libmemcached_la_LIBADD += libmemcached/libmemcached_probes.o +libmemcached_libmemcached_la_SOURCES += libmemcached/libmemcached_probes.d +endif + +SUFFIXES+= .d + +libmemcached/dtrace_probes.h: libmemcached/libmemcached_probes.d + $(DTRACE) $(DTRACEFLAGS) -h -o ${top_srcdir}/libmemcached/dtrace_probes.h -s ${top_srcdir}/libmemcached/libmemcached_probes.d + +libmemcached/libmemcached_probes.o: libmemcached/libmemcached_probes.d ${libmemcached_libmemcached_la_OBJECTS} + +.d.o: + $(DTRACE) $(DTRACEFLAGS) -o $@ -G -s libmemcached/libmemcached_probes.d diff --git a/libmemcached/initialize_query.cc b/libmemcached/initialize_query.cc new file mode 100644 index 0000000..cef8e57 --- /dev/null +++ b/libmemcached/initialize_query.cc @@ -0,0 +1,80 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +memcached_return_t initialize_query(Memcached *self, bool increment_query_id) +{ + if (self == NULL) + { + return MEMCACHED_INVALID_ARGUMENTS; + } + + if (increment_query_id) + { + self->query_id++; + } + + if (self->state.is_time_for_rebuild) + { + memcached_reset(self); + } + + if (memcached_server_count(self) == 0) + { + return memcached_set_error(*self, MEMCACHED_NO_SERVERS, MEMCACHED_AT); + } + + memcached_error_free(*self); + memcached_result_reset(&self->result); + + return MEMCACHED_SUCCESS; +} + +memcached_return_t initialize_const_query(const Memcached *self) +{ + if (self == NULL) + { + return MEMCACHED_INVALID_ARGUMENTS; + } + + if (memcached_server_count(self) == 0) + { + return MEMCACHED_NO_SERVERS; + } + + return MEMCACHED_SUCCESS; +} diff --git a/libmemcached/initialize_query.h b/libmemcached/initialize_query.h new file mode 100644 index 0000000..105283c --- /dev/null +++ b/libmemcached/initialize_query.h @@ -0,0 +1,41 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +memcached_return_t initialize_query(Memcached *self, bool increment_query_id); + +memcached_return_t initialize_const_query(const Memcached *self); diff --git a/libmemcached/instance.cc b/libmemcached/instance.cc new file mode 100644 index 0000000..53f74f7 --- /dev/null +++ b/libmemcached/instance.cc @@ -0,0 +1,362 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +static inline void _server_init(memcached_instance_st* self, Memcached *root, + const memcached_string_t& hostname, + in_port_t port, + uint32_t weight, memcached_connection_t type) +{ + self->options.is_shutting_down= false; + self->options.is_dead= false; + self->options.ready= false; + self->_events= 0; + self->_revents= 0; + self->cursor_active_= 0; + self->port_= port; + self->fd= INVALID_SOCKET; + self->io_bytes_sent= 0; + self->request_id= 0; + self->server_failure_counter= 0; + self->server_failure_counter_query_id= 0; + self->server_timeout_counter= 0; + self->server_timeout_counter_query_id= 0; + self->weight= weight ? weight : 1; // 1 is the default weight value + self->io_wait_count.read= 0; + self->io_wait_count.write= 0; + self->io_wait_count.timeouts= 0; + self->io_wait_count._bytes_read= 0; + self->major_version= UINT8_MAX; + self->micro_version= UINT8_MAX; + self->minor_version= UINT8_MAX; + self->type= type; + self->error_messages= NULL; + self->read_ptr= self->read_buffer; + self->read_buffer_length= 0; + self->read_data_length= 0; + self->write_buffer_offset= 0; + self->address_info= NULL; + self->address_info_next= NULL; + + self->state= MEMCACHED_SERVER_STATE_NEW; + self->next_retry= 0; + + self->root= root; + if (root) + { + self->version= ++root->server_info.version; + } + else + { + self->version= UINT_MAX; + } + self->limit_maxbytes= 0; + self->hostname(hostname); +} + +static memcached_instance_st* _server_create(memcached_instance_st* self, const memcached_st *memc) +{ + if (self == NULL) + { + self= libmemcached_xmalloc(memc, memcached_instance_st); + + if (self == NULL) + { + return NULL; /* MEMCACHED_MEMORY_ALLOCATION_FAILURE */ + } + + self->options.is_allocated= true; + } + else + { + self->options.is_allocated= false; + } + + self->options.is_initialized= true; + + return self; +} + +void memcached_instance_st::events(short arg) +{ + if ((_events | arg) == _events) + { + return; + } + + _events|= arg; +} + +void memcached_instance_st::revents(short arg) +{ + if (arg) + { + options.ready= true; + } + + _revents= arg; + _events&= short(~arg); +} + +memcached_instance_st* __instance_create_with(memcached_st *memc, + memcached_instance_st* self, + const memcached_string_t& hostname, + const in_port_t port, + uint32_t weight, + const memcached_connection_t type) +{ + if (memcached_is_valid_servername(hostname) == false) + { + memcached_set_error(*memc, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, memcached_literal_param("Invalid hostname provided")); + return NULL; + } + + self= _server_create(self, memc); + + if (self == NULL) + { + return NULL; + } + + _server_init(self, const_cast(memc), hostname, port, weight, type); + + if (memc and memcached_is_udp(memc)) + { + self->write_buffer_offset= UDP_DATAGRAM_HEADER_LENGTH; + memcached_io_init_udp_header(self, 0); + } + + return self; +} + +void __instance_free(memcached_instance_st* self) +{ + memcached_quit_server(self, false); + + self->clear_addrinfo(); + assert(self->address_info_next == NULL); + + memcached_error_free(*self); + + if (memcached_is_allocated(self)) + { + libmemcached_free(self->root, self); + } + else + { + self->options.is_initialized= false; + } +} + +void memcached_instance_free(memcached_instance_st* self) +{ + if (self) + { + __instance_free(self); + } +} + +memcached_return_t memcached_server_cursor(const memcached_st* shell, + const memcached_server_fn *callback, + void *context, + uint32_t number_of_callbacks) +{ + const Memcached* memc= memcached2Memcached(shell); + memcached_return_t rc; + if (memcached_failed(rc= initialize_const_query(memc))) + { + return rc; + } + + size_t errors= 0; + for (uint32_t x= 0; x < memcached_instance_list_count(memc); x++) + { + memcached_instance_st* instance= memcached_instance_by_position(memc, x); + + for (uint32_t y= 0; y < number_of_callbacks; y++) + { + memcached_return_t ret= (*callback[y])(memc, instance, context); + + if (memcached_failed(ret)) + { + errors++; + continue; + } + } + } + + return errors ? MEMCACHED_SOME_ERRORS : MEMCACHED_SUCCESS; +} + +memcached_return_t memcached_server_execute(memcached_st *memc, + memcached_server_execute_fn callback, + void *context) +{ + if (callback == NULL) + { + return MEMCACHED_INVALID_ARGUMENTS; + } + + bool some_errors= false;; + for (uint32_t x= 0; x < memcached_instance_list_count(memc); x++) + { + memcached_instance_st* instance= memcached_instance_fetch(memc, x); + + memcached_return_t rc= (*callback)(memc, instance, context); + if (rc == MEMCACHED_INVALID_ARGUMENTS) + { + return rc; + } + else if (memcached_fatal(rc)) + { + some_errors= true; + } + } + + (void)some_errors; + return MEMCACHED_SUCCESS; +} + +const memcached_instance_st * memcached_server_by_key(memcached_st *shell, + const char *key, + size_t key_length, + memcached_return_t *error) +{ + Memcached* memc= memcached2Memcached(shell); + memcached_return_t unused; + if (error == NULL) + { + error= &unused; + } + + + memcached_return_t rc; + if (memcached_failed(rc= initialize_const_query(memc))) + { + *error= rc; + return NULL; + } + + if (memcached_failed((memcached_key_test(*memc, (const char **)&key, &key_length, 1)))) + { + *error= memcached_last_error(memc); + return NULL; + } + + uint32_t server_key= memcached_generate_hash(memc, key, key_length); + return memcached_instance_by_position(memc, server_key); +} + +/* + If we do not have a valid object to clone from, we toss an error. +*/ +static memcached_instance_st* memcached_instance_clone(memcached_instance_st* source) +{ + /* We just do a normal create if source is missing */ + if (source == NULL) + { + return NULL; + } + + memcached_string_t hostname_= { memcached_string_make_from_cstr(source->hostname()) }; + return __instance_create_with(source->root, + NULL, + hostname_, + source->port(), source->weight, + source->type); +} + +void set_last_disconnected_host(memcached_instance_st* self) +{ + assert(self->root); + if (self->root) + { + if (memcached_server_get_last_disconnect(self->root) and + memcached_server_get_last_disconnect(self->root)->version == self->version) + { + return; + } + + // const_cast + memcached_st *root= (memcached_st *)self->root; + + memcached_instance_free((memcached_instance_st*)(root->last_disconnected_server)); + + // We set is_parsing so that no lookup happens + root->state.is_parsing= true; + root->last_disconnected_server= memcached_instance_clone(self); + root->state.is_parsing= false; + + ((memcached_instance_st*)memcached_server_get_last_disconnect(root))->version= self->version; + } +} + +const memcached_instance_st * memcached_server_get_last_disconnect(const memcached_st *shell) +{ + const Memcached* self= memcached2Memcached(shell); + if (self) + { + return (const memcached_instance_st *)self->last_disconnected_server; + } + + return 0; +} + +void memcached_instance_next_retry(const memcached_instance_st * self, const time_t absolute_time) +{ + WATCHPOINT_ASSERT(self); + if (self) + { + ((memcached_instance_st*)self)->next_retry= absolute_time; + } +} + +bool memcached_instance_st::valid() const +{ + if (fd == INVALID_SOCKET) + { + return false; + } + + return true; +} + +bool memcached_instance_st::is_shutting_down() const +{ + return options.is_shutting_down; +} diff --git a/libmemcached/instance.hpp b/libmemcached/instance.hpp new file mode 100644 index 0000000..73d74a6 --- /dev/null +++ b/libmemcached/instance.hpp @@ -0,0 +1,200 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2012-2013 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#pragma once + +#ifndef WIN32 +# ifdef HAVE_NETDB_H +# include +# endif +#endif + +#ifdef NI_MAXHOST +# define MEMCACHED_NI_MAXHOST NI_MAXHOST +#else +# define MEMCACHED_NI_MAXHOST 1025 +#endif + +#ifdef NI_MAXSERV +# define MEMCACHED_NI_MAXSERV NI_MAXSERV +#else +# define MEMCACHED_NI_MAXSERV 32 +#endif + +#include "libmemcached/string.hpp" + +// @todo Complete class transformation +struct memcached_instance_st { + in_port_t port() const + { + return port_; + } + + void port(in_port_t arg) + { + port_= arg; + } + + void mark_server_as_clean() + { + server_failure_counter= 0; + server_timeout_counter= 0; + next_retry= 0; + } + + void disable() + { + } + + void enable() + { + } + + bool valid() const; + + bool is_shutting_down() const; + + void start_close_socket(); + void close_socket(); + void reset_socket(); + + uint32_t response_count() const + { + return cursor_active_; + } + + struct { + bool is_allocated; + bool is_initialized; + bool is_shutting_down; + bool is_dead; + bool ready; + } options; + + short _events; + short _revents; + + short events(void) + { + return _events; + } + + short revents(void) + { + return _revents; + } + + const char* hostname() + { + return _hostname; + } + + void hostname(const memcached_string_t& hostname_) + { + if (hostname_.size) + { + memcpy(_hostname, hostname_.c_str, hostname_.size); + _hostname[hostname_.size]= 0; + } + else + { + memcpy(_hostname, memcached_literal_param("localhost")); + _hostname[memcached_literal_param_size("localhost")]= 0; + } + } + + void events(short); + void revents(short); + + uint32_t cursor_active_; + in_port_t port_; + memcached_socket_t fd; + uint32_t io_bytes_sent; /* # bytes sent since last read */ + uint32_t request_id; + uint32_t server_failure_counter; + uint64_t server_failure_counter_query_id; + uint32_t server_timeout_counter; + uint32_t server_timeout_counter_query_id; + uint32_t weight; + uint32_t version; + enum memcached_server_state_t state; + struct { + uint32_t read; + uint32_t write; + uint32_t timeouts; + size_t _bytes_read; + } io_wait_count; + uint8_t major_version; // Default definition of UINT8_MAX means that it has not been set. + uint8_t micro_version; // ditto, and note that this is the third, not second version bit + uint8_t minor_version; // ditto + memcached_connection_t type; + char *read_ptr; + size_t read_buffer_length; + size_t read_data_length; + size_t write_buffer_offset; + struct addrinfo *address_info; + struct addrinfo *address_info_next; + time_t next_retry; + struct memcached_st *root; + uint64_t limit_maxbytes; + struct memcached_error_t *error_messages; + char read_buffer[MEMCACHED_MAX_BUFFER]; + char write_buffer[MEMCACHED_MAX_BUFFER]; + char _hostname[MEMCACHED_NI_MAXHOST]; + + void clear_addrinfo() + { + if (address_info) + { + freeaddrinfo(address_info); + address_info= NULL; + address_info_next= NULL; + } + } +}; + +memcached_instance_st* __instance_create_with(memcached_st *memc, + memcached_instance_st* self, + const memcached_string_t& _hostname, + const in_port_t port, + uint32_t weight, + const memcached_connection_t type); + +memcached_return_t memcached_instance_push(memcached_st *ptr, const memcached_instance_st*, uint32_t); + +void __instance_free(memcached_instance_st *); diff --git a/libmemcached/internal.h b/libmemcached/internal.h new file mode 100644 index 0000000..67ae67d --- /dev/null +++ b/libmemcached/internal.h @@ -0,0 +1,46 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached/io.cc b/libmemcached/io.cc new file mode 100644 index 0000000..e9d3ad3 --- /dev/null +++ b/libmemcached/io.cc @@ -0,0 +1,931 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * LibMemcached + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#include + +#ifdef HAVE_SYS_SOCKET_H +# include +#endif + +void initialize_binary_request(memcached_instance_st* server, protocol_binary_request_header& header) +{ + server->request_id++; + header.request.magic= PROTOCOL_BINARY_REQ; + header.request.opaque= htons(server->request_id); +} + +enum memc_read_or_write { + MEM_READ, + MEM_WRITE +}; + +/** + * Try to fill the input buffer for a server with as much + * data as possible. + * + * @param instance the server to pack + */ +static bool repack_input_buffer(memcached_instance_st* instance) +{ + if (instance->read_ptr != instance->read_buffer) + { + /* Move all of the data to the beginning of the buffer so + ** that we can fit more data into the buffer... + */ + memmove(instance->read_buffer, instance->read_ptr, instance->read_buffer_length); + instance->read_ptr= instance->read_buffer; + instance->read_data_length= instance->read_buffer_length; + } + + /* There is room in the buffer, try to fill it! */ + if (instance->read_buffer_length != MEMCACHED_MAX_BUFFER) + { + do { + /* Just try a single read to grab what's available */ + ssize_t nr; + if ((nr= ::recv(instance->fd, + instance->read_ptr + instance->read_data_length, + MEMCACHED_MAX_BUFFER - instance->read_data_length, + MSG_NOSIGNAL)) <= 0) + { + if (nr == 0) + { + memcached_set_error(*instance, MEMCACHED_CONNECTION_FAILURE, MEMCACHED_AT); + } + else + { + switch (get_socket_errno()) + { + case EINTR: + continue; + +#if EWOULDBLOCK != EAGAIN + case EWOULDBLOCK: +#endif + case EAGAIN: +#ifdef __linux + case ERESTART: +#endif + break; // No IO is fine, we can just move on + + default: + memcached_set_errno(*instance, get_socket_errno(), MEMCACHED_AT); + } + } + + break; + } + else // We read data, append to our read buffer + { + instance->read_data_length+= size_t(nr); + instance->read_buffer_length+= size_t(nr); + + return true; + } + } while (false); + } + + return false; +} + +/** + * If the we have callbacks connected to this server structure + * we may start process the input queue and fire the callbacks + * for the incomming messages. This function is _only_ called + * when the input buffer is full, so that we _know_ that we have + * at least _one_ message to process. + * + * @param instance the server to star processing iput messages for + * @return true if we processed anything, false otherwise + */ +static bool process_input_buffer(memcached_instance_st* instance) +{ + /* + ** We might be able to process some of the response messages if we + ** have a callback set up + */ + if (instance->root->callbacks != NULL) + { + /* + * We might have responses... try to read them out and fire + * callbacks + */ + memcached_callback_st cb= *instance->root->callbacks; + + memcached_set_processing_input((Memcached *)instance->root, true); + + char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE]; + Memcached *root= (Memcached *)instance->root; + memcached_return_t error= memcached_response(instance, buffer, sizeof(buffer), &root->result); + + memcached_set_processing_input(root, false); + + if (error == MEMCACHED_SUCCESS) + { + for (unsigned int x= 0; x < cb.number_of_callback; x++) + { + error= (*cb.callback[x])(instance->root, &root->result, cb.context); + if (error != MEMCACHED_SUCCESS) + { + break; + } + } + + /* @todo what should I do with the error message??? */ + } + /* @todo what should I do with other error messages?? */ + return true; + } + + return false; +} + +static memcached_return_t io_wait(memcached_instance_st* instance, + const short events) +{ + /* + ** We are going to block on write, but at least on Solaris we might block + ** on write if we haven't read anything from our input buffer.. + ** Try to purge the input buffer if we don't do any flow control in the + ** application layer (just sending a lot of data etc) + ** The test is moved down in the purge function to avoid duplication of + ** the test. + */ + if (events & POLLOUT) + { + if (memcached_purge(instance) == false) + { + return MEMCACHED_FAILURE; + } + } + + struct pollfd fds; + fds.fd= instance->fd; + fds.events= events; + fds.revents= 0; + + if (fds.events & POLLOUT) /* write */ + { + instance->io_wait_count.write++; + } + else + { + instance->io_wait_count.read++; + } + + if (instance->root->poll_timeout == 0) // Mimic 0 causes timeout behavior (not all platforms do this) + { + return memcached_set_error(*instance, MEMCACHED_TIMEOUT, MEMCACHED_AT, memcached_literal_param("poll_timeout() was set to zero")); + } + + size_t loop_max= 5; + while (--loop_max) // While loop is for ERESTART or EINTR + { + int active_fd= poll(&fds, 1, instance->root->poll_timeout); + + if (active_fd >= 1) + { + assert_msg(active_fd == 1 , "poll() returned an unexpected number of active file descriptors"); + if (fds.revents & POLLIN or fds.revents & POLLOUT) + { + return MEMCACHED_SUCCESS; + } + + if (fds.revents & POLLHUP) + { + return memcached_set_error(*instance, MEMCACHED_CONNECTION_FAILURE, MEMCACHED_AT, + memcached_literal_param("poll() detected hang up")); + } + + if (fds.revents & POLLERR) + { + int local_errno= EINVAL; + int err; + socklen_t len= sizeof (err); + if (getsockopt(instance->fd, SOL_SOCKET, SO_ERROR, (char*)&err, &len) == 0) + { + if (err == 0) // treat this as EINTR + { + continue; + } + local_errno= err; + } + memcached_quit_server(instance, true); + return memcached_set_errno(*instance, local_errno, MEMCACHED_AT, + memcached_literal_param("poll() returned POLLHUP")); + } + + return memcached_set_error(*instance, MEMCACHED_FAILURE, MEMCACHED_AT, memcached_literal_param("poll() returned a value that was not dealt with")); + } + + if (active_fd == 0) + { + return memcached_set_error(*instance, MEMCACHED_TIMEOUT, MEMCACHED_AT, memcached_literal_param("No active_fd were found")); + } + + // Only an error should result in this code being called. + int local_errno= get_socket_errno(); // We cache in case memcached_quit_server() modifies errno + assert_msg(active_fd == -1 , "poll() returned an unexpected value"); + switch (local_errno) + { +#ifdef __linux + case ERESTART: +#endif + case EINTR: + continue; + + case EFAULT: + case ENOMEM: + memcached_set_error(*instance, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT); + + case EINVAL: + memcached_set_error(*instance, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT, memcached_literal_param("RLIMIT_NOFILE exceeded, or if OSX the timeout value was invalid")); + + default: + memcached_set_errno(*instance, local_errno, MEMCACHED_AT, memcached_literal_param("poll")); + } + + break; + } + + memcached_quit_server(instance, true); + + if (memcached_has_error(instance)) + { + return memcached_instance_error_return(instance); + } + + return memcached_set_error(*instance, MEMCACHED_CONNECTION_FAILURE, MEMCACHED_AT, + memcached_literal_param("number of attempts to call io_wait() failed")); +} + +static bool io_flush(memcached_instance_st* instance, + const bool with_flush, + memcached_return_t& error) +{ + /* + ** We might want to purge the input buffer if we haven't consumed + ** any output yet... The test for the limits is the purge is inline + ** in the purge function to avoid duplicating the logic.. + */ + { + WATCHPOINT_ASSERT(instance->fd != INVALID_SOCKET); + + if (memcached_purge(instance) == false) + { + return false; + } + } + char *local_write_ptr= instance->write_buffer; + size_t write_length= instance->write_buffer_offset; + + error= MEMCACHED_SUCCESS; + + WATCHPOINT_ASSERT(instance->fd != INVALID_SOCKET); + + /* Looking for memory overflows */ +#if defined(DEBUG) + if (write_length == MEMCACHED_MAX_BUFFER) + WATCHPOINT_ASSERT(instance->write_buffer == local_write_ptr); + WATCHPOINT_ASSERT((instance->write_buffer + MEMCACHED_MAX_BUFFER) >= (local_write_ptr + write_length)); +#endif + + while (write_length) + { + WATCHPOINT_ASSERT(instance->fd != INVALID_SOCKET); + WATCHPOINT_ASSERT(write_length > 0); + + int flags; + if (with_flush) + { + flags= MSG_NOSIGNAL; + } + else + { + flags= MSG_NOSIGNAL|MSG_MORE; + } + + ssize_t sent_length= ::send(instance->fd, local_write_ptr, write_length, flags); + int local_errno= get_socket_errno(); // We cache in case memcached_quit_server() modifies errno + + if (sent_length == SOCKET_ERROR) + { +#if 0 // @todo I should look at why we hit this bit of code hard frequently + WATCHPOINT_ERRNO(get_socket_errno()); + WATCHPOINT_NUMBER(get_socket_errno()); +#endif + switch (get_socket_errno()) + { + case ENOBUFS: + continue; + +#if EWOULDBLOCK != EAGAIN + case EWOULDBLOCK: +#endif + case EAGAIN: + { + /* + * We may be blocked on write because the input buffer + * is full. Let's check if we have room in our input + * buffer for more data and retry the write before + * waiting.. + */ + if (repack_input_buffer(instance) or process_input_buffer(instance)) + { + continue; + } + + memcached_return_t rc= io_wait(instance, POLLOUT); + if (memcached_success(rc)) + { + continue; + } + else if (rc == MEMCACHED_TIMEOUT) + { + return false; + } + + memcached_quit_server(instance, true); + error= memcached_set_errno(*instance, local_errno, MEMCACHED_AT); + return false; + } + case ENOTCONN: + case EPIPE: + default: + memcached_quit_server(instance, true); + error= memcached_set_errno(*instance, local_errno, MEMCACHED_AT); + WATCHPOINT_ASSERT(instance->fd == INVALID_SOCKET); + return false; + } + } + + instance->io_bytes_sent+= uint32_t(sent_length); + + local_write_ptr+= sent_length; + write_length-= uint32_t(sent_length); + } + + WATCHPOINT_ASSERT(write_length == 0); + instance->write_buffer_offset= 0; + + return true; +} + +memcached_return_t memcached_io_wait_for_write(memcached_instance_st* instance) +{ + return io_wait(instance, POLLOUT); +} + +memcached_return_t memcached_io_wait_for_read(memcached_instance_st* instance) +{ + return io_wait(instance, POLLIN); +} + +static memcached_return_t _io_fill(memcached_instance_st* instance) +{ + ssize_t data_read; + do + { + data_read= ::recv(instance->fd, instance->read_buffer, MEMCACHED_MAX_BUFFER, MSG_NOSIGNAL); + int local_errno= get_socket_errno(); // We cache in case memcached_quit_server() modifies errno + + if (data_read == SOCKET_ERROR) + { + switch (get_socket_errno()) + { + case EINTR: // We just retry + continue; + + case ETIMEDOUT: // OSX +#if EWOULDBLOCK != EAGAIN + case EWOULDBLOCK: +#endif + case EAGAIN: +#ifdef __linux + case ERESTART: +#endif + { + memcached_return_t io_wait_ret; + if (memcached_success(io_wait_ret= io_wait(instance, POLLIN))) + { + continue; + } + + return io_wait_ret; + } + + /* fall through */ + + case ENOTCONN: // Programmer Error + WATCHPOINT_ASSERT(0); + case ENOTSOCK: + WATCHPOINT_ASSERT(0); + case EBADF: + assert_msg(instance->fd != INVALID_SOCKET, "Programmer error, invalid socket"); + case EINVAL: + case EFAULT: + case ECONNREFUSED: + default: + memcached_quit_server(instance, true); + memcached_set_errno(*instance, local_errno, MEMCACHED_AT); + break; + } + + return memcached_instance_error_return(instance); + } + else if (data_read == 0) + { + /* + EOF. Any data received so far is incomplete + so discard it. This always reads by byte in case of TCP + and protocol enforcement happens at memcached_response() + looking for '\n'. We do not care for UDB which requests 8 bytes + at once. Generally, this means that connection went away. Since + for blocking I/O we do not return 0 and for non-blocking case + it will return EGAIN if data is not immediatly available. + */ + memcached_quit_server(instance, true); + return memcached_set_error(*instance, MEMCACHED_CONNECTION_FAILURE, MEMCACHED_AT, + memcached_literal_param("::rec() returned zero, server has disconnected")); + } + instance->io_wait_count._bytes_read+= data_read; + } while (data_read <= 0); + + instance->io_bytes_sent= 0; + instance->read_data_length= (size_t) data_read; + instance->read_buffer_length= (size_t) data_read; + instance->read_ptr= instance->read_buffer; + + return MEMCACHED_SUCCESS; +} + +memcached_return_t memcached_io_read(memcached_instance_st* instance, + void *buffer, size_t length, ssize_t& nread) +{ + assert(memcached_is_udp(instance->root) == false); + assert_msg(instance, "Programmer error, memcached_io_read() recieved an invalid Instance"); // Programmer error + char *buffer_ptr= static_cast(buffer); + + if (instance->fd == INVALID_SOCKET) + { +#if 0 + assert_msg(int(instance->state) <= int(MEMCACHED_SERVER_STATE_ADDRINFO), "Programmer error, invalid socket state"); +#endif + return MEMCACHED_CONNECTION_FAILURE; + } + + while (length) + { + if (instance->read_buffer_length == 0) + { + memcached_return_t io_fill_ret; + if (memcached_fatal(io_fill_ret= _io_fill(instance))) + { + nread= -1; + return io_fill_ret; + } + } + + if (length > 1) + { + size_t difference= (length > instance->read_buffer_length) ? instance->read_buffer_length : length; + + memcpy(buffer_ptr, instance->read_ptr, difference); + length -= difference; + instance->read_ptr+= difference; + instance->read_buffer_length-= difference; + buffer_ptr+= difference; + } + else + { + *buffer_ptr= *instance->read_ptr; + instance->read_ptr++; + instance->read_buffer_length--; + buffer_ptr++; + break; + } + } + + nread= ssize_t(buffer_ptr - (char*)buffer); + + return MEMCACHED_SUCCESS; +} + +memcached_return_t memcached_io_slurp(memcached_instance_st* instance) +{ + assert_msg(instance, "Programmer error, invalid Instance"); + assert(memcached_is_udp(instance->root) == false); + + if (instance->fd == INVALID_SOCKET) + { + assert_msg(int(instance->state) <= int(MEMCACHED_SERVER_STATE_ADDRINFO), "Invalid socket state"); + return MEMCACHED_CONNECTION_FAILURE; + } + + ssize_t data_read; + char buffer[MEMCACHED_MAX_BUFFER]; + do + { + data_read= ::recv(instance->fd, instance->read_buffer, sizeof(buffer), MSG_NOSIGNAL); + if (data_read == SOCKET_ERROR) + { + switch (get_socket_errno()) + { + case EINTR: // We just retry + continue; + + case ETIMEDOUT: // OSX +#if EWOULDBLOCK != EAGAIN + case EWOULDBLOCK: +#endif + case EAGAIN: +#ifdef __linux + case ERESTART: +#endif + if (memcached_success(io_wait(instance, POLLIN))) + { + continue; + } + return MEMCACHED_IN_PROGRESS; + + /* fall through */ + + case ENOTCONN: // Programmer Error + assert(0); + case ENOTSOCK: + assert(0); + case EBADF: + assert_msg(instance->fd != INVALID_SOCKET, "Invalid socket state"); + case EINVAL: + case EFAULT: + case ECONNREFUSED: + default: + return MEMCACHED_CONNECTION_FAILURE; // We want this! + } + } + } while (data_read > 0); + + return MEMCACHED_CONNECTION_FAILURE; +} + +static bool _io_write(memcached_instance_st* instance, + const void *buffer, size_t length, bool with_flush, + size_t& written) +{ + assert(instance->fd != INVALID_SOCKET); + assert(memcached_is_udp(instance->root) == false); + + const char *buffer_ptr= static_cast(buffer); + + const size_t original_length= length; + + while (length) + { + char *write_ptr; + size_t buffer_end= MEMCACHED_MAX_BUFFER; + size_t should_write= buffer_end -instance->write_buffer_offset; + should_write= (should_write < length) ? should_write : length; + + write_ptr= instance->write_buffer + instance->write_buffer_offset; + memcpy(write_ptr, buffer_ptr, should_write); + instance->write_buffer_offset+= should_write; + buffer_ptr+= should_write; + length-= should_write; + + if (instance->write_buffer_offset == buffer_end) + { + WATCHPOINT_ASSERT(instance->fd != INVALID_SOCKET); + + memcached_return_t rc; + if (io_flush(instance, with_flush, rc) == false) + { + written= original_length -length; + return false; + } + } + } + + if (with_flush) + { + memcached_return_t rc; + WATCHPOINT_ASSERT(instance->fd != INVALID_SOCKET); + if (io_flush(instance, with_flush, rc) == false) + { + written= original_length -length; + return false; + } + } + + written= original_length -length; + + return true; +} + +bool memcached_io_write(memcached_instance_st* instance) +{ + size_t written; + return _io_write(instance, NULL, 0, true, written); +} + +ssize_t memcached_io_write(memcached_instance_st* instance, + const void *buffer, const size_t length, const bool with_flush) +{ + size_t written; + + if (_io_write(instance, buffer, length, with_flush, written) == false) + { + return -1; + } + + return ssize_t(written); +} + +bool memcached_io_writev(memcached_instance_st* instance, + libmemcached_io_vector_st vector[], + const size_t number_of, const bool with_flush) +{ + ssize_t complete_total= 0; + ssize_t total= 0; + + for (size_t x= 0; x < number_of; x++, vector++) + { + complete_total+= vector->length; + if (vector->length) + { + size_t written; + if ((_io_write(instance, vector->buffer, vector->length, false, written)) == false) + { + return false; + } + total+= written; + } + } + + if (with_flush) + { + if (memcached_io_write(instance) == false) + { + return false; + } + } + + return (complete_total == total); +} + +void memcached_instance_st::start_close_socket() +{ + if (fd != INVALID_SOCKET) + { + shutdown(fd, SHUT_WR); + options.is_shutting_down= true; + } +} + +void memcached_instance_st::reset_socket() +{ + if (fd != INVALID_SOCKET) + { + (void)closesocket(fd); + fd= INVALID_SOCKET; + } +} + +void memcached_instance_st::close_socket() +{ + if (fd != INVALID_SOCKET) + { + int shutdown_options= SHUT_RD; + if (options.is_shutting_down == false) + { + shutdown_options= SHUT_RDWR; + } + + /* in case of death shutdown to avoid blocking at close() */ + if (shutdown(fd, shutdown_options) == SOCKET_ERROR and get_socket_errno() != ENOTCONN) + { + WATCHPOINT_NUMBER(fd); + WATCHPOINT_ERRNO(get_socket_errno()); + WATCHPOINT_ASSERT(get_socket_errno()); + } + + reset_socket(); + state= MEMCACHED_SERVER_STATE_NEW; + } + + state= MEMCACHED_SERVER_STATE_NEW; + cursor_active_= 0; + io_bytes_sent= 0; + write_buffer_offset= size_t(root and memcached_is_udp(root) ? UDP_DATAGRAM_HEADER_LENGTH : 0); + read_buffer_length= 0; + read_ptr= read_buffer; + options.is_shutting_down= false; + memcached_server_response_reset(this); + + // We reset the version so that if we end up talking to a different server + // we don't have stale server version information. + major_version= minor_version= micro_version= UINT8_MAX; +} + +memcached_instance_st* memcached_io_get_readable_server(Memcached *memc, memcached_return_t&) +{ +#define MAX_SERVERS_TO_POLL 100 + struct pollfd fds[MAX_SERVERS_TO_POLL]; + nfds_t host_index= 0; + + for (uint32_t x= 0; x < memcached_server_count(memc) and host_index < MAX_SERVERS_TO_POLL; ++x) + { + memcached_instance_st* instance= memcached_instance_fetch(memc, x); + + if (instance->read_buffer_length > 0) /* I have data in the buffer */ + { + return instance; + } + + if (instance->response_count() > 0) + { + fds[host_index].events= POLLIN; + fds[host_index].revents= 0; + fds[host_index].fd= instance->fd; + ++host_index; + } + } + + if (host_index < 2) + { + /* We have 0 or 1 server with pending events.. */ + for (uint32_t x= 0; x< memcached_server_count(memc); ++x) + { + memcached_instance_st* instance= memcached_instance_fetch(memc, x); + + if (instance->response_count() > 0) + { + return instance; + } + } + + return NULL; + } + + int error= poll(fds, host_index, memc->poll_timeout); + switch (error) + { + case -1: + memcached_set_errno(*memc, get_socket_errno(), MEMCACHED_AT); + /* FALLTHROUGH */ + case 0: + break; + + default: + for (nfds_t x= 0; x < host_index; ++x) + { + if (fds[x].revents & POLLIN) + { + for (uint32_t y= 0; y < memcached_server_count(memc); ++y) + { + memcached_instance_st* instance= memcached_instance_fetch(memc, y); + + if (instance->fd == fds[x].fd) + { + return instance; + } + } + } + } + } + + return NULL; +} + +/* + Eventually we will just kill off the server with the problem. +*/ +void memcached_io_reset(memcached_instance_st* instance) +{ + memcached_quit_server(instance, true); +} + +/** + * Read a given number of bytes from the server and place it into a specific + * buffer. Reset the IO channel on this server if an error occurs. + */ +memcached_return_t memcached_safe_read(memcached_instance_st* instance, + void *dta, + const size_t size) +{ + size_t offset= 0; + char *data= static_cast(dta); + + while (offset < size) + { + ssize_t nread; + memcached_return_t rc; + + while (memcached_continue(rc= memcached_io_read(instance, data + offset, size - offset, nread))) { }; + + if (memcached_failed(rc)) + { + return rc; + } + + offset+= size_t(nread); + } + + return MEMCACHED_SUCCESS; +} + +memcached_return_t memcached_io_readline(memcached_instance_st* instance, + char *buffer_ptr, + size_t size, + size_t& total_nr) +{ + total_nr= 0; + bool line_complete= false; + + while (line_complete == false) + { + if (instance->read_buffer_length == 0) + { + /* + * We don't have any data in the buffer, so let's fill the read + * buffer. Call the standard read function to avoid duplicating + * the logic. + */ + ssize_t nread; + memcached_return_t rc= memcached_io_read(instance, buffer_ptr, 1, nread); + if (memcached_failed(rc) and rc == MEMCACHED_IN_PROGRESS) + { + memcached_quit_server(instance, true); + return memcached_set_error(*instance, rc, MEMCACHED_AT); + } + else if (memcached_failed(rc)) + { + return rc; + } + + if (*buffer_ptr == '\n') + { + line_complete= true; + } + + ++buffer_ptr; + ++total_nr; + } + + /* Now let's look in the buffer and copy as we go! */ + while (instance->read_buffer_length and total_nr < size and line_complete == false) + { + *buffer_ptr = *instance->read_ptr; + if (*buffer_ptr == '\n') + { + line_complete = true; + } + --instance->read_buffer_length; + ++instance->read_ptr; + ++total_nr; + ++buffer_ptr; + } + + if (total_nr == size) + { + return MEMCACHED_PROTOCOL_ERROR; + } + } + + return MEMCACHED_SUCCESS; +} diff --git a/libmemcached/io.h b/libmemcached/io.h new file mode 100644 index 0000000..c2711e2 --- /dev/null +++ b/libmemcached/io.h @@ -0,0 +1,45 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * LibMemcached + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +struct libmemcached_io_vector_st +{ + const void *buffer; + size_t length; +}; diff --git a/libmemcached/io.hpp b/libmemcached/io.hpp new file mode 100644 index 0000000..5480239 --- /dev/null +++ b/libmemcached/io.hpp @@ -0,0 +1,73 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * LibMemcached + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +void initialize_binary_request(memcached_instance_st* server, protocol_binary_request_header&); + +bool memcached_io_write(memcached_instance_st* ptr); + +ssize_t memcached_io_write(memcached_instance_st* ptr, + const void *buffer, size_t length, bool with_flush); + +bool memcached_io_writev(memcached_instance_st* ptr, + libmemcached_io_vector_st vector[], + const size_t number_of, const bool with_flush); + +memcached_return_t memcached_io_wait_for_write(memcached_instance_st*); +memcached_return_t memcached_io_wait_for_read(memcached_instance_st*); + +void memcached_io_reset(memcached_instance_st* ptr); + +memcached_return_t memcached_io_read(memcached_instance_st* ptr, + void *buffer, size_t length, ssize_t& nread); + +/* Read a line (terminated by '\n') into the buffer */ +memcached_return_t memcached_io_readline(memcached_instance_st* ptr, + char *buffer_ptr, + size_t size, + size_t& total); + +/* Read n bytes of data from the server and store them in dta */ +memcached_return_t memcached_safe_read(memcached_instance_st* ptr, + void *dta, + const size_t size); + +memcached_instance_st* memcached_io_get_readable_server(memcached_st *memc, memcached_return_t&); + +memcached_return_t memcached_io_slurp(memcached_instance_st* ptr); diff --git a/libmemcached/is.h b/libmemcached/is.h new file mode 100644 index 0000000..54f2c2b --- /dev/null +++ b/libmemcached/is.h @@ -0,0 +1,95 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * LibMemcached + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +/* These are private */ +#define memcached_is_allocated(__object) ((__object)->options.is_allocated) +#define memcached_is_encrypted(__object) ((__object)->hashkit._key) +#define memcached_is_initialized(__object) ((__object)->options.is_initialized) +#define memcached_is_purging(__object) ((__object)->state.is_purging) +#define memcached_is_processing_input(__object) ((__object)->state.is_processing_input) + +#define memcached_is_aes(__object) ((__object)->flags.is_aes) +#define memcached_is_udp(__object) ((__object)->flags.use_udp) +#define memcached_is_verify_key(__object) ((__object)->flags.verify_key) +#define memcached_is_binary(__object) ((__object)->flags.binary_protocol) +#define memcached_is_fetching_version(__object) ((__object)->flags.is_fetching_version) +#define memcached_is_buffering(__object) ((__object)->flags.buffer_requests) +#define memcached_is_replying(__object) ((__object)->flags.reply) +#define memcached_is_cas(__object) ((__object)->flags.reply) +#define memcached_is_randomize_replica_read(__object) ((__object)->flags.randomize_replica_read) +#define memcached_is_no_block(__object) ((__object)->flags.no_block) +#define memcached_is_hash_with_namespace(__object) ((__object)->flags.hash_with_namespace) +#define memcached_is_tcp_nodelay(__object) ((__object)->flags.tcp_nodelay) +#define memcached_is_auto_eject_hosts(__object) ((__object)->flags.auto_eject_hosts) +#define memcached_is_use_sort_hosts(__object) ((__object)->flags.use_sort_hosts) + +#define memcached_is_ready(__object) ((__object)->options.ready) + +#define memcached_is_weighted_ketama(__object) ((__object)->ketama.weighted_) + +#define memcached_set_ready(__object, __flag) ((__object)->options.ready= (__flag)) + +#define memcached_set_aes(__object, __flag) ((__object).flags.is_aes= __flag) +#define memcached_set_udp(__object, __flag) ((__object).flags.use_udp= __flag) +#define memcached_set_verify_key(__object, __flag) ((__object).flags.verify_key= __flag) +#define memcached_set_binary(__object, __flag) ((__object).flags.binary_protocol= __flag) +#define memcached_set_fetching_version(__object, __flag) ((__object).flags.is_fetching_version= __flag) +#define memcached_set_buffering(__object, __flag) ((__object).flags.buffer_requests= __flag) +#define memcached_set_replying(__object, __flag) ((__object).flags.reply= __flag) +#define memcached_set_cas(__object, __flag) ((__object).flags.reply= __flag) +#define memcached_set_randomize_replica_read(__object, __flag) ((__object).flags.randomize_replica_read= __flag) +#define memcached_set_no_block(__object, __flag) ((__object).flags.no_block= __flag) +#define memcached_set_hash_with_namespace(__object, __flag) ((__object).flags.hash_with_namespace= __flag) +#define memcached_set_tcp_nodelay(__object, __flag) ((__object).flags.tcp_nodelay= __flag) +#define memcached_set_auto_eject_hosts(__object, __flag) ((__object).flags.auto_eject_hosts= __flag) +#define memcached_set_use_sort_hosts(__object, __flag) ((__object).flags.use_sort_hosts= __flag) + +#define memcached_has_root(__object) ((__object)->root) + +#define memcached_has_error(__object) ((__object)->error_messages) + +#define memcached_has_replicas(__object) ((__object)->root->number_of_replicas) + +#define memcached_set_processing_input(__object, __value) ((__object)->state.is_processing_input= (__value)) +#define memcached_set_initialized(__object, __value) ((__object)->options.is_initialized= (__value)) +#define memcached_set_allocated(__object, __value) ((__object)->options.is_allocated= (__value)) + +#define memcached_set_weighted_ketama(__object, __value) ((__object)->ketama.weighted_= (__value)) + +#define memcached2Memcached(__obj) (__obj) diff --git a/libmemcached/key.cc b/libmemcached/key.cc new file mode 100644 index 0000000..cec0eec --- /dev/null +++ b/libmemcached/key.cc @@ -0,0 +1,111 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +static inline memcached_return_t memcached_validate_key_length(size_t key_length, bool) +{ + if (key_length == 0) + { + return MEMCACHED_BAD_KEY_PROVIDED; + } + + // No one ever reimplemented MEMCACHED to use keys longer then the original ascii length +#if 0 + if (binary) + { + if (key_length > 0xffff) + { + return MEMCACHED_BAD_KEY_PROVIDED; + } + } + else +#endif + { + if (key_length >= MEMCACHED_MAX_KEY) + { + return MEMCACHED_BAD_KEY_PROVIDED; + } + } + + return MEMCACHED_SUCCESS; +} + +memcached_return_t memcached_key_test(memcached_st &memc, + const char * const *keys, + const size_t *key_length, + size_t number_of_keys) +{ + if (number_of_keys == 0) + { + return memcached_set_error(memc, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, memcached_literal_param("Numbers of keys provided was zero")); + } + + if (keys == NULL or key_length == NULL) + { + return memcached_set_error(memc, MEMCACHED_BAD_KEY_PROVIDED, MEMCACHED_AT, memcached_literal_param("Key was NULL or length of key was zero.")); + } + + const bool is_binary= memcached_flag(memc, MEMCACHED_FLAG_BINARY_PROTOCOL); + + // If we don't need to verify the key, or we are using the binary protoocol, + // we just check the size of the key + for (size_t x= 0; x < number_of_keys; ++x) + { + // We should set binary key, but the memcached server is broken for + // longer keys at the moment. + memcached_return_t rc= memcached_validate_key_length(*(key_length +x), false /* memc.flags.binary_protocol */); + if (memcached_failed(rc)) + { + return memcached_set_error(memc, rc, MEMCACHED_AT, memcached_literal_param("Key provided was too long.")); + } + + if (memc.flags.verify_key and is_binary == false) + { + for (size_t y= 0; y < *(key_length +x); ++y) + { + if ((isgraph(keys[x][y])) == 0) + { + return memcached_set_error(memc, MEMCACHED_BAD_KEY_PROVIDED, MEMCACHED_AT, memcached_literal_param("Key provided had invalid character.")); + } + } + } + } + + return MEMCACHED_SUCCESS; +} + diff --git a/libmemcached/key.hpp b/libmemcached/key.hpp new file mode 100644 index 0000000..811a4b7 --- /dev/null +++ b/libmemcached/key.hpp @@ -0,0 +1,43 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +memcached_return_t memcached_key_test(memcached_st& memc, + const char * const *keys, + const size_t *key_length, + size_t number_of_keys); + diff --git a/libmemcached/libmemcached_probes.d b/libmemcached/libmemcached_probes.d new file mode 100644 index 0000000..28d8402 --- /dev/null +++ b/libmemcached/libmemcached_probes.d @@ -0,0 +1,30 @@ +provider libmemcached { + probe memcached_delete_start(); + probe memcached_delete_end(); + probe memcached_increment_with_initial_start(); + probe memcached_increment_with_initial_end(); + probe memcached_decrement_with_initial_start(); + probe memcached_decrement_with_initial_end(); + probe memcached_increment_start(); + probe memcached_increment_end(); + probe memcached_decrement_start(); + probe memcached_decrement_end(); + probe memcached_flush_start(); + probe memcached_flush_end(); + probe memcached_set_start(); + probe memcached_set_end(); + probe memcached_add_start(); + probe memcached_add_end(); + probe memcached_replace_start(); + probe memcached_replace_end(); + probe memcached_get_start(); + probe memcached_get_end(); + probe memcached_touch_start(); + probe memcached_touch_end(); + probe memcached_mget_start(); + probe memcached_mget_end(); + probe memcached_connect_start(); + probe memcached_connect_end(); + probe memcached_server_add_start(); + probe memcached_server_add_end(); +}; diff --git a/libmemcached/libmemcached_probes.h b/libmemcached/libmemcached_probes.h new file mode 100644 index 0000000..9dba8aa --- /dev/null +++ b/libmemcached/libmemcached_probes.h @@ -0,0 +1,118 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + + +/* + * This file contains the definition of the various probes supported by + * libmemcached. Currently it only support DTRACE, but just create an + * implementation of the following macros to create your own sort of + * probing :) + */ + +#ifdef HAVE_DTRACE +/* + * Create the DTrace probes on the system using it (to support both Solaris + * and MacOS X + */ +#include "libmemcached/dtrace_probes.h" + +#else +/* + * Provide dummy macros so that we don't need to clutter the code with + * ifdefs when we want to use the probes. + */ + +#define LIBMEMCACHED_MEMCACHED_ADD_END() +#define LIBMEMCACHED_MEMCACHED_ADD_END_ENABLED() (0) +#define LIBMEMCACHED_MEMCACHED_ADD_START() +#define LIBMEMCACHED_MEMCACHED_ADD_START_ENABLED() (0) +#define LIBMEMCACHED_MEMCACHED_CONNECT_END() +#define LIBMEMCACHED_MEMCACHED_CONNECT_END_ENABLED() (0) +#define LIBMEMCACHED_MEMCACHED_CONNECT_START() +#define LIBMEMCACHED_MEMCACHED_CONNECT_START_ENABLED() (0) +#define LIBMEMCACHED_MEMCACHED_DECREMENT_END() +#define LIBMEMCACHED_MEMCACHED_DECREMENT_END_ENABLED() (0) +#define LIBMEMCACHED_MEMCACHED_DECREMENT_START() +#define LIBMEMCACHED_MEMCACHED_DECREMENT_START_ENABLED() (0) +#define LIBMEMCACHED_MEMCACHED_DECREMENT_WITH_INITIAL_END() +#define LIBMEMCACHED_MEMCACHED_DECREMENT_WITH_INITIAL_END_ENABLED() (0) +#define LIBMEMCACHED_MEMCACHED_DECREMENT_WITH_INITIAL_START() +#define LIBMEMCACHED_MEMCACHED_DECREMENT_WITH_INITIAL_START_ENABLED() (0) +#define LIBMEMCACHED_MEMCACHED_DELETE_END() +#define LIBMEMCACHED_MEMCACHED_DELETE_END_ENABLED() (0) +#define LIBMEMCACHED_MEMCACHED_DELETE_START() +#define LIBMEMCACHED_MEMCACHED_DELETE_START_ENABLED() (0) +#define LIBMEMCACHED_MEMCACHED_FLUSH_END() +#define LIBMEMCACHED_MEMCACHED_FLUSH_END_ENABLED() (0) +#define LIBMEMCACHED_MEMCACHED_FLUSH_START() +#define LIBMEMCACHED_MEMCACHED_FLUSH_START_ENABLED() (0) +#define LIBMEMCACHED_MEMCACHED_GET_END() +#define LIBMEMCACHED_MEMCACHED_GET_END_ENABLED() (0) +#define LIBMEMCACHED_MEMCACHED_GET_START() +#define LIBMEMCACHED_MEMCACHED_GET_START_ENABLED() (0) +#define LIBMEMCACHED_MEMCACHED_TOUCH_END() +#define LIBMEMCACHED_MEMCACHED_TOUCH_END_ENABLED() (0) +#define LIBMEMCACHED_MEMCACHED_TOUCH_START() +#define LIBMEMCACHED_MEMCACHED_TOUCH_START_ENABLED() (0) +#define LIBMEMCACHED_MEMCACHED_INCREMENT_END() +#define LIBMEMCACHED_MEMCACHED_INCREMENT_END_ENABLED() (0) +#define LIBMEMCACHED_MEMCACHED_INCREMENT_START() +#define LIBMEMCACHED_MEMCACHED_INCREMENT_START_ENABLED() (0) +#define LIBMEMCACHED_MEMCACHED_INCREMENT_WITH_INITIAL_END() +#define LIBMEMCACHED_MEMCACHED_INCREMENT_WITH_INITIAL_END_ENABLED() (0) +#define LIBMEMCACHED_MEMCACHED_INCREMENT_WITH_INITIAL_START() +#define LIBMEMCACHED_MEMCACHED_INCREMENT_WITH_INITIAL_START_ENABLED() (0) +#define LIBMEMCACHED_MEMCACHED_MGET_END() +#define LIBMEMCACHED_MEMCACHED_MGET_END_ENABLED() (0) +#define LIBMEMCACHED_MEMCACHED_MGET_START() +#define LIBMEMCACHED_MEMCACHED_MGET_START_ENABLED() (0) +#define LIBMEMCACHED_MEMCACHED_REPLACE_END() +#define LIBMEMCACHED_MEMCACHED_REPLACE_END_ENABLED() (0) +#define LIBMEMCACHED_MEMCACHED_REPLACE_START() +#define LIBMEMCACHED_MEMCACHED_REPLACE_START_ENABLED() (0) +#define LIBMEMCACHED_MEMCACHED_SERVER_ADD_END() +#define LIBMEMCACHED_MEMCACHED_SERVER_ADD_END_ENABLED() (0) +#define LIBMEMCACHED_MEMCACHED_SERVER_ADD_START() +#define LIBMEMCACHED_MEMCACHED_SERVER_ADD_START_ENABLED() (0) +#define LIBMEMCACHED_MEMCACHED_SET_END() +#define LIBMEMCACHED_MEMCACHED_SET_END_ENABLED() (0) +#define LIBMEMCACHED_MEMCACHED_SET_START() +#define LIBMEMCACHED_MEMCACHED_SET_START_ENABLED() (0) + +#endif diff --git a/libmemcached/memcached.cc b/libmemcached/memcached.cc new file mode 100644 index 0000000..337f918 --- /dev/null +++ b/libmemcached/memcached.cc @@ -0,0 +1,493 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +#include +#include + +static inline bool _memcached_init(Memcached *self) +{ + self->state.is_purging= false; + self->state.is_processing_input= false; + self->state.is_time_for_rebuild= false; + self->state.is_parsing= false; + + self->flags.auto_eject_hosts= false; + self->flags.binary_protocol= false; + self->flags.buffer_requests= false; + self->flags.hash_with_namespace= false; + self->flags.no_block= false; + self->flags.reply= true; + self->flags.randomize_replica_read= false; + self->flags.support_cas= false; + self->flags.tcp_nodelay= false; + self->flags.use_sort_hosts= false; + self->flags.use_udp= false; + self->flags.verify_key= false; + self->flags.tcp_keepalive= false; + self->flags.is_aes= false; + self->flags.is_fetching_version= false; + + self->virtual_bucket= NULL; + + self->distribution= MEMCACHED_DISTRIBUTION_MODULA; + + if (hashkit_create(&self->hashkit) == NULL) + { + return false; + } + + self->server_info.version= 0; + + self->ketama.continuum= NULL; + self->ketama.continuum_count= 0; + self->ketama.continuum_points_counter= 0; + self->ketama.next_distribution_rebuild= 0; + self->ketama.weighted_= false; + + self->number_of_hosts= 0; + self->servers= NULL; + self->last_disconnected_server= NULL; + + self->snd_timeout= 0; + self->rcv_timeout= 0; + self->server_failure_limit= MEMCACHED_SERVER_FAILURE_LIMIT; + self->server_timeout_limit= MEMCACHED_SERVER_TIMEOUT_LIMIT; + self->query_id= 1; // 0 is considered invalid + + /* TODO, Document why we picked these defaults */ + self->io_msg_watermark= 500; + self->io_bytes_watermark= 65 * 1024; + + self->tcp_keepidle= 0; + + self->io_key_prefetch= 0; + self->poll_timeout= MEMCACHED_DEFAULT_TIMEOUT; + self->connect_timeout= MEMCACHED_DEFAULT_CONNECT_TIMEOUT; + self->retry_timeout= MEMCACHED_SERVER_FAILURE_RETRY_TIMEOUT; + self->dead_timeout= MEMCACHED_SERVER_FAILURE_DEAD_TIMEOUT; + + self->send_size= -1; + self->recv_size= -1; + + self->user_data= NULL; + self->number_of_replicas= 0; + + self->allocators= memcached_allocators_return_default(); + + self->on_clone= NULL; + self->on_cleanup= NULL; + self->get_key_failure= NULL; + self->delete_trigger= NULL; + self->callbacks= NULL; + self->sasl.callbacks= NULL; + self->sasl.is_allocated= false; + + self->error_messages= NULL; + self->_namespace= NULL; + self->configure.initial_pool_size= 1; + self->configure.max_pool_size= 1; + self->configure.version= -1; + self->configure.filename= NULL; + + return true; +} + +static void __memcached_free(Memcached *ptr, bool release_st) +{ + /* If we have anything open, lets close it now */ + send_quit(ptr); + memcached_instance_list_free(memcached_instance_list(ptr), memcached_instance_list_count(ptr)); + memcached_result_free(&ptr->result); + + memcached_virtual_bucket_free(ptr); + + memcached_instance_free((memcached_instance_st*)ptr->last_disconnected_server); + + if (ptr->on_cleanup) + { + ptr->on_cleanup(ptr); + } + + libmemcached_free(ptr, ptr->ketama.continuum); + ptr->ketama.continuum= NULL; + + memcached_array_free(ptr->_namespace); + ptr->_namespace= NULL; + + memcached_error_free(*ptr); + + if (LIBMEMCACHED_WITH_SASL_SUPPORT and ptr->sasl.callbacks) + { + memcached_destroy_sasl_auth_data(ptr); + } + + if (release_st) + { + memcached_array_free(ptr->configure.filename); + ptr->configure.filename= NULL; + } + + hashkit_free(&ptr->hashkit); + + if (memcached_is_allocated(ptr) and release_st) + { + libmemcached_free(ptr, ptr); + } +} + +memcached_st *memcached_create(memcached_st *shell) +{ + if (shell) + { + shell->options.is_allocated= false; + } + else + { + shell= (memcached_st *)libmemcached_xmalloc(NULL, memcached_st); + + if (shell == NULL) + { + return NULL; /* MEMCACHED_MEMORY_ALLOCATION_FAILURE */ + } + + shell->options.is_allocated= true; + } + + if (_memcached_init(shell) == false) + { + memcached_free(shell); + return NULL; + } + + Memcached* memc= memcached2Memcached(shell); + if (memcached_result_create(shell, &memc->result) == NULL) + { + memcached_free(shell); + return NULL; + } + + WATCHPOINT_ASSERT_INITIALIZED(&memc->result); + + return shell; +} + +memcached_st *memcached(const char *string, size_t length) +{ + if (length == 0 and string) + { + return NULL; + } + + if (length and string == NULL) + { + return NULL; + } + + if (length == 0) + { + if (bool(getenv("LIBMEMCACHED"))) + { + string= getenv("LIBMEMCACHED"); + length= string ? strlen(string) : 0; + } + } + + memcached_st *memc= memcached_create(NULL); + if (memc == NULL) + { + return NULL; + } + + if (length == 0 or string == NULL) + { + return memc; + } + + memcached_return_t rc= memcached_parse_configuration(memc, string, length); + if (memcached_success(rc) and memcached_parse_filename(memc)) + { + rc= memcached_parse_configure_file(*memc, memcached_parse_filename(memc), memcached_parse_filename_length(memc)); + } + + if (memcached_failed(rc)) + { + memcached_free(memc); + return NULL; + } + + return memc; +} + +memcached_return_t memcached_reset(memcached_st *shell) +{ + Memcached* ptr= memcached2Memcached(shell); + WATCHPOINT_ASSERT(ptr); + if (ptr == NULL) + { + return MEMCACHED_INVALID_ARGUMENTS; + } + + bool stored_is_allocated= memcached_is_allocated(ptr); + uint64_t query_id= ptr->query_id; + __memcached_free(ptr, false); + memcached_create(ptr); + memcached_set_allocated(ptr, stored_is_allocated); + ptr->query_id= query_id; + + if (ptr->configure.filename) + { + return memcached_parse_configure_file(*ptr, memcached_param_array(ptr->configure.filename)); + } + + return MEMCACHED_SUCCESS; +} + +void memcached_servers_reset(memcached_st *shell) +{ + Memcached* self= memcached2Memcached(shell); + if (self) + { + libmemcached_free(self, self->ketama.continuum); + self->ketama.continuum= NULL; + + memcached_instance_list_free(memcached_instance_list(self), self->number_of_hosts); + memcached_instance_set(self, NULL, 0); + + memcached_reset_last_disconnected_server(self); + } +} + +void memcached_reset_last_disconnected_server(memcached_st *shell) +{ + Memcached* self= memcached2Memcached(shell); + if (self) + { + memcached_instance_free((memcached_instance_st*)self->last_disconnected_server); + self->last_disconnected_server= NULL; + } +} + +void memcached_free(memcached_st *ptr) +{ + if (ptr) + { + __memcached_free(ptr, true); + } +} + +/* + clone is the destination, while source is the structure to clone. + If source is NULL the call is the same as if a memcached_create() was + called. +*/ +memcached_st *memcached_clone(memcached_st *clone, const memcached_st *source) +{ + if (source == NULL) + { + return memcached_create(clone); + } + + if (clone and memcached_is_allocated(clone)) + { + return NULL; + } + + memcached_st *new_clone= memcached_create(clone); + + if (new_clone == NULL) + { + return NULL; + } + + new_clone->flags= source->flags; + new_clone->send_size= source->send_size; + new_clone->recv_size= source->recv_size; + new_clone->poll_timeout= source->poll_timeout; + new_clone->connect_timeout= source->connect_timeout; + new_clone->retry_timeout= source->retry_timeout; + new_clone->dead_timeout= source->dead_timeout; + new_clone->distribution= source->distribution; + + if (hashkit_clone(&new_clone->hashkit, &source->hashkit) == NULL) + { + memcached_free(new_clone); + return NULL; + } + + new_clone->user_data= source->user_data; + + new_clone->snd_timeout= source->snd_timeout; + new_clone->rcv_timeout= source->rcv_timeout; + + new_clone->on_clone= source->on_clone; + new_clone->on_cleanup= source->on_cleanup; + + new_clone->allocators= source->allocators; + + new_clone->get_key_failure= source->get_key_failure; + new_clone->delete_trigger= source->delete_trigger; + new_clone->server_failure_limit= source->server_failure_limit; + new_clone->server_timeout_limit= source->server_timeout_limit; + new_clone->io_msg_watermark= source->io_msg_watermark; + new_clone->io_bytes_watermark= source->io_bytes_watermark; + new_clone->io_key_prefetch= source->io_key_prefetch; + new_clone->number_of_replicas= source->number_of_replicas; + new_clone->tcp_keepidle= source->tcp_keepidle; + + if (memcached_server_count(source)) + { + if (memcached_failed(memcached_push(new_clone, source))) + { + return NULL; + } + } + + + new_clone->_namespace= memcached_array_clone(new_clone, source->_namespace); + new_clone->configure.filename= memcached_array_clone(new_clone, source->_namespace); + new_clone->configure.version= source->configure.version; + + if (LIBMEMCACHED_WITH_SASL_SUPPORT and source->sasl.callbacks) + { + if (memcached_failed(memcached_clone_sasl(new_clone, source))) + { + memcached_free(new_clone); + return NULL; + } + } + + if (memcached_failed(run_distribution(new_clone))) + { + memcached_free(new_clone); + + return NULL; + } + + if (source->on_clone) + { + source->on_clone(new_clone, source); + } + + return new_clone; +} + +void *memcached_get_user_data(const memcached_st *shell) +{ + const Memcached* memc= memcached2Memcached(shell); + if (memc) + { + return memc->user_data; + } + + return NULL; +} + +void *memcached_set_user_data(memcached_st *shell, void *data) +{ + Memcached* memc= memcached2Memcached(shell); + if (memc) + { + void *ret= memc->user_data; + memc->user_data= data; + + return ret; + } + + return NULL; +} + +memcached_return_t memcached_push(memcached_st *destination, const memcached_st *source) +{ + return memcached_instance_push(destination, (memcached_instance_st*)source->servers, source->number_of_hosts); +} + +memcached_instance_st* memcached_instance_fetch(Memcached *ptr, uint32_t server_key) +{ + if (ptr == NULL) + { + return NULL; + } + + return &ptr->servers[server_key]; +} + +const memcached_instance_st * memcached_server_instance_by_position(const memcached_st *shell, uint32_t server_key) +{ + const Memcached* memc= memcached2Memcached(shell); + if (memc) + { + return &memc->servers[server_key]; + } + + return NULL; +} + +memcached_instance_st* memcached_instance_by_position(const memcached_st *shell, uint32_t server_key) +{ + const Memcached* memc= memcached2Memcached(shell); + if (memc) + { + return &memc->servers[server_key]; + } + + return NULL; +} + +uint64_t memcached_query_id(const memcached_st *shell) +{ + const Memcached* memc= memcached2Memcached(shell); + if (memc) + { + return memc->query_id; + } + + return 0; +} + +memcached_instance_st* memcached_instance_list(const memcached_st *shell) +{ + const Memcached* memc= memcached2Memcached(shell); + if (memc) + { + return (memcached_instance_st*)memc->servers; + } + + return NULL; +} + diff --git a/libmemcached/memcached.h b/libmemcached/memcached.h new file mode 100644 index 0000000..a45077e --- /dev/null +++ b/libmemcached/memcached.h @@ -0,0 +1,39 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include diff --git a/libmemcached/memcached.hpp b/libmemcached/memcached.hpp new file mode 100644 index 0000000..d38e6d2 --- /dev/null +++ b/libmemcached/memcached.hpp @@ -0,0 +1,40 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include + diff --git a/libmemcached/memcached/README.txt b/libmemcached/memcached/README.txt new file mode 100644 index 0000000..adcac80 --- /dev/null +++ b/libmemcached/memcached/README.txt @@ -0,0 +1,7 @@ +For your convenience libmemcached contains a copy of protocol_binary.h so that +you may compile libmemcached without having a memcached server with support +for the binary protocol installed on your computer. Please do not modify this +fine, but replace it with a fresh copy from a new distribution if they are +out of sync. + +Trond Norbye diff --git a/libmemcached/memcached/protocol_binary.h b/libmemcached/memcached/protocol_binary.h new file mode 100644 index 0000000..51e2c42 --- /dev/null +++ b/libmemcached/memcached/protocol_binary.h @@ -0,0 +1,728 @@ +/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ +/* + * Copyright (c) <2008>, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY SUN MICROSYSTEMS, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +/* + * Summary: Constants used by to implement the binary protocol. + * + * Copy: See Copyright for the status of this software. + * + * Author: Trond Norbye + */ + +#ifndef PROTOCOL_BINARY_H +#define PROTOCOL_BINARY_H + +#include + +/** + * \addtogroup Protocol + * @{ + */ + +/** + * This file contains definitions of the constants and packet formats + * defined in the binary specification. Please note that you _MUST_ remember + * to convert each multibyte field to / from network byte order to / from + * host order. + */ +#ifdef __cplusplus +extern "C" +{ +#endif + + /** + * Definition of the legal "magic" values used in a packet. + * See section 3.1 Magic byte + */ + typedef enum { + PROTOCOL_BINARY_REQ = 0x80, + PROTOCOL_BINARY_RES = 0x81 + } protocol_binary_magic; + + /** + * Definition of the valid response status numbers. + * See section 3.2 Response Status + */ + typedef enum { + PROTOCOL_BINARY_RESPONSE_SUCCESS = 0x00, + PROTOCOL_BINARY_RESPONSE_KEY_ENOENT = 0x01, + PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS = 0x02, + PROTOCOL_BINARY_RESPONSE_E2BIG = 0x03, + PROTOCOL_BINARY_RESPONSE_EINVAL = 0x04, + PROTOCOL_BINARY_RESPONSE_NOT_STORED = 0x05, + PROTOCOL_BINARY_RESPONSE_DELTA_BADVAL = 0x06, + PROTOCOL_BINARY_RESPONSE_NOT_MY_VBUCKET = 0x07, + PROTOCOL_BINARY_RESPONSE_AUTH_ERROR = 0x20, + PROTOCOL_BINARY_RESPONSE_AUTH_CONTINUE = 0x21, + PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND = 0x81, + PROTOCOL_BINARY_RESPONSE_ENOMEM = 0x82, + PROTOCOL_BINARY_RESPONSE_NOT_SUPPORTED = 0x83, + PROTOCOL_BINARY_RESPONSE_EINTERNAL = 0x84, + PROTOCOL_BINARY_RESPONSE_EBUSY = 0x85, + PROTOCOL_BINARY_RESPONSE_ETMPFAIL = 0x86 + } protocol_binary_response_status; + + /** + * Defintion of the different command opcodes. + * See section 3.3 Command Opcodes + */ + typedef enum { + PROTOCOL_BINARY_CMD_GET = 0x00, + PROTOCOL_BINARY_CMD_SET = 0x01, + PROTOCOL_BINARY_CMD_ADD = 0x02, + PROTOCOL_BINARY_CMD_REPLACE = 0x03, + PROTOCOL_BINARY_CMD_DELETE = 0x04, + PROTOCOL_BINARY_CMD_INCREMENT = 0x05, + PROTOCOL_BINARY_CMD_DECREMENT = 0x06, + PROTOCOL_BINARY_CMD_QUIT = 0x07, + PROTOCOL_BINARY_CMD_FLUSH = 0x08, + PROTOCOL_BINARY_CMD_GETQ = 0x09, + PROTOCOL_BINARY_CMD_NOOP = 0x0a, + PROTOCOL_BINARY_CMD_VERSION = 0x0b, + PROTOCOL_BINARY_CMD_GETK = 0x0c, + PROTOCOL_BINARY_CMD_GETKQ = 0x0d, + PROTOCOL_BINARY_CMD_APPEND = 0x0e, + PROTOCOL_BINARY_CMD_PREPEND = 0x0f, + PROTOCOL_BINARY_CMD_STAT = 0x10, + PROTOCOL_BINARY_CMD_SETQ = 0x11, + PROTOCOL_BINARY_CMD_ADDQ = 0x12, + PROTOCOL_BINARY_CMD_REPLACEQ = 0x13, + PROTOCOL_BINARY_CMD_DELETEQ = 0x14, + PROTOCOL_BINARY_CMD_INCREMENTQ = 0x15, + PROTOCOL_BINARY_CMD_DECREMENTQ = 0x16, + PROTOCOL_BINARY_CMD_QUITQ = 0x17, + PROTOCOL_BINARY_CMD_FLUSHQ = 0x18, + PROTOCOL_BINARY_CMD_APPENDQ = 0x19, + PROTOCOL_BINARY_CMD_PREPENDQ = 0x1a, + PROTOCOL_BINARY_CMD_VERBOSITY = 0x1b, + PROTOCOL_BINARY_CMD_TOUCH = 0x1c, + PROTOCOL_BINARY_CMD_GAT = 0x1d, + PROTOCOL_BINARY_CMD_GATQ = 0x1e, + PROTOCOL_BINARY_CMD_GATK = 0x23, + PROTOCOL_BINARY_CMD_GATKQ = 0x24, + + PROTOCOL_BINARY_CMD_SASL_LIST_MECHS = 0x20, + PROTOCOL_BINARY_CMD_SASL_AUTH = 0x21, + PROTOCOL_BINARY_CMD_SASL_STEP = 0x22, + + /* These commands are used for range operations and exist within + * this header for use in other projects. Range operations are + * not expected to be implemented in the memcached server itself. + */ + PROTOCOL_BINARY_CMD_RGET = 0x30, + PROTOCOL_BINARY_CMD_RSET = 0x31, + PROTOCOL_BINARY_CMD_RSETQ = 0x32, + PROTOCOL_BINARY_CMD_RAPPEND = 0x33, + PROTOCOL_BINARY_CMD_RAPPENDQ = 0x34, + PROTOCOL_BINARY_CMD_RPREPEND = 0x35, + PROTOCOL_BINARY_CMD_RPREPENDQ = 0x36, + PROTOCOL_BINARY_CMD_RDELETE = 0x37, + PROTOCOL_BINARY_CMD_RDELETEQ = 0x38, + PROTOCOL_BINARY_CMD_RINCR = 0x39, + PROTOCOL_BINARY_CMD_RINCRQ = 0x3a, + PROTOCOL_BINARY_CMD_RDECR = 0x3b, + PROTOCOL_BINARY_CMD_RDECRQ = 0x3c, + /* End Range operations */ + + /* VBucket commands */ + PROTOCOL_BINARY_CMD_SET_VBUCKET = 0x3d, + PROTOCOL_BINARY_CMD_GET_VBUCKET = 0x3e, + PROTOCOL_BINARY_CMD_DEL_VBUCKET = 0x3f, + /* End VBucket commands */ + + /* TAP commands */ + PROTOCOL_BINARY_CMD_TAP_CONNECT = 0x40, + PROTOCOL_BINARY_CMD_TAP_MUTATION = 0x41, + PROTOCOL_BINARY_CMD_TAP_DELETE = 0x42, + PROTOCOL_BINARY_CMD_TAP_FLUSH = 0x43, + PROTOCOL_BINARY_CMD_TAP_OPAQUE = 0x44, + PROTOCOL_BINARY_CMD_TAP_VBUCKET_SET = 0x45, + PROTOCOL_BINARY_CMD_TAP_CHECKPOINT_START = 0x46, + PROTOCOL_BINARY_CMD_TAP_CHECKPOINT_END = 0x47, + /* End TAP */ + + PROTOCOL_BINARY_CMD_LAST_RESERVED = 0xef, + + /* Scrub the data */ + PROTOCOL_BINARY_CMD_SCRUB = 0xf0 + } protocol_binary_command; + + /** + * Definition of the data types in the packet + * See section 3.4 Data Types + */ + typedef enum { + PROTOCOL_BINARY_RAW_BYTES = 0x00 + } protocol_binary_datatypes; + + /** + * Definition of the header structure for a request packet. + * See section 2 + */ + typedef union { + struct { + uint8_t magic; + uint8_t opcode; + uint16_t keylen; + uint8_t extlen; + uint8_t datatype; + uint16_t vbucket; + uint32_t bodylen; + uint32_t opaque; + uint64_t cas; + } request; + uint8_t bytes[24]; + } protocol_binary_request_header; + + /** + * Definition of the header structure for a response packet. + * See section 2 + */ + typedef union { + struct { + uint8_t magic; + uint8_t opcode; + uint16_t keylen; + uint8_t extlen; + uint8_t datatype; + uint16_t status; + uint32_t bodylen; + uint32_t opaque; + uint64_t cas; + } response; + uint8_t bytes[24]; + } protocol_binary_response_header; + + /** + * Definition of a request-packet containing no extras + */ + union protocol_binary_request_no_extras { + struct { + protocol_binary_request_header header; + } message; + uint8_t bytes[sizeof(protocol_binary_request_header)]; + }; + typedef union protocol_binary_request_no_extras protocol_binary_request_no_extras; + + /** + * Definition of a response-packet containing no extras + */ + typedef union { + struct { + protocol_binary_response_header header; + } message; + uint8_t bytes[sizeof(protocol_binary_response_header)]; + } protocol_binary_response_no_extras; + + /** + * Definition of the packet used by the get, getq, getk and getkq command. + * See section 4 + */ + typedef protocol_binary_request_no_extras protocol_binary_request_get; + typedef protocol_binary_request_no_extras protocol_binary_request_getq; + typedef protocol_binary_request_no_extras protocol_binary_request_getk; + typedef protocol_binary_request_no_extras protocol_binary_request_getkq; + + /** + * Definition of the packet returned from a successful get, getq, getk and + * getkq. + * See section 4 + */ + typedef union { + struct { + protocol_binary_response_header header; + struct { + uint32_t flags; + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_response_header) + 4]; + } protocol_binary_response_get; + + typedef protocol_binary_response_get protocol_binary_response_getq; + typedef protocol_binary_response_get protocol_binary_response_getk; + typedef protocol_binary_response_get protocol_binary_response_getkq; + + /** + * Definition of the packet used by the delete command + * See section 4 + */ + typedef protocol_binary_request_no_extras protocol_binary_request_delete; + + /** + * Definition of the packet returned by the delete command + * See section 4 + */ + typedef protocol_binary_response_no_extras protocol_binary_response_delete; + + /** + * Definition of the packet used by the flush command + * See section 4 + * Please note that the expiration field is optional, so remember to see + * check the header.bodysize to see if it is present. + */ + typedef union { + struct { + protocol_binary_request_header header; + struct { + uint32_t expiration; + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_request_header) + 4]; + } protocol_binary_request_flush; + + /** + * Definition of the packet returned by the flush command + * See section 4 + */ + typedef protocol_binary_response_no_extras protocol_binary_response_flush; + + /** + * Definition of the packet used by set, add and replace + * See section 4 + */ + typedef union { + struct { + protocol_binary_request_header header; + struct { + uint32_t flags; + uint32_t expiration; + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_request_header) + 8]; + } protocol_binary_request_set; + typedef protocol_binary_request_set protocol_binary_request_add; + typedef protocol_binary_request_set protocol_binary_request_replace; + + /** + * Definition of the packet returned by set, add and replace + * See section 4 + */ + typedef protocol_binary_response_no_extras protocol_binary_response_set; + typedef protocol_binary_response_no_extras protocol_binary_response_add; + typedef protocol_binary_response_no_extras protocol_binary_response_replace; + + /** + * Definition of the noop packet + * See section 4 + */ + typedef protocol_binary_request_no_extras protocol_binary_request_noop; + + /** + * Definition of the packet returned by the noop command + * See section 4 + */ + typedef protocol_binary_response_no_extras protocol_binary_response_noop; + + /** + * Definition of the structure used by the increment and decrement + * command. + * See section 4 + */ + typedef union { + struct { + protocol_binary_request_header header; + struct { + uint64_t delta; + uint64_t initial; + uint32_t expiration; + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_request_header) + 20]; + } protocol_binary_request_incr; + typedef protocol_binary_request_incr protocol_binary_request_decr; + + /** + * Definition of the response from an incr or decr command + * command. + * See section 4 + */ + typedef union { + struct { + protocol_binary_response_header header; + struct { + uint64_t value; + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_response_header) + 8]; + } protocol_binary_response_incr; + typedef protocol_binary_response_incr protocol_binary_response_decr; + + /** + * Definition of the quit + * See section 4 + */ + typedef protocol_binary_request_no_extras protocol_binary_request_quit; + + /** + * Definition of the packet returned by the quit command + * See section 4 + */ + typedef protocol_binary_response_no_extras protocol_binary_response_quit; + + /** + * Definition of the packet used by append and prepend command + * See section 4 + */ + typedef protocol_binary_request_no_extras protocol_binary_request_append; + typedef protocol_binary_request_no_extras protocol_binary_request_prepend; + + /** + * Definition of the packet returned from a successful append or prepend + * See section 4 + */ + typedef protocol_binary_response_no_extras protocol_binary_response_append; + typedef protocol_binary_response_no_extras protocol_binary_response_prepend; + + /** + * Definition of the packet used by the version command + * See section 4 + */ + typedef protocol_binary_request_no_extras protocol_binary_request_version; + + /** + * Definition of the packet returned from a successful version command + * See section 4 + */ + typedef protocol_binary_response_no_extras protocol_binary_response_version; + + + /** + * Definition of the packet used by the stats command. + * See section 4 + */ + typedef protocol_binary_request_no_extras protocol_binary_request_stats; + + /** + * Definition of the packet returned from a successful stats command + * See section 4 + */ + typedef protocol_binary_response_no_extras protocol_binary_response_stats; + + /** + * Definition of the packet used by the verbosity command + */ + typedef union { + struct { + protocol_binary_request_header header; + struct { + uint32_t level; + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_request_header) + 4]; + } protocol_binary_request_verbosity; + + /** + * Definition of the packet returned from the verbosity command + */ + typedef protocol_binary_response_no_extras protocol_binary_response_verbosity; + + /** + * Definition of the packet used by the touch command. + */ + typedef union { + struct { + protocol_binary_request_header header; + struct { + uint32_t expiration; + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_request_header) + 4]; + } protocol_binary_request_touch; + + /** + * Definition of the packet returned from the touch command + */ + typedef protocol_binary_response_no_extras protocol_binary_response_touch; + + /** + * Definition of the packet used by the GAT(Q) command. + */ + typedef union { + struct { + protocol_binary_request_header header; + struct { + uint32_t expiration; + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_request_header) + 4]; + } protocol_binary_request_gat; + + typedef protocol_binary_request_gat protocol_binary_request_gatq; + + /** + * Definition of the packet returned from the GAT(Q) + */ + typedef protocol_binary_response_get protocol_binary_response_gat; + typedef protocol_binary_response_get protocol_binary_response_gatq; + + + /** + * Definition of a request for a range operation. + * See http://code.google.com/p/memcached/wiki/RangeOps + * + * These types are used for range operations and exist within + * this header for use in other projects. Range operations are + * not expected to be implemented in the memcached server itself. + */ + typedef union { + struct { + protocol_binary_response_header header; + struct { + uint16_t size; + uint8_t reserved; + uint8_t flags; + uint32_t max_results; + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_request_header) + 4]; + } protocol_binary_request_rangeop; + + typedef protocol_binary_request_rangeop protocol_binary_request_rget; + typedef protocol_binary_request_rangeop protocol_binary_request_rset; + typedef protocol_binary_request_rangeop protocol_binary_request_rsetq; + typedef protocol_binary_request_rangeop protocol_binary_request_rappend; + typedef protocol_binary_request_rangeop protocol_binary_request_rappendq; + typedef protocol_binary_request_rangeop protocol_binary_request_rprepend; + typedef protocol_binary_request_rangeop protocol_binary_request_rprependq; + typedef protocol_binary_request_rangeop protocol_binary_request_rdelete; + typedef protocol_binary_request_rangeop protocol_binary_request_rdeleteq; + typedef protocol_binary_request_rangeop protocol_binary_request_rincr; + typedef protocol_binary_request_rangeop protocol_binary_request_rincrq; + typedef protocol_binary_request_rangeop protocol_binary_request_rdecr; + typedef protocol_binary_request_rangeop protocol_binary_request_rdecrq; + + + /** + * Definition of tap commands + * See To be written + * + */ + + typedef union { + struct { + protocol_binary_request_header header; + struct { + /** + * flags is a bitmask used to set properties for the + * the connection. Please In order to be forward compatible + * you should set all undefined bits to 0. + * + * If the bit require extra userdata, it will be stored + * in the user-data field of the body (passed to the engine + * as enginespeciffic). That means that when you parse the + * flags and the engine-specific data, you have to work your + * way from bit 0 and upwards to find the correct offset for + * the data. + * + */ + uint32_t flags; + + /** + * Backfill age + * + * By using this flag you can limit the amount of data being + * transmitted. If you don't specify a backfill age, the + * server will transmit everything it contains. + * + * The first 8 bytes in the engine specific data contains + * the oldest entry (from epoc) you're interested in. + * Specifying a time in the future (for the server you are + * connecting to), will cause it to start streaming current + * changes. + */ +#define TAP_CONNECT_FLAG_BACKFILL 0x01 + /** + * Dump will cause the server to send the data stored on the + * server, but disconnect when the keys stored in the server + * are transmitted. + */ +#define TAP_CONNECT_FLAG_DUMP 0x02 + /** + * The body contains a list of 16 bits words in network byte + * order specifying the vbucket ids to monitor. The first 16 + * bit word contains the number of buckets. The number of 0 + * means "all buckets" + */ +#define TAP_CONNECT_FLAG_LIST_VBUCKETS 0x04 + /** + * The responsibility of the vbuckets is to be transferred + * over to the caller when all items are transferred. + */ +#define TAP_CONNECT_FLAG_TAKEOVER_VBUCKETS 0x08 + /** + * The tap consumer supports ack'ing of tap messages + */ +#define TAP_CONNECT_SUPPORT_ACK 0x10 + /** + * The tap consumer would prefer to just get the keys + * back. If the engine supports this it will set + * the TAP_FLAG_NO_VALUE flag in each of the + * tap packets returned. + */ +#define TAP_CONNECT_REQUEST_KEYS_ONLY 0x20 + /** + * The body contains a list of (vbucket_id, last_checkpoint_id) + * pairs. This provides the checkpoint support in TAP streams. + * The last checkpoint id represents the last checkpoint that + * was successfully persisted. + */ +#define TAP_CONNECT_CHECKPOINT 0x40 + /** + * The tap consumer is a registered tap client, which means that + * the tap server will maintain its checkpoint cursor permanently. + */ +#define TAP_CONNECT_REGISTERED_CLIENT 0x80 + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_request_header) + 4]; + } protocol_binary_request_tap_connect; + + typedef union { + struct { + protocol_binary_request_header header; + struct { + struct { + uint16_t enginespecific_length; + /* + * The flag section support the following flags + */ + /** + * Request that the consumer send a response packet + * for this packet. The opaque field must be preserved + * in the response. + */ +#define TAP_FLAG_ACK 0x01 + /** + * The value for the key is not included in the packet + */ +#define TAP_FLAG_NO_VALUE 0x02 + uint16_t flags; + uint8_t ttl; + uint8_t res1; + uint8_t res2; + uint8_t res3; + } tap; + struct { + uint32_t flags; + uint32_t expiration; + } item; + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_request_header) + 16]; + } protocol_binary_request_tap_mutation; + + typedef union { + struct { + protocol_binary_request_header header; + struct { + struct { + uint16_t enginespecific_length; + /** + * See the definition of the flags for + * protocol_binary_request_tap_mutation for a description + * of the available flags. + */ + uint16_t flags; + uint8_t ttl; + uint8_t res1; + uint8_t res2; + uint8_t res3; + } tap; + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_request_header) + 8]; + } protocol_binary_request_tap_no_extras; + + typedef protocol_binary_request_tap_no_extras protocol_binary_request_tap_delete; + typedef protocol_binary_request_tap_no_extras protocol_binary_request_tap_flush; + typedef protocol_binary_request_tap_no_extras protocol_binary_request_tap_opaque; + typedef protocol_binary_request_tap_no_extras protocol_binary_request_tap_vbucket_set; + + + /** + * Definition of the packet used by the scrub. + */ + typedef protocol_binary_request_no_extras protocol_binary_request_scrub; + + /** + * Definition of the packet returned from scrub. + */ + typedef protocol_binary_response_no_extras protocol_binary_response_scrub; + + + /** + * Definition of the packet used by set vbucket + */ + typedef union { + struct { + protocol_binary_request_header header; + struct { + vbucket_state_t state; + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_request_header) + sizeof(vbucket_state_t)]; + } protocol_binary_request_set_vbucket; + /** + * Definition of the packet returned from set vbucket + */ + typedef protocol_binary_response_no_extras protocol_binary_response_set_vbucket; + /** + * Definition of the packet used by del vbucket + */ + typedef protocol_binary_request_no_extras protocol_binary_request_del_vbucket; + /** + * Definition of the packet returned from del vbucket + */ + typedef protocol_binary_response_no_extras protocol_binary_response_del_vbucket; + + /** + * Definition of the packet used by get vbucket + */ + typedef protocol_binary_request_no_extras protocol_binary_request_get_vbucket; + + /** + * Definition of the packet returned from get vbucket + */ + typedef union { + struct { + protocol_binary_response_header header; + struct { + vbucket_state_t state; + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_response_header) + sizeof(vbucket_state_t)]; + } protocol_binary_response_get_vbucket; + + + /** + * @} + */ + +#ifdef __cplusplus +} +#endif +#endif /* PROTOCOL_BINARY_H */ diff --git a/libmemcached/memcached/vbucket.h b/libmemcached/memcached/vbucket.h new file mode 100644 index 0000000..e2cc563 --- /dev/null +++ b/libmemcached/memcached/vbucket.h @@ -0,0 +1,59 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" +{ +#endif + +typedef enum { + vbucket_state_active = 1, /**< Actively servicing a vbucket. */ + vbucket_state_replica, /**< Servicing a vbucket as a replica only. */ + vbucket_state_pending, /**< Pending active. */ + vbucket_state_dead /**< Not in use, pending deletion. */ +} vbucket_state_t; + +#define is_valid_vbucket_state_t(state) \ + (state == vbucket_state_active || \ + state == vbucket_state_replica || \ + state == vbucket_state_pending || \ + state == vbucket_state_dead) + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached/memory.h b/libmemcached/memory.h new file mode 100644 index 0000000..12d0284 --- /dev/null +++ b/libmemcached/memory.h @@ -0,0 +1,111 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include + +#include + +#ifdef __cplusplus +#include +#include +#else +#include +#include +#endif + +static inline void libmemcached_free(const memcached_st *self, void *mem) +{ + if (self) + { + self->allocators.free(self, mem, self->allocators.context); + } + else if (mem) + { +#ifdef __cplusplus + std::free(mem); +#else + free(mem); +#endif + } +} + +static inline void *libmemcached_malloc(const memcached_st *self, const size_t size) +{ + if (self) + { + return self->allocators.malloc(self, size, self->allocators.context); + } + +#ifdef __cplusplus + return std::malloc(size); +#else + return malloc(size); +#endif +} +#define libmemcached_xmalloc(__memcachd_st, __type) ((__type *)libmemcached_malloc((__memcachd_st), sizeof(__type))) + +static inline void *libmemcached_realloc(const memcached_st *self, void *mem, size_t nmemb, const size_t size) +{ + if (self) + { + return self->allocators.realloc(self, mem, nmemb * size, self->allocators.context); + } + +#ifdef __cplusplus + return std::realloc(mem, size); +#else + return realloc(mem, size); +#endif +} +#define libmemcached_xrealloc(__memcachd_st, __mem, __nelem, __type) ((__type *)libmemcached_realloc((__memcachd_st), (__mem), (__nelem), sizeof(__type))) +#define libmemcached_xvalloc(__memcachd_st, __nelem, __type) ((__type *)libmemcached_realloc((__memcachd_st), NULL, (__nelem), sizeof(__type))) + +static inline void *libmemcached_calloc(const memcached_st *self, size_t nelem, size_t size) +{ + if (self) + { + return self->allocators.calloc(self, nelem, size, self->allocators.context); + } + +#ifdef __cplusplus + return std::calloc(nelem, size); +#else + return calloc(nelem, size); +#endif +} +#define libmemcached_xcalloc(__memcachd_st, __nelem, __type) ((__type *)libmemcached_calloc((__memcachd_st), (__nelem), sizeof(__type))) diff --git a/libmemcached/namespace.cc b/libmemcached/namespace.cc new file mode 100644 index 0000000..664ebc4 --- /dev/null +++ b/libmemcached/namespace.cc @@ -0,0 +1,94 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libmemcached/common.h" +#include "libmemcached/assert.hpp" + +memcached_return_t memcached_set_namespace(Memcached& memc, const char *key, size_t key_length) +{ + if (key and key_length == 0) + { + WATCHPOINT_ASSERT(key_length); + return memcached_set_error(memc, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, memcached_literal_param("Invalid namespace, namespace string had value but length was 0")); + } + else if (key_length and key == NULL) + { + WATCHPOINT_ASSERT(key); + return memcached_set_error(memc, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, memcached_literal_param("Invalid namespace, namespace string length was > 1 but namespace string was null ")); + } + else if (key and key_length) + { + bool orig= memc.flags.verify_key; + memc.flags.verify_key= true; + if (memcached_failed(memcached_key_test(memc, (const char **)&key, &key_length, 1))) + { + memc.flags.verify_key= orig; + return memcached_last_error(&memc); + } + memc.flags.verify_key= orig; + + if ((key_length > MEMCACHED_PREFIX_KEY_MAX_SIZE -1)) + { + return memcached_set_error(memc, MEMCACHED_KEY_TOO_BIG, MEMCACHED_AT); + } + + memcached_array_free(memc._namespace); + memc._namespace= memcached_strcpy(&memc, key, key_length); + + if (memc._namespace == NULL) + { + return memcached_set_error(memc, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT); + } + } + else + { + memcached_array_free(memc._namespace); + memc._namespace= NULL; + } + + return MEMCACHED_SUCCESS; +} + +const char * memcached_get_namespace(Memcached& memc) +{ + if (memc._namespace == NULL) + { + return NULL; + } + + return memcached_array_string(memc._namespace); +} diff --git a/libmemcached/namespace.h b/libmemcached/namespace.h new file mode 100644 index 0000000..0c98ce4 --- /dev/null +++ b/libmemcached/namespace.h @@ -0,0 +1,46 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus + +memcached_return_t memcached_set_namespace(Memcached&, const char *str, size_t length); + +const char * memcached_get_namespace(Memcached&); + +#endif // __cplusplus diff --git a/libmemcached/options.cc b/libmemcached/options.cc new file mode 100644 index 0000000..290cfc8 --- /dev/null +++ b/libmemcached/options.cc @@ -0,0 +1,185 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include + +#include + +const char *memcached_parse_filename(memcached_st *memc) +{ + assert_msg(memc, "Invalid memcached_st"); + return memcached_array_string(memc->configure.filename); +} + +size_t memcached_parse_filename_length(memcached_st *memc) +{ + return memcached_array_size(memc->configure.filename); +} + +static memcached_return_t _parse_file_options(memcached_st& self, memcached_array_st *real_name) +{ + FILE *fp= fopen(memcached_array_string(real_name), "r"); + if (not fp) + { + memcached_string_t error_message= memcached_array_to_string(real_name); + memcached_return_t rc= memcached_set_errno(self, errno, MEMCACHED_AT, error_message); + return rc; + } + + char buffer[BUFSIZ]; + memcached_return_t rc= MEMCACHED_INVALID_ARGUMENTS; + while (fgets(buffer, sizeof(buffer), fp)) + { + size_t length= strlen(buffer); + + if (length == 1 and buffer[0] == '\n') + continue; + + if (memcached_failed(rc= memcached_parse_configuration(&self, buffer, length))) + break; + } + fclose(fp); + + return rc; +} + +memcached_return_t libmemcached_check_configuration(const char *option_string, size_t length, char *error_buffer, size_t error_buffer_size) +{ + memcached_st memc, *memc_ptr; + + if (option_string == NULL or length == 0) + { + return MEMCACHED_INVALID_ARGUMENTS; + } + + if (error_buffer and error_buffer_size) + { + error_buffer[0]= 0; + } + + if (not (memc_ptr= memcached_create(&memc))) + { + return MEMCACHED_MEMORY_ALLOCATION_FAILURE; + } + + memcached_return_t rc= memcached_parse_configuration(memc_ptr, option_string, length); + if (memcached_failed(rc) and error_buffer and error_buffer_size) + { + strncpy(error_buffer, memcached_last_error_message(memc_ptr), error_buffer_size); + error_buffer[error_buffer_size -1]= 0; + } + + bool has_filename= memcached_behavior_get(memc_ptr, MEMCACHED_BEHAVIOR_LOAD_FROM_FILE); + if (memcached_success(rc) and has_filename) + { + assert_msg(memcached_parse_filename(memc_ptr), "Invalid configuration file"); + assert_msg(memcached_parse_filename_length(memc_ptr), "Invalid configuration file"); + rc= _parse_file_options(*memc_ptr, memc_ptr->configure.filename); + + if (memcached_failed(rc) and error_buffer and error_buffer_size) + { + strncpy(error_buffer, memcached_last_error_message(memc_ptr), error_buffer_size); + error_buffer[error_buffer_size -1]= 0; + } + } + + memcached_free(memc_ptr); + + return rc; +} + +memcached_return_t memcached_parse_configuration(memcached_st *self, char const *option_string, size_t length) +{ + WATCHPOINT_ASSERT(self); + if (not self) + { + return MEMCACHED_INVALID_ARGUMENTS; + } + + memcached_return_t rc; + Context context(option_string, length, self, rc); + + context.start(); + + return rc; +} + +void memcached_set_configuration_file(memcached_st *self, const char *filename, size_t filename_length) +{ + assert_msg(filename, "Invalid filename"); + assert_msg(filename_length, "Invalid filename_length"); + memcached_array_free(self->configure.filename); + self->configure.filename= memcached_strcpy(self, filename, filename_length); +} + +memcached_return_t memcached_parse_configure_file(memcached_st& self, const char *filename, size_t length) +{ + if (not filename) + { + return memcached_set_error(self, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT); + } + + WATCHPOINT_ASSERT(self); + if (not length) + { + return memcached_set_error(self, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT); + } + + memcached_array_st *tmp_array= memcached_strcpy(&self, filename, length); + + if (not tmp_array) + { + return memcached_set_error(self, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT); + } + + memcached_return_t rc= memcached_parse_configure_file(self, *tmp_array); + memcached_array_free(tmp_array); + + return rc; +} + +memcached_return_t memcached_parse_configure_file(memcached_st& self, memcached_array_st& filename) +{ + WATCHPOINT_ASSERT(memcached_array_size(&filename)); + if (not memcached_array_size(&filename)) + { + return memcached_set_error(self, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT); + } + + return _parse_file_options(self, &filename); +} diff --git a/libmemcached/options.hpp b/libmemcached/options.hpp new file mode 100644 index 0000000..bc71732 --- /dev/null +++ b/libmemcached/options.hpp @@ -0,0 +1,56 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +LIBMEMCACHED_LOCAL + void memcached_set_configuration_file(memcached_st *self, const char *filename, size_t filename_length); + +LIBMEMCACHED_LOCAL + const char *memcached_parse_filename(memcached_st *memc); + +LIBMEMCACHED_LOCAL + memcached_return_t memcached_parse_configuration(memcached_st *ptr, const char *option_string, size_t length); + +LIBMEMCACHED_LOCAL + size_t memcached_parse_filename_length(memcached_st *memc); + +LIBMEMCACHED_LOCAL + memcached_return_t memcached_parse_configure_file(memcached_st&, const char *filename, size_t length); + +LIBMEMCACHED_LOCAL + memcached_return_t memcached_parse_configure_file(memcached_st&, memcached_array_st& filename); diff --git a/libmemcached/parse.cc b/libmemcached/parse.cc new file mode 100644 index 0000000..7665b73 --- /dev/null +++ b/libmemcached/parse.cc @@ -0,0 +1,124 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* + I debated about putting this in the client library since it does an + action I don't really believe belongs in the library. + + Frankly its too damn useful not to be here though. +*/ + +#include + +memcached_server_list_st memcached_servers_parse(const char *server_strings) +{ + char *string; + const char *begin_ptr; + const char *end_ptr; + memcached_server_st *servers= NULL; + memcached_return_t rc; + + WATCHPOINT_ASSERT(server_strings); + + end_ptr= server_strings + strlen(server_strings); + + for (begin_ptr= server_strings, string= (char *)index(server_strings, ','); + begin_ptr != end_ptr; + string= (char *)index(begin_ptr, ',')) + { + char buffer[HUGE_STRING_LEN]; + char *ptr, *ptr2; + uint32_t weight= 0; + + if (string) + { + memcpy(buffer, begin_ptr, (size_t) (string - begin_ptr)); + buffer[(unsigned int)(string - begin_ptr)]= 0; + begin_ptr= string+1; + } + else + { + size_t length= strlen(begin_ptr); + memcpy(buffer, begin_ptr, length); + buffer[length]= 0; + begin_ptr= end_ptr; + } + + ptr= index(buffer, ':'); + + in_port_t port= 0; + if (ptr) + { + ptr[0]= 0; + + ptr++; + + errno= 0; + port= (in_port_t) strtoul(ptr, (char **)NULL, 10); + if (errno != 0) + { + memcached_server_free(servers); + return NULL; + } + + ptr2= index(ptr, ' '); + if (! ptr2) + ptr2= index(ptr, ':'); + + if (ptr2) + { + ptr2++; + errno= 0; + weight= uint32_t(strtoul(ptr2, (char **)NULL, 10)); + if (errno != 0) + { + memcached_server_free(servers); + return NULL; + } + } + } + + servers= memcached_server_list_append_with_weight(servers, buffer, port, weight, &rc); + + if (isspace(*begin_ptr)) + { + begin_ptr++; + } + } + + return servers; +} diff --git a/libmemcached/poll.cc b/libmemcached/poll.cc new file mode 100644 index 0000000..6fdf242 --- /dev/null +++ b/libmemcached/poll.cc @@ -0,0 +1,85 @@ +/* LibMemcached + * Copyright (C) 2013 Data Differential, http://datadifferential.com/ + * Copyright (C) 2010 Brian Aker, Trond Norbye + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: Implementation of poll by using select + * + */ + +#include "libmemcached/common.h" + +#if defined(_WIN32) +#include "libmemcached/poll.h" + +#include +#include + +int poll(struct pollfd fds[], nfds_t nfds, int tmo) +{ + fd_set readfds, writefds, errorfds; + FD_ZERO(&readfds); + FD_ZERO(&writefds); + FD_ZERO(&errorfds); + + int maxfd= 0; + + for (nfds_t x= 0; x < nfds; ++x) + { + if (fds[x].events & (POLLIN | POLLOUT)) + { +#ifndef _WIN32 + if (fds[x].fd > maxfd) + { + maxfd= fds[x].fd; + } +#endif + if (fds[x].events & POLLIN) + { + FD_SET(fds[x].fd, &readfds); + } + if (fds[x].events & POLLOUT) + { + FD_SET(fds[x].fd, &writefds); + } + } + } + + struct timeval timeout= { .tv_sec = tmo / 1000, + .tv_usec= (tmo % 1000) * 1000 }; + struct timeval *tp= &timeout; + if (tmo == -1) + { + tp= NULL; + } + int ret= select(maxfd + 1, &readfds, &writefds, &errorfds, tp); + if (ret <= 0) + { + return ret; + } + + /* Iterate through all of them because I need to clear the revent map */ + for (nfds_t x= 0; x < nfds; ++x) + { + fds[x].revents= 0; + if (FD_ISSET(fds[x].fd, &readfds)) + { + fds[x].revents |= POLLIN; + } + if (FD_ISSET(fds[x].fd, &writefds)) + { + fds[x].revents |= POLLOUT; + } + if (FD_ISSET(fds[x].fd, &errorfds)) + { + fds[x].revents |= POLLERR; + } + } + + return ret; +} + +#endif // defined(_WIN32) diff --git a/libmemcached/poll.h b/libmemcached/poll.h new file mode 100644 index 0000000..46636c4 --- /dev/null +++ b/libmemcached/poll.h @@ -0,0 +1,48 @@ +/* LibMemcached + * Copyright (C) 2013 Data Differential, http://datadifferential.com/ + * Copyright (C) 2010 Brian Aker, Trond Norbye + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: Implementation of poll by using select + * + */ + +#pragma once + +#if defined(_WIN32) + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct pollfd +{ +#if defined(_WIN32) + SOCKET fd; +#else + int fd; +#endif + short events; + short revents; +} pollfd_t; + +typedef int nfds_t; + +#define POLLIN 0x0001 +#define POLLOUT 0x0004 +#define POLLERR 0x0008 +#define POLLHUP 0x010 /* Hung up. */ +#define POLLNVAL 0x020 /* Invalid polling request. */ + +int poll(struct pollfd fds[], nfds_t nfds, int tmo); + +#ifdef __cplusplus +} +#endif + +#endif // defined(_WIN32) diff --git a/libmemcached/purge.cc b/libmemcached/purge.cc new file mode 100644 index 0000000..5f6d4bb --- /dev/null +++ b/libmemcached/purge.cc @@ -0,0 +1,165 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * LibMemcached + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#include + +#define memcached_set_purging(__object, __value) ((__object)->state.is_purging= (__value)) + +class Purge +{ +public: + Purge(Memcached* arg) : + _memc(arg) + { + memcached_set_purging(_memc, true); + } + + ~Purge() + { + memcached_set_purging(_memc, false); + } + +private: + Memcached* _memc; +}; + +class PollTimeout +{ +public: + PollTimeout(Memcached* arg) : + _timeout(arg->poll_timeout), + _origin(arg->poll_timeout) + { + _origin = 2000; + } + + ~PollTimeout() + { + _origin= _timeout; + } + +private: + int32_t _timeout; + int32_t& _origin; +}; + +bool memcached_purge(memcached_instance_st* ptr) +{ + Memcached *root= (Memcached *)ptr->root; + + if (memcached_is_purging(ptr->root) || /* already purging */ + (memcached_server_response_count(ptr) < ptr->root->io_msg_watermark && + ptr->io_bytes_sent < ptr->root->io_bytes_watermark) || + (ptr->io_bytes_sent >= ptr->root->io_bytes_watermark && + memcached_server_response_count(ptr) < 2)) + { + return true; + } + + /* + memcached_io_write and memcached_response may call memcached_purge + so we need to be able stop any recursion.. + */ + Purge set_purge(root); + + WATCHPOINT_ASSERT(ptr->fd != INVALID_SOCKET); + /* + Force a flush of the buffer to ensure that we don't have the n-1 pending + requests buffered up.. + */ + if (memcached_io_write(ptr) == false) + { + memcached_set_error(*ptr, MEMCACHED_WRITE_FAILURE, MEMCACHED_AT); + return false; + } + WATCHPOINT_ASSERT(ptr->fd != INVALID_SOCKET); + + bool is_successful= true; + uint32_t no_msg= memcached_server_response_count(ptr) - 1; + if (no_msg > 0) + { + memcached_result_st result; + + /* + * We need to increase the timeout, because we might be waiting for + * data to be sent from the server (the commands was in the output buffer + * and just flushed + */ + PollTimeout poll_timeout(ptr->root); + + memcached_result_st* result_ptr= memcached_result_create(root, &result); + assert(result_ptr); + + for (uint32_t x= 0; x < no_msg; x++) + { + memcached_result_reset(result_ptr); + memcached_return_t rc= memcached_read_one_response(ptr, result_ptr); + /* + * Purge doesn't care for what kind of command results that is received. + * The only kind of errors I care about if is I'm out of sync with the + * protocol or have problems reading data from the network.. + */ + if (rc== MEMCACHED_PROTOCOL_ERROR or rc == MEMCACHED_UNKNOWN_READ_FAILURE or rc == MEMCACHED_READ_FAILURE) + { + WATCHPOINT_ERROR(rc); + memcached_io_reset(ptr); + is_successful= false; + } + + if (ptr->root->callbacks != NULL) + { + memcached_callback_st cb = *ptr->root->callbacks; + if (memcached_success(rc)) + { + for (uint32_t y= 0; y < cb.number_of_callback; y++) + { + if (memcached_fatal((*cb.callback[y])(ptr->root, result_ptr, cb.context))) + { + break; + } + } + } + } + } + + memcached_result_free(result_ptr); + } + + return is_successful; +} diff --git a/libmemcached/quit.cc b/libmemcached/quit.cc new file mode 100644 index 0000000..5d17b31 --- /dev/null +++ b/libmemcached/quit.cc @@ -0,0 +1,157 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +namespace { + memcached_return_t send_quit_message(memcached_instance_st* instance) + { + memcached_return_t rc; + if (instance->root->flags.binary_protocol) + { + protocol_binary_request_quit request= {}; // = {.bytes= {0}}; + + initialize_binary_request(instance, request.message.header); + + request.message.header.request.opcode = PROTOCOL_BINARY_CMD_QUIT; + request.message.header.request.datatype = PROTOCOL_BINARY_RAW_BYTES; + + libmemcached_io_vector_st vector[]= + { + { request.bytes, sizeof(request.bytes) } + }; + + rc= memcached_vdo(instance, vector, 1, true); + } + else + { + libmemcached_io_vector_st vector[]= + { + { memcached_literal_param("quit\r\n") } + }; + + rc= memcached_vdo(instance, vector, 1, true); + } + + return rc; + } + + void drain_instance(memcached_instance_st* instance) + { + /* read until socket is closed, or there is an error + * closing the socket before all data is read + * results in server throwing away all data which is + * not read + * + * In .40 we began to only do this if we had been doing buffered + * requests of had replication enabled. + */ + if (instance->root->flags.buffer_requests or instance->root->number_of_replicas) + { + memcached_io_slurp(instance); + } + + /* + * memcached_io_read may call memcached_quit_server with io_death if + * it encounters problems, but we don't care about those occurences. + * The intention of that loop is to drain the data sent from the + * server to ensure that the server processed all of the data we + * sent to the server. + */ + instance->server_failure_counter= 0; + instance->server_timeout_counter= 0; + } +} + +/* + This closes all connections (forces flush of input as well). + + Maybe add a host specific, or key specific version? + + The reason we send "quit" is that in case we have buffered IO, this + will force data to be completed. +*/ + +void memcached_quit_server(memcached_instance_st* instance, bool io_death) +{ + if (instance->valid()) + { + if (io_death == false and memcached_is_udp(instance->root) == false and instance->is_shutting_down() == false) + { + send_quit_message(instance); + + instance->start_close_socket(); + drain_instance(instance); + } + } + + instance->close_socket(); + + if (io_death and memcached_is_udp(instance->root)) + { + /* + If using UDP, we should stop using the server briefly on every IO + failure. If using TCP, it may be that the connection went down a + short while ago (e.g. the server failed) and we've only just + noticed, so we should only set the retry timeout on a connect + failure (which doesn't call this method). + */ + memcached_mark_server_for_timeout(instance); + } +} + +void send_quit(Memcached *memc) +{ + for (uint32_t x= 0; x < memcached_server_count(memc); x++) + { + memcached_instance_st* instance= memcached_instance_fetch(memc, x); + + memcached_quit_server(instance, false); + } +} + +void memcached_quit(memcached_st *shell) +{ + Memcached* memc= memcached2Memcached(shell); + memcached_return_t rc; + if (memcached_failed(rc= initialize_query(memc, true))) + { + return; + } + + send_quit(memc); +} diff --git a/libmemcached/quit.hpp b/libmemcached/quit.hpp new file mode 100644 index 0000000..a48a8a7 --- /dev/null +++ b/libmemcached/quit.hpp @@ -0,0 +1,41 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +void memcached_quit_server(memcached_instance_st* ptr, bool io_death); + +void send_quit(memcached_st *ptr); diff --git a/libmemcached/response.cc b/libmemcached/response.cc new file mode 100644 index 0000000..ad3c078 --- /dev/null +++ b/libmemcached/response.cc @@ -0,0 +1,937 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include + +static memcached_return_t textual_value_fetch(memcached_instance_st* instance, + char *buffer, + memcached_result_st *result) +{ + char *next_ptr; + ssize_t read_length= 0; + size_t value_length; + + WATCHPOINT_ASSERT(instance->root); + char *end_ptr= buffer + MEMCACHED_DEFAULT_COMMAND_SIZE; + + memcached_result_reset(result); + + char *string_ptr= buffer; + string_ptr+= 6; /* "VALUE " */ + + + // Just used for cases of AES decrypt currently + memcached_return_t rc= MEMCACHED_SUCCESS; + + /* We load the key */ + { + char *key= result->item_key; + result->key_length= 0; + + for (ptrdiff_t prefix_length= memcached_array_size(instance->root->_namespace); !(iscntrl(*string_ptr) || isspace(*string_ptr)) ; string_ptr++) + { + if (prefix_length == 0) + { + *key= *string_ptr; + key++; + result->key_length++; + } + else + prefix_length--; + } + result->item_key[result->key_length]= 0; + } + + if (end_ptr == string_ptr) + { + goto read_error; + } + + /* Flags fetch move past space */ + string_ptr++; + if (end_ptr == string_ptr) + { + goto read_error; + } + + for (next_ptr= string_ptr; isdigit(*string_ptr); string_ptr++) {}; + errno= 0; + result->item_flags= (uint32_t) strtoul(next_ptr, &string_ptr, 10); + + if (errno != 0 or end_ptr == string_ptr) + { + goto read_error; + } + + /* Length fetch move past space*/ + string_ptr++; + if (end_ptr == string_ptr) + { + goto read_error; + } + + for (next_ptr= string_ptr; isdigit(*string_ptr); string_ptr++) {}; + errno= 0; + value_length= (size_t)strtoull(next_ptr, &string_ptr, 10); + + if (errno != 0 or end_ptr == string_ptr) + { + goto read_error; + } + + /* Skip spaces */ + if (*string_ptr == '\r') + { + /* Skip past the \r\n */ + string_ptr+= 2; + } + else + { + string_ptr++; + for (next_ptr= string_ptr; isdigit(*string_ptr); string_ptr++) {}; + errno= 0; + result->item_cas= strtoull(next_ptr, &string_ptr, 10); + } + + if (errno != 0 or end_ptr < string_ptr) + { + goto read_error; + } + + /* We add two bytes so that we can walk the \r\n */ + if (memcached_failed(memcached_string_check(&result->value, value_length +2))) + { + return memcached_set_error(*instance, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT); + } + + { + char *value_ptr= memcached_string_value_mutable(&result->value); + /* + We read the \r\n into the string since not doing so is more + cycles then the waster of memory to do so. + + We are null terminating through, which will most likely make + some people lazy about using the return length. + */ + size_t to_read= (value_length) + 2; + memcached_return_t rrc= memcached_io_read(instance, value_ptr, to_read, read_length); + if (memcached_failed(rrc) and rrc == MEMCACHED_IN_PROGRESS) + { + memcached_quit_server(instance, true); + return memcached_set_error(*instance, MEMCACHED_IN_PROGRESS, MEMCACHED_AT); + } + else if (memcached_failed(rrc)) + { + return rrc; + } + } + + if (read_length != (ssize_t)(value_length + 2)) + { + goto read_error; + } + + /* This next bit blows the API, but this is internal....*/ + { + char *char_ptr; + char_ptr= memcached_string_value_mutable(&result->value);; + char_ptr[value_length]= 0; + char_ptr[value_length +1]= 0; + memcached_string_set_length(&result->value, value_length); + } + + if (memcached_is_encrypted(instance->root) and memcached_result_length(result)) + { + hashkit_string_st *destination; + + if ((destination= hashkit_decrypt(&instance->root->hashkit, + memcached_result_value(result), memcached_result_length(result))) == NULL) + { + rc= memcached_set_error(*instance->root, MEMCACHED_FAILURE, + MEMCACHED_AT, memcached_literal_param("hashkit_decrypt() failed")); + } + else + { + memcached_result_reset_value(result); + if (memcached_failed(memcached_result_set_value(result, hashkit_string_c_str(destination), hashkit_string_length(destination)))) + { + rc= memcached_set_error(*instance->root, MEMCACHED_FAILURE, + MEMCACHED_AT, memcached_literal_param("hashkit_decrypt() failed")); + } + } + + if (memcached_failed(rc)) + { + memcached_result_reset(result); + } + hashkit_string_free(destination); + } + + return rc; + +read_error: + memcached_io_reset(instance); + + return MEMCACHED_PARTIAL_READ; +} + +static memcached_return_t textual_read_one_response(memcached_instance_st* instance, + char *buffer, const size_t buffer_length, + memcached_result_st *result) +{ + size_t total_read; + memcached_return_t rc= memcached_io_readline(instance, buffer, buffer_length, total_read); + + if (memcached_failed(rc)) + { + return rc; + } + assert(total_read); + + switch(buffer[0]) + { + case 'V': + { + // VALUE + if (buffer[1] == 'A' and buffer[2] == 'L' and buffer[3] == 'U' and buffer[4] == 'E') /* VALUE */ + { + /* We add back in one because we will need to search for END */ + memcached_server_response_increment(instance); + return textual_value_fetch(instance, buffer, result); + } + // VERSION + else if (buffer[1] == 'E' and buffer[2] == 'R' and buffer[3] == 'S' and buffer[4] == 'I' and buffer[5] == 'O' and buffer[6] == 'N') /* VERSION */ + { + /* Find the space, and then move one past it to copy version */ + char *response_ptr= index(buffer, ' '); + + char *endptr; + errno= 0; + long int version= strtol(response_ptr, &endptr, 10); + if (errno != 0 or version == LONG_MIN or version == LONG_MAX or version > UINT8_MAX or version == 0) + { + instance->major_version= instance->minor_version= instance->micro_version= UINT8_MAX; + return memcached_set_error(*instance, MEMCACHED_UNKNOWN_READ_FAILURE, MEMCACHED_AT, memcached_literal_param("strtol() failed to parse major version")); + } + instance->major_version= uint8_t(version); + + endptr++; + errno= 0; + version= strtol(endptr, &endptr, 10); + if (errno != 0 or version == LONG_MIN or version == LONG_MAX or version > UINT8_MAX) + { + instance->major_version= instance->minor_version= instance->micro_version= UINT8_MAX; + return memcached_set_error(*instance, MEMCACHED_UNKNOWN_READ_FAILURE, MEMCACHED_AT, memcached_literal_param("strtol() failed to parse minor version")); + } + instance->minor_version= uint8_t(version); + + endptr++; + errno= 0; + version= strtol(endptr, &endptr, 10); + if (errno != 0 or version == LONG_MIN or version == LONG_MAX or version > UINT8_MAX) + { + instance->major_version= instance->minor_version= instance->micro_version= UINT8_MAX; + return memcached_set_error(*instance, MEMCACHED_UNKNOWN_READ_FAILURE, MEMCACHED_AT, memcached_literal_param("strtol() failed to parse micro version")); + } + instance->micro_version= uint8_t(version); + + return MEMCACHED_SUCCESS; + } + } + break; + + case 'O': + { + // OK + if (buffer[1] == 'K') + { + return MEMCACHED_SUCCESS; + } + } + break; + + case 'S': + { + // STAT + if (buffer[1] == 'T' and buffer[2] == 'A' and buffer[3] == 'T') /* STORED STATS */ + { + memcached_server_response_increment(instance); + return MEMCACHED_STAT; + } + // SERVER_ERROR + else if (buffer[1] == 'E' and buffer[2] == 'R' and buffer[3] == 'V' and buffer[4] == 'E' and buffer[5] == 'R' + and buffer[6] == '_' + and buffer[7] == 'E' and buffer[8] == 'R' and buffer[9] == 'R' and buffer[10] == 'O' and buffer[11] == 'R' ) + { + if (total_read == memcached_literal_param_size("SERVER_ERROR")) + { + return MEMCACHED_SERVER_ERROR; + } + + if (total_read >= memcached_literal_param_size("SERVER_ERROR object too large for cache") and + (memcmp(buffer, memcached_literal_param("SERVER_ERROR object too large for cache")) == 0)) + { + return MEMCACHED_E2BIG; + } + + if (total_read >= memcached_literal_param_size("SERVER_ERROR out of memory storing object") and + (memcmp(buffer, memcached_literal_param("SERVER_ERROR out of memory storing object")) == 0)) + { + return MEMCACHED_SERVER_MEMORY_ALLOCATION_FAILURE; + } + + // Move past the basic error message and whitespace + char *startptr= buffer + memcached_literal_param_size("SERVER_ERROR"); + if (startptr[0] == ' ') + { + startptr++; + } + + char *endptr= startptr; + while (*endptr != '\r' && *endptr != '\n') endptr++; + + return memcached_set_error(*instance, MEMCACHED_SERVER_ERROR, MEMCACHED_AT, startptr, size_t(endptr - startptr)); + } + // STORED + else if (buffer[1] == 'T' and buffer[2] == 'O' and buffer[3] == 'R') // and buffer[4] == 'E' and buffer[5] == 'D') + { + return MEMCACHED_STORED; + } + } + break; + + case 'D': + { + // DELETED + if (buffer[1] == 'E' and buffer[2] == 'L' and buffer[3] == 'E' and buffer[4] == 'T' and buffer[5] == 'E' and buffer[6] == 'D') + { + return MEMCACHED_DELETED; + } + } + break; + + case 'N': + { + // NOT_FOUND + if (buffer[1] == 'O' and buffer[2] == 'T' + and buffer[3] == '_' + and buffer[4] == 'F' and buffer[5] == 'O' and buffer[6] == 'U' and buffer[7] == 'N' and buffer[8] == 'D') + { + return MEMCACHED_NOTFOUND; + } + // NOT_STORED + else if (buffer[1] == 'O' and buffer[2] == 'T' + and buffer[3] == '_' + and buffer[4] == 'S' and buffer[5] == 'T' and buffer[6] == 'O' and buffer[7] == 'R' and buffer[8] == 'E' and buffer[9] == 'D') + { + return MEMCACHED_NOTSTORED; + } + } + break; + + case 'E': /* PROTOCOL ERROR or END */ + { + // END + if (buffer[1] == 'N' and buffer[2] == 'D') + { + return MEMCACHED_END; + } +#if 0 + // PROTOCOL_ERROR + else if (buffer[1] == 'R' and buffer[2] == 'O' and buffer[3] == 'T' and buffer[4] == 'O' and buffer[5] == 'C' and buffer[6] == 'O' and buffer[7] == 'L' + and buffer[8] == '_' + and buffer[9] == 'E' and buffer[10] == 'R' and buffer[11] == 'R' and buffer[12] == 'O' and buffer[13] == 'R') + { + return MEMCACHED_PROTOCOL_ERROR; + } +#endif + // ERROR + else if (buffer[1] == 'R' and buffer[2] == 'R' and buffer[3] == 'O' and buffer[4] == 'R') + { + return MEMCACHED_ERROR; + } + // EXISTS + else if (buffer[1] == 'X' and buffer[2] == 'I' and buffer[3] == 'S' and buffer[4] == 'T' and buffer[5] == 'S') + { + return MEMCACHED_DATA_EXISTS; + } + } + break; + + case 'T': /* TOUCHED */ + { + // TOUCHED + if (buffer[1] == 'O' and buffer[2] == 'U' and buffer[3] == 'C' and buffer[4] == 'H' and buffer[5] == 'E' and buffer[6] == 'D') + { + return MEMCACHED_SUCCESS; + } + } + break; + + case 'I': /* ITEM */ + { + // ITEM + if (buffer[1] == 'T' and buffer[2] == 'E' and buffer[3] == 'M') + { + /* We add back in one because we will need to search for END */ + memcached_server_response_increment(instance); + return MEMCACHED_ITEM; + } + } + break; + + case 'C': /* CLIENT ERROR */ + { + // CLIENT_ERROR + if (buffer[1] == 'L' and buffer[2] == 'I' and buffer[3] == 'E' and buffer[4] == 'N' and buffer[5] == 'T' + and buffer[6] == '_' + and buffer[7] == 'E' and buffer[8] == 'R' and buffer[9] == 'R' and buffer[10] == 'O' and buffer[11] == 'R') + { + // Move past the basic error message and whitespace + char *startptr= buffer + memcached_literal_param_size("CLIENT_ERROR"); + if (startptr[0] == ' ') + { + startptr++; + } + + char *endptr= startptr; + while (*endptr != '\r' && *endptr != '\n') endptr++; + + return memcached_set_error(*instance, MEMCACHED_CLIENT_ERROR, MEMCACHED_AT, startptr, size_t(endptr - startptr)); + } + } + break; + + case '0': /* INCR/DECR response */ + case '1': /* INCR/DECR response */ + case '2': /* INCR/DECR response */ + case '3': /* INCR/DECR response */ + case '4': /* INCR/DECR response */ + case '5': /* INCR/DECR response */ + case '6': /* INCR/DECR response */ + case '7': /* INCR/DECR response */ + case '8': /* INCR/DECR response */ + case '9': /* INCR/DECR response */ + { + errno= 0; + unsigned long long int auto_return_value= strtoull(buffer, (char **)NULL, 10); + + if (auto_return_value == ULLONG_MAX and errno == ERANGE) + { + result->numeric_value= UINT64_MAX; + return memcached_set_error(*instance, MEMCACHED_UNKNOWN_READ_FAILURE, MEMCACHED_AT, + memcached_literal_param("Numeric response was out of range")); + } + else if (errno == EINVAL) + { + result->numeric_value= UINT64_MAX; + return memcached_set_error(*instance, MEMCACHED_UNKNOWN_READ_FAILURE, MEMCACHED_AT, + memcached_literal_param("Numeric response was out of range")); + } + else if (errno != 0) + { + result->numeric_value= UINT64_MAX; + return memcached_set_error(*instance, MEMCACHED_UNKNOWN_READ_FAILURE, MEMCACHED_AT, + memcached_literal_param("Numeric response was out of range")); + } + + result->numeric_value= uint64_t(auto_return_value); + + WATCHPOINT_STRING(buffer); + return MEMCACHED_SUCCESS; + } + + default: + break; + } + + buffer[total_read]= 0; +#if 0 + if (total_read >= sizeof("STORSTORED") -1) + { + fprintf(stderr, "%s:%d '%s', %.*s\n", __FILE__, __LINE__, + buffer, MEMCACHED_MAX_BUFFER, instance->read_buffer); + assert(memcmp(buffer,"STORSTORED", sizeof("STORSTORED") -1)); + } +#endif + return memcached_set_error(*instance, MEMCACHED_UNKNOWN_READ_FAILURE, MEMCACHED_AT, + buffer, total_read); +} + +static memcached_return_t binary_read_one_response(memcached_instance_st* instance, + char *buffer, const size_t buffer_length, + memcached_result_st *result) +{ + memcached_return_t rc; + protocol_binary_response_header header; + + assert(memcached_is_binary(instance->root)); + + if ((rc= memcached_safe_read(instance, &header.bytes, sizeof(header.bytes))) != MEMCACHED_SUCCESS) + { + WATCHPOINT_ERROR(rc); + return rc; + } + + if (header.response.magic != PROTOCOL_BINARY_RES) + { + return memcached_set_error(*instance, MEMCACHED_UNKNOWN_READ_FAILURE, MEMCACHED_AT); + } + + /* + ** Convert the header to host local endian! + */ + header.response.keylen= ntohs(header.response.keylen); + header.response.status= ntohs(header.response.status); + header.response.bodylen= ntohl(header.response.bodylen); + header.response.cas= memcached_ntohll(header.response.cas); + uint32_t bodylen= header.response.bodylen; + + if (header.response.status == PROTOCOL_BINARY_RESPONSE_SUCCESS or + header.response.status == PROTOCOL_BINARY_RESPONSE_AUTH_CONTINUE) + { + switch (header.response.opcode) + { + case PROTOCOL_BINARY_CMD_GETKQ: + /* + * We didn't increment the response counter for the GETKQ packet + * (only the final NOOP), so we need to increment the counter again. + */ + memcached_server_response_increment(instance); + /* FALLTHROUGH */ + case PROTOCOL_BINARY_CMD_GETK: + { + uint16_t keylen= header.response.keylen; + memcached_result_reset(result); + result->item_cas= header.response.cas; + + if ((rc= memcached_safe_read(instance, &result->item_flags, sizeof (result->item_flags))) != MEMCACHED_SUCCESS) + { + WATCHPOINT_ERROR(rc); + return MEMCACHED_UNKNOWN_READ_FAILURE; + } + + result->item_flags= ntohl(result->item_flags); + bodylen -= header.response.extlen; + + result->key_length= keylen; + if (memcached_failed(rc= memcached_safe_read(instance, result->item_key, keylen))) + { + WATCHPOINT_ERROR(rc); + return MEMCACHED_UNKNOWN_READ_FAILURE; + } + + // Only bother with doing this if key_length > 0 + if (result->key_length) + { + if (memcached_array_size(instance->root->_namespace) and memcached_array_size(instance->root->_namespace) >= result->key_length) + { + return memcached_set_error(*instance, MEMCACHED_UNKNOWN_READ_FAILURE, MEMCACHED_AT); + } + + if (memcached_array_size(instance->root->_namespace)) + { + result->key_length-= memcached_array_size(instance->root->_namespace); + memmove(result->item_key, result->item_key +memcached_array_size(instance->root->_namespace), result->key_length); + } + } + + bodylen -= keylen; + if (memcached_failed(memcached_string_check(&result->value, bodylen))) + { + return MEMCACHED_MEMORY_ALLOCATION_FAILURE; + } + + char *vptr= memcached_string_value_mutable(&result->value); + if (memcached_failed(rc= memcached_safe_read(instance, vptr, bodylen))) + { + WATCHPOINT_ERROR(rc); + return MEMCACHED_UNKNOWN_READ_FAILURE; + } + + memcached_string_set_length(&result->value, bodylen); + } + break; + + case PROTOCOL_BINARY_CMD_INCREMENT: + case PROTOCOL_BINARY_CMD_DECREMENT: + { + if (bodylen != sizeof(uint64_t)) + { + result->numeric_value= UINT64_MAX; + return memcached_set_error(*instance, MEMCACHED_UNKNOWN_READ_FAILURE, MEMCACHED_AT); + } + + uint64_t val; + if ((rc= memcached_safe_read(instance, &val, sizeof(val))) != MEMCACHED_SUCCESS) + { + result->numeric_value= UINT64_MAX; + return MEMCACHED_UNKNOWN_READ_FAILURE; + } + + result->numeric_value= memcached_ntohll(val); + } + break; + + case PROTOCOL_BINARY_CMD_SASL_LIST_MECHS: + { + if (header.response.keylen != 0 || bodylen + 1 > buffer_length) + { + return MEMCACHED_UNKNOWN_READ_FAILURE; + } + else + { + if ((rc= memcached_safe_read(instance, buffer, bodylen)) != MEMCACHED_SUCCESS) + { + return MEMCACHED_UNKNOWN_READ_FAILURE; + } + } + } + break; + + case PROTOCOL_BINARY_CMD_VERSION: + { + char version_buffer[32]; // @todo document this number + memset(version_buffer, 0, sizeof(version_buffer)); + + if (memcached_safe_read(instance, version_buffer, bodylen) != MEMCACHED_SUCCESS) + { + return MEMCACHED_UNKNOWN_READ_FAILURE; + } + + char *endptr; + errno= 0; + long int version= strtol(version_buffer, &endptr, 10); + if (errno != 0 or version == LONG_MIN or version == LONG_MAX or version > UINT8_MAX or version == 0) + { + instance->major_version= instance->minor_version= instance->micro_version= UINT8_MAX; + return memcached_set_error(*instance, MEMCACHED_UNKNOWN_READ_FAILURE, MEMCACHED_AT, memcached_literal_param("strtol() failed to parse major version")); + } + instance->major_version= uint8_t(version); + + endptr++; + errno= 0; + version= strtol(endptr, &endptr, 10); + if (errno != 0 or version == LONG_MIN or version == LONG_MAX or version > UINT8_MAX) + { + instance->major_version= instance->minor_version= instance->micro_version= UINT8_MAX; + return memcached_set_error(*instance, MEMCACHED_UNKNOWN_READ_FAILURE, MEMCACHED_AT, memcached_literal_param("strtol() failed to parse minor version")); + } + instance->minor_version= uint8_t(version); + + endptr++; + errno= 0; + version= strtol(endptr, &endptr, 10); + if (errno != 0 or version == LONG_MIN or version == LONG_MAX or version > UINT8_MAX) + { + instance->major_version= instance->minor_version= instance->micro_version= UINT8_MAX; + return memcached_set_error(*instance, MEMCACHED_UNKNOWN_READ_FAILURE, MEMCACHED_AT, memcached_literal_param("strtol() failed to parse micro version")); + } + instance->micro_version= uint8_t(version); + } + break; + + case PROTOCOL_BINARY_CMD_TOUCH: + { + rc= MEMCACHED_SUCCESS; + if (bodylen == 4) // The four byte read is a bug? + { + char touch_buffer[4]; // @todo document this number + rc= memcached_safe_read(instance, touch_buffer, sizeof(touch_buffer)); +#if 0 + fprintf(stderr, "%s:%d %d %d %d %d %.*s(%d)\n", __FILE__, __LINE__, + int(touch_buffer[0]), + int(touch_buffer[1]), + int(touch_buffer[2]), + int(touch_buffer[3]), + int(bodylen), touch_buffer, int(bodylen)); +#endif + } + return memcached_set_error(*instance, rc, MEMCACHED_AT); + } + + case PROTOCOL_BINARY_CMD_FLUSH: + case PROTOCOL_BINARY_CMD_QUIT: + case PROTOCOL_BINARY_CMD_SET: + case PROTOCOL_BINARY_CMD_ADD: + case PROTOCOL_BINARY_CMD_REPLACE: + case PROTOCOL_BINARY_CMD_APPEND: + case PROTOCOL_BINARY_CMD_PREPEND: + case PROTOCOL_BINARY_CMD_DELETE: + { + WATCHPOINT_ASSERT(bodylen == 0); + return MEMCACHED_SUCCESS; + } + + case PROTOCOL_BINARY_CMD_NOOP: + { + WATCHPOINT_ASSERT(bodylen == 0); + return MEMCACHED_END; + } + + case PROTOCOL_BINARY_CMD_STAT: + { + if (bodylen == 0) + { + return MEMCACHED_END; + } + else if (bodylen + 1 > buffer_length) + { + /* not enough space in buffer.. should not happen... */ + return MEMCACHED_UNKNOWN_READ_FAILURE; + } + else + { + size_t keylen= header.response.keylen; + memset(buffer, 0, buffer_length); + if ((rc= memcached_safe_read(instance, buffer, keylen)) != MEMCACHED_SUCCESS || + (rc= memcached_safe_read(instance, buffer + keylen + 1, bodylen - keylen)) != MEMCACHED_SUCCESS) + { + WATCHPOINT_ERROR(rc); + return MEMCACHED_UNKNOWN_READ_FAILURE; + } + } + } + break; + + case PROTOCOL_BINARY_CMD_SASL_AUTH: + case PROTOCOL_BINARY_CMD_SASL_STEP: + { + memcached_result_reset(result); + result->item_cas= header.response.cas; + + if (memcached_string_check(&result->value, + bodylen) != MEMCACHED_SUCCESS) + return MEMCACHED_MEMORY_ALLOCATION_FAILURE; + + char *vptr= memcached_string_value_mutable(&result->value); + if ((rc= memcached_safe_read(instance, vptr, bodylen)) != MEMCACHED_SUCCESS) + { + WATCHPOINT_ERROR(rc); + return MEMCACHED_UNKNOWN_READ_FAILURE; + } + + memcached_string_set_length(&result->value, bodylen); + } + break; + default: + { + /* Command not implemented yet! */ + return memcached_set_error(*instance, MEMCACHED_UNKNOWN_READ_FAILURE, MEMCACHED_AT); + } + } + } + else if (header.response.bodylen) + { + /* What should I do with the error message??? just discard it for now */ + char hole[SMALL_STRING_LEN]; + while (bodylen > 0) + { + size_t nr= (bodylen > SMALL_STRING_LEN) ? SMALL_STRING_LEN : bodylen; + if ((rc= memcached_safe_read(instance, hole, nr)) != MEMCACHED_SUCCESS) + { + WATCHPOINT_ERROR(rc); + return memcached_set_error(*instance, MEMCACHED_UNKNOWN_READ_FAILURE, MEMCACHED_AT); + } + bodylen-= (uint32_t) nr; + } + + /* This might be an error from one of the quiet commands.. if + * so, just throw it away and get the next one. What about creating + * a callback to the user with the error information? + */ + switch (header.response.opcode) + { + case PROTOCOL_BINARY_CMD_SETQ: + case PROTOCOL_BINARY_CMD_ADDQ: + case PROTOCOL_BINARY_CMD_REPLACEQ: + case PROTOCOL_BINARY_CMD_APPENDQ: + case PROTOCOL_BINARY_CMD_PREPENDQ: + return binary_read_one_response(instance, buffer, buffer_length, result); + + default: + break; + } + } + + rc= MEMCACHED_SUCCESS; + if (header.response.status != 0) + { + switch (header.response.status) + { + case PROTOCOL_BINARY_RESPONSE_KEY_ENOENT: + rc= MEMCACHED_NOTFOUND; + break; + + case PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS: + rc= MEMCACHED_DATA_EXISTS; + break; + + case PROTOCOL_BINARY_RESPONSE_NOT_STORED: + rc= MEMCACHED_NOTSTORED; + break; + + case PROTOCOL_BINARY_RESPONSE_E2BIG: + rc= MEMCACHED_E2BIG; + break; + + case PROTOCOL_BINARY_RESPONSE_ENOMEM: + rc= MEMCACHED_MEMORY_ALLOCATION_FAILURE; + break; + + case PROTOCOL_BINARY_RESPONSE_AUTH_CONTINUE: + rc= MEMCACHED_AUTH_CONTINUE; + break; + + case PROTOCOL_BINARY_RESPONSE_AUTH_ERROR: + rc= MEMCACHED_AUTH_FAILURE; + break; + + case PROTOCOL_BINARY_RESPONSE_EINVAL: + case PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND: + default: + return memcached_set_error(*instance, MEMCACHED_UNKNOWN_READ_FAILURE, MEMCACHED_AT); + break; + } + } + + return rc; +} + +static memcached_return_t _read_one_response(memcached_instance_st* instance, + char *buffer, const size_t buffer_length, + memcached_result_st *result) +{ + memcached_server_response_decrement(instance); + + if (result == NULL) + { + Memcached *root= (Memcached *)instance->root; + result = &root->result; + } + + memcached_return_t rc; + if (memcached_is_binary(instance->root)) + { + rc= binary_read_one_response(instance, buffer, buffer_length, result); + } + else + { + rc= textual_read_one_response(instance, buffer, buffer_length, result); + } + + if (memcached_fatal(rc)) + { + memcached_io_reset(instance); + } + + return rc; +} + +memcached_return_t memcached_read_one_response(memcached_instance_st* instance, + memcached_result_st *result) +{ + char buffer[SMALL_STRING_LEN]; + + if (memcached_is_udp(instance->root)) + { + return memcached_set_error(*instance, MEMCACHED_NOT_SUPPORTED, MEMCACHED_AT); + } + + + return _read_one_response(instance, buffer, sizeof(buffer), result); +} + +memcached_return_t memcached_response(memcached_instance_st* instance, + memcached_result_st *result) +{ + char buffer[1024]; + + return memcached_response(instance, buffer, sizeof(buffer), result); +} + +memcached_return_t memcached_response(memcached_instance_st* instance, + char *buffer, size_t buffer_length, + memcached_result_st *result) +{ + if (memcached_is_udp(instance->root)) + { + return memcached_set_error(*instance, MEMCACHED_NOT_SUPPORTED, MEMCACHED_AT); + } + + /* We may have old commands in the buffer not sent, first purge */ + if ((instance->root->flags.no_block) and (memcached_is_processing_input(instance->root) == false)) + { + (void)memcached_io_write(instance); + } + + /* Before going into loop wait to see if we have any IO waiting for us */ + if (0) + { + memcached_return_t read_rc= memcached_io_wait_for_read(instance); + fprintf(stderr, "%s:%d: %s\n", __FILE__, __LINE__, memcached_strerror(NULL, read_rc)); + } + + /* + * The previous implementation purged all pending requests and just + * returned the last one. Purge all pending messages to ensure backwards + * compatibility. + */ + if (memcached_is_binary(instance->root) == false and memcached_server_response_count(instance) > 1) + { + memcached_result_st junked_result; + memcached_result_st *junked_result_ptr= memcached_result_create(instance->root, &junked_result); + + assert(junked_result_ptr); + + while (memcached_server_response_count(instance) > 1) + { + memcached_return_t rc= _read_one_response(instance, buffer, buffer_length, junked_result_ptr); + + // @TODO should we return an error on another but a bad read case? + if (memcached_fatal(rc)) + { + memcached_result_free(junked_result_ptr); + return rc; + } + } + memcached_result_free(junked_result_ptr); + } + + return _read_one_response(instance, buffer, buffer_length, result); +} diff --git a/libmemcached/response.h b/libmemcached/response.h new file mode 100644 index 0000000..c066f3b --- /dev/null +++ b/libmemcached/response.h @@ -0,0 +1,49 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +/* Read a single response from the server */ +memcached_return_t memcached_read_one_response(memcached_instance_st* ptr, + memcached_result_st *result); + +memcached_return_t memcached_response(memcached_instance_st* ptr, + memcached_result_st *result); + +memcached_return_t memcached_response(memcached_instance_st* ptr, + char *buffer, size_t buffer_length, + memcached_result_st *result); diff --git a/libmemcached/result.cc b/libmemcached/result.cc new file mode 100644 index 0000000..6fa507b --- /dev/null +++ b/libmemcached/result.cc @@ -0,0 +1,189 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011-2013 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +/* + memcached_result_st are used to internally represent the return values from + memcached. We use a structure so that long term as identifiers are added + to memcached we will be able to absorb new attributes without having + to addjust the entire API. +*/ +#include + +static inline void _result_init(memcached_result_st *self, + Memcached *memc) +{ + self->item_flags= 0; + self->item_expiration= 0; + self->key_length= 0; + self->item_cas= 0; + self->root= memc; + self->numeric_value= UINT64_MAX; + self->count= 0; + self->item_key[0]= 0; +} + +memcached_result_st *memcached_result_create(const memcached_st *shell, + memcached_result_st *ptr) +{ + const Memcached* memc= memcached2Memcached(shell); + + /* Saving malloc calls :) */ + if (ptr) + { + ptr->options.is_allocated= false; + } + else + { + ptr= libmemcached_xmalloc(memc, memcached_result_st); + + if (not ptr) + { + return NULL; + } + + ptr->options.is_allocated= true; + } + + ptr->options.is_initialized= true; + + _result_init(ptr, (memcached_st *)memc); + + WATCHPOINT_SET(ptr->value.options.is_initialized= false); + memcached_string_create((memcached_st*)memc, &ptr->value, 0); + WATCHPOINT_ASSERT_INITIALIZED(&ptr->value); + WATCHPOINT_ASSERT(ptr->value.string == NULL); + + return ptr; +} + +void memcached_result_reset(memcached_result_st *ptr) +{ + ptr->key_length= 0; + memcached_string_reset(&ptr->value); + ptr->item_flags= 0; + ptr->item_cas= 0; + ptr->item_expiration= 0; + ptr->numeric_value= UINT64_MAX; +} + +void memcached_result_free(memcached_result_st *ptr) +{ + if (ptr == NULL) + { + return; + } + + memcached_string_free(&ptr->value); + ptr->numeric_value= UINT64_MAX; + + if (memcached_is_allocated(ptr)) + { + WATCHPOINT_ASSERT(ptr->root); // Without a root, that means that result was not properly initialized. + libmemcached_free(ptr->root, ptr); + } + else + { + ptr->count= 0; + ptr->options.is_initialized= false; + } +} + +void memcached_result_reset_value(memcached_result_st *ptr) +{ + memcached_string_reset(&ptr->value); +} + +memcached_return_t memcached_result_set_value(memcached_result_st *ptr, + const char *value, + size_t length) +{ + if (memcached_failed(memcached_string_append(&ptr->value, value, length))) + { + return memcached_set_errno(*ptr->root, errno, MEMCACHED_AT); + } + + return MEMCACHED_SUCCESS; +} + +const char *memcached_result_key_value(const memcached_result_st *self) +{ + return self->key_length ? self->item_key : NULL; +} + +size_t memcached_result_key_length(const memcached_result_st *self) +{ + return self->key_length; +} + +const char *memcached_result_value(const memcached_result_st *self) +{ + const memcached_string_st *sptr= &self->value; + return memcached_string_value(sptr); +} + +size_t memcached_result_length(const memcached_result_st *self) +{ + const memcached_string_st *sptr= &self->value; + return memcached_string_length(sptr); +} + +char *memcached_result_take_value(memcached_result_st *self) +{ + memcached_string_st *sptr= &self->value; + return memcached_string_take_value(sptr); +} + +uint32_t memcached_result_flags(const memcached_result_st *self) +{ + return self->item_flags; +} + +uint64_t memcached_result_cas(const memcached_result_st *self) +{ + return self->item_cas; +} + +void memcached_result_set_flags(memcached_result_st *self, uint32_t flags) +{ + self->item_flags= flags; +} + +void memcached_result_set_expiration(memcached_result_st *self, time_t expiration) +{ + self->item_expiration= expiration; +} diff --git a/libmemcached/result.h b/libmemcached/result.h new file mode 100644 index 0000000..624ff5a --- /dev/null +++ b/libmemcached/result.h @@ -0,0 +1,39 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once +void memcached_result_reset_value(memcached_result_st *ptr); diff --git a/libmemcached/sasl.cc b/libmemcached/sasl.cc new file mode 100644 index 0000000..ee22586 --- /dev/null +++ b/libmemcached/sasl.cc @@ -0,0 +1,541 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libmemcached/common.h" +#include + +#if defined(LIBMEMCACHED_WITH_SASL_SUPPORT) && LIBMEMCACHED_WITH_SASL_SUPPORT + +#if defined(HAVE_LIBSASL) && HAVE_LIBSASL +#include +#endif + +#include + +void memcached_set_sasl_callbacks(memcached_st *shell, + const sasl_callback_t *callbacks) +{ + Memcached* self= memcached2Memcached(shell); + if (self) + { + self->sasl.callbacks= const_cast(callbacks); + self->sasl.is_allocated= false; + } +} + +sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *shell) +{ + Memcached* self= memcached2Memcached(shell); + if (self) + { + return self->sasl.callbacks; + } + + return NULL; +} + +/** + * Resolve the names for both ends of a connection + * @param fd socket to check + * @param laddr local address (out) + * @param raddr remote address (out) + * @return true on success false otherwise (errno contains more info) + */ +static memcached_return_t resolve_names(memcached_instance_st& server, char *laddr, size_t laddr_length, char *raddr, size_t raddr_length) +{ + char host[MEMCACHED_NI_MAXHOST]; + char port[MEMCACHED_NI_MAXSERV]; + struct sockaddr_storage saddr; + socklen_t salen= sizeof(saddr); + + if (getsockname(server.fd, (struct sockaddr *)&saddr, &salen) < 0) + { + return memcached_set_error(server, MEMCACHED_HOST_LOOKUP_FAILURE, MEMCACHED_AT); + } + + if (getnameinfo((struct sockaddr *)&saddr, salen, host, sizeof(host), port, sizeof(port), NI_NUMERICHOST | NI_NUMERICSERV) < 0) + { + return memcached_set_error(server, MEMCACHED_HOST_LOOKUP_FAILURE, MEMCACHED_AT); + } + + (void)snprintf(laddr, laddr_length, "%s;%s", host, port); + salen= sizeof(saddr); + + if (getpeername(server.fd, (struct sockaddr *)&saddr, &salen) < 0) + { + return memcached_set_error(server, MEMCACHED_HOST_LOOKUP_FAILURE, MEMCACHED_AT); + } + + if (getnameinfo((struct sockaddr *)&saddr, salen, host, sizeof(host), + port, sizeof(port), NI_NUMERICHOST | NI_NUMERICSERV) < 0) + { + return memcached_set_error(server, MEMCACHED_HOST_LOOKUP_FAILURE, MEMCACHED_AT); + } + + (void)snprintf(raddr, raddr_length, "%s;%s", host, port); + + return MEMCACHED_SUCCESS; +} + +extern "C" { + +static void sasl_shutdown_function() +{ + sasl_done(); +} + +static volatile int sasl_startup_state= SASL_OK; +pthread_mutex_t sasl_startup_state_LOCK= PTHREAD_MUTEX_INITIALIZER; +static pthread_once_t sasl_startup_once= PTHREAD_ONCE_INIT; +static void sasl_startup_function(void) +{ + sasl_startup_state= sasl_client_init(NULL); + + if (sasl_startup_state == SASL_OK) + { + (void)atexit(sasl_shutdown_function); + } +} + +} // extern "C" + +memcached_return_t memcached_sasl_authenticate_connection(memcached_instance_st* server) +{ + if (LIBMEMCACHED_WITH_SASL_SUPPORT == 0) + { + return MEMCACHED_NOT_SUPPORTED; + } + + if (server == NULL) + { + return MEMCACHED_INVALID_ARGUMENTS; + } + + /* SANITY CHECK: SASL can only be used with the binary protocol */ + if (memcached_is_binary(server->root) == false) + { + return memcached_set_error(*server, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, + memcached_literal_param("memcached_sasl_authenticate_connection() is not supported via the ASCII protocol")); + } + + /* Try to get the supported mech from the server. Servers without SASL + * support will return UNKNOWN COMMAND, so we can just treat that + * as authenticated + */ + protocol_binary_request_no_extras request= { }; + + initialize_binary_request(server, request.message.header); + + request.message.header.request.opcode= PROTOCOL_BINARY_CMD_SASL_LIST_MECHS; + + if (memcached_io_write(server, request.bytes, sizeof(request.bytes), true) != sizeof(request.bytes)) + { + return MEMCACHED_WRITE_FAILURE; + } + assert_msg(server->fd != INVALID_SOCKET, "Programmer error, invalid socket"); + + memcached_server_response_increment(server); + + char mech[MEMCACHED_MAX_BUFFER]; + memcached_return_t rc= memcached_response(server, mech, sizeof(mech), NULL); + if (memcached_failed(rc)) + { + if (rc == MEMCACHED_PROTOCOL_ERROR) + { + /* If the server doesn't support SASL it will return PROTOCOL_ERROR. + * This error may also be returned for other errors, but let's assume + * that the server don't support SASL and treat it as success and + * let the client fail with the next operation if the error was + * caused by another problem.... + */ + rc= MEMCACHED_SUCCESS; + } + + return rc; + } + assert_msg(server->fd != INVALID_SOCKET, "Programmer error, invalid socket"); + + /* set ip addresses */ + char laddr[MEMCACHED_NI_MAXHOST + MEMCACHED_NI_MAXSERV]; + char raddr[MEMCACHED_NI_MAXHOST + MEMCACHED_NI_MAXSERV]; + + if (memcached_failed(rc= resolve_names(*server, laddr, sizeof(laddr), raddr, sizeof(raddr)))) + { + return rc; + } + + int pthread_error; + if ((pthread_error= pthread_once(&sasl_startup_once, sasl_startup_function)) != 0) + { + return memcached_set_errno(*server, pthread_error, MEMCACHED_AT); + } + + (void)pthread_mutex_lock(&sasl_startup_state_LOCK); + if (sasl_startup_state != SASL_OK) + { + const char *sasl_error_msg= sasl_errstring(sasl_startup_state, NULL, NULL); + return memcached_set_error(*server, MEMCACHED_AUTH_PROBLEM, MEMCACHED_AT, + memcached_string_make_from_cstr(sasl_error_msg)); + } + (void)pthread_mutex_unlock(&sasl_startup_state_LOCK); + + sasl_conn_t *conn; + int ret; + if ((ret= sasl_client_new("memcached", server->_hostname, laddr, raddr, server->root->sasl.callbacks, 0, &conn) ) != SASL_OK) + { + const char *sasl_error_msg= sasl_errstring(ret, NULL, NULL); + + sasl_dispose(&conn); + + return memcached_set_error(*server, MEMCACHED_AUTH_PROBLEM, MEMCACHED_AT, + memcached_string_make_from_cstr(sasl_error_msg)); + } + + const char *data; + const char *chosenmech; + unsigned int len; + ret= sasl_client_start(conn, mech, NULL, &data, &len, &chosenmech); + if (ret != SASL_OK and ret != SASL_CONTINUE) + { + const char *sasl_error_msg= sasl_errstring(ret, NULL, NULL); + + sasl_dispose(&conn); + + return memcached_set_error(*server, MEMCACHED_AUTH_PROBLEM, MEMCACHED_AT, + memcached_string_make_from_cstr(sasl_error_msg)); + } + uint16_t keylen= (uint16_t)strlen(chosenmech); + request.message.header.request.opcode= PROTOCOL_BINARY_CMD_SASL_AUTH; + request.message.header.request.keylen= htons(keylen); + request.message.header.request.bodylen= htonl(len + keylen); + + do { + /* send the packet */ + + libmemcached_io_vector_st vector[]= + { + { request.bytes, sizeof(request.bytes) }, + { chosenmech, keylen }, + { data, len } + }; + + assert_msg(server->fd != INVALID_SOCKET, "Programmer error, invalid socket"); + if (memcached_io_writev(server, vector, 3, true) == false) + { + rc= MEMCACHED_WRITE_FAILURE; + break; + } + assert_msg(server->fd != INVALID_SOCKET, "Programmer error, invalid socket"); + memcached_server_response_increment(server); + + /* read the response */ + assert_msg(server->fd != INVALID_SOCKET, "Programmer error, invalid socket"); + rc= memcached_response(server, NULL, 0, NULL); + if (rc != MEMCACHED_AUTH_CONTINUE) + { + break; + } + assert_msg(server->fd != INVALID_SOCKET, "Programmer error, invalid socket"); + + ret= sasl_client_step(conn, memcached_result_value(&server->root->result), + (unsigned int)memcached_result_length(&server->root->result), + NULL, &data, &len); + + if (ret != SASL_OK && ret != SASL_CONTINUE) + { + rc= MEMCACHED_AUTH_PROBLEM; + break; + } + + request.message.header.request.opcode= PROTOCOL_BINARY_CMD_SASL_STEP; + request.message.header.request.bodylen= htonl(len + keylen); + } while (true); + + /* Release resources */ + sasl_dispose(&conn); + + return memcached_set_error(*server, rc, MEMCACHED_AT); +} + +static int get_username(void *context, int id, const char **result, unsigned int *len) +{ + if (!context || !result || (id != SASL_CB_USER && id != SASL_CB_AUTHNAME)) + { + return SASL_BADPARAM; + } + + *result= (char *)context; + if (len) + { + *len= (unsigned int)strlen(*result); + } + + return SASL_OK; +} + +static int get_password(sasl_conn_t *conn, void *context, int id, + sasl_secret_t **psecret) +{ + if (!conn || ! psecret || id != SASL_CB_PASS) + { + return SASL_BADPARAM; + } + + *psecret= (sasl_secret_t *)context; + + return SASL_OK; +} + +memcached_return_t memcached_set_sasl_auth_data(memcached_st *shell, + const char *username, + const char *password) +{ + Memcached* ptr= memcached2Memcached(shell); + if (LIBMEMCACHED_WITH_SASL_SUPPORT == 0) + { + return MEMCACHED_NOT_SUPPORTED; + } + + if (ptr == NULL or username == NULL or password == NULL) + { + return MEMCACHED_INVALID_ARGUMENTS; + } + + memcached_return_t ret; + if (memcached_failed(ret= memcached_behavior_set(ptr, MEMCACHED_BEHAVIOR_BINARY_PROTOCOL, 1))) + { + return memcached_set_error(*ptr, ret, MEMCACHED_AT, memcached_literal_param("Unable change to binary protocol which is required for SASL.")); + } + + memcached_destroy_sasl_auth_data(ptr); + + sasl_callback_t *callbacks= libmemcached_xcalloc(ptr, 4, sasl_callback_t); + size_t password_length= strlen(password); + size_t username_length= strlen(username); + char *name= (char *)libmemcached_malloc(ptr, username_length +1); + sasl_secret_t *secret= (sasl_secret_t*)libmemcached_malloc(ptr, password_length +1 + sizeof(sasl_secret_t)); + + if (callbacks == NULL or name == NULL or secret == NULL) + { + libmemcached_free(ptr, callbacks); + libmemcached_free(ptr, name); + libmemcached_free(ptr, secret); + return memcached_set_error(*ptr, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT); + } + + secret->len= password_length; + memcpy(secret->data, password, password_length); + secret->data[password_length]= 0; + + callbacks[0].id= SASL_CB_USER; + callbacks[0].proc= (int (*)())get_username; + callbacks[0].context= strncpy(name, username, username_length +1); + callbacks[1].id= SASL_CB_AUTHNAME; + callbacks[1].proc= (int (*)())get_username; + callbacks[1].context= name; + callbacks[2].id= SASL_CB_PASS; + callbacks[2].proc= (int (*)())get_password; + callbacks[2].context= secret; + callbacks[3].id= SASL_CB_LIST_END; + + ptr->sasl.callbacks= callbacks; + ptr->sasl.is_allocated= true; + + return MEMCACHED_SUCCESS; +} + +memcached_return_t memcached_destroy_sasl_auth_data(memcached_st *shell) +{ + if (LIBMEMCACHED_WITH_SASL_SUPPORT == 0) + { + return MEMCACHED_NOT_SUPPORTED; + } + + Memcached* ptr= memcached2Memcached(shell); + if (ptr == NULL) + { + return MEMCACHED_INVALID_ARGUMENTS; + } + + if (ptr->sasl.callbacks == NULL) + { + return MEMCACHED_SUCCESS; + } + + if (ptr->sasl.is_allocated) + { + libmemcached_free(ptr, ptr->sasl.callbacks[0].context); + libmemcached_free(ptr, ptr->sasl.callbacks[2].context); + libmemcached_free(ptr, (void*)ptr->sasl.callbacks); + ptr->sasl.is_allocated= false; + } + + ptr->sasl.callbacks= NULL; + + return MEMCACHED_SUCCESS; +} + +memcached_return_t memcached_clone_sasl(memcached_st *clone, const memcached_st *source) +{ + if (LIBMEMCACHED_WITH_SASL_SUPPORT == 0) + { + return MEMCACHED_NOT_SUPPORTED; + } + + if (clone == NULL or source == NULL) + { + return MEMCACHED_INVALID_ARGUMENTS; + } + + if (source->sasl.callbacks == NULL) + { + return MEMCACHED_SUCCESS; + } + + /* Hopefully we are using our own callback mechanisms.. */ + if (source->sasl.callbacks[0].id == SASL_CB_USER && + source->sasl.callbacks[0].proc == (int (*)())get_username && + source->sasl.callbacks[1].id == SASL_CB_AUTHNAME && + source->sasl.callbacks[1].proc == (int (*)())get_username && + source->sasl.callbacks[2].id == SASL_CB_PASS && + source->sasl.callbacks[2].proc == (int (*)())get_password && + source->sasl.callbacks[3].id == SASL_CB_LIST_END) + { + sasl_secret_t *secret= (sasl_secret_t *)source->sasl.callbacks[2].context; + return memcached_set_sasl_auth_data(clone, + (const char*)source->sasl.callbacks[0].context, + (const char*)secret->data); + } + + /* + * But we're not. It may work if we know what the user tries to pass + * into the list, but if we don't know the ID we don't know how to handle + * the context... + */ + ptrdiff_t total= 0; + + while (source->sasl.callbacks[total].id != SASL_CB_LIST_END) + { + switch (source->sasl.callbacks[total].id) + { + case SASL_CB_USER: + case SASL_CB_AUTHNAME: + case SASL_CB_PASS: + break; + default: + /* I don't know how to deal with this... */ + return MEMCACHED_NOT_SUPPORTED; + } + + ++total; + } + + sasl_callback_t *callbacks= libmemcached_xcalloc(clone, total +1, sasl_callback_t); + if (callbacks == NULL) + { + return MEMCACHED_MEMORY_ALLOCATION_FAILURE; + } + memcpy(callbacks, source->sasl.callbacks, (total + 1) * sizeof(sasl_callback_t)); + + /* Now update the context... */ + for (ptrdiff_t x= 0; x < total; ++x) + { + if (callbacks[x].id == SASL_CB_USER || callbacks[x].id == SASL_CB_AUTHNAME) + { + callbacks[x].context= (sasl_callback_t*)libmemcached_malloc(clone, strlen((const char*)source->sasl.callbacks[x].context)); + + if (callbacks[x].context == NULL) + { + /* Failed to allocate memory, clean up previously allocated memory */ + for (ptrdiff_t y= 0; y < x; ++y) + { + libmemcached_free(clone, clone->sasl.callbacks[y].context); + } + + libmemcached_free(clone, callbacks); + return MEMCACHED_MEMORY_ALLOCATION_FAILURE; + } + strncpy((char*)callbacks[x].context, (const char*)source->sasl.callbacks[x].context, sizeof(callbacks[x].context)); + } + else + { + sasl_secret_t *src= (sasl_secret_t *)source->sasl.callbacks[x].context; + sasl_secret_t *n= (sasl_secret_t*)libmemcached_malloc(clone, src->len + 1 + sizeof(*n)); + if (n == NULL) + { + /* Failed to allocate memory, clean up previously allocated memory */ + for (ptrdiff_t y= 0; y < x; ++y) + { + libmemcached_free(clone, clone->sasl.callbacks[y].context); + } + + libmemcached_free(clone, callbacks); + return MEMCACHED_MEMORY_ALLOCATION_FAILURE; + } + memcpy(n, src, src->len + 1 + sizeof(*n)); + callbacks[x].context= n; + } + } + + clone->sasl.callbacks= callbacks; + clone->sasl.is_allocated= true; + + return MEMCACHED_SUCCESS; +} + +#else + +void memcached_set_sasl_callbacks(memcached_st *, const sasl_callback_t *) +{ +} + +sasl_callback_t *memcached_get_sasl_callbacks(memcached_st *) +{ + return NULL; +} + +memcached_return_t memcached_set_sasl_auth_data(memcached_st *, const char *, const char *) +{ + return MEMCACHED_NOT_SUPPORTED; +} + +memcached_return_t memcached_clone_sasl(memcached_st *, const memcached_st *) +{ + return MEMCACHED_NOT_SUPPORTED; +} + +#endif diff --git a/libmemcached/sasl.hpp b/libmemcached/sasl.hpp new file mode 100644 index 0000000..bda6b22 --- /dev/null +++ b/libmemcached/sasl.hpp @@ -0,0 +1,42 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +memcached_return_t memcached_clone_sasl(memcached_st *clone, const memcached_st *source); + +memcached_return_t memcached_sasl_authenticate_connection(memcached_instance_st* server); diff --git a/libmemcached/server.cc b/libmemcached/server.cc new file mode 100644 index 0000000..e2837c7 --- /dev/null +++ b/libmemcached/server.cc @@ -0,0 +1,295 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* + This is a partial implementation for fetching/creating memcached_server_st objects. +*/ +#include + +static inline void _server_init(memcached_server_st *self, Memcached *root, + const memcached_string_t& hostname, + in_port_t port, + uint32_t weight, memcached_connection_t type) +{ + self->options.is_shutting_down= false; + self->options.is_dead= false; + self->number_of_hosts= 0; + self->cursor_active= 0; + self->port= port; + self->io_bytes_sent= 0; + self->request_id= 0; + self->server_failure_counter= 0; + self->server_failure_counter_query_id= 0; + self->server_timeout_counter= 0; + self->server_timeout_counter_query_id= 0; + self->weight= weight ? weight : 1; // 1 is the default weight value + self->io_wait_count.read= 0; + self->io_wait_count.write= 0; + self->io_wait_count.timeouts= 0; + self->io_wait_count._bytes_read= 0; + self->major_version= UINT8_MAX; + self->micro_version= UINT8_MAX; + self->minor_version= UINT8_MAX; + self->type= type; + self->error_messages= NULL; + + self->state= MEMCACHED_SERVER_STATE_NEW; + self->next_retry= 0; + + self->root= root; + if (root) + { + self->version= ++root->server_info.version; + } + else + { + self->version= UINT_MAX; + } + self->limit_maxbytes= 0; + memcpy(self->hostname, hostname.c_str, hostname.size); + self->hostname[hostname.size]= 0; +} + +static memcached_server_st *_server_create(memcached_server_st *self, const Memcached *memc) +{ + if (self == NULL) + { + self= libmemcached_xmalloc(memc, struct memcached_server_st); + + if (self == NULL) + { + return NULL; /* MEMCACHED_MEMORY_ALLOCATION_FAILURE */ + } + + self->options.is_allocated= true; + } + else + { + self->options.is_allocated= false; + } + + self->options.is_initialized= true; + + return self; +} + +memcached_server_st *__server_create_with(Memcached *memc, + memcached_server_st* allocated_instance, + const memcached_string_t& hostname, + const in_port_t port, + uint32_t weight, + const memcached_connection_t type) +{ + if (memcached_is_valid_servername(hostname) == false) + { + memcached_set_error(*memc, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, memcached_literal_param("Invalid hostname provided")); + return NULL; + } + + allocated_instance= _server_create(allocated_instance, memc); + + if (allocated_instance == NULL) + { + return NULL; + } + + _server_init(allocated_instance, const_cast(memc), hostname, port, weight, type); + + return allocated_instance; +} + +void __server_free(memcached_server_st *self) +{ + memcached_error_free(*self); + + if (memcached_is_allocated(self)) + { + libmemcached_free(self->root, self); + } + else + { + self->options.is_initialized= false; + } +} + +void memcached_server_free(memcached_server_st *self) +{ + if (self == NULL) + { + return; + } + + if (memcached_server_list_count(self)) + { + memcached_server_list_free(self); + return; + } + + __server_free(self); +} + +void memcached_server_error_reset(memcached_server_st *self) +{ + WATCHPOINT_ASSERT(self); + if (self == NULL) + { + return; + } + + memcached_error_free(*self); +} + +uint32_t memcached_servers_set_count(memcached_server_st *servers, uint32_t count) +{ + WATCHPOINT_ASSERT(servers); + if (servers == NULL) + { + return 0; + } + + return servers->number_of_hosts= count; +} + +uint32_t memcached_server_count(const memcached_st *self) +{ + WATCHPOINT_ASSERT(self); + if (self == NULL) + return 0; + + return self->number_of_hosts; +} + +const char *memcached_server_name(const memcached_instance_st * self) +{ + WATCHPOINT_ASSERT(self); + if (self) + { + return self->_hostname; + } + + return NULL; +} + +in_port_t memcached_server_port(const memcached_instance_st * self) +{ + WATCHPOINT_ASSERT(self); + if (self == NULL) + { + return 0; + } + + return self->port(); +} + +in_port_t memcached_server_srcport(const memcached_instance_st * self) +{ + WATCHPOINT_ASSERT(self); + if (self == NULL || self->fd == INVALID_SOCKET || (self->type != MEMCACHED_CONNECTION_TCP && self->type != MEMCACHED_CONNECTION_UDP)) + { + return 0; + } + + struct sockaddr_in sin; + socklen_t addrlen= sizeof(sin); + if (getsockname(self->fd, (struct sockaddr*)&sin, &addrlen) != -1) + { + return ntohs(sin.sin_port); + } + + return -1; +} + +uint32_t memcached_server_response_count(const memcached_instance_st * self) +{ + WATCHPOINT_ASSERT(self); + if (self == NULL) + { + return 0; + } + + return self->cursor_active_; +} + +const char *memcached_server_type(const memcached_instance_st * ptr) +{ + if (ptr) + { + switch (ptr->type) + { + case MEMCACHED_CONNECTION_TCP: + return "TCP"; + + case MEMCACHED_CONNECTION_UDP: + return "UDP"; + + case MEMCACHED_CONNECTION_UNIX_SOCKET: + return "SOCKET"; + } + } + + return "UNKNOWN"; +} + +uint8_t memcached_server_major_version(const memcached_instance_st * instance) +{ + if (instance) + { + return instance->major_version; + } + + return UINT8_MAX; +} + +uint8_t memcached_server_minor_version(const memcached_instance_st * instance) +{ + if (instance) + { + return instance->minor_version; + } + + return UINT8_MAX; +} + +uint8_t memcached_server_micro_version(const memcached_instance_st * instance) +{ + if (instance) + { + return instance->micro_version; + } + + return UINT8_MAX; +} diff --git a/libmemcached/server.hpp b/libmemcached/server.hpp new file mode 100644 index 0000000..6ea0b7f --- /dev/null +++ b/libmemcached/server.hpp @@ -0,0 +1,106 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#pragma once + +#ifdef HAVE_SYS_TIME_H +#include +#endif + +#include + +memcached_server_st *__server_create_with(memcached_st *memc, + memcached_server_st* self, + const memcached_string_t& hostname, + const in_port_t port, + uint32_t weight, + const memcached_connection_t type); + +memcached_return_t memcached_server_add_parsed(memcached_st *ptr, + const char *hostname, + size_t hostname_length, + in_port_t port, + uint32_t weight); + +void __server_free(memcached_server_st *); + +static inline bool memcached_is_valid_servername(const memcached_string_t& arg) +{ + return (arg.c_str != NULL or arg.size == 0) and arg.size < MEMCACHED_NI_MAXHOST; +} + +static inline bool memcached_is_valid_filename(const memcached_string_t& arg) +{ + return arg.c_str != NULL and arg.size > 0 and arg.size < MEMCACHED_NI_MAXHOST; +} + +void memcached_instance_free(memcached_instance_st *); + +void set_last_disconnected_host(memcached_instance_st* self); + +static inline void memcached_mark_server_for_timeout(memcached_instance_st* server) +{ + if (server->state != MEMCACHED_SERVER_STATE_IN_TIMEOUT) + { + if (server->server_timeout_counter_query_id != server->root->query_id) + { + server->server_timeout_counter++; + server->server_timeout_counter_query_id= server->root->query_id; + } + + if (server->server_timeout_counter >= server->root->server_timeout_limit) + { + struct timeval next_time; + if (gettimeofday(&next_time, NULL) == 0) + { + server->next_retry= next_time.tv_sec +server->root->retry_timeout; + } + else + { + server->next_retry= 1; // Setting the value to 1 causes the timeout to occur immediatly + } + + server->state= MEMCACHED_SERVER_STATE_IN_TIMEOUT; + if (server->server_failure_counter_query_id != server->root->query_id) + { + server->server_failure_counter++; + server->server_failure_counter_query_id= server->root->query_id; + } + set_last_disconnected_host(server); + } + } +} diff --git a/libmemcached/server_instance.h b/libmemcached/server_instance.h new file mode 100644 index 0000000..187f274 --- /dev/null +++ b/libmemcached/server_instance.h @@ -0,0 +1,60 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * LibMemcached + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +typedef struct memcached_instance_st* memcached_server_write_instance_st; +#else +typedef void* memcached_server_write_instance_st; +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +typedef memcached_return_t (*memcached_server_execute_fn)(memcached_st *ptr, memcached_server_write_instance_st server, void *context); + +memcached_return_t memcached_server_execute(memcached_st *ptr, + memcached_server_execute_fn callback, + void *context); + +#ifdef __cplusplus +} // extern "C" +#endif + + diff --git a/libmemcached/server_list.cc b/libmemcached/server_list.cc new file mode 100644 index 0000000..b5d5b72 --- /dev/null +++ b/libmemcached/server_list.cc @@ -0,0 +1,163 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + + +#include + +memcached_server_list_st +memcached_server_list_append_with_weight(memcached_server_list_st ptr, + const char *hostname, in_port_t port, + uint32_t weight, + memcached_return_t *error) +{ + memcached_return_t unused; + if (error == NULL) + { + error= &unused; + } + + if (hostname == NULL) + { + hostname= "localhost"; + } + + if (hostname[0] == '/') + { + port = 0; + } + else if (port == 0) + { + port= MEMCACHED_DEFAULT_PORT; + } + + + /* Increment count for hosts */ + uint32_t count= 1; + if (ptr != NULL) + { + count+= memcached_server_list_count(ptr); + } + + memcached_server_list_st new_host_list= (memcached_server_st*)realloc(ptr, sizeof(memcached_server_st) * count); + if (new_host_list == NULL) + { +#if 0 + *error= memcached_set_error(*ptr, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT); +#endif + return NULL; + } + + memcached_string_t _hostname= { memcached_string_make_from_cstr(hostname) }; + /* @todo Check return type */ + if (__server_create_with(NULL, &new_host_list[count-1], _hostname, port, weight, port ? MEMCACHED_CONNECTION_TCP : MEMCACHED_CONNECTION_UNIX_SOCKET) == NULL) + { +#if 0 + *error= memcached_set_errno(*ptr, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT); +#endif + free(new_host_list); + return NULL; + } + +#if 0 + // Handset allocated since + new_host_list->options.is_allocated= true; +#endif + + /* Backwards compatibility hack */ + memcached_servers_set_count(new_host_list, count); + + *error= MEMCACHED_SUCCESS; + return new_host_list; +} + +memcached_server_list_st +memcached_server_list_append(memcached_server_list_st ptr, + const char *hostname, in_port_t port, + memcached_return_t *error) +{ + return memcached_server_list_append_with_weight(ptr, hostname, port, 0, error); +} + +uint32_t memcached_server_list_count(const memcached_server_list_st self) +{ + return (self == NULL) + ? 0 + : self->number_of_hosts; +} + +uint32_t memcached_instance_list_count(const memcached_st* self) +{ + return (self == NULL) + ? 0 + : self->number_of_hosts; +} + +void memcached_instance_set(memcached_st* memc, memcached_instance_st* list, const uint32_t host_list_size) +{ + assert(memc); + memc->servers= list; + memc->number_of_hosts= host_list_size; +} + +void memcached_server_list_free(memcached_server_list_st self) +{ + if (self) + { + for (uint32_t x= 0; x < memcached_server_list_count(self); x++) + { + assert_msg(not memcached_is_allocated(&self[x]), "You have called memcached_server_list_free(), but you did not pass it a valid memcached_server_list_st"); + __server_free(&self[x]); + } + + libmemcached_free(self->root, self); + } +} + +void memcached_instance_list_free(memcached_instance_st* self, uint32_t instance_count) +{ + if (self) + { + for (uint32_t x= 0; x < instance_count; x++) + { + assert_msg(memcached_is_allocated(&self[x]) == false, "You have called memcached_server_list_free(), but you did not pass it a valid memcached_server_list_st"); + __instance_free(&self[x]); + } + + libmemcached_free(self->root, self); + } +} diff --git a/libmemcached/server_list.hpp b/libmemcached/server_list.hpp new file mode 100644 index 0000000..0280332 --- /dev/null +++ b/libmemcached/server_list.hpp @@ -0,0 +1,47 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +memcached_instance_st* memcached_instance_list(const memcached_st *); + +uint32_t memcached_instance_list_count(const memcached_st*); + +uint32_t memcached_servers_set_count(memcached_server_list_st servers, uint32_t count); + +void memcached_instance_list_free(memcached_instance_st* self, uint32_t count); + +void memcached_instance_set(memcached_st*, memcached_instance_st*, const uint32_t host_list_size); diff --git a/libmemcached/socket.hpp b/libmemcached/socket.hpp new file mode 100644 index 0000000..a2ee941 --- /dev/null +++ b/libmemcached/socket.hpp @@ -0,0 +1,80 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * LibMemcached + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + + +/* To hide the platform differences between MS Windows and Unix, I am + * going to use the Microsoft way and #define the Microsoft-specific + * functions to the unix way. Microsoft use a separate subsystem for sockets, + * but Unix normally just use a filedescriptor on the same functions. It is + * a lot easier to map back to the unix way with macros than going the other + * way without side effect ;-) + */ +#if defined(WIN32) || defined(__MINGW32__) +# include "win32/wrappers.h" +# define get_socket_errno() WSAGetLastError() +#else +# include +# define INVALID_SOCKET -1 +# define SOCKET_ERROR -1 +# define closesocket(a) close(a) +# define get_socket_errno() errno +#endif + +#ifdef __cplusplus +static inline void memcached_close_socket(memcached_socket_t& socket_fd) +{ + closesocket(socket_fd); + socket_fd= INVALID_SOCKET; +} +#endif + +#ifndef HAVE_MSG_NOSIGNAL +# define MSG_NOSIGNAL 0 +#endif + +#ifndef HAVE_MSG_DONTWAIT +# define MSG_DONTWAIT 0 +#endif + +#ifndef HAVE_MSG_MORE +# define MSG_MORE 0 +#endif + + diff --git a/libmemcached/stats.cc b/libmemcached/stats.cc new file mode 100644 index 0000000..180b0d9 --- /dev/null +++ b/libmemcached/stats.cc @@ -0,0 +1,848 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011-2013 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +static const char *memcached_stat_keys[] = { + "pid", + "uptime", + "time", + "version", + "pointer_size", + "rusage_user", + "rusage_system", + "curr_items", + "total_items", + "bytes", + "curr_connections", + "total_connections", + "connection_structures", + "cmd_get", + "cmd_set", + "get_hits", + "get_misses", + "evictions", + "bytes_read", + "bytes_written", + "limit_maxbytes", + "threads", + NULL +}; + +struct local_context +{ + memcached_stat_fn func; + void *context; + const char *args; + const size_t args_length; + + local_context(memcached_stat_fn func_arg, + void *context_arg, + const char *args_arg, + const size_t args_length_arg) : + func(func_arg), + context(context_arg), + args(args_arg), + args_length(args_length_arg) + { } +}; + + +static memcached_return_t set_data(memcached_stat_st *memc_stat, const char *key, const char *value) +{ + + if (strlen(key) < 1) + { + WATCHPOINT_STRING(key); + return MEMCACHED_UNKNOWN_STAT_KEY; + } + else if (strcmp("pid", key) == 0) + { + errno= 0; + int64_t temp= strtoll(value, (char **)NULL, 10); + if (errno != 0) + { + return MEMCACHED_FAILURE; + } + + if (temp <= INT32_MAX and ( sizeof(pid_t) == sizeof(int32_t) )) + { + memc_stat->pid= pid_t(temp); + } + else if (temp > -1) + { + memc_stat->pid= pid_t(temp); + } + else + { + // If we got a value less then -1 then something went wrong in the + // protocol + } + } + else if (not strcmp("uptime", key)) + { + errno= 0; + memc_stat->uptime= strtoul(value, (char **)NULL, 10); + if (errno != 0) + { + return MEMCACHED_FAILURE; + } + } + else if (not strcmp("time", key)) + { + errno= 0; + memc_stat->time= strtoul(value, (char **)NULL, 10); + if (errno != 0) + { + return MEMCACHED_FAILURE; + } + } + else if (not strcmp("version", key)) + { + memcpy(memc_stat->version, value, strlen(value)); + memc_stat->version[strlen(value)]= 0; + } + else if (not strcmp("pointer_size", key)) + { + errno= 0; + memc_stat->pointer_size= strtoul(value, (char **)NULL, 10); + if (errno != 0) + { + return MEMCACHED_FAILURE; + } + } + else if (not strcmp("rusage_user", key)) + { + char *walk_ptr; + for (walk_ptr= (char*)value; (!ispunct(*walk_ptr)); walk_ptr++) {}; + *walk_ptr= 0; + walk_ptr++; + + errno= 0; + memc_stat->rusage_user_seconds= strtoul(value, (char **)NULL, 10); + if (errno != 0) + { + return MEMCACHED_FAILURE; + } + + errno= 0; + memc_stat->rusage_user_microseconds= strtoul(walk_ptr, (char **)NULL, 10); + if (errno != 0) + { + return MEMCACHED_FAILURE; + } + } + else if (not strcmp("rusage_system", key)) + { + char *walk_ptr; + for (walk_ptr= (char*)value; (!ispunct(*walk_ptr)); walk_ptr++) {}; + *walk_ptr= 0; + walk_ptr++; + + errno= 0; + memc_stat->rusage_system_seconds= strtoul(value, (char **)NULL, 10); + if (errno != 0) + { + return MEMCACHED_FAILURE; + } + + errno= 0; + memc_stat->rusage_system_microseconds= strtoul(walk_ptr, (char **)NULL, 10); + if (errno != 0) + { + return MEMCACHED_FAILURE; + } + } + else if (not strcmp("curr_items", key)) + { + errno= 0; + memc_stat->curr_items= strtoul(value, (char **)NULL, 10); + if (errno != 0) + { + return MEMCACHED_FAILURE; + } + } + else if (not strcmp("total_items", key)) + { + errno= 0; + memc_stat->total_items= strtoul(value, (char **)NULL, 10); + if (errno != 0) + { + return MEMCACHED_FAILURE; + } + } + else if (not strcmp("bytes_read", key)) + { + errno= 0; + memc_stat->bytes_read= strtoull(value, (char **)NULL, 10); + if (errno != 0) + { + return MEMCACHED_FAILURE; + } + } + else if (not strcmp("bytes_written", key)) + { + errno= 0; + memc_stat->bytes_written= strtoull(value, (char **)NULL, 10); + if (errno != 0) + { + return MEMCACHED_FAILURE; + } + } + else if (not strcmp("bytes", key)) + { + errno= 0; + memc_stat->bytes= strtoull(value, (char **)NULL, 10); + if (errno != 0) + { + return MEMCACHED_FAILURE; + } + } + else if (not strcmp("curr_connections", key)) + { + errno= 0; + memc_stat->curr_connections= strtoull(value, (char **)NULL, 10); + if (errno != 0) + { + return MEMCACHED_FAILURE; + } + } + else if (not strcmp("total_connections", key)) + { + errno= 0; + memc_stat->total_connections= strtoull(value, (char **)NULL, 10); + if (errno != 0) + { + return MEMCACHED_FAILURE; + } + } + else if (not strcmp("connection_structures", key)) + { + errno= 0; + memc_stat->connection_structures= strtoul(value, (char **)NULL, 10); + if (errno != 0) + { + return MEMCACHED_FAILURE; + } + } + else if (not strcmp("cmd_get", key)) + { + errno= 0; + memc_stat->cmd_get= strtoull(value, (char **)NULL, 10); + if (errno != 0) + { + return MEMCACHED_FAILURE; + } + } + else if (not strcmp("cmd_set", key)) + { + errno= 0; + memc_stat->cmd_set= strtoull(value, (char **)NULL, 10); + if (errno != 0) + { + return MEMCACHED_FAILURE; + } + } + else if (not strcmp("get_hits", key)) + { + errno= 0; + memc_stat->get_hits= strtoull(value, (char **)NULL, 10); + if (errno != 0) + { + return MEMCACHED_FAILURE; + } + } + else if (not strcmp("get_misses", key)) + { + errno= 0; + memc_stat->get_misses= strtoull(value, (char **)NULL, 10); + if (errno != 0) + { + return MEMCACHED_FAILURE; + } + } + else if (not strcmp("evictions", key)) + { + errno= 0; + memc_stat->evictions= strtoull(value, (char **)NULL, 10); + if (errno != 0) + { + return MEMCACHED_FAILURE; + } + } + else if (not strcmp("limit_maxbytes", key)) + { + errno= 0; + memc_stat->limit_maxbytes= strtoull(value, (char **)NULL, 10); + if (errno != 0) + { + return MEMCACHED_FAILURE; + } + } + else if (not strcmp("threads", key)) + { + errno= 0; + memc_stat->threads= strtoul(value, (char **)NULL, 10); + if (errno != 0) + { + return MEMCACHED_FAILURE; + } + } + else if ((strcmp("delete_misses", key) == 0 or /* New stats in the 1.3 beta */ + strcmp("delete_hits", key) == 0 or /* Just swallow them for now.. */ + strcmp("incr_misses", key) == 0 or + strcmp("incr_hits", key) == 0 or + strcmp("decr_misses", key) == 0 or + strcmp("decr_hits", key) == 0 or + strcmp("cas_misses", key) == 0 or + strcmp("cas_hits", key) == 0 or + strcmp("cas_badval", key) == 0 or + strcmp("cmd_flush", key) == 0 or + strcmp("accepting_conns", key) == 0 or + strcmp("listen_disabled_num", key) == 0 or + strcmp("conn_yields", key) == 0 or + strcmp("auth_cmds", key) == 0 or + strcmp("auth_errors", key) == 0 or + strcmp("reclaimed", key) == 0) == 0) + { + WATCHPOINT_STRING(key); + /* return MEMCACHED_UNKNOWN_STAT_KEY; */ + return MEMCACHED_SUCCESS; + } + + return MEMCACHED_SUCCESS; +} + +char *memcached_stat_get_value(const memcached_st* shell, memcached_stat_st *memc_stat, + const char *key, memcached_return_t *error) +{ + memcached_return_t not_used; + if (error == NULL) + { + error= ¬_used; + } + + if (memc_stat == NULL) + { + *error= MEMCACHED_INVALID_ARGUMENTS; + return NULL; + } + + char buffer[SMALL_STRING_LEN]; + int length; + + *error= MEMCACHED_SUCCESS; + + if (memcmp("pid", key, sizeof("pid") -1) == 0) + { + length= snprintf(buffer, SMALL_STRING_LEN,"%lld", (signed long long)memc_stat->pid); + } + else if (not memcmp("uptime", key, sizeof("uptime") -1)) + { + length= snprintf(buffer, SMALL_STRING_LEN,"%lu", memc_stat->uptime); + } + else if (not memcmp("time", key, sizeof("time") -1)) + { + length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->time); + } + else if (not memcmp("version", key, sizeof("version") -1)) + { + length= snprintf(buffer, SMALL_STRING_LEN,"%s", memc_stat->version); + } + else if (not memcmp("pointer_size", key, sizeof("pointer_size") -1)) + { + length= snprintf(buffer, SMALL_STRING_LEN,"%lu", memc_stat->pointer_size); + } + else if (not memcmp("rusage_user", key, sizeof("rusage_user") -1)) + { + length= snprintf(buffer, SMALL_STRING_LEN,"%lu.%lu", memc_stat->rusage_user_seconds, memc_stat->rusage_user_microseconds); + } + else if (not memcmp("rusage_system", key, sizeof("rusage_system") -1)) + { + length= snprintf(buffer, SMALL_STRING_LEN,"%lu.%lu", memc_stat->rusage_system_seconds, memc_stat->rusage_system_microseconds); + } + else if (not memcmp("curr_items", key, sizeof("curr_items") -1)) + { + length= snprintf(buffer, SMALL_STRING_LEN,"%lu", memc_stat->curr_items); + } + else if (not memcmp("total_items", key, sizeof("total_items") -1)) + { + length= snprintf(buffer, SMALL_STRING_LEN,"%lu", memc_stat->total_items); + } + else if (not memcmp("curr_connections", key, sizeof("curr_connections") -1)) + { + length= snprintf(buffer, SMALL_STRING_LEN,"%lu", memc_stat->curr_connections); + } + else if (not memcmp("total_connections", key, sizeof("total_connections") -1)) + { + length= snprintf(buffer, SMALL_STRING_LEN,"%lu", memc_stat->total_connections); + } + else if (not memcmp("connection_structures", key, sizeof("connection_structures") -1)) + { + length= snprintf(buffer, SMALL_STRING_LEN,"%lu", memc_stat->connection_structures); + } + else if (not memcmp("cmd_get", key, sizeof("cmd_get") -1)) + { + length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->cmd_get); + } + else if (not memcmp("cmd_set", key, sizeof("cmd_set") -1)) + { + length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->cmd_set); + } + else if (not memcmp("get_hits", key, sizeof("get_hits") -1)) + { + length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->get_hits); + } + else if (not memcmp("get_misses", key, sizeof("get_misses") -1)) + { + length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->get_misses); + } + else if (not memcmp("evictions", key, sizeof("evictions") -1)) + { + length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->evictions); + } + else if (not memcmp("bytes_read", key, sizeof("bytes_read") -1)) + { + length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->bytes_read); + } + else if (not memcmp("bytes_written", key, sizeof("bytes_written") -1)) + { + length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->bytes_written); + } + else if (not memcmp("bytes", key, sizeof("bytes") -1)) + { + length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->bytes); + } + else if (not memcmp("limit_maxbytes", key, sizeof("limit_maxbytes") -1)) + { + length= snprintf(buffer, SMALL_STRING_LEN,"%llu", (unsigned long long)memc_stat->limit_maxbytes); + } + else if (not memcmp("threads", key, sizeof("threads") -1)) + { + length= snprintf(buffer, SMALL_STRING_LEN,"%lu", memc_stat->threads); + } + else + { + Memcached* memc= (Memcached*)memcached2Memcached(shell); + *error= memcached_set_error(*memc, MEMCACHED_INVALID_ARGUMENTS, MEMCACHED_AT, memcached_literal_param("Invalid key provided")); + return NULL; + } + + if (length >= SMALL_STRING_LEN || length < 0) + { + Memcached* memc= (Memcached*)memcached2Memcached(shell); + *error= memcached_set_error(*memc, MEMCACHED_FAILURE, MEMCACHED_AT, memcached_literal_param("Internal failure occured with buffer, please report this bug.")); + return NULL; + } + + // User is responsible for free() memory, so use malloc() + char *ret= static_cast(malloc(size_t(length +1))); + memcpy(ret, buffer, (size_t) length); + ret[length]= '\0'; + + return ret; +} + +static memcached_return_t binary_stats_fetch(memcached_stat_st *memc_stat, + const char *args, + const size_t args_length, + memcached_instance_st* instance, + struct local_context *check) +{ + char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE]; + protocol_binary_request_stats request= {}; // = {.bytes= {0}}; + + initialize_binary_request(instance, request.message.header); + + request.message.header.request.opcode= PROTOCOL_BINARY_CMD_STAT; + request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES; + + if (args_length) + { + request.message.header.request.keylen= htons(uint16_t(args_length)); + request.message.header.request.bodylen= htonl(uint32_t( args_length)); + + libmemcached_io_vector_st vector[]= + { + { request.bytes, sizeof(request.bytes) }, + { args, args_length } + }; + + if (memcached_vdo(instance, vector, 2, true) != MEMCACHED_SUCCESS) + { + memcached_io_reset(instance); + return MEMCACHED_WRITE_FAILURE; + } + } + else + { + libmemcached_io_vector_st vector[]= + { + { request.bytes, sizeof(request.bytes) } + }; + + if (memcached_vdo(instance, vector, 1, true) != MEMCACHED_SUCCESS) + { + memcached_io_reset(instance); + return MEMCACHED_WRITE_FAILURE; + } + } + + memcached_server_response_decrement(instance); + while (1) + { + memcached_return_t rc= memcached_response(instance, buffer, sizeof(buffer), NULL); + + if (rc == MEMCACHED_END) + { + break; + } + + if (rc != MEMCACHED_SUCCESS) + { + memcached_io_reset(instance); + return rc; + } + + if (check && check->func) + { + size_t key_length= strlen(buffer); + + check->func(instance, + buffer, key_length, + buffer+key_length+1, strlen(buffer+key_length+1), + check->context); + } + + if (memc_stat) + { + if ((set_data(memc_stat, buffer, buffer + strlen(buffer) + 1)) == MEMCACHED_UNKNOWN_STAT_KEY) + { + WATCHPOINT_ERROR(MEMCACHED_UNKNOWN_STAT_KEY); + WATCHPOINT_ASSERT(0); + } + } + } + + /* + * memcached_response will decrement the counter, so I need to reset it.. + * todo: look at this and try to find a better solution. + * */ + instance->cursor_active_= 0; + + return MEMCACHED_SUCCESS; +} + +static memcached_return_t ascii_stats_fetch(memcached_stat_st *memc_stat, + const char *args, + const size_t args_length, + memcached_instance_st* instance, + struct local_context *check) +{ + libmemcached_io_vector_st vector[]= + { + { memcached_literal_param("stats ") }, + { args, args_length }, + { memcached_literal_param("\r\n") } + }; + + memcached_return_t rc= memcached_vdo(instance, vector, 3, true); + if (memcached_success(rc)) + { + char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE]; + while ((rc= memcached_response(instance, buffer, sizeof(buffer), NULL)) == MEMCACHED_STAT) + { + char *string_ptr= buffer; + string_ptr+= 5; /* Move past STAT */ + + char *end_ptr; + for (end_ptr= string_ptr; isgraph(*end_ptr); end_ptr++) {}; + char *key= string_ptr; + key[size_t(end_ptr-string_ptr)]= 0; + + string_ptr= end_ptr + 1; + for (end_ptr= string_ptr; !(isspace(*end_ptr)); end_ptr++) {}; + char *value= string_ptr; + value[(size_t)(end_ptr -string_ptr)]= 0; +#if 0 + bool check_bool= bool(check); + bool check_func_bool= bool(check) ? bool(check->func) : false; + fprintf(stderr, "%s:%d %s %s %d:%d\n", __FILE__, __LINE__, key, value, check_bool, check_func_bool); +#endif + + if (check and check->func) + { + check->func(instance, + key, strlen(key), + value, strlen(value), + check->context); + } + + if (memc_stat) + { + if((set_data(memc_stat, key, value)) == MEMCACHED_UNKNOWN_STAT_KEY) + { + WATCHPOINT_ERROR(MEMCACHED_UNKNOWN_STAT_KEY); + WATCHPOINT_ASSERT(0); + } + } + } + } + + if (rc == MEMCACHED_ERROR) + { + return MEMCACHED_INVALID_ARGUMENTS; + } + + if (rc == MEMCACHED_END) + { + return MEMCACHED_SUCCESS; + } + + return rc; +} + +memcached_stat_st *memcached_stat(memcached_st *shell, char *args, memcached_return_t *error) +{ + Memcached* self= memcached2Memcached(shell); + memcached_return_t unused; + if (error == NULL) + { + error= &unused; + } + + if (memcached_failed(*error= initialize_query(self, true))) + { + return NULL; + } + + if (memcached_is_udp(self)) + { + *error= memcached_set_error(*self, MEMCACHED_NOT_SUPPORTED, MEMCACHED_AT); + return NULL; + } + + memcached_return_t rc; + size_t args_length= 0; + if (args) + { + args_length= strlen(args); + if (memcached_failed(rc= memcached_key_test(*self, (const char **)&args, &args_length, 1))) + { + *error= memcached_set_error(*self, rc, MEMCACHED_AT); + return NULL; + } + } + + WATCHPOINT_ASSERT(error); + + memcached_stat_st *stats= libmemcached_xcalloc(self, memcached_server_count(self), memcached_stat_st); + if (stats == NULL) + { + *error= memcached_set_error(*self, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT); + return NULL; + } + + WATCHPOINT_ASSERT(rc == MEMCACHED_SUCCESS); + rc= MEMCACHED_SUCCESS; + for (uint32_t x= 0; x < memcached_server_count(self); x++) + { + memcached_stat_st* stat_instance= stats +x; + + stat_instance->pid= -1; + stat_instance->root= self; + + memcached_instance_st* instance= memcached_instance_fetch(self, x); + + memcached_return_t temp_return; + if (memcached_is_binary(self)) + { + temp_return= binary_stats_fetch(stat_instance, args, args_length, instance, NULL); + } + else + { + temp_return= ascii_stats_fetch(stat_instance, args, args_length, instance, NULL); + } + + // Special case where "args" is invalid + if (temp_return == MEMCACHED_INVALID_ARGUMENTS) + { + rc= MEMCACHED_INVALID_ARGUMENTS; + break; + } + + if (memcached_failed(temp_return)) + { + rc= MEMCACHED_SOME_ERRORS; + } + } + + *error= rc; + + return stats; +} + +memcached_return_t memcached_stat_servername(memcached_stat_st *memc_stat, char *args, + const char *hostname, in_port_t port) +{ + memcached_st memc; + + memcached_stat_st unused_memc_stat; + if (memc_stat == NULL) + { + memc_stat= &unused_memc_stat; + } + + memset(memc_stat, 0, sizeof(memcached_stat_st)); + + memcached_st *memc_ptr= memcached_create(&memc); + if (memc_ptr == NULL) + { + return MEMCACHED_MEMORY_ALLOCATION_FAILURE; + } + + memcached_return_t rc; + if (memcached_failed(rc= memcached_server_add(&memc, hostname, port))) + { + memcached_free(&memc); + return rc; + } + + if (memcached_success(rc= initialize_query(memc_ptr, true))) + { + size_t args_length= 0; + if (args) + { + args_length= strlen(args); + rc= memcached_key_test(*memc_ptr, (const char **)&args, &args_length, 1); + } + + if (memcached_success(rc)) + { + memcached_instance_st* instance= memcached_instance_fetch(memc_ptr, 0); + if (memc.flags.binary_protocol) + { + rc= binary_stats_fetch(memc_stat, args, args_length, instance, NULL); + } + else + { + rc= ascii_stats_fetch(memc_stat, args, args_length, instance, NULL); + } + } + } + + memcached_free(&memc); + + return rc; +} + +/* + We make a copy of the keys since at some point in the not so distant future + we will add support for "found" keys. +*/ +char ** memcached_stat_get_keys(memcached_st *shell, + memcached_stat_st *, + memcached_return_t *error) +{ + Memcached* memc= memcached2Memcached(shell); + if (memc) + { + char **list= static_cast(libmemcached_malloc(memc, sizeof(memcached_stat_keys))); + if (list == NULL) + { + if (error) + { + *error= memcached_set_error(*memc, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT); + } + + return NULL; + } + + memcpy(list, memcached_stat_keys, sizeof(memcached_stat_keys)); + + if (error) + { + *error= MEMCACHED_SUCCESS; + } + + return list; + } + + return NULL; +} + +void memcached_stat_free(const memcached_st *, memcached_stat_st *memc_stat) +{ + WATCHPOINT_ASSERT(memc_stat); // Be polite, but when debugging catch this as an error + if (memc_stat) + { + libmemcached_free(memc_stat->root, memc_stat); + } +} + +static memcached_return_t call_stat_fn(memcached_st *memc, + memcached_instance_st* instance, + void *context) +{ + if (memc) + { + local_context *check= (struct local_context *)context; + + if (memcached_is_binary(memc)) + { + return binary_stats_fetch(NULL, check->args, check->args_length, instance, check); + } + else + { + return ascii_stats_fetch(NULL, check->args, check->args_length, instance, check); + } + } + + return MEMCACHED_INVALID_ARGUMENTS; +} + +memcached_return_t memcached_stat_execute(memcached_st *shell, const char *args, memcached_stat_fn func, void *context) +{ + Memcached* memc= memcached2Memcached(shell); + if (memcached_fatal(memcached_version(memc))) + { + return memcached_last_error(memc); + } + + local_context check(func, context, args, args ? strlen(args) : 0); + + return memcached_server_execute(memc, call_stat_fn, (void *)&check); +} diff --git a/libmemcached/storage.cc b/libmemcached/storage.cc new file mode 100644 index 0000000..46ae15a --- /dev/null +++ b/libmemcached/storage.cc @@ -0,0 +1,598 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#include + +enum memcached_storage_action_t { + SET_OP, + REPLACE_OP, + ADD_OP, + PREPEND_OP, + APPEND_OP, + CAS_OP +}; + +/* Inline this */ +static inline const char *storage_op_string(memcached_storage_action_t verb) +{ + switch (verb) + { + case REPLACE_OP: + return "replace "; + + case ADD_OP: + return "add "; + + case PREPEND_OP: + return "prepend "; + + case APPEND_OP: + return "append "; + + case CAS_OP: + return "cas "; + + case SET_OP: + break; + } + + return "set "; +} + +static inline uint8_t can_by_encrypted(const memcached_storage_action_t verb) +{ + switch (verb) + { + case SET_OP: + case ADD_OP: + case CAS_OP: + case REPLACE_OP: + return true; + + case APPEND_OP: + case PREPEND_OP: + break; + } + + return false; +} + +static inline uint8_t get_com_code(const memcached_storage_action_t verb, const bool reply) +{ + if (reply == false) + { + switch (verb) + { + case SET_OP: + return PROTOCOL_BINARY_CMD_SETQ; + + case ADD_OP: + return PROTOCOL_BINARY_CMD_ADDQ; + + case CAS_OP: /* FALLTHROUGH */ + case REPLACE_OP: + return PROTOCOL_BINARY_CMD_REPLACEQ; + + case APPEND_OP: + return PROTOCOL_BINARY_CMD_APPENDQ; + + case PREPEND_OP: + return PROTOCOL_BINARY_CMD_PREPENDQ; + } + } + + switch (verb) + { + case SET_OP: + break; + + case ADD_OP: + return PROTOCOL_BINARY_CMD_ADD; + + case CAS_OP: /* FALLTHROUGH */ + case REPLACE_OP: + return PROTOCOL_BINARY_CMD_REPLACE; + + case APPEND_OP: + return PROTOCOL_BINARY_CMD_APPEND; + + case PREPEND_OP: + return PROTOCOL_BINARY_CMD_PREPEND; + } + + return PROTOCOL_BINARY_CMD_SET; +} + +static memcached_return_t memcached_send_binary(Memcached *ptr, + memcached_instance_st* server, + uint32_t server_key, + const char *key, + const size_t key_length, + const char *value, + const size_t value_length, + const time_t expiration, + const uint32_t flags, + const uint64_t cas, + const bool flush, + const bool reply, + memcached_storage_action_t verb) +{ + protocol_binary_request_set request= {}; + size_t send_length= sizeof(request.bytes); + + initialize_binary_request(server, request.message.header); + + request.message.header.request.opcode= get_com_code(verb, reply); + request.message.header.request.keylen= htons((uint16_t)(key_length + memcached_array_size(ptr->_namespace))); + request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES; + if (verb == APPEND_OP or verb == PREPEND_OP) + { + send_length -= 8; /* append & prepend does not contain extras! */ + } + else + { + request.message.header.request.extlen= 8; + request.message.body.flags= htonl(flags); + request.message.body.expiration= htonl((uint32_t)expiration); + } + + request.message.header.request.bodylen= htonl((uint32_t) (key_length + memcached_array_size(ptr->_namespace) + value_length + + request.message.header.request.extlen)); + + if (cas) + { + request.message.header.request.cas= memcached_htonll(cas); + } + + libmemcached_io_vector_st vector[]= + { + { NULL, 0 }, + { request.bytes, send_length }, + { memcached_array_string(ptr->_namespace), memcached_array_size(ptr->_namespace) }, + { key, key_length }, + { value, value_length } + }; + + /* write the header */ + memcached_return_t rc; + if ((rc= memcached_vdo(server, vector, 5, flush)) != MEMCACHED_SUCCESS) + { + memcached_io_reset(server); + +#if 0 + if (memcached_has_error(ptr)) + { + memcached_set_error(*server, rc, MEMCACHED_AT); + } +#endif + + assert(memcached_last_error(server->root) != MEMCACHED_SUCCESS); + return memcached_last_error(server->root); + } + + if (verb == SET_OP and ptr->number_of_replicas > 0) + { + request.message.header.request.opcode= PROTOCOL_BINARY_CMD_SETQ; + WATCHPOINT_STRING("replicating"); + + for (uint32_t x= 0; x < ptr->number_of_replicas; x++) + { + ++server_key; + if (server_key == memcached_server_count(ptr)) + { + server_key= 0; + } + + memcached_instance_st* instance= memcached_instance_fetch(ptr, server_key); + + if (memcached_vdo(instance, vector, 5, false) != MEMCACHED_SUCCESS) + { + memcached_io_reset(instance); + } + else + { + memcached_server_response_decrement(instance); + } + } + } + + if (flush == false) + { + return MEMCACHED_BUFFERED; + } + + // No reply always assumes success + if (reply == false) + { + return MEMCACHED_SUCCESS; + } + + return memcached_response(server, NULL, 0, NULL); +} + +static memcached_return_t memcached_send_ascii(Memcached *ptr, + memcached_instance_st* instance, + const char *key, + const size_t key_length, + const char *value, + const size_t value_length, + const time_t expiration, + const uint32_t flags, + const uint64_t cas, + const bool flush, + const bool reply, + const memcached_storage_action_t verb) +{ + char flags_buffer[MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH +1]; + int flags_buffer_length= snprintf(flags_buffer, sizeof(flags_buffer), " %u", flags); + if (size_t(flags_buffer_length) >= sizeof(flags_buffer) or flags_buffer_length < 0) + { + return memcached_set_error(*instance, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT, + memcached_literal_param("snprintf(MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH)")); + } + + char expiration_buffer[MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH +1]; + int expiration_buffer_length= snprintf(expiration_buffer, sizeof(expiration_buffer), " %llu", (unsigned long long)expiration); + if (size_t(expiration_buffer_length) >= sizeof(expiration_buffer) or expiration_buffer_length < 0) + { + return memcached_set_error(*instance, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT, + memcached_literal_param("snprintf(MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH)")); + } + + char value_buffer[MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH +1]; + int value_buffer_length= snprintf(value_buffer, sizeof(value_buffer), " %llu", (unsigned long long)value_length); + if (size_t(value_buffer_length) >= sizeof(value_buffer) or value_buffer_length < 0) + { + return memcached_set_error(*instance, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT, + memcached_literal_param("snprintf(MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH)")); + } + + char cas_buffer[MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH +1]; + int cas_buffer_length= 0; + if (cas) + { + cas_buffer_length= snprintf(cas_buffer, sizeof(cas_buffer), " %llu", (unsigned long long)cas); + if (size_t(cas_buffer_length) >= sizeof(cas_buffer) or cas_buffer_length < 0) + { + return memcached_set_error(*instance, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT, + memcached_literal_param("snprintf(MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH)")); + } + } + + libmemcached_io_vector_st vector[]= + { + { NULL, 0 }, + { storage_op_string(verb), strlen(storage_op_string(verb))}, + { memcached_array_string(ptr->_namespace), memcached_array_size(ptr->_namespace) }, + { key, key_length }, + { flags_buffer, size_t(flags_buffer_length) }, + { expiration_buffer, size_t(expiration_buffer_length) }, + { value_buffer, size_t(value_buffer_length) }, + { cas_buffer, size_t(cas_buffer_length) }, + { " noreply", reply ? 0 : memcached_literal_param_size(" noreply") }, + { memcached_literal_param("\r\n") }, + { value, value_length }, + { memcached_literal_param("\r\n") } + }; + + /* Send command header */ + memcached_return_t rc= memcached_vdo(instance, vector, 12, flush); + + // If we should not reply, return with MEMCACHED_SUCCESS, unless error + if (reply == false) + { + return memcached_success(rc) ? MEMCACHED_SUCCESS : rc; + } + + if (flush == false) + { + return memcached_success(rc) ? MEMCACHED_BUFFERED : rc; + } + + if (rc == MEMCACHED_SUCCESS) + { + char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE]; + rc= memcached_response(instance, buffer, sizeof(buffer), NULL); + + if (rc == MEMCACHED_STORED) + { + return MEMCACHED_SUCCESS; + } + } + + if (rc == MEMCACHED_WRITE_FAILURE) + { + memcached_io_reset(instance); + } + + assert(memcached_failed(rc)); +#if 0 + if (memcached_has_error(ptr) == false) + { + return memcached_set_error(*ptr, rc, MEMCACHED_AT); + } +#endif + + return rc; +} + +static inline memcached_return_t memcached_send(memcached_st *shell, + const char *group_key, size_t group_key_length, + const char *key, size_t key_length, + const char *value, size_t value_length, + const time_t expiration, + const uint32_t flags, + const uint64_t cas, + memcached_storage_action_t verb) +{ + Memcached* ptr= memcached2Memcached(shell); + memcached_return_t rc; + if (memcached_failed(rc= initialize_query(ptr, true))) + { + return rc; + } + + if (memcached_failed(memcached_key_test(*ptr, (const char **)&key, &key_length, 1))) + { + return memcached_last_error(ptr); + } + + uint32_t server_key= memcached_generate_hash_with_redistribution(ptr, group_key, group_key_length); + memcached_instance_st* instance= memcached_instance_fetch(ptr, server_key); + + WATCHPOINT_SET(instance->io_wait_count.read= 0); + WATCHPOINT_SET(instance->io_wait_count.write= 0); + + bool flush= true; + if (memcached_is_buffering(instance->root) and verb == SET_OP) + { + flush= false; + } + + bool reply= memcached_is_replying(ptr); + + hashkit_string_st* destination= NULL; + + if (memcached_is_encrypted(ptr)) + { + if (can_by_encrypted(verb) == false) + { + return memcached_set_error(*ptr, MEMCACHED_NOT_SUPPORTED, MEMCACHED_AT, + memcached_literal_param("Operation not allowed while encyrption is enabled")); + } + + if ((destination= hashkit_encrypt(&ptr->hashkit, value, value_length)) == NULL) + { + return rc; + } + value= hashkit_string_c_str(destination); + value_length= hashkit_string_length(destination); + } + + if (memcached_is_binary(ptr)) + { + rc= memcached_send_binary(ptr, instance, server_key, + key, key_length, + value, value_length, expiration, + flags, cas, flush, reply, verb); + } + else + { + rc= memcached_send_ascii(ptr, instance, + key, key_length, + value, value_length, expiration, + flags, cas, flush, reply, verb); + } + + hashkit_string_free(destination); + + return rc; +} + + +memcached_return_t memcached_set(memcached_st *ptr, const char *key, size_t key_length, + const char *value, size_t value_length, + time_t expiration, + uint32_t flags) +{ + memcached_return_t rc; + LIBMEMCACHED_MEMCACHED_SET_START(); + rc= memcached_send(ptr, key, key_length, + key, key_length, value, value_length, + expiration, flags, 0, SET_OP); + LIBMEMCACHED_MEMCACHED_SET_END(); + return rc; +} + +memcached_return_t memcached_add(memcached_st *ptr, + const char *key, size_t key_length, + const char *value, size_t value_length, + time_t expiration, + uint32_t flags) +{ + memcached_return_t rc; + LIBMEMCACHED_MEMCACHED_ADD_START(); + rc= memcached_send(ptr, key, key_length, + key, key_length, value, value_length, + expiration, flags, 0, ADD_OP); + + LIBMEMCACHED_MEMCACHED_ADD_END(); + return rc; +} + +memcached_return_t memcached_replace(memcached_st *ptr, + const char *key, size_t key_length, + const char *value, size_t value_length, + time_t expiration, + uint32_t flags) +{ + memcached_return_t rc; + LIBMEMCACHED_MEMCACHED_REPLACE_START(); + rc= memcached_send(ptr, key, key_length, + key, key_length, value, value_length, + expiration, flags, 0, REPLACE_OP); + LIBMEMCACHED_MEMCACHED_REPLACE_END(); + return rc; +} + +memcached_return_t memcached_prepend(memcached_st *ptr, + const char *key, size_t key_length, + const char *value, size_t value_length, + time_t expiration, + uint32_t flags) +{ + memcached_return_t rc; + rc= memcached_send(ptr, key, key_length, + key, key_length, value, value_length, + expiration, flags, 0, PREPEND_OP); + return rc; +} + +memcached_return_t memcached_append(memcached_st *ptr, + const char *key, size_t key_length, + const char *value, size_t value_length, + time_t expiration, + uint32_t flags) +{ + memcached_return_t rc; + rc= memcached_send(ptr, key, key_length, + key, key_length, value, value_length, + expiration, flags, 0, APPEND_OP); + return rc; +} + +memcached_return_t memcached_cas(memcached_st *ptr, + const char *key, size_t key_length, + const char *value, size_t value_length, + time_t expiration, + uint32_t flags, + uint64_t cas) +{ + memcached_return_t rc; + rc= memcached_send(ptr, key, key_length, + key, key_length, value, value_length, + expiration, flags, cas, CAS_OP); + return rc; +} + +memcached_return_t memcached_set_by_key(memcached_st *ptr, + const char *group_key, + size_t group_key_length, + const char *key, size_t key_length, + const char *value, size_t value_length, + time_t expiration, + uint32_t flags) +{ + memcached_return_t rc; + LIBMEMCACHED_MEMCACHED_SET_START(); + rc= memcached_send(ptr, group_key, group_key_length, + key, key_length, value, value_length, + expiration, flags, 0, SET_OP); + LIBMEMCACHED_MEMCACHED_SET_END(); + return rc; +} + +memcached_return_t memcached_add_by_key(memcached_st *ptr, + const char *group_key, size_t group_key_length, + const char *key, size_t key_length, + const char *value, size_t value_length, + time_t expiration, + uint32_t flags) +{ + memcached_return_t rc; + LIBMEMCACHED_MEMCACHED_ADD_START(); + rc= memcached_send(ptr, group_key, group_key_length, + key, key_length, value, value_length, + expiration, flags, 0, ADD_OP); + LIBMEMCACHED_MEMCACHED_ADD_END(); + return rc; +} + +memcached_return_t memcached_replace_by_key(memcached_st *ptr, + const char *group_key, size_t group_key_length, + const char *key, size_t key_length, + const char *value, size_t value_length, + time_t expiration, + uint32_t flags) +{ + memcached_return_t rc; + LIBMEMCACHED_MEMCACHED_REPLACE_START(); + rc= memcached_send(ptr, group_key, group_key_length, + key, key_length, value, value_length, + expiration, flags, 0, REPLACE_OP); + LIBMEMCACHED_MEMCACHED_REPLACE_END(); + return rc; +} + +memcached_return_t memcached_prepend_by_key(memcached_st *ptr, + const char *group_key, size_t group_key_length, + const char *key, size_t key_length, + const char *value, size_t value_length, + time_t expiration, + uint32_t flags) +{ + return memcached_send(ptr, group_key, group_key_length, + key, key_length, value, value_length, + expiration, flags, 0, PREPEND_OP); +} + +memcached_return_t memcached_append_by_key(memcached_st *ptr, + const char *group_key, size_t group_key_length, + const char *key, size_t key_length, + const char *value, size_t value_length, + time_t expiration, + uint32_t flags) +{ + return memcached_send(ptr, group_key, group_key_length, + key, key_length, value, value_length, + expiration, flags, 0, APPEND_OP); +} + +memcached_return_t memcached_cas_by_key(memcached_st *ptr, + const char *group_key, size_t group_key_length, + const char *key, size_t key_length, + const char *value, size_t value_length, + time_t expiration, + uint32_t flags, + uint64_t cas) +{ + return memcached_send(ptr, group_key, group_key_length, + key, key_length, value, value_length, + expiration, flags, cas, CAS_OP); +} + diff --git a/libmemcached/strerror.cc b/libmemcached/strerror.cc new file mode 100644 index 0000000..7a4e0a8 --- /dev/null +++ b/libmemcached/strerror.cc @@ -0,0 +1,195 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +const char *memcached_strerror(const memcached_st *, memcached_return_t rc) +{ + switch (rc) + { + case MEMCACHED_SUCCESS: + return "SUCCESS"; + + case MEMCACHED_FAILURE: + return "FAILURE"; + + case MEMCACHED_HOST_LOOKUP_FAILURE: // getaddrinfo only + return "getaddrinfo() or getnameinfo() HOSTNAME LOOKUP FAILURE"; + + case MEMCACHED_CONNECTION_FAILURE: + return "CONNECTION FAILURE"; + + case MEMCACHED_CONNECTION_BIND_FAILURE: // DEPRECATED, see MEMCACHED_HOST_LOOKUP_FAILURE + return "CONNECTION BIND FAILURE"; + + case MEMCACHED_READ_FAILURE: + return "READ FAILURE"; + + case MEMCACHED_UNKNOWN_READ_FAILURE: + return "UNKNOWN READ FAILURE"; + + case MEMCACHED_PROTOCOL_ERROR: + return "PROTOCOL ERROR"; + + case MEMCACHED_CLIENT_ERROR: + return "CLIENT ERROR"; + + case MEMCACHED_SERVER_ERROR: + return "SERVER ERROR"; + + case MEMCACHED_WRITE_FAILURE: + return "WRITE FAILURE"; + + case MEMCACHED_ERROR: + return "ERROR was returned by server"; + + case MEMCACHED_DATA_EXISTS: + return "CONNECTION DATA EXISTS"; + + case MEMCACHED_DATA_DOES_NOT_EXIST: + return "CONNECTION DATA DOES NOT EXIST"; + + case MEMCACHED_NOTSTORED: + return "NOT STORED"; + + case MEMCACHED_STORED: + return "STORED"; + + case MEMCACHED_NOTFOUND: + return "NOT FOUND"; + + case MEMCACHED_MEMORY_ALLOCATION_FAILURE: + return "MEMORY ALLOCATION FAILURE"; + + case MEMCACHED_PARTIAL_READ: + return "PARTIAL READ"; + + case MEMCACHED_SOME_ERRORS: + return "SOME ERRORS WERE REPORTED"; + + case MEMCACHED_NO_SERVERS: + return "NO SERVERS DEFINED"; + + case MEMCACHED_END: + return "SERVER END"; + + case MEMCACHED_DELETED: + return "SERVER DELETE"; + + case MEMCACHED_VALUE: + return "SERVER VALUE"; + + case MEMCACHED_STAT: + return "STAT VALUE"; + + case MEMCACHED_ITEM: + return "ITEM VALUE"; + + case MEMCACHED_ERRNO: + return "SYSTEM ERROR"; + + case MEMCACHED_FAIL_UNIX_SOCKET: + return "COULD NOT OPEN UNIX SOCKET"; + + case MEMCACHED_NOT_SUPPORTED: + return "ACTION NOT SUPPORTED"; + + case MEMCACHED_FETCH_NOTFINISHED: + return "FETCH WAS NOT COMPLETED"; + + case MEMCACHED_NO_KEY_PROVIDED: + return "A KEY LENGTH OF ZERO WAS PROVIDED"; + + case MEMCACHED_BUFFERED: + return "ACTION QUEUED"; + + case MEMCACHED_TIMEOUT: + return "A TIMEOUT OCCURRED"; + + case MEMCACHED_BAD_KEY_PROVIDED: + return "A BAD KEY WAS PROVIDED/CHARACTERS OUT OF RANGE"; + + case MEMCACHED_INVALID_HOST_PROTOCOL: + return "THE HOST TRANSPORT PROTOCOL DOES NOT MATCH THAT OF THE CLIENT"; + + case MEMCACHED_SERVER_MARKED_DEAD: + return "SERVER IS MARKED DEAD"; + + case MEMCACHED_UNKNOWN_STAT_KEY: + return "ENCOUNTERED AN UNKNOWN STAT KEY"; + + case MEMCACHED_E2BIG: + return "ITEM TOO BIG"; + + case MEMCACHED_INVALID_ARGUMENTS: + return "INVALID ARGUMENTS"; + + case MEMCACHED_KEY_TOO_BIG: + return "KEY RETURNED FROM SERVER WAS TOO LARGE"; + + case MEMCACHED_AUTH_PROBLEM: + return "FAILED TO SEND AUTHENTICATION TO SERVER"; + + case MEMCACHED_AUTH_FAILURE: + return "AUTHENTICATION FAILURE"; + + case MEMCACHED_AUTH_CONTINUE: + return "CONTINUE AUTHENTICATION"; + + case MEMCACHED_PARSE_ERROR: + return "ERROR OCCURED WHILE PARSING"; + + case MEMCACHED_PARSE_USER_ERROR: + return "USER INITIATED ERROR OCCURED WHILE PARSING"; + + case MEMCACHED_DEPRECATED: + return "DEPRECATED"; + + case MEMCACHED_IN_PROGRESS: + return "OPERATION IN PROCESS"; + + case MEMCACHED_SERVER_TEMPORARILY_DISABLED: + return "SERVER HAS FAILED AND IS DISABLED UNTIL TIMED RETRY"; + + case MEMCACHED_SERVER_MEMORY_ALLOCATION_FAILURE: + return "SERVER FAILED TO ALLOCATE OBJECT"; + + default: + case MEMCACHED_MAXIMUM_RETURN: + return "INVALID memcached_return_t"; + } +} diff --git a/libmemcached/string.cc b/libmemcached/string.cc new file mode 100644 index 0000000..b821aca --- /dev/null +++ b/libmemcached/string.cc @@ -0,0 +1,330 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#include + +inline static memcached_return_t _string_check(memcached_string_st *string, size_t need) +{ + if (need && need > (size_t)(string->current_size - (size_t)(string->end - string->string))) + { + size_t current_offset= (size_t) (string->end - string->string); + + /* This is the block multiplier. To keep it larger and surive division errors we must round it up */ + size_t adjust= (need - (size_t)(string->current_size - (size_t)(string->end - string->string))) / MEMCACHED_BLOCK_SIZE; + adjust++; + + size_t new_size= sizeof(char) * (size_t)((adjust * MEMCACHED_BLOCK_SIZE) + string->current_size); + /* Test for overflow */ + if (new_size < need) + { + char error_message[1024]; + int error_message_length= snprintf(error_message, sizeof(error_message),"Needed %ld, got %ld", (long)need, (long)new_size); + return memcached_set_error(*string->root, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT, error_message, error_message_length); + } + + char *new_value= libmemcached_xrealloc(string->root, string->string, new_size, char); + + if (new_value == NULL) + { + return memcached_set_error(*string->root, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT); + } + + string->string= new_value; + string->end= string->string + current_offset; + + string->current_size+= (MEMCACHED_BLOCK_SIZE * adjust); + } + + return MEMCACHED_SUCCESS; +} + +static inline void _init_string(memcached_string_st *self) +{ + self->current_size= 0; + self->end= self->string= NULL; +} + +memcached_string_st *memcached_string_create(Memcached *memc, memcached_string_st *self, size_t initial_size) +{ + WATCHPOINT_ASSERT(memc); + + /* Saving malloc calls :) */ + if (self) + { + WATCHPOINT_ASSERT(self->options.is_initialized == false); + + memcached_set_allocated(self, false); + } + else + { + self= libmemcached_xmalloc(memc, memcached_string_st); + + if (self == NULL) + { + return NULL; + } + + memcached_set_allocated(self, true); + } + self->root= memc; + + _init_string(self); + + if (memcached_failed(_string_check(self, initial_size))) + { + if (memcached_is_allocated(self)) + { + libmemcached_free(memc, self); + } + + return NULL; + } + + memcached_set_initialized(self, true); + + WATCHPOINT_ASSERT(self->string == self->end); + + return self; +} + +static memcached_return_t memcached_string_append_null(memcached_string_st& string) +{ + if (memcached_failed(_string_check(&string, 1))) + { + return MEMCACHED_MEMORY_ALLOCATION_FAILURE; + } + + *string.end= 0; + + return MEMCACHED_SUCCESS; +} + +static memcached_return_t memcached_string_append_null(memcached_string_st *string) +{ + if (memcached_failed(_string_check(string, 1))) + { + return MEMCACHED_MEMORY_ALLOCATION_FAILURE; + } + + *string->end= 0; + + return MEMCACHED_SUCCESS; +} + +memcached_return_t memcached_string_append_character(memcached_string_st *string, + char character) +{ + if (memcached_failed(_string_check(string, 1))) + { + return MEMCACHED_MEMORY_ALLOCATION_FAILURE; + } + + *string->end= character; + string->end++; + + return MEMCACHED_SUCCESS; +} + +memcached_return_t memcached_string_append(memcached_string_st *string, + const char *value, size_t length) +{ + if (memcached_failed(_string_check(string, length))) + { + return MEMCACHED_MEMORY_ALLOCATION_FAILURE; + } + + WATCHPOINT_ASSERT(length <= string->current_size); + WATCHPOINT_ASSERT(string->string); + WATCHPOINT_ASSERT(string->end >= string->string); + + memcpy(string->end, value, length); + string->end+= length; + + return MEMCACHED_SUCCESS; +} + +char *memcached_string_c_copy(memcached_string_st *string) +{ + if (memcached_string_length(string) == 0) + { + return NULL; + } + + char *c_ptr= static_cast(libmemcached_malloc(string->root, (memcached_string_length(string)+1) * sizeof(char))); + + if (c_ptr == NULL) + { + return NULL; + } + + memcpy(c_ptr, memcached_string_value(string), memcached_string_length(string)); + c_ptr[memcached_string_length(string)]= 0; + + return c_ptr; +} + +bool memcached_string_set(memcached_string_st& string, const char* value, size_t length) +{ + memcached_string_reset(&string); + if (memcached_success(memcached_string_append(&string, value, length))) + { + memcached_string_append_null(string); + return true; + } + + return false; +} + +void memcached_string_reset(memcached_string_st *string) +{ + string->end= string->string; +} + +void memcached_string_free(memcached_string_st& ptr) +{ + memcached_string_free(&ptr); +} + +void memcached_string_free(memcached_string_st *ptr) +{ + if (ptr == NULL) + { + return; + } + + if (ptr->string) + { + libmemcached_free(ptr->root, ptr->string); + } + + if (memcached_is_allocated(ptr)) + { + libmemcached_free(ptr->root, ptr); + } + else + { + ptr->options.is_initialized= false; + } +} + +memcached_return_t memcached_string_check(memcached_string_st *string, size_t need) +{ + return _string_check(string, need); +} + +bool memcached_string_resize(memcached_string_st& string, const size_t need) +{ + return memcached_success(_string_check(&string, need)); +} + +size_t memcached_string_length(const memcached_string_st *self) +{ + return size_t(self->end -self->string); +} + +size_t memcached_string_length(const memcached_string_st& self) +{ + return size_t(self.end -self.string); +} + +size_t memcached_string_size(const memcached_string_st *self) +{ + return self->current_size; +} + +const char *memcached_string_value(const memcached_string_st *self) +{ + return self->string; +} + +const char *memcached_string_value(const memcached_string_st& self) +{ + return self.string; +} + +char *memcached_string_take_value(memcached_string_st *self) +{ + char* value= NULL; + + assert_msg(self, "Invalid memcached_string_st"); + if (self) + { + if (memcached_string_length(self)) + { + // If we fail at adding the null, we copy and move on + if (memcached_failed(memcached_string_append_null(self))) + { + return NULL; + } + + value= self->string; + _init_string(self); + } + } + + return value; +} + +char *memcached_string_value_mutable(const memcached_string_st *self) +{ + return self->string; +} + +char *memcached_string_c_str(memcached_string_st& self) +{ + return self.string; +} + +void memcached_string_set_length(memcached_string_st *self, size_t length) +{ + self->end= self->string +length; +} + +void memcached_string_set_length(memcached_string_st& self, const size_t length) +{ + assert(self.current_size >= length); + size_t set_length= length; + if (self.current_size > length) + { + if (memcached_failed(_string_check(&self, length))) + { + set_length= self.current_size; + } + } + self.end= self.string +set_length; +} diff --git a/libmemcached/string.hpp b/libmemcached/string.hpp new file mode 100644 index 0000000..e2978cc --- /dev/null +++ b/libmemcached/string.hpp @@ -0,0 +1,94 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * libmcachedd client library. + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include "util/string.hpp" + +#define memcached_literal_param util_literal_param +#define memcached_literal_param_size util_literal_param_size +#define memcached_string_make_from_cstr util_string_make_from_cstr +#define memcached_array_length util_array_length + +/** + Strings are always under our control so we make some assumptions + about them. + + 1) is_initialized is always valid. + 2) A string once intialized will always be, until free where we + unset this flag. + 3) A string always has a root. +*/ + +memcached_string_st *memcached_string_create(memcached_st *ptr, + memcached_string_st *string, + size_t initial_size); + +memcached_return_t memcached_string_check(memcached_string_st *string, size_t need); + +char *memcached_string_c_copy(memcached_string_st *string); + +memcached_return_t memcached_string_append_character(memcached_string_st *string, + char character); + +memcached_return_t memcached_string_append(memcached_string_st *string, + const char *value, size_t length); + +void memcached_string_reset(memcached_string_st *string); + +void memcached_string_free(memcached_string_st *string); +void memcached_string_free(memcached_string_st&); + +size_t memcached_string_length(const memcached_string_st *self); +size_t memcached_string_length(const memcached_string_st&); + +size_t memcached_string_size(const memcached_string_st *self); + +const char *memcached_string_value(const memcached_string_st *self); +const char *memcached_string_value(const memcached_string_st&); + +char *memcached_string_take_value(memcached_string_st *self); + +char *memcached_string_value_mutable(const memcached_string_st *self); + +bool memcached_string_set(memcached_string_st&, const char*, size_t); + +void memcached_string_set_length(memcached_string_st *self, size_t length); +void memcached_string_set_length(memcached_string_st&, const size_t length); + +bool memcached_string_resize(memcached_string_st&, const size_t); +char *memcached_string_c_str(memcached_string_st&); diff --git a/libmemcached/touch.cc b/libmemcached/touch.cc new file mode 100644 index 0000000..91d0825 --- /dev/null +++ b/libmemcached/touch.cc @@ -0,0 +1,158 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include + +static memcached_return_t ascii_touch(memcached_instance_st* instance, + const char *key, size_t key_length, + time_t expiration) +{ + char expiration_buffer[MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH +1]; + int expiration_buffer_length= snprintf(expiration_buffer, sizeof(expiration_buffer), " %llu", (unsigned long long)expiration); + if (size_t(expiration_buffer_length) >= sizeof(expiration_buffer) or expiration_buffer_length < 0) + { + return memcached_set_error(*instance, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT, + memcached_literal_param("snprintf(MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH)")); + } + + libmemcached_io_vector_st vector[]= + { + { NULL, 0 }, + { memcached_literal_param("touch ") }, + { memcached_array_string(instance->root->_namespace), memcached_array_size(instance->root->_namespace) }, + { key, key_length }, + { expiration_buffer, size_t(expiration_buffer_length) }, + { memcached_literal_param("\r\n") } + }; + + memcached_return_t rc; + if (memcached_failed(rc= memcached_vdo(instance, vector, 6, true))) + { + memcached_io_reset(instance); + return memcached_set_error(*instance, MEMCACHED_WRITE_FAILURE, MEMCACHED_AT); + } + + return rc; +} + +static memcached_return_t binary_touch(memcached_instance_st* instance, + const char *key, size_t key_length, + time_t expiration) +{ + protocol_binary_request_touch request= {}; //{.bytes= {0}}; + + initialize_binary_request(instance, request.message.header); + + request.message.header.request.opcode= PROTOCOL_BINARY_CMD_TOUCH; + request.message.header.request.extlen= 4; + request.message.header.request.keylen= htons((uint16_t)(key_length +memcached_array_size(instance->root->_namespace))); + request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES; + request.message.header.request.bodylen= htonl((uint32_t)(key_length +memcached_array_size(instance->root->_namespace) +request.message.header.request.extlen)); + request.message.body.expiration= htonl((uint32_t) expiration); + + libmemcached_io_vector_st vector[]= + { + { NULL, 0 }, + { request.bytes, sizeof(request.bytes) }, + { memcached_array_string(instance->root->_namespace), memcached_array_size(instance->root->_namespace) }, + { key, key_length } + }; + + memcached_return_t rc; + if (memcached_failed(rc= memcached_vdo(instance, vector, 4, true))) + { + memcached_io_reset(instance); + return memcached_set_error(*instance, MEMCACHED_WRITE_FAILURE, MEMCACHED_AT); + } + + return rc; +} + +memcached_return_t memcached_touch(memcached_st *ptr, + const char *key, size_t key_length, + time_t expiration) +{ + return memcached_touch_by_key(ptr, key, key_length, key, key_length, expiration); +} + +memcached_return_t memcached_touch_by_key(memcached_st *shell, + const char *group_key, size_t group_key_length, + const char *key, size_t key_length, + time_t expiration) +{ + Memcached* ptr= memcached2Memcached(shell); + LIBMEMCACHED_MEMCACHED_TOUCH_START(); + + memcached_return_t rc; + if (memcached_failed(rc= initialize_query(ptr, true))) + { + return rc; + } + + if (memcached_failed(rc= memcached_key_test(*ptr, (const char **)&key, &key_length, 1))) + { + return memcached_set_error(*ptr, rc, MEMCACHED_AT); + } + + uint32_t server_key= memcached_generate_hash_with_redistribution(ptr, group_key, group_key_length); + memcached_instance_st* instance= memcached_instance_fetch(ptr, server_key); + + if (ptr->flags.binary_protocol) + { + rc= binary_touch(instance, key, key_length, expiration); + } + else + { + rc= ascii_touch(instance, key, key_length, expiration); + } + + if (memcached_failed(rc)) + { + return memcached_set_error(*instance, rc, MEMCACHED_AT, memcached_literal_param("Error occcured while writing touch command to server")); + } + + char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE]; + rc= memcached_response(instance, buffer, sizeof(buffer), NULL); + + if (rc == MEMCACHED_SUCCESS or rc == MEMCACHED_NOTFOUND) + { + return rc; + } + + return memcached_set_error(*instance, rc, MEMCACHED_AT, memcached_literal_param("Error occcured while reading response")); +} diff --git a/libmemcached/udp.cc b/libmemcached/udp.cc new file mode 100644 index 0000000..5d21f9f --- /dev/null +++ b/libmemcached/udp.cc @@ -0,0 +1,77 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * LibMemcached + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +/* + * The udp request id consists of two seperate sections + * 1) The thread id + * 2) The message number + * The thread id should only be set when the memcached_st struct is created + * and should not be changed. + * + * The message num is incremented for each new message we send, this function + * extracts the message number from message_id, increments it and then + * writes the new value back into the header + */ +void increment_udp_message_id(memcached_instance_st* ptr) +{ + struct udp_datagram_header_st *header= (struct udp_datagram_header_st *)ptr->write_buffer; + uint16_t cur_req= get_udp_datagram_request_id(header); + int msg_num= get_msg_num_from_request_id(cur_req); + int thread_id= get_thread_id_from_request_id(cur_req); + + if (((++msg_num) & UDP_REQUEST_ID_THREAD_MASK) != 0) + msg_num= 0; + + header->request_id= htons((uint16_t) (thread_id | msg_num)); +} + +bool memcached_io_init_udp_header(memcached_instance_st* ptr, const uint16_t thread_id) +{ + if (thread_id > UDP_REQUEST_ID_MAX_THREAD_ID) + { + return MEMCACHED_FAILURE; + } + + struct udp_datagram_header_st *header= (struct udp_datagram_header_st *)ptr->write_buffer; + header->request_id= htons(uint16_t((generate_udp_request_thread_id(thread_id)))); + header->num_datagrams= htons(1); + header->sequence_number= htons(0); + + return MEMCACHED_SUCCESS; +} diff --git a/libmemcached/udp.hpp b/libmemcached/udp.hpp new file mode 100644 index 0000000..7442c59 --- /dev/null +++ b/libmemcached/udp.hpp @@ -0,0 +1,59 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * LibMemcached + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#define MAX_UDP_DATAGRAM_LENGTH 1400 +#define UDP_DATAGRAM_HEADER_LENGTH 8 +#define UDP_REQUEST_ID_MSG_SIG_DIGITS 10 +#define UDP_REQUEST_ID_THREAD_MASK 0xFFFF << UDP_REQUEST_ID_MSG_SIG_DIGITS +#define get_udp_datagram_request_id(A) ntohs((A)->request_id) +#define get_udp_datagram_seq_num(A) ntohs((A)->sequence_number) +#define get_udp_datagram_num_datagrams(A) ntohs((A)->num_datagrams) +#define get_msg_num_from_request_id(A) ( (A) & (~(UDP_REQUEST_ID_THREAD_MASK)) ) +#define get_thread_id_from_request_id(A) ( (A) & (UDP_REQUEST_ID_THREAD_MASK) ) >> UDP_REQUEST_ID_MSG_SIG_DIGITS +#define generate_udp_request_thread_id(A) (A) << UDP_REQUEST_ID_MSG_SIG_DIGITS +#define UDP_REQUEST_ID_MAX_THREAD_ID get_thread_id_from_request_id(0xFFFF) + +struct udp_datagram_header_st +{ + uint16_t request_id; + uint16_t sequence_number; + uint16_t num_datagrams; + uint16_t reserved; +}; + +bool memcached_io_init_udp_header(memcached_instance_st*, const uint16_t thread_id); +void increment_udp_message_id(memcached_instance_st*); diff --git a/libmemcached/util.h b/libmemcached/util.h new file mode 100644 index 0000000..03ed6da --- /dev/null +++ b/libmemcached/util.h @@ -0,0 +1,40 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include + diff --git a/libmemcached/verbosity.cc b/libmemcached/verbosity.cc new file mode 100644 index 0000000..ed0e244 --- /dev/null +++ b/libmemcached/verbosity.cc @@ -0,0 +1,107 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +struct context_st +{ + size_t length; + const char *buffer; +}; + +static memcached_return_t _set_verbosity(const Memcached *, + const memcached_instance_st * server, + void *context) +{ + libmemcached_io_vector_st *vector= (libmemcached_io_vector_st *)context; + + Memcached local_memc; + Memcached *memc_ptr= memcached_create(&local_memc); + + memcached_return_t rc= memcached_server_add(memc_ptr, memcached_server_name(server), memcached_server_port(server)); + + if (rc == MEMCACHED_SUCCESS) + { + memcached_instance_st* instance= memcached_instance_fetch(memc_ptr, 0); + + + rc= memcached_vdo(instance, vector, 4, true); + + if (rc == MEMCACHED_SUCCESS) + { + char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE]; + rc= memcached_response(instance, buffer, sizeof(buffer), NULL); + } + } + + memcached_free(memc_ptr); + + return rc; +} + +memcached_return_t memcached_verbosity(memcached_st *shell, uint32_t verbosity) +{ + Memcached* ptr= memcached2Memcached(shell); + memcached_return_t rc; + if (memcached_failed(rc= initialize_query(ptr, false))) + { + return rc; + } + + memcached_server_fn callbacks[1]; + + char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE]; + + int send_length= snprintf(buffer, sizeof(buffer), "%u", verbosity); + if (send_length >= MEMCACHED_DEFAULT_COMMAND_SIZE or send_length < 0) + { + return memcached_set_error(*ptr, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT, + memcached_literal_param("snprintf(MEMCACHED_DEFAULT_COMMAND_SIZE)")); + } + + libmemcached_io_vector_st vector[]= + { + { NULL, 0 }, + { memcached_literal_param("verbosity ") }, + { buffer, size_t(send_length) }, + { memcached_literal_param("\r\n") } + }; + + callbacks[0]= _set_verbosity; + + return memcached_server_cursor(ptr, callbacks, vector, 1); +} diff --git a/libmemcached/version.cc b/libmemcached/version.cc new file mode 100644 index 0000000..5f07491 --- /dev/null +++ b/libmemcached/version.cc @@ -0,0 +1,230 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ +#include + +const char * memcached_lib_version(void) +{ + return LIBMEMCACHED_VERSION_STRING; +} + +static inline memcached_return_t memcached_version_textual(Memcached *memc) +{ + libmemcached_io_vector_st vector[]= + { + { memcached_literal_param("version\r\n") }, + }; + + uint32_t success= 0; + bool errors_happened= false; + for (uint32_t x= 0; x < memcached_server_count(memc); x++) + { + memcached_instance_st* instance= memcached_instance_fetch(memc, x); + + // Optimization, we only fetch version once. + if (instance->major_version != UINT8_MAX) + { + continue; + } + + memcached_return_t rrc; + if (memcached_failed(rrc= memcached_vdo(instance, vector, 1, true))) + { + errors_happened= true; + (void)memcached_set_error(*instance, rrc, MEMCACHED_AT); + continue; + } + success++; + } + + if (success) + { + // Collect the returned items + memcached_instance_st* instance; + memcached_return_t readable_error; + while ((instance= memcached_io_get_readable_server(memc, readable_error))) + { + memcached_return_t rrc= memcached_response(instance, NULL); + if (memcached_failed(rrc)) + { + memcached_io_reset(instance); + errors_happened= true; + } + } + } + + return errors_happened ? MEMCACHED_SOME_ERRORS : MEMCACHED_SUCCESS; +} + +static inline memcached_return_t memcached_version_binary(Memcached *memc) +{ + protocol_binary_request_version request= {}; + + request.message.header.request.opcode= PROTOCOL_BINARY_CMD_VERSION; + request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES; + + libmemcached_io_vector_st vector[]= + { + { request.bytes, sizeof(request.bytes) } + }; + + uint32_t success= 0; + bool errors_happened= false; + for (uint32_t x= 0; x < memcached_server_count(memc); x++) + { + memcached_instance_st* instance= memcached_instance_fetch(memc, x); + + initialize_binary_request(instance, request.message.header); + + if (instance->major_version != UINT8_MAX) + { + continue; + } + + memcached_return_t rrc= memcached_vdo(instance, vector, 1, true); + if (memcached_failed(rrc)) + { + memcached_io_reset(instance); + errors_happened= true; + continue; + } + + success++; + } + + if (success) + { + // Collect the returned items + memcached_instance_st* instance; + memcached_return_t readable_error; + while ((instance= memcached_io_get_readable_server(memc, readable_error))) + { + char buffer[32]; + memcached_return_t rrc= memcached_response(instance, buffer, sizeof(buffer), NULL); + if (memcached_failed(rrc)) + { + memcached_io_reset(instance); + errors_happened= true; + } + } + } + + return errors_happened ? MEMCACHED_SOME_ERRORS : MEMCACHED_SUCCESS; +} + +static inline void version_ascii_instance(memcached_instance_st* instance) +{ + if (instance->major_version != UINT8_MAX) + { + libmemcached_io_vector_st vector[]= + { + { memcached_literal_param("version\r\n") }, + }; + + (void)memcached_vdo(instance, vector, 1, false); + } +} + +static inline void version_binary_instance(memcached_instance_st* instance) +{ + if (instance->major_version != UINT8_MAX) + { + protocol_binary_request_version request= {}; + + request.message.header.request.opcode= PROTOCOL_BINARY_CMD_VERSION; + request.message.header.request.datatype= PROTOCOL_BINARY_RAW_BYTES; + + libmemcached_io_vector_st vector[]= + { + { request.bytes, sizeof(request.bytes) } + }; + + initialize_binary_request(instance, request.message.header); + + (void)memcached_vdo(instance, vector, 1, false); + } +} + +void memcached_version_instance(memcached_instance_st* instance) +{ + if (instance) + { + if (memcached_has_root(instance)) + { + if (memcached_is_fetching_version(instance->root)) + { + if (memcached_is_udp(instance->root) == false) + { + + if (memcached_is_binary(instance->root)) + { + version_binary_instance(instance); + return; + } + + version_ascii_instance(instance); + } + } + } + } +} + +memcached_return_t memcached_version(memcached_st *shell) +{ + Memcached* memc= memcached2Memcached(shell); + if (memc) + { + memcached_return_t rc; + if (memcached_failed(rc= initialize_query(memc, true))) + { + return rc; + } + + if (memcached_is_udp(memc)) + { + return MEMCACHED_NOT_SUPPORTED; + } + + if (memcached_is_binary(memc)) + { + return memcached_version_binary(memc); + } + + return memcached_version_textual(memc); + } + + return MEMCACHED_INVALID_ARGUMENTS; +} diff --git a/libmemcached/version.hpp b/libmemcached/version.hpp new file mode 100644 index 0000000..f420a26 --- /dev/null +++ b/libmemcached/version.hpp @@ -0,0 +1,44 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * LibMemcached + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ All + * rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* + Common include file for libmemached +*/ + +#pragma once + +void memcached_version_instance(memcached_instance_st*); diff --git a/libmemcached/virtual_bucket.c b/libmemcached/virtual_bucket.c new file mode 100644 index 0000000..951881b --- /dev/null +++ b/libmemcached/virtual_bucket.c @@ -0,0 +1,120 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +struct bucket_t { + uint32_t master; + uint32_t forward; +}; + +struct memcached_virtual_bucket_t { + bool has_forward; + uint32_t size; + uint32_t replicas; + struct bucket_t buckets[]; +}; + +memcached_return_t memcached_virtual_bucket_create(memcached_st *self, + const uint32_t *host_map, + const uint32_t *forward_map, + const uint32_t buckets, + const uint32_t replicas) +{ + if (self == NULL || host_map == NULL || buckets == 0U) + { + return MEMCACHED_INVALID_ARGUMENTS; + } + + memcached_virtual_bucket_free(self); + + struct memcached_virtual_bucket_t *virtual_bucket= (struct memcached_virtual_bucket_t *)malloc(sizeof(struct memcached_virtual_bucket_t) + sizeof(struct bucket_t) *buckets); + + if (virtual_bucket == NULL) + { + return MEMCACHED_MEMORY_ALLOCATION_FAILURE; + } + + + virtual_bucket->size= buckets; + virtual_bucket->replicas= replicas; + self->virtual_bucket= virtual_bucket; + + uint32_t x= 0; + for (; x < buckets; x++) + { + virtual_bucket->buckets[x].master= host_map[x]; + if (forward_map) + { + virtual_bucket->buckets[x].forward= forward_map[x]; + } + else + { + virtual_bucket->buckets[x].forward= 0; + } + } + + return MEMCACHED_SUCCESS; +} + +void memcached_virtual_bucket_free(memcached_st *self) +{ + if (self) + { + if (self->virtual_bucket) + { + free(self->virtual_bucket); + self->virtual_bucket= NULL; + } + } +} + +uint32_t memcached_virtual_bucket_get(const memcached_st *self, uint32_t digest) +{ + if (self) + { + if (self->virtual_bucket) + { + uint32_t result= (uint32_t) (digest & (self->virtual_bucket->size -1)); + return self->virtual_bucket->buckets[result].master; + } + + return (uint32_t) (digest & (self->number_of_hosts -1)); + } + + return 0; +} diff --git a/libmemcached/virtual_bucket.h b/libmemcached/virtual_bucket.h new file mode 100644 index 0000000..9a63c38 --- /dev/null +++ b/libmemcached/virtual_bucket.h @@ -0,0 +1,56 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011-2013 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +memcached_return_t memcached_virtual_bucket_create(memcached_st *self, + const uint32_t *host_map, + const uint32_t *forward_map, + const uint32_t buckets, + const uint32_t replicas); + +uint32_t memcached_virtual_bucket_get(const memcached_st *self, uint32_t digest); + +void memcached_virtual_bucket_free(memcached_st *self); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcached/watchpoint.h b/libmemcached/watchpoint.h new file mode 100644 index 0000000..822101e --- /dev/null +++ b/libmemcached/watchpoint.h @@ -0,0 +1,51 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#define WATCHPOINT +#define WATCHPOINT_ERROR(A) +#define WATCHPOINT_IFERROR(__memcached_return_t) (void)(__memcached_return_t) +#define WATCHPOINT_STRING(A) +#define WATCHPOINT_NUMBER(A) +#define WATCHPOINT_LABELED_NUMBER(A,B) +#define WATCHPOINT_IF_LABELED_NUMBER(A,B,C) +#define WATCHPOINT_ERRNO(A) +#define WATCHPOINT_ASSERT_PRINT(A,B,C) +#define WATCHPOINT_ASSERT(A) (void)(A) +#define WATCHPOINT_ASSERT_INITIALIZED(A) +#define WATCHPOINT_SET(A) diff --git a/libmemcached/windows.hpp b/libmemcached/windows.hpp new file mode 100644 index 0000000..40564b1 --- /dev/null +++ b/libmemcached/windows.hpp @@ -0,0 +1,125 @@ +/* + * Libmemcached library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +# include +#else +# include +#endif + +#ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif + +#ifndef _WIN32_WINNT +# define _WIN32_WINNT 0x0501 +#endif + +#ifdef __MINGW32__ +# if(_WIN32_WINNT >= 0x0501) +# else +# undef _WIN32_WINNT +# define _WIN32_WINNT 0x0501 +# endif /* _WIN32_WINNT >= 0x0501 */ +#endif /* __MINGW32__ */ + +#if defined(HAVE_WINSOCK2_H) && HAVE_WINSOCK2_H +# include +#endif + +#if defined(HAVE_WS2TCPIP_H) && HAVE_WS2TCPIP_H +# include +#endif + +#if defined(HAVE_IO_H) && HAVE_IO_H +# include +#endif + +struct sockaddr_un +{ + short int sun_family; + char sun_path[108]; +}; + +static inline int translate_windows_error() +{ + int local_errno= WSAGetLastError(); + + switch(local_errno) { + case WSAEINVAL: + local_errno= EINPROGRESS; + break; + case WSAEALREADY: + case WSAEWOULDBLOCK: + local_errno= EAGAIN; + break; + + case WSAECONNREFUSED: + local_errno= ECONNREFUSED; + break; + + case WSAENETUNREACH: + local_errno= ENETUNREACH; + break; + + case WSAETIMEDOUT: + local_errno= ETIMEDOUT; + break; + + case WSAECONNRESET: + local_errno= ECONNRESET; + break; + + case WSAEADDRINUSE: + local_errno= EADDRINUSE; + break; + + case WSAEOPNOTSUPP: + local_errno= EOPNOTSUPP; + break; + + case WSAENOPROTOOPT: + local_errno= ENOPROTOOPT; + break; + + default: + break; + } + + return local_errno; +} diff --git a/libmemcachedinternal/include.am b/libmemcachedinternal/include.am new file mode 100644 index 0000000..f71472e --- /dev/null +++ b/libmemcachedinternal/include.am @@ -0,0 +1,27 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# This noinst lib contains things we want to be ABI private but still want to +# either use in client programs or be able to test in test cases These symbols +# will not be exposed in the shipped .so +noinst_LTLIBRARIES+= libmemcachedinternal/libmemcachedinternal.la + +if HAVE_DTRACE +else +libmemcachedinternal_libmemcachedinternal_la_SOURCES= $(libmemcached_libmemcached_la_SOURCES) +libmemcachedinternal_libmemcachedinternal_la_CFLAGS= \ + ${AM_CFLAGS} \ + ${NO_CONVERSION} \ + -DBUILDING_LIBMEMCACHEDINTERNAL +libmemcachedinternal_libmemcachedinternal_la_CPPFLAGS= \ + ${AM_CPPFLAGS} \ + ${NO_CONVERSION} \ + -DBUILDING_LIBMEMCACHEDINTERNAL +libmemcachedinternal_libmemcachedinternal_la_CXXFLAGS= \ + ${AM_CXXFLAGS} \ + ${NO_CONVERSION} \ + -DBUILDING_LIBMEMCACHEDINTERNAL +libmemcachedinternal_libmemcachedinternal_la_LIBADD= $(libmemcached_libmemcached_la_LIBADD) +EXTRA_libmemcachedinternal_libmemcachedinternal_la_DEPENDENCIES= $(EXTRA_libmemcached_libmemcached_la_DEPENDENCIES) +endif diff --git a/libmemcachedinternal/util/include.am b/libmemcachedinternal/util/include.am new file mode 100644 index 0000000..f5ac3cb --- /dev/null +++ b/libmemcachedinternal/util/include.am @@ -0,0 +1,17 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +# This noinst lib contains things we want to be ABI private but still want to +# either use in client programs or be able to test in test cases These symbols +# will not be exposed in the shipped .so +noinst_LTLIBRARIES+= libmemcachedinternal/libmemcachedutilinternal.la + +libmemcachedinternal_libmemcachedutilinternal_la_SOURCES= $(libmemcached_libmemcachedutil_la_SOURCES) +libmemcachedinternal_libmemcachedutilinternal_la_CXXFLAGS= \ + ${AM_CXXFLAGS} \ + ${NO_CONVERSION} \ + -DBUILDING_LIBMEMCACHEDINTERNAL +libmemcachedinternal_libmemcachedutilinternal_la_CXXFLAGS+= @PTHREAD_CFLAGS@ +libmemcachedinternal_libmemcachedutilinternal_la_LIBADD= libmemcachedinternal/libmemcachedinternal.la +libmemcachedinternal_libmemcachedutilinternal_la_LIBADD+= @PTHREAD_LIBS@ diff --git a/libmemcachedprotocol-0.0/binary.h b/libmemcachedprotocol-0.0/binary.h new file mode 100644 index 0000000..51e2c42 --- /dev/null +++ b/libmemcachedprotocol-0.0/binary.h @@ -0,0 +1,728 @@ +/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ +/* + * Copyright (c) <2008>, Sun Microsystems, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY SUN MICROSYSTEMS, INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +/* + * Summary: Constants used by to implement the binary protocol. + * + * Copy: See Copyright for the status of this software. + * + * Author: Trond Norbye + */ + +#ifndef PROTOCOL_BINARY_H +#define PROTOCOL_BINARY_H + +#include + +/** + * \addtogroup Protocol + * @{ + */ + +/** + * This file contains definitions of the constants and packet formats + * defined in the binary specification. Please note that you _MUST_ remember + * to convert each multibyte field to / from network byte order to / from + * host order. + */ +#ifdef __cplusplus +extern "C" +{ +#endif + + /** + * Definition of the legal "magic" values used in a packet. + * See section 3.1 Magic byte + */ + typedef enum { + PROTOCOL_BINARY_REQ = 0x80, + PROTOCOL_BINARY_RES = 0x81 + } protocol_binary_magic; + + /** + * Definition of the valid response status numbers. + * See section 3.2 Response Status + */ + typedef enum { + PROTOCOL_BINARY_RESPONSE_SUCCESS = 0x00, + PROTOCOL_BINARY_RESPONSE_KEY_ENOENT = 0x01, + PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS = 0x02, + PROTOCOL_BINARY_RESPONSE_E2BIG = 0x03, + PROTOCOL_BINARY_RESPONSE_EINVAL = 0x04, + PROTOCOL_BINARY_RESPONSE_NOT_STORED = 0x05, + PROTOCOL_BINARY_RESPONSE_DELTA_BADVAL = 0x06, + PROTOCOL_BINARY_RESPONSE_NOT_MY_VBUCKET = 0x07, + PROTOCOL_BINARY_RESPONSE_AUTH_ERROR = 0x20, + PROTOCOL_BINARY_RESPONSE_AUTH_CONTINUE = 0x21, + PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND = 0x81, + PROTOCOL_BINARY_RESPONSE_ENOMEM = 0x82, + PROTOCOL_BINARY_RESPONSE_NOT_SUPPORTED = 0x83, + PROTOCOL_BINARY_RESPONSE_EINTERNAL = 0x84, + PROTOCOL_BINARY_RESPONSE_EBUSY = 0x85, + PROTOCOL_BINARY_RESPONSE_ETMPFAIL = 0x86 + } protocol_binary_response_status; + + /** + * Defintion of the different command opcodes. + * See section 3.3 Command Opcodes + */ + typedef enum { + PROTOCOL_BINARY_CMD_GET = 0x00, + PROTOCOL_BINARY_CMD_SET = 0x01, + PROTOCOL_BINARY_CMD_ADD = 0x02, + PROTOCOL_BINARY_CMD_REPLACE = 0x03, + PROTOCOL_BINARY_CMD_DELETE = 0x04, + PROTOCOL_BINARY_CMD_INCREMENT = 0x05, + PROTOCOL_BINARY_CMD_DECREMENT = 0x06, + PROTOCOL_BINARY_CMD_QUIT = 0x07, + PROTOCOL_BINARY_CMD_FLUSH = 0x08, + PROTOCOL_BINARY_CMD_GETQ = 0x09, + PROTOCOL_BINARY_CMD_NOOP = 0x0a, + PROTOCOL_BINARY_CMD_VERSION = 0x0b, + PROTOCOL_BINARY_CMD_GETK = 0x0c, + PROTOCOL_BINARY_CMD_GETKQ = 0x0d, + PROTOCOL_BINARY_CMD_APPEND = 0x0e, + PROTOCOL_BINARY_CMD_PREPEND = 0x0f, + PROTOCOL_BINARY_CMD_STAT = 0x10, + PROTOCOL_BINARY_CMD_SETQ = 0x11, + PROTOCOL_BINARY_CMD_ADDQ = 0x12, + PROTOCOL_BINARY_CMD_REPLACEQ = 0x13, + PROTOCOL_BINARY_CMD_DELETEQ = 0x14, + PROTOCOL_BINARY_CMD_INCREMENTQ = 0x15, + PROTOCOL_BINARY_CMD_DECREMENTQ = 0x16, + PROTOCOL_BINARY_CMD_QUITQ = 0x17, + PROTOCOL_BINARY_CMD_FLUSHQ = 0x18, + PROTOCOL_BINARY_CMD_APPENDQ = 0x19, + PROTOCOL_BINARY_CMD_PREPENDQ = 0x1a, + PROTOCOL_BINARY_CMD_VERBOSITY = 0x1b, + PROTOCOL_BINARY_CMD_TOUCH = 0x1c, + PROTOCOL_BINARY_CMD_GAT = 0x1d, + PROTOCOL_BINARY_CMD_GATQ = 0x1e, + PROTOCOL_BINARY_CMD_GATK = 0x23, + PROTOCOL_BINARY_CMD_GATKQ = 0x24, + + PROTOCOL_BINARY_CMD_SASL_LIST_MECHS = 0x20, + PROTOCOL_BINARY_CMD_SASL_AUTH = 0x21, + PROTOCOL_BINARY_CMD_SASL_STEP = 0x22, + + /* These commands are used for range operations and exist within + * this header for use in other projects. Range operations are + * not expected to be implemented in the memcached server itself. + */ + PROTOCOL_BINARY_CMD_RGET = 0x30, + PROTOCOL_BINARY_CMD_RSET = 0x31, + PROTOCOL_BINARY_CMD_RSETQ = 0x32, + PROTOCOL_BINARY_CMD_RAPPEND = 0x33, + PROTOCOL_BINARY_CMD_RAPPENDQ = 0x34, + PROTOCOL_BINARY_CMD_RPREPEND = 0x35, + PROTOCOL_BINARY_CMD_RPREPENDQ = 0x36, + PROTOCOL_BINARY_CMD_RDELETE = 0x37, + PROTOCOL_BINARY_CMD_RDELETEQ = 0x38, + PROTOCOL_BINARY_CMD_RINCR = 0x39, + PROTOCOL_BINARY_CMD_RINCRQ = 0x3a, + PROTOCOL_BINARY_CMD_RDECR = 0x3b, + PROTOCOL_BINARY_CMD_RDECRQ = 0x3c, + /* End Range operations */ + + /* VBucket commands */ + PROTOCOL_BINARY_CMD_SET_VBUCKET = 0x3d, + PROTOCOL_BINARY_CMD_GET_VBUCKET = 0x3e, + PROTOCOL_BINARY_CMD_DEL_VBUCKET = 0x3f, + /* End VBucket commands */ + + /* TAP commands */ + PROTOCOL_BINARY_CMD_TAP_CONNECT = 0x40, + PROTOCOL_BINARY_CMD_TAP_MUTATION = 0x41, + PROTOCOL_BINARY_CMD_TAP_DELETE = 0x42, + PROTOCOL_BINARY_CMD_TAP_FLUSH = 0x43, + PROTOCOL_BINARY_CMD_TAP_OPAQUE = 0x44, + PROTOCOL_BINARY_CMD_TAP_VBUCKET_SET = 0x45, + PROTOCOL_BINARY_CMD_TAP_CHECKPOINT_START = 0x46, + PROTOCOL_BINARY_CMD_TAP_CHECKPOINT_END = 0x47, + /* End TAP */ + + PROTOCOL_BINARY_CMD_LAST_RESERVED = 0xef, + + /* Scrub the data */ + PROTOCOL_BINARY_CMD_SCRUB = 0xf0 + } protocol_binary_command; + + /** + * Definition of the data types in the packet + * See section 3.4 Data Types + */ + typedef enum { + PROTOCOL_BINARY_RAW_BYTES = 0x00 + } protocol_binary_datatypes; + + /** + * Definition of the header structure for a request packet. + * See section 2 + */ + typedef union { + struct { + uint8_t magic; + uint8_t opcode; + uint16_t keylen; + uint8_t extlen; + uint8_t datatype; + uint16_t vbucket; + uint32_t bodylen; + uint32_t opaque; + uint64_t cas; + } request; + uint8_t bytes[24]; + } protocol_binary_request_header; + + /** + * Definition of the header structure for a response packet. + * See section 2 + */ + typedef union { + struct { + uint8_t magic; + uint8_t opcode; + uint16_t keylen; + uint8_t extlen; + uint8_t datatype; + uint16_t status; + uint32_t bodylen; + uint32_t opaque; + uint64_t cas; + } response; + uint8_t bytes[24]; + } protocol_binary_response_header; + + /** + * Definition of a request-packet containing no extras + */ + union protocol_binary_request_no_extras { + struct { + protocol_binary_request_header header; + } message; + uint8_t bytes[sizeof(protocol_binary_request_header)]; + }; + typedef union protocol_binary_request_no_extras protocol_binary_request_no_extras; + + /** + * Definition of a response-packet containing no extras + */ + typedef union { + struct { + protocol_binary_response_header header; + } message; + uint8_t bytes[sizeof(protocol_binary_response_header)]; + } protocol_binary_response_no_extras; + + /** + * Definition of the packet used by the get, getq, getk and getkq command. + * See section 4 + */ + typedef protocol_binary_request_no_extras protocol_binary_request_get; + typedef protocol_binary_request_no_extras protocol_binary_request_getq; + typedef protocol_binary_request_no_extras protocol_binary_request_getk; + typedef protocol_binary_request_no_extras protocol_binary_request_getkq; + + /** + * Definition of the packet returned from a successful get, getq, getk and + * getkq. + * See section 4 + */ + typedef union { + struct { + protocol_binary_response_header header; + struct { + uint32_t flags; + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_response_header) + 4]; + } protocol_binary_response_get; + + typedef protocol_binary_response_get protocol_binary_response_getq; + typedef protocol_binary_response_get protocol_binary_response_getk; + typedef protocol_binary_response_get protocol_binary_response_getkq; + + /** + * Definition of the packet used by the delete command + * See section 4 + */ + typedef protocol_binary_request_no_extras protocol_binary_request_delete; + + /** + * Definition of the packet returned by the delete command + * See section 4 + */ + typedef protocol_binary_response_no_extras protocol_binary_response_delete; + + /** + * Definition of the packet used by the flush command + * See section 4 + * Please note that the expiration field is optional, so remember to see + * check the header.bodysize to see if it is present. + */ + typedef union { + struct { + protocol_binary_request_header header; + struct { + uint32_t expiration; + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_request_header) + 4]; + } protocol_binary_request_flush; + + /** + * Definition of the packet returned by the flush command + * See section 4 + */ + typedef protocol_binary_response_no_extras protocol_binary_response_flush; + + /** + * Definition of the packet used by set, add and replace + * See section 4 + */ + typedef union { + struct { + protocol_binary_request_header header; + struct { + uint32_t flags; + uint32_t expiration; + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_request_header) + 8]; + } protocol_binary_request_set; + typedef protocol_binary_request_set protocol_binary_request_add; + typedef protocol_binary_request_set protocol_binary_request_replace; + + /** + * Definition of the packet returned by set, add and replace + * See section 4 + */ + typedef protocol_binary_response_no_extras protocol_binary_response_set; + typedef protocol_binary_response_no_extras protocol_binary_response_add; + typedef protocol_binary_response_no_extras protocol_binary_response_replace; + + /** + * Definition of the noop packet + * See section 4 + */ + typedef protocol_binary_request_no_extras protocol_binary_request_noop; + + /** + * Definition of the packet returned by the noop command + * See section 4 + */ + typedef protocol_binary_response_no_extras protocol_binary_response_noop; + + /** + * Definition of the structure used by the increment and decrement + * command. + * See section 4 + */ + typedef union { + struct { + protocol_binary_request_header header; + struct { + uint64_t delta; + uint64_t initial; + uint32_t expiration; + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_request_header) + 20]; + } protocol_binary_request_incr; + typedef protocol_binary_request_incr protocol_binary_request_decr; + + /** + * Definition of the response from an incr or decr command + * command. + * See section 4 + */ + typedef union { + struct { + protocol_binary_response_header header; + struct { + uint64_t value; + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_response_header) + 8]; + } protocol_binary_response_incr; + typedef protocol_binary_response_incr protocol_binary_response_decr; + + /** + * Definition of the quit + * See section 4 + */ + typedef protocol_binary_request_no_extras protocol_binary_request_quit; + + /** + * Definition of the packet returned by the quit command + * See section 4 + */ + typedef protocol_binary_response_no_extras protocol_binary_response_quit; + + /** + * Definition of the packet used by append and prepend command + * See section 4 + */ + typedef protocol_binary_request_no_extras protocol_binary_request_append; + typedef protocol_binary_request_no_extras protocol_binary_request_prepend; + + /** + * Definition of the packet returned from a successful append or prepend + * See section 4 + */ + typedef protocol_binary_response_no_extras protocol_binary_response_append; + typedef protocol_binary_response_no_extras protocol_binary_response_prepend; + + /** + * Definition of the packet used by the version command + * See section 4 + */ + typedef protocol_binary_request_no_extras protocol_binary_request_version; + + /** + * Definition of the packet returned from a successful version command + * See section 4 + */ + typedef protocol_binary_response_no_extras protocol_binary_response_version; + + + /** + * Definition of the packet used by the stats command. + * See section 4 + */ + typedef protocol_binary_request_no_extras protocol_binary_request_stats; + + /** + * Definition of the packet returned from a successful stats command + * See section 4 + */ + typedef protocol_binary_response_no_extras protocol_binary_response_stats; + + /** + * Definition of the packet used by the verbosity command + */ + typedef union { + struct { + protocol_binary_request_header header; + struct { + uint32_t level; + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_request_header) + 4]; + } protocol_binary_request_verbosity; + + /** + * Definition of the packet returned from the verbosity command + */ + typedef protocol_binary_response_no_extras protocol_binary_response_verbosity; + + /** + * Definition of the packet used by the touch command. + */ + typedef union { + struct { + protocol_binary_request_header header; + struct { + uint32_t expiration; + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_request_header) + 4]; + } protocol_binary_request_touch; + + /** + * Definition of the packet returned from the touch command + */ + typedef protocol_binary_response_no_extras protocol_binary_response_touch; + + /** + * Definition of the packet used by the GAT(Q) command. + */ + typedef union { + struct { + protocol_binary_request_header header; + struct { + uint32_t expiration; + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_request_header) + 4]; + } protocol_binary_request_gat; + + typedef protocol_binary_request_gat protocol_binary_request_gatq; + + /** + * Definition of the packet returned from the GAT(Q) + */ + typedef protocol_binary_response_get protocol_binary_response_gat; + typedef protocol_binary_response_get protocol_binary_response_gatq; + + + /** + * Definition of a request for a range operation. + * See http://code.google.com/p/memcached/wiki/RangeOps + * + * These types are used for range operations and exist within + * this header for use in other projects. Range operations are + * not expected to be implemented in the memcached server itself. + */ + typedef union { + struct { + protocol_binary_response_header header; + struct { + uint16_t size; + uint8_t reserved; + uint8_t flags; + uint32_t max_results; + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_request_header) + 4]; + } protocol_binary_request_rangeop; + + typedef protocol_binary_request_rangeop protocol_binary_request_rget; + typedef protocol_binary_request_rangeop protocol_binary_request_rset; + typedef protocol_binary_request_rangeop protocol_binary_request_rsetq; + typedef protocol_binary_request_rangeop protocol_binary_request_rappend; + typedef protocol_binary_request_rangeop protocol_binary_request_rappendq; + typedef protocol_binary_request_rangeop protocol_binary_request_rprepend; + typedef protocol_binary_request_rangeop protocol_binary_request_rprependq; + typedef protocol_binary_request_rangeop protocol_binary_request_rdelete; + typedef protocol_binary_request_rangeop protocol_binary_request_rdeleteq; + typedef protocol_binary_request_rangeop protocol_binary_request_rincr; + typedef protocol_binary_request_rangeop protocol_binary_request_rincrq; + typedef protocol_binary_request_rangeop protocol_binary_request_rdecr; + typedef protocol_binary_request_rangeop protocol_binary_request_rdecrq; + + + /** + * Definition of tap commands + * See To be written + * + */ + + typedef union { + struct { + protocol_binary_request_header header; + struct { + /** + * flags is a bitmask used to set properties for the + * the connection. Please In order to be forward compatible + * you should set all undefined bits to 0. + * + * If the bit require extra userdata, it will be stored + * in the user-data field of the body (passed to the engine + * as enginespeciffic). That means that when you parse the + * flags and the engine-specific data, you have to work your + * way from bit 0 and upwards to find the correct offset for + * the data. + * + */ + uint32_t flags; + + /** + * Backfill age + * + * By using this flag you can limit the amount of data being + * transmitted. If you don't specify a backfill age, the + * server will transmit everything it contains. + * + * The first 8 bytes in the engine specific data contains + * the oldest entry (from epoc) you're interested in. + * Specifying a time in the future (for the server you are + * connecting to), will cause it to start streaming current + * changes. + */ +#define TAP_CONNECT_FLAG_BACKFILL 0x01 + /** + * Dump will cause the server to send the data stored on the + * server, but disconnect when the keys stored in the server + * are transmitted. + */ +#define TAP_CONNECT_FLAG_DUMP 0x02 + /** + * The body contains a list of 16 bits words in network byte + * order specifying the vbucket ids to monitor. The first 16 + * bit word contains the number of buckets. The number of 0 + * means "all buckets" + */ +#define TAP_CONNECT_FLAG_LIST_VBUCKETS 0x04 + /** + * The responsibility of the vbuckets is to be transferred + * over to the caller when all items are transferred. + */ +#define TAP_CONNECT_FLAG_TAKEOVER_VBUCKETS 0x08 + /** + * The tap consumer supports ack'ing of tap messages + */ +#define TAP_CONNECT_SUPPORT_ACK 0x10 + /** + * The tap consumer would prefer to just get the keys + * back. If the engine supports this it will set + * the TAP_FLAG_NO_VALUE flag in each of the + * tap packets returned. + */ +#define TAP_CONNECT_REQUEST_KEYS_ONLY 0x20 + /** + * The body contains a list of (vbucket_id, last_checkpoint_id) + * pairs. This provides the checkpoint support in TAP streams. + * The last checkpoint id represents the last checkpoint that + * was successfully persisted. + */ +#define TAP_CONNECT_CHECKPOINT 0x40 + /** + * The tap consumer is a registered tap client, which means that + * the tap server will maintain its checkpoint cursor permanently. + */ +#define TAP_CONNECT_REGISTERED_CLIENT 0x80 + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_request_header) + 4]; + } protocol_binary_request_tap_connect; + + typedef union { + struct { + protocol_binary_request_header header; + struct { + struct { + uint16_t enginespecific_length; + /* + * The flag section support the following flags + */ + /** + * Request that the consumer send a response packet + * for this packet. The opaque field must be preserved + * in the response. + */ +#define TAP_FLAG_ACK 0x01 + /** + * The value for the key is not included in the packet + */ +#define TAP_FLAG_NO_VALUE 0x02 + uint16_t flags; + uint8_t ttl; + uint8_t res1; + uint8_t res2; + uint8_t res3; + } tap; + struct { + uint32_t flags; + uint32_t expiration; + } item; + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_request_header) + 16]; + } protocol_binary_request_tap_mutation; + + typedef union { + struct { + protocol_binary_request_header header; + struct { + struct { + uint16_t enginespecific_length; + /** + * See the definition of the flags for + * protocol_binary_request_tap_mutation for a description + * of the available flags. + */ + uint16_t flags; + uint8_t ttl; + uint8_t res1; + uint8_t res2; + uint8_t res3; + } tap; + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_request_header) + 8]; + } protocol_binary_request_tap_no_extras; + + typedef protocol_binary_request_tap_no_extras protocol_binary_request_tap_delete; + typedef protocol_binary_request_tap_no_extras protocol_binary_request_tap_flush; + typedef protocol_binary_request_tap_no_extras protocol_binary_request_tap_opaque; + typedef protocol_binary_request_tap_no_extras protocol_binary_request_tap_vbucket_set; + + + /** + * Definition of the packet used by the scrub. + */ + typedef protocol_binary_request_no_extras protocol_binary_request_scrub; + + /** + * Definition of the packet returned from scrub. + */ + typedef protocol_binary_response_no_extras protocol_binary_response_scrub; + + + /** + * Definition of the packet used by set vbucket + */ + typedef union { + struct { + protocol_binary_request_header header; + struct { + vbucket_state_t state; + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_request_header) + sizeof(vbucket_state_t)]; + } protocol_binary_request_set_vbucket; + /** + * Definition of the packet returned from set vbucket + */ + typedef protocol_binary_response_no_extras protocol_binary_response_set_vbucket; + /** + * Definition of the packet used by del vbucket + */ + typedef protocol_binary_request_no_extras protocol_binary_request_del_vbucket; + /** + * Definition of the packet returned from del vbucket + */ + typedef protocol_binary_response_no_extras protocol_binary_response_del_vbucket; + + /** + * Definition of the packet used by get vbucket + */ + typedef protocol_binary_request_no_extras protocol_binary_request_get_vbucket; + + /** + * Definition of the packet returned from get vbucket + */ + typedef union { + struct { + protocol_binary_response_header header; + struct { + vbucket_state_t state; + } body; + } message; + uint8_t bytes[sizeof(protocol_binary_response_header) + sizeof(vbucket_state_t)]; + } protocol_binary_response_get_vbucket; + + + /** + * @} + */ + +#ifdef __cplusplus +} +#endif +#endif /* PROTOCOL_BINARY_H */ diff --git a/libmemcachedprotocol-0.0/callback.h b/libmemcachedprotocol-0.0/callback.h new file mode 100644 index 0000000..638536c --- /dev/null +++ b/libmemcachedprotocol-0.0/callback.h @@ -0,0 +1,416 @@ +/* + * Summary: Definition of the callback interface + * + * Copy: See Copyright for the status of this software. + * + * Author: Trond Norbye + */ + +#pragma once + +/** + * Callback to send data back from a successful GET/GETQ/GETK/GETKQ command + * + * @param cookie Just pass along the cookie supplied in the callback + * @param key What to insert as key in the reply + * @param keylen The length of the key + * @param body What to store in the body of the package + * @param bodylen The number of bytes of the body + * @param flags The flags stored with the item + * @param cas The CAS value to insert into the response (should be 0 + * if you don't care) + */ +typedef protocol_binary_response_status +(*memcached_binary_protocol_get_response_handler)(const void *cookie, + const void *key, + uint16_t keylen, + const void *body, + uint32_t bodylen, + uint32_t flags, + uint64_t cas); +/** + * Callback to send data back from a STAT command + * + * @param cookie Just pass along the cookie supplied in the callback + * @param key What to insert as key in the reply + * @param keylen The length of the key + * @param body What to store in the body of the package + * @param bodylen The number of bytes of the body + */ +typedef protocol_binary_response_status +(*memcached_binary_protocol_stat_response_handler)(const void *cookie, + const void *key, + uint16_t keylen, + const void *body, + uint32_t bodylen); +/** + * Callback to send data back from a VERSION command + * + * @param cookie Just pass along the cookie supplied in the callback + * @param text The version string + * @param length The number of bytes in the version string + */ +typedef protocol_binary_response_status +(*memcached_binary_protocol_version_response_handler)(const void *cookie, + const void *text, + uint32_t length); + + +/** + * In the low level interface you need to format the response + * packet yourself (giving you complete freedom :-) + * + * @param cookie Just pass along the cookie supplied in the callback + * @param request Pointer to the request packet you are sending a reply to + * @param response Pointer to the response packet to send + * + */ +typedef protocol_binary_response_status (*memcached_binary_protocol_raw_response_handler)(const void *cookie, + protocol_binary_request_header *request, + protocol_binary_response_header *response); + +/** + * In the low lever interface you have to do most of the work by + * yourself, but it also gives you a lot of freedom :-) + * @param cookie identification for this connection, just pass it along to + * the response handler + * @param header the command received over the wire. Never try to access + * anything outside the command. + * @param resonse_handler call this function to send data back to the client + */ +typedef protocol_binary_response_status (*memcached_binary_protocol_command_handler)(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler); + +/** + * The raw interface to the packets is implemented in version 0. It contains + * just an array with command handlers. The inxed in the array is the + * com code. + */ +typedef struct { + memcached_binary_protocol_command_handler comcode[256]; +} memcached_binary_protocol_callback_v0_st; + + +/** + * The first version of the callback struct containing all of the + * documented commands in the initial release of the binary protocol + * (aka. memcached 1.4.0). + * + * You might miss the Q commands (addq etc) but the response function + * knows how to deal with them so you don't need to worry about that :-) + */ +typedef struct { + /** + * Add an item to the cache + * @param cookie id of the client receiving the command + * @param key the key to add + * @param len the length of the key + * @param val the value to store for the key (may be NIL) + * @param vallen the length of the data + * @param flags the flags to store with the key + * @param exptime the expiry time for the key-value pair + * @param cas the resulting cas for the add operation (if success) + */ + protocol_binary_response_status (*add)(const void *cookie, + const void *key, + uint16_t keylen, + const void* val, + uint32_t vallen, + uint32_t flags, + uint32_t exptime, + uint64_t *cas); + + /** + * Append data to an existing key-value pair. + * + * @param cookie id of the client receiving the command + * @param key the key to add data to + * @param len the length of the key + * @param val the value to append to the value + * @param vallen the length of the data + * @param cas the CAS in the request + * @param result_cas the resulting cas for the append operation + * + */ + protocol_binary_response_status (*append)(const void *cookie, + const void *key, + uint16_t keylen, + const void* val, + uint32_t vallen, + uint64_t cas, + uint64_t *result_cas); + + /** + * Decrement the value for a key + * + * @param cookie id of the client receiving the command + * @param key the key to decrement the value for + * @param len the length of the key + * @param delta the amount to decrement + * @param initial initial value to store (if the key doesn't exist) + * @param expiration expiration time for the object (if the key doesn't exist) + * @param cas the CAS in the request + * @param result the result from the decrement + * @param result_cas the cas of the item + * + */ + protocol_binary_response_status (*decrement)(const void *cookie, + const void *key, + uint16_t keylen, + uint64_t delta, + uint64_t initial, + uint32_t expiration, + uint64_t *result, + uint64_t *result_cas); + + /** + * Delete an existing key + * + * @param cookie id of the client receiving the command + * @param key the key to delete_object + * @param len the length of the key + * @param cas the CAS in the request + */ + protocol_binary_response_status (*delete_object)(const void *cookie, + const void *key, + uint16_t keylen, + uint64_t cas); + + + /** + * Flush the cache + * + * @param cookie id of the client receiving the command + * @param when when the cache should be flushed (0 == immediately) + */ + protocol_binary_response_status (*flush_object)(const void *cookie, + uint32_t when); + + + + /** + * Get a key-value pair + * + * @param cookie id of the client receiving the command + * @param key the key to get + * @param len the length of the key + * @param response_handler to send the result back to the client + */ + protocol_binary_response_status (*get)(const void *cookie, + const void *key, + uint16_t keylen, + memcached_binary_protocol_get_response_handler response_handler); + + /** + * Increment the value for a key + * + * @param cookie id of the client receiving the command + * @param key the key to increment the value on + * @param len the length of the key + * @param delta the amount to increment + * @param initial initial value to store (if the key doesn't exist) + * @param expiration expiration time for the object (if the key doesn't exist) + * @param cas the CAS in the request + * @param result the result from the decrement + * @param result_cas the cas of the item + * + */ + protocol_binary_response_status (*increment)(const void *cookie, + const void *key, + uint16_t keylen, + uint64_t delta, + uint64_t initial, + uint32_t expiration, + uint64_t *result, + uint64_t *result_cas); + + /** + * The noop command was received. This is just a notification callback (the + * response is automatically created). + * + * @param cookie id of the client receiving the command + */ + protocol_binary_response_status (*noop)(const void *cookie); + + /** + * Prepend data to an existing key-value pair. + * + * @param cookie id of the client receiving the command + * @param key the key to prepend data to + * @param len the length of the key + * @param val the value to prepend to the value + * @param vallen the length of the data + * @param cas the CAS in the request + * @param result-cas the cas id of the item + * + */ + protocol_binary_response_status (*prepend)(const void *cookie, + const void *key, + uint16_t keylen, + const void* val, + uint32_t vallen, + uint64_t cas, + uint64_t *result_cas); + + /** + * The quit command was received. This is just a notification callback (the + * response is automatically created). + * + * @param cookie id of the client receiving the command + */ + protocol_binary_response_status (*quit)(const void *cookie); + + + /** + * Replace an existing item to the cache + * + * @param cookie id of the client receiving the command + * @param key the key to replace the content for + * @param len the length of the key + * @param val the value to store for the key (may be NIL) + * @param vallen the length of the data + * @param flags the flags to store with the key + * @param exptime the expiry time for the key-value pair + * @param cas the cas id in the request + * @param result_cas the cas id of the item + */ + protocol_binary_response_status (*replace)(const void *cookie, + const void *key, + uint16_t keylen, + const void* val, + uint32_t vallen, + uint32_t flags, + uint32_t exptime, + uint64_t cas, + uint64_t *result_cas); + + + /** + * Set a key-value pair in the cache + * + * @param cookie id of the client receiving the command + * @param key the key to insert + * @param len the length of the key + * @param val the value to store for the key (may be NIL) + * @param vallen the length of the data + * @param flags the flags to store with the key + * @param exptime the expiry time for the key-value pair + * @param cas the cas id in the request + * @param result_cas the cas id of the new item + */ + protocol_binary_response_status (*set)(const void *cookie, + const void *key, + uint16_t keylen, + const void* val, + uint32_t vallen, + uint32_t flags, + uint32_t exptime, + uint64_t cas, + uint64_t *result_cas); + + /** + * Get status information + * + * @param cookie id of the client receiving the command + * @param key the key to get status for (or NIL to request all status). + * Remember to insert the terminating packet if multiple + * packets should be returned. + * @param keylen the length of the key + * @param response_handler to send the result back to the client, but + * don't send reply on success! + * + */ + protocol_binary_response_status (*stat)(const void *cookie, + const void *key, + uint16_t keylen, + memcached_binary_protocol_stat_response_handler response_handler); + + /** + * Get the version information + * + * @param cookie id of the client receiving the command + * @param response_handler to send the result back to the client, but + * don't send reply on success! + * + */ + protocol_binary_response_status (*version)(const void *cookie, + memcached_binary_protocol_version_response_handler response_handler); +} memcached_binary_protocol_callback_v1_st; + + +/** + * The version numbers for the different callback structures. + */ +typedef enum { + /** Version 0 is a lowlevel interface that tries to maximize your freedom */ + MEMCACHED_PROTOCOL_HANDLER_V0= 0, + /** + * Version 1 abstracts more of the protocol details, and let you work at + * a logical level + */ + MEMCACHED_PROTOCOL_HANDLER_V1= 1 +} memcached_protocol_interface_version_t; + +/** + * Definition of the protocol callback structure. + */ +typedef struct { + /** + * The interface version you provide callbacks for. + */ + memcached_protocol_interface_version_t interface_version; + + /** + * Callback fired just before the command will be executed. + * + * @param cookie id of the client receiving the command + * @param header the command header as received on the wire. If you look + * at the content you must ensure that you don't + * try to access beyond the end of the message. + */ + void (*pre_execute)(const void *cookie, + protocol_binary_request_header *header); + /** + * Callback fired just after the command was exected (please note + * that the data transfer back to the client is not finished at this + * time). + * + * @param cookie id of the client receiving the command + * @param header the command header as received on the wire. If you look + * at the content you must ensure that you don't + * try to access beyond the end of the message. + */ + void (*post_execute)(const void *cookie, + protocol_binary_request_header *header); + + /** + * Callback fired if no specialized callback is registered for this + * specific command code. + * + * @param cookie id of the client receiving the command + * @param header the command header as received on the wire. You must + * ensure that you don't try to access beyond the end of the + * message. + * @param response_handler The response handler to send data back. + */ + protocol_binary_response_status (*unknown)(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler); + + /** + * The different interface levels we support. A pointer is used so the + * size of the structure is fixed. You must ensure that the memory area + * passed as the pointer is valid as long as you use the protocol handler. + */ + union { + memcached_binary_protocol_callback_v0_st v0; + + /** + * The first version of the callback struct containing all of the + * documented commands in the initial release of the binary protocol + * (aka. memcached 1.4.0). + */ + memcached_binary_protocol_callback_v1_st v1; + } interface; +} memcached_binary_protocol_callback_st; diff --git a/libmemcachedprotocol-0.0/handler.h b/libmemcachedprotocol-0.0/handler.h new file mode 100644 index 0000000..113338d --- /dev/null +++ b/libmemcachedprotocol-0.0/handler.h @@ -0,0 +1,218 @@ +/* LibMemcached + * Copyright (C) 2006-2009 Brian Aker + * All rights reserved. + * + * Use and distribution licensed under the BSD license. See + * the COPYING file in the parent directory for full text. + * + * Summary: Definition of the callback interface to the protocol handler + * + * Author: Trond Norbye + * + */ + +#pragma once + +#include +#if !defined(__cplusplus) +# include +#endif + +#include +#include +#include +#include + +/* Forward declarations */ +/* + * You should only access memcached_protocol_st from one thread!, + * and never assume anything about the internal layout / sizes of the + * structures. + */ +typedef struct memcached_protocol_st memcached_protocol_st; +typedef struct memcached_protocol_client_st memcached_protocol_client_st; + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Function the protocol handler should call to receive data. + * This function should behave exactly like read(2) + * + * @param cookie a cookie used to represent a given client + * @param fd the filedescriptor associated with the client + * @param buf destination buffer + * @param nbuf number of bytes to receive + * @return the number of bytes copied into buf + * or -1 upon error (errno should contain more information) + */ +typedef ssize_t (*memcached_protocol_recv_func)(const void *cookie, + memcached_socket_t fd, + void *buf, + size_t nbuf); + +/** + * Function the protocol handler should call to send data. + * This function should behave exactly like write(2) + * + * @param cookie a cookie used to represent a given client + * @param fd the filedescriptor associated with the client + * @param buf the source buffer + * @param nbuf number of bytes to send + * @return the number of bytes sent + * or -1 upon error (errno should contain more information) + */ +typedef ssize_t (*memcached_protocol_send_func)(const void *cookie, + memcached_socket_t fd, + const void *buf, + size_t nbuf); + +/** + * Create an instance of the protocol handler + * + * @return NULL if allocation of an instance fails + */ +LIBMEMCACHED_API +memcached_protocol_st *memcached_protocol_create_instance(void); + +/** + * Get the callbacks associated with a protocol handler instance + * @return the callbacks currently used + */ +LIBMEMCACHED_API +memcached_binary_protocol_callback_st *memcached_binary_protocol_get_callbacks(memcached_protocol_st *instance); + +/** + * Set the callbacks to be used by the given protocol handler instance + * @param instance the instance to update + * @param callback the callbacks to use + */ +LIBMEMCACHED_API +void memcached_binary_protocol_set_callbacks(memcached_protocol_st *instance, memcached_binary_protocol_callback_st *callback); + +/** + * Should the library inspect the packages being sent and received and verify + * that they are according to the specification? If it encounters an invalid + * packet, it will return an EINVAL packet. + * + * @param instance the instance to update + * @param enable true if you want the library to check packages, false otherwise + */ +LIBMEMCACHED_API +void memcached_binary_protocol_set_pedantic(memcached_protocol_st *instance, bool enable); + +/** + * Is the library inpecting each package? + * @param instance the instance to check + * @return true it the library is inspecting each package, false otherwise + */ +LIBMEMCACHED_API +bool memcached_binary_protocol_get_pedantic(memcached_protocol_st *instance); + +/** + * Destroy an instance of the protocol handler + * + * @param instance The instance to destroy + */ +LIBMEMCACHED_API +void memcached_protocol_destroy_instance(memcached_protocol_st *instance); + +/** + * Set the IO functions used by the instance to send and receive data. The + * functions should behave like recv(3socket) and send(3socket). + * + * @param instance the instance to specify the IO functions for + * @param recv the function to call for reciving data + * @param send the function to call for sending data + */ +LIBMEMCACHED_API +void memached_protocol_set_io_functions(memcached_protocol_st *instance, + memcached_protocol_recv_func recv, + memcached_protocol_send_func send); + + +/** + * Create a new client instance and associate it with a socket + * @param instance the protocol instance to bind the client to + * @param sock the client socket + * @return NULL if allocation fails, otherwise an instance + */ +LIBMEMCACHED_API +memcached_protocol_client_st *memcached_protocol_create_client(memcached_protocol_st *instance, memcached_socket_t sock); + +/** + * Destroy a client handle. + * The caller needs to close the socket accociated with the client + * before calling this function. This function invalidates the + * client memory area. + * + * @param client the client to destroy + */ +LIBMEMCACHED_API +void memcached_protocol_client_destroy(memcached_protocol_client_st *client); + +LIBMEMCACHED_API +void memcached_protocol_client_set_verbose(struct memcached_protocol_client_st *client, bool arg); + +/** + * Error event means that the client encountered an error with the + * connection so you should shut it down + */ +#define MEMCACHED_PROTOCOL_ERROR_EVENT 1 +/** + * Please notify when there is more data available to read + */ +#define MEMCACHED_PROTOCOL_READ_EVENT 2 +/** + * Please notify when it is possible to send more data + */ +#define MEMCACHED_PROTOCOL_WRITE_EVENT 4 +/** + * Backed paused the execution for this client + */ +#define MEMCACHED_PROTOCOL_PAUSE_EVENT 8 + +/** + * The different events the client is interested in. This is a bitmask of + * the constants defined above. + */ +typedef uint32_t memcached_protocol_event_t; + +/** + * Let the client do some work. This might involve reading / sending data + * to/from the client, or perform callbacks to execute a command. + * @param client the client structure to work on + * @return The next event the protocol handler will be notified for + */ +LIBMEMCACHED_API +memcached_protocol_event_t memcached_protocol_client_work(memcached_protocol_client_st *client); + +/** + * Get the socket attached to a client handle + * @param client the client to query + * @return the socket handle + */ +LIBMEMCACHED_API +memcached_socket_t memcached_protocol_client_get_socket(memcached_protocol_client_st *client); + +/** + * Get the error id socket attached to a client handle + * @param client the client to query for an error code + * @return the OS error code from the client + */ +LIBMEMCACHED_API +int memcached_protocol_client_get_errno(memcached_protocol_client_st *client); + +/** + * Get a raw response handler for the given cookie + * @param cookie the cookie passed along into the callback + * @return the raw reponse handler you may use if you find + * the generic callback too limiting + */ +LIBMEMCACHED_API +memcached_binary_protocol_raw_response_handler memcached_binary_protocol_get_raw_response_handler(const void *cookie); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcachedprotocol-0.0/include.am b/libmemcachedprotocol-0.0/include.am new file mode 100644 index 0000000..3683c0f --- /dev/null +++ b/libmemcachedprotocol-0.0/include.am @@ -0,0 +1,9 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +nobase_include_HEADERS+= \ + libmemcachedprotocol-0.0/binary.h \ + libmemcachedprotocol-0.0/callback.h \ + libmemcachedprotocol-0.0/handler.h \ + libmemcachedprotocol-0.0/vbucket.h diff --git a/libmemcachedprotocol-0.0/vbucket.h b/libmemcachedprotocol-0.0/vbucket.h new file mode 100644 index 0000000..e2cc563 --- /dev/null +++ b/libmemcachedprotocol-0.0/vbucket.h @@ -0,0 +1,59 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" +{ +#endif + +typedef enum { + vbucket_state_active = 1, /**< Actively servicing a vbucket. */ + vbucket_state_replica, /**< Servicing a vbucket as a replica only. */ + vbucket_state_pending, /**< Pending active. */ + vbucket_state_dead /**< Not in use, pending deletion. */ +} vbucket_state_t; + +#define is_valid_vbucket_state_t(state) \ + (state == vbucket_state_active || \ + state == vbucket_state_replica || \ + state == vbucket_state_pending || \ + state == vbucket_state_dead) + +#ifdef __cplusplus +} +#endif diff --git a/libmemcachedprotocol/ascii_handler.c b/libmemcachedprotocol/ascii_handler.c new file mode 100644 index 0000000..449b650 --- /dev/null +++ b/libmemcachedprotocol/ascii_handler.c @@ -0,0 +1,1161 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +#include +#include +#include +#include +#include + + +static void print_ascii_command(memcached_protocol_client_st *client) +{ + if (client->is_verbose) + { + switch (client->ascii_command) + { + case SET_CMD: + fprintf(stderr, "%s:%d SET_CMD\n", __FILE__, __LINE__); + break; + + case ADD_CMD: + fprintf(stderr, "%s:%d ADD_CMD\n", __FILE__, __LINE__); + break; + + case REPLACE_CMD: + fprintf(stderr, "%s:%d REPLACE_CMD\n", __FILE__, __LINE__); + break; + + case CAS_CMD: + fprintf(stderr, "%s:%d CAS_CMD\n", __FILE__, __LINE__); + break; + + case APPEND_CMD: + fprintf(stderr, "%s:%d APPEND_CMD\n", __FILE__, __LINE__); + break; + + case PREPEND_CMD: + fprintf(stderr, "%s:%d PREPEND_CMD\n", __FILE__, __LINE__); + break; + + case DELETE_CMD: + fprintf(stderr, "%s:%d DELETE_CMD\n", __FILE__, __LINE__); + break; + + case INCR_CMD: /* FALLTHROUGH */ + fprintf(stderr, "%s:%d INCR_CMD\n", __FILE__, __LINE__); + break; + + case DECR_CMD: + fprintf(stderr, "%s:%d DECR_CMD\n", __FILE__, __LINE__); + break; + + case STATS_CMD: + fprintf(stderr, "%s:%d STATS_CMD\n", __FILE__, __LINE__); + break; + + case FLUSH_ALL_CMD: + fprintf(stderr, "%s:%d FLUSH_ALL_CMD\n", __FILE__, __LINE__); + break; + + case VERSION_CMD: + fprintf(stderr, "%s:%d VERSION_CMD\n", __FILE__, __LINE__); + break; + + case QUIT_CMD: + fprintf(stderr, "%s:%d QUIT_CMD\n", __FILE__, __LINE__); + break; + + case VERBOSITY_CMD: + fprintf(stderr, "%s:%d VERBOSITY_CMD\n", __FILE__, __LINE__); + break; + + case GET_CMD: + fprintf(stderr, "%s:%d GET_CMD\n", __FILE__, __LINE__); + break; + + case GETS_CMD: + fprintf(stderr, "%s:%d GETS_CMD\n", __FILE__, __LINE__); + break; + + default: + case UNKNOWN_CMD: + fprintf(stderr, "%s:%d UNKNOWN_CMD\n", __FILE__, __LINE__); + break; + + } + } +} + +/** + * Try to parse a key from the string. + * @pointer start pointer to a pointer to the string (IN and OUT) + * @return length of the string of -1 if this was an illegal key (invalid + * characters or invalid length) + * @todo add length! + */ +static uint16_t parse_ascii_key(char **start) +{ + uint16_t len= 0; + char *c= *start; + /* Strip leading whitespaces */ + while (isspace(*c)) + { + ++c; + } + + *start= c; + + while (*c != '\0' && !isspace(*c) && !iscntrl(*c)) + { + ++c; + ++len; + } + + + if (len == 0 || len > 240 || (*c != '\0' && *c != '\r' && iscntrl(*c))) + { + return 0; + } + + return len; +} + +/** + * Spool a zero-terminated string + * @param client destination + * @param text the text to spool + * @return status of the spool operation + */ +static protocol_binary_response_status raw_response_handler(memcached_protocol_client_st *client, const char *text) +{ + if (client->is_verbose) + { + fprintf(stderr, "%s:%d %s\n", __FILE__, __LINE__, text); + } + + if (client->root->drain(client) == false) + { + return PROTOCOL_BINARY_RESPONSE_EINTERNAL; + } + + assert(client->output != NULL); +#if 0 + if (client->output == NULL) + { + /* I can write directly to the socket.... */ + do + { + size_t num_bytes= len -offset; + ssize_t nw= client->root->send(client, + client->sock, + ptr + offset, + num_bytes); + if (nw == -1) + { + if (get_socket_errno() == EWOULDBLOCK) + { + break; + } + else if (get_socket_errno() != EINTR) + { + client->error= errno; + return PROTOCOL_BINARY_RESPONSE_EINTERNAL; + } + } + else + { + offset += (size_t)nw; + } + } while (offset < len); + } +#endif + + return client->root->spool(client, text, strlen(text)); +} + +/** + * Send a "CLIENT_ERROR" message back to the client with the correct + * format of the command being sent + * @param client the client to send the message to + */ +static void send_command_usage(memcached_protocol_client_st *client) +{ + const char *errmsg[]= { + [GET_CMD]= "CLIENT_ERROR: Syntax error: get *\r\n", + [GETS_CMD]= "CLIENT_ERROR: Syntax error: gets *\r\n", + [SET_CMD]= "CLIENT_ERROR: Syntax error: set [noreply]\r\n", + [ADD_CMD]= "CLIENT_ERROR: Syntax error: add [noreply]\r\n", + [REPLACE_CMD]= "CLIENT_ERROR: Syntax error: replace [noreply]\r\n", + [CAS_CMD]= "CLIENT_ERROR: Syntax error: cas [noreply]\r\n", + [APPEND_CMD]= "CLIENT_ERROR: Syntax error: append [noreply]\r\n", + [PREPEND_CMD]= "CLIENT_ERROR: Syntax error: prepend [noreply]\r\n", + [DELETE_CMD]= "CLIENT_ERROR: Syntax error: delete_object [noreply]\r\n", + [INCR_CMD]= "CLIENT_ERROR: Syntax error: incr [noreply]\r\n", + [DECR_CMD]= "CLIENT_ERROR: Syntax error: decr [noreply]\r\n", + [STATS_CMD]= "CLIENT_ERROR: Syntax error: stats [key]\r\n", + [FLUSH_ALL_CMD]= "CLIENT_ERROR: Syntax error: flush_all [timeout] [noreply]\r\n", + [VERSION_CMD]= "CLIENT_ERROR: Syntax error: version\r\n", + [QUIT_CMD]="CLIENT_ERROR: Syntax error: quit\r\n", + + [VERBOSITY_CMD]= "CLIENT_ERROR: Syntax error: verbosity \r\n", + [UNKNOWN_CMD]= "CLIENT_ERROR: Unknown command\r\n", + }; + + client->mute = false; + raw_response_handler(client, errmsg[client->ascii_command]); +} + +/** + * Callback for the VERSION responses + * @param cookie client identifier + * @param text the length of the body + * @param textlen the length of the body + */ +static protocol_binary_response_status ascii_version_response_handler(const void *cookie, + const void *text, + uint32_t textlen) +{ + memcached_protocol_client_st *client= (memcached_protocol_client_st*)cookie; + raw_response_handler(client, "VERSION "); + client->root->spool(client, text, textlen); + raw_response_handler(client, "\r\n"); + return PROTOCOL_BINARY_RESPONSE_SUCCESS; +} + +/** + * Callback for the GET/GETQ/GETK and GETKQ responses + * @param cookie client identifier + * @param key the key for the item + * @param keylen the length of the key + * @param body the length of the body + * @param bodylen the length of the body + * @param flags the flags for the item + * @param cas the CAS id for the item + */ +static protocol_binary_response_status +ascii_get_response_handler(const void *cookie, + const void *key, + uint16_t keylen, + const void *body, + uint32_t bodylen, + uint32_t flags, + uint64_t cas) +{ + memcached_protocol_client_st *client= (void*)cookie; + char buffer[300]; + strcpy(buffer, "VALUE "); + const char *source= key; + char *dest= buffer + 6; + + for (int x= 0; x < keylen; ++x) + { + if (*source != '\0' && !isspace(*source) && !iscntrl(*source)) + { + *dest= *source; + } + else + { + return PROTOCOL_BINARY_RESPONSE_EINVAL; /* key constraints in ascii */ + } + + ++dest; + ++source; + } + + size_t used= (size_t)(dest - buffer); + + if (client->ascii_command == GETS_CMD) + { + snprintf(dest, sizeof(buffer) - used, " %u %u %" PRIu64 "\r\n", flags, + bodylen, cas); + } + else + { + snprintf(dest, sizeof(buffer) - used, " %u %u\r\n", flags, bodylen); + } + + client->root->spool(client, buffer, strlen(buffer)); + client->root->spool(client, body, bodylen); + client->root->spool(client, "\r\n", 2); + + return PROTOCOL_BINARY_RESPONSE_SUCCESS; +} + +/** + * Callback for the STAT responses + * @param cookie client identifier + * @param key the key for the item + * @param keylen the length of the key + * @param body the length of the body + * @param bodylen the length of the body + */ +static protocol_binary_response_status ascii_stat_response_handler(const void *cookie, + const void *key, + uint16_t keylen, + const void *body, + uint32_t bodylen) +{ + + memcached_protocol_client_st *client= (void*)cookie; + + if (key != NULL) + { + raw_response_handler(client, "STAT "); + client->root->spool(client, key, keylen); + raw_response_handler(client, " "); + client->root->spool(client, body, bodylen); + raw_response_handler(client, "\r\n"); + } + else + { + raw_response_handler(client, "END\r\n"); + } + + return PROTOCOL_BINARY_RESPONSE_SUCCESS; +} + +/** + * Process a get or a gets request. + * @param client the client handle + * @param buffer the complete get(s) command + * @param end the last character in the command + */ +static void ascii_process_gets(memcached_protocol_client_st *client, + char *buffer, char *end) +{ + char *key= buffer; + + /* Skip command */ + key += (client->ascii_command == GETS_CMD) ? 5 : 4; + + int num_keys= 0; + while (key < end) + { + uint16_t nkey= parse_ascii_key(&key); + if (nkey == 0) /* Invalid key... stop processing this line */ + { + break; + } + + (void)client->root->callback->interface.v1.get(client, key, nkey, + ascii_get_response_handler); + key += nkey; + ++num_keys; + } + + if (num_keys == 0) + { + send_command_usage(client); + } + else + { + client->root->spool(client, "END\r\n", 5); + } +} + +/** + * Try to split up the command line "asdf asdf asdf asdf\n" into an + * argument vector for easier parsing. + * @param start the first character in the command line + * @param end the last character in the command line ("\n") + * @param vec the vector to insert the pointers into + * @size the number of elements in the vector + * @return the number of tokens in the vector + */ +static int ascii_tokenize_command(char *str, char *end, char **vec, int size) +{ + int elem= 0; + + while (str < end) + { + /* Skip leading blanks */ + while (str < end && isspace(*str)) + { + ++str; + } + + if (str == end) + { + return elem; + } + + vec[elem++]= str; + /* find the next non-blank field */ + while (str < end && !isspace(*str)) + { + ++str; + } + + /* zero-terminate it for easier parsing later on */ + *str= '\0'; + ++str; + + /* Is the vector full? */ + if (elem == size) + { + break; + } + } + + return elem; +} + +/** + * If we for some reasons needs to push the line back to read more + * data we have to reverse the tokenization. Just do the brain-dead replace + * of all '\0' to ' ' and set the last character to '\n'. We could have used + * the vector we created, but then we would have to search for all of the + * spaces we ignored... + * @param start pointer to the first character in the buffer to recover + * @param end pointer to the last character in the buffer to recover + */ +static void recover_tokenize_command(char *start, char *end) +{ + while (start < end) + { + if (*start == '\0') + *start= ' '; + ++start; + } + + *end= '\n'; +} + +/** + * Convert the textual command into a comcode + */ +static enum ascii_cmd ascii_to_cmd(char *start, size_t length) +{ + struct { + const char *cmd; + size_t len; + enum ascii_cmd cc; + } commands[]= { + { .cmd= "get", .len= 3, .cc= GET_CMD }, + { .cmd= "gets", .len= 4, .cc= GETS_CMD }, + { .cmd= "set", .len= 3, .cc= SET_CMD }, + { .cmd= "add", .len= 3, .cc= ADD_CMD }, + { .cmd= "replace", .len= 7, .cc= REPLACE_CMD }, + { .cmd= "cas", .len= 3, .cc= CAS_CMD }, + { .cmd= "append", .len= 6, .cc= APPEND_CMD }, + { .cmd= "prepend", .len= 7, .cc= PREPEND_CMD }, + { .cmd= "delete_object", .len= 6, .cc= DELETE_CMD }, + { .cmd= "incr", .len= 4, .cc= INCR_CMD }, + { .cmd= "decr", .len= 4, .cc= DECR_CMD }, + { .cmd= "stats", .len= 5, .cc= STATS_CMD }, + { .cmd= "flush_all", .len= 9, .cc= FLUSH_ALL_CMD }, + { .cmd= "version", .len= 7, .cc= VERSION_CMD }, + { .cmd= "quit", .len= 4, .cc= QUIT_CMD }, + { .cmd= "verbosity", .len= 9, .cc= VERBOSITY_CMD }, + { .cmd= NULL, .len= 0, .cc= UNKNOWN_CMD }}; + + int x= 0; + while (commands[x].len > 0) { + if (length >= commands[x].len) + { + if (strncmp(start, commands[x].cmd, commands[x].len) == 0) + { + /* Potential hit */ + if (length == commands[x].len || isspace(*(start + commands[x].len))) + { + return commands[x].cc; + } + } + } + ++x; + } + + return UNKNOWN_CMD; +} + +/** + * Perform a delete_object operation. + * + * @param client client requesting the deletion + * @param tokens the command as a vector + * @param ntokens the number of items in the vector + */ +static void process_delete(memcached_protocol_client_st *client, + char **tokens, int ntokens) +{ + char *key= tokens[1]; + uint16_t nkey; + + if (ntokens != 2 || (nkey= parse_ascii_key(&key)) == 0) + { + send_command_usage(client); + return; + } + + if (client->root->callback->interface.v1.delete_object == NULL) + { + raw_response_handler(client, "SERVER_ERROR: callback not implemented\r\n"); + return; + } + + protocol_binary_response_status rval= client->root->callback->interface.v1.delete_object(client, key, nkey, 0); + + if (rval == PROTOCOL_BINARY_RESPONSE_SUCCESS) + { + raw_response_handler(client, "DELETED\r\n"); + } + else if (rval == PROTOCOL_BINARY_RESPONSE_KEY_ENOENT) + { + raw_response_handler(client, "NOT_FOUND\r\n"); + } + else + { + char msg[80]; + snprintf(msg, sizeof(msg), "SERVER_ERROR: delete_object failed %u\r\n",(uint32_t)rval); + raw_response_handler(client, msg); + } +} + +static void process_arithmetic(memcached_protocol_client_st *client, + char **tokens, int ntokens) +{ + char *key= tokens[1]; + uint16_t nkey; + + if (ntokens != 3 || (nkey= parse_ascii_key(&key)) == 0) + { + send_command_usage(client); + return; + } + + uint64_t cas; + uint64_t result; + errno= 0; + uint64_t delta= strtoull(tokens[2], NULL, 10); + if (errno != 0) + { + return; // Error + } + + protocol_binary_response_status rval; + if (client->ascii_command == INCR_CMD) + { + if (client->root->callback->interface.v1.increment == NULL) + { + raw_response_handler(client, "SERVER_ERROR: callback not implemented\r\n"); + return; + } + rval= client->root->callback->interface.v1.increment(client, + key, nkey, + delta, 0, + 0, + &result, + &cas); + } + else + { + if (client->root->callback->interface.v1.decrement == NULL) + { + raw_response_handler(client, "SERVER_ERROR: callback not implemented\r\n"); + return; + } + rval= client->root->callback->interface.v1.decrement(client, + key, nkey, + delta, 0, + 0, + &result, + &cas); + } + + if (rval == PROTOCOL_BINARY_RESPONSE_SUCCESS) + { + char buffer[80]; + snprintf(buffer, sizeof(buffer), "%"PRIu64"\r\n", result); + raw_response_handler(client, buffer); + } + else + { + raw_response_handler(client, "NOT_FOUND\r\n"); + } +} + +/** + * Process the stats command (with or without a key specified) + * @param key pointer to the first character after "stats" + * @param end pointer to the "\n" + */ +static void process_stats(memcached_protocol_client_st *client, + char *key, char *end) +{ + if (client->root->callback->interface.v1.stat == NULL) + { + raw_response_handler(client, "SERVER_ERROR: callback not implemented\r\n"); + return; + } + + while (isspace(*key)) + { + key++; + } + + uint16_t nkey= (uint16_t)(end - key); + (void)client->root->callback->interface.v1.stat(client, key, nkey, + ascii_stat_response_handler); +} + +static void process_version(memcached_protocol_client_st *client, + char **tokens, int ntokens) +{ + (void)tokens; + if (ntokens != 1) + { + send_command_usage(client); + return; + } + + if (client->root->callback->interface.v1.version == NULL) + { + raw_response_handler(client, "SERVER_ERROR: callback not implemented\r\n"); + return; + } + + client->root->callback->interface.v1.version(client, + ascii_version_response_handler); +} + +static void process_flush(memcached_protocol_client_st *client, + char **tokens, int ntokens) +{ + if (ntokens > 2) + { + send_command_usage(client); + return; + } + + if (client->root->callback->interface.v1.flush_object == NULL) + { + raw_response_handler(client, "SERVER_ERROR: callback not implemented\r\n"); + return; + } + + uint32_t timeout= 0; + if (ntokens == 2) + { + errno= 0; + timeout= (uint32_t)strtoul(tokens[1], NULL, 10); + if (errno != 0) + { + return; // Error + } + } + + protocol_binary_response_status rval; + rval= client->root->callback->interface.v1.flush_object(client, timeout); + if (rval == PROTOCOL_BINARY_RESPONSE_SUCCESS) + raw_response_handler(client, "OK\r\n"); + else + raw_response_handler(client, "SERVER_ERROR: internal error\r\n"); +} + +/** + * Process one of the storage commands + * @param client the client performing the operation + * @param tokens the command tokens + * @param ntokens the number of tokens + * @param start pointer to the first character in the line + * @param end pointer to the pointer where the last character of this + * command is (IN and OUT) + * @param length the number of bytes available + * @return -1 if an error occurs (and we should just terminate the connection + * because we are out of sync) + * 0 storage command completed, continue processing + * 1 We need more data, so just go ahead and wait for more! + */ +static inline int process_storage_command(memcached_protocol_client_st *client, + char **tokens, int ntokens, char *start, + char **end, ssize_t length) +{ + (void)ntokens; /* already checked */ + char *key= tokens[1]; + uint16_t nkey= parse_ascii_key(&key); + if (nkey == 0) + { + /* return error */ + raw_response_handler(client, "CLIENT_ERROR: bad key\r\n"); + return -1; + } + + errno= 0; + uint32_t flags= (uint32_t)strtoul(tokens[2], NULL, 10); + if (errno != 0) + { + /* return error */ + raw_response_handler(client, "CLIENT_ERROR: bad key\r\n"); + return -1; + } + + uint32_t timeout= (uint32_t)strtoul(tokens[3], NULL, 10); + if (errno != 0) + { + /* return error */ + raw_response_handler(client, "CLIENT_ERROR: bad key\r\n"); + return -1; + } + + unsigned long nbytes= strtoul(tokens[4], NULL, 10); + if (errno != 0) + { + /* return error */ + raw_response_handler(client, "CLIENT_ERROR: bad key\r\n"); + return -1; + } + + /* Do we have all data? */ + unsigned long need= nbytes + (unsigned long)((*end - start) + 1) + 2; /* \n\r\n */ + if ((ssize_t)need > length) + { + /* Keep on reading */ + recover_tokenize_command(start, *end); + return 1; + } + + void *data= (*end) + 1; + uint64_t cas= 0; + uint64_t result_cas; + protocol_binary_response_status rval; + switch (client->ascii_command) + { + case SET_CMD: + rval= client->root->callback->interface.v1.set(client, key, + (uint16_t)nkey, + data, + (uint32_t)nbytes, + flags, + timeout, cas, + &result_cas); + break; + case ADD_CMD: + rval= client->root->callback->interface.v1.add(client, key, + (uint16_t)nkey, + data, + (uint32_t)nbytes, + flags, + timeout, &result_cas); + break; + case CAS_CMD: + errno= 0; + cas= strtoull(tokens[5], NULL, 10); + if (errno != 0) + { + /* return error */ + raw_response_handler(client, "CLIENT_ERROR: bad key\r\n"); + return -1; + } + /* FALLTHROUGH */ + case REPLACE_CMD: + rval= client->root->callback->interface.v1.replace(client, key, + (uint16_t)nkey, + data, + (uint32_t)nbytes, + flags, + timeout, cas, + &result_cas); + break; + case APPEND_CMD: + rval= client->root->callback->interface.v1.append(client, key, + (uint16_t)nkey, + data, + (uint32_t)nbytes, + cas, + &result_cas); + break; + case PREPEND_CMD: + rval= client->root->callback->interface.v1.prepend(client, key, + (uint16_t)nkey, + data, + (uint32_t)nbytes, + cas, + &result_cas); + break; + + /* gcc complains if I don't put all of the enums in here.. */ + case GET_CMD: + case GETS_CMD: + case DELETE_CMD: + case DECR_CMD: + case INCR_CMD: + case STATS_CMD: + case FLUSH_ALL_CMD: + case VERSION_CMD: + case QUIT_CMD: + case VERBOSITY_CMD: + case UNKNOWN_CMD: + default: + abort(); /* impossible */ + } + + if (rval == PROTOCOL_BINARY_RESPONSE_SUCCESS) + { + raw_response_handler(client, "STORED\r\n"); + } + else + { + if (client->ascii_command == CAS_CMD) + { + if (rval == PROTOCOL_BINARY_RESPONSE_KEY_EEXISTS) + { + raw_response_handler(client, "EXISTS\r\n"); + } + else if (rval == PROTOCOL_BINARY_RESPONSE_KEY_ENOENT) + { + raw_response_handler(client, "NOT_FOUND\r\n"); + } + else + { + raw_response_handler(client, "NOT_STORED\r\n"); + } + } + else + { + raw_response_handler(client, "NOT_STORED\r\n"); + } + } + + *end += nbytes + 2; + + return 0; +} + +static int process_cas_command(memcached_protocol_client_st *client, + char **tokens, int ntokens, char *start, + char **end, ssize_t length) +{ + if (ntokens != 6) + { + send_command_usage(client); + return false; + } + + if (client->root->callback->interface.v1.replace == NULL) + { + raw_response_handler(client, "SERVER_ERROR: callback not implemented\r\n"); + return false; + } + + return process_storage_command(client, tokens, ntokens, start, end, length); +} + +static int process_set_command(memcached_protocol_client_st *client, + char **tokens, int ntokens, char *start, + char **end, ssize_t length) +{ + if (ntokens != 5) + { + send_command_usage(client); + return false; + } + + if (client->root->callback->interface.v1.set == NULL) + { + raw_response_handler(client, "SERVER_ERROR: callback not implemented\r\n"); + return false; + } + + return process_storage_command(client, tokens, ntokens, start, end, length); +} + +static int process_add_command(memcached_protocol_client_st *client, + char **tokens, int ntokens, char *start, + char **end, ssize_t length) +{ + if (ntokens != 5) + { + send_command_usage(client); + return false; + } + + if (client->root->callback->interface.v1.add == NULL) + { + raw_response_handler(client, "SERVER_ERROR: callback not implemented\r\n"); + return false; + } + + return process_storage_command(client, tokens, ntokens, start, end, length); +} + +static int process_replace_command(memcached_protocol_client_st *client, + char **tokens, int ntokens, char *start, + char **end, ssize_t length) +{ + if (ntokens != 5) + { + send_command_usage(client); + return false; + } + + if (client->root->callback->interface.v1.replace == NULL) + { + raw_response_handler(client, "SERVER_ERROR: callback not implemented\r\n"); + return false; + } + + return process_storage_command(client, tokens, ntokens, start, end, length); +} + +static int process_append_command(memcached_protocol_client_st *client, + char **tokens, int ntokens, char *start, + char **end, ssize_t length) +{ + if (ntokens != 5) + { + send_command_usage(client); + return false; + } + + if (client->root->callback->interface.v1.append == NULL) + { + raw_response_handler(client, "SERVER_ERROR: callback not implemented\r\n"); + return false; + } + + return process_storage_command(client, tokens, ntokens, start, end, length); +} + +static int process_prepend_command(memcached_protocol_client_st *client, + char **tokens, int ntokens, char *start, + char **end, ssize_t length) +{ + if (ntokens != 5) + { + send_command_usage(client); + return false; + } + + if (client->root->callback->interface.v1.prepend == NULL) + { + raw_response_handler(client, "SERVER_ERROR: callback not implemented\r\n"); + return false; + } + + return process_storage_command(client, tokens, ntokens, start, end, length); +} + +/** + * The ASCII protocol support is just one giant big hack. Instead of adding + * a optimal ascii support, I just convert the ASCII commands to the binary + * protocol and calls back into the command handlers for the binary protocol ;) + */ +memcached_protocol_event_t memcached_ascii_protocol_process_data(memcached_protocol_client_st *client, ssize_t *length, void **endptr) +{ + char *ptr= (char*)client->root->input_buffer; + *endptr= ptr; + + do { + /* Do we have \n (indicating the command preamble)*/ + char *end= memchr(ptr, '\n', (size_t)*length); + if (end == NULL) + { + *endptr= ptr; + return MEMCACHED_PROTOCOL_READ_EVENT; + } + + client->ascii_command= ascii_to_cmd(ptr, (size_t)(*length)); + + /* we got all data available, execute the callback! */ + if (client->root->callback->pre_execute != NULL) + { + client->root->callback->pre_execute(client, NULL); + } + + + /* A multiget lists all of the keys, and I don't want to have an + * avector of let's say 512 pointers to tokenize all of them, so let's + * just handle them immediately + */ + if (client->ascii_command == GET_CMD || + client->ascii_command == GETS_CMD) + { + if (client->root->callback->interface.v1.get != NULL) + { + ascii_process_gets(client, ptr, end); + } + else + { + raw_response_handler(client, "SERVER_ERROR: Command not implemented\n"); + } + } + else + { + /* None of the defined commands takes 10 parameters, so lets just use + * that as a maximum limit. + */ + char *tokens[10]; + int ntokens= ascii_tokenize_command(ptr, end, tokens, 10); + + if (ntokens < 10) + { + client->mute= strcmp(tokens[ntokens - 1], "noreply") == 0; + if (client->mute) + { + --ntokens; /* processed noreply token*/ + } + } + + int error= 0; + + print_ascii_command(client); + switch (client->ascii_command) + { + case SET_CMD: + error= process_set_command(client, tokens, ntokens, ptr, &end, *length); + break; + + case ADD_CMD: + error= process_add_command(client, tokens, ntokens, ptr, &end, *length); + break; + + case REPLACE_CMD: + error= process_replace_command(client, tokens, ntokens, ptr, &end, *length); + break; + + case CAS_CMD: + error= process_cas_command(client, tokens, ntokens, ptr, &end, *length); + break; + + case APPEND_CMD: + error= process_append_command(client, tokens, ntokens, ptr, &end, *length); + break; + + case PREPEND_CMD: + error= process_prepend_command(client, tokens, ntokens, ptr, &end, *length); + break; + + case DELETE_CMD: + process_delete(client, tokens, ntokens); + break; + + case INCR_CMD: /* FALLTHROUGH */ + case DECR_CMD: + process_arithmetic(client, tokens, ntokens); + break; + + case STATS_CMD: + if (client->mute) + { + send_command_usage(client); + } + else + { + recover_tokenize_command(ptr, end); + process_stats(client, ptr + 6, end); + } + break; + + case FLUSH_ALL_CMD: + process_flush(client, tokens, ntokens); + break; + + case VERSION_CMD: + if (client->mute) + { + send_command_usage(client); + } + else + { + process_version(client, tokens, ntokens); + } + break; + + case QUIT_CMD: + if (ntokens != 1 || client->mute) + { + send_command_usage(client); + } + else + { + if (client->root->callback->interface.v1.quit != NULL) + { + client->root->callback->interface.v1.quit(client); + } + + return MEMCACHED_PROTOCOL_ERROR_EVENT; + } + break; + + case VERBOSITY_CMD: + if (ntokens != 2) + { + send_command_usage(client); + } + else + { + raw_response_handler(client, "OK\r\n"); + } + break; + + case UNKNOWN_CMD: + send_command_usage(client); + break; + + case GET_CMD: + case GETS_CMD: + default: + /* Should already be handled */ + abort(); + } + + if (error == -1) + { + return MEMCACHED_PROTOCOL_ERROR_EVENT; + } + else if (error == 1) + { + return MEMCACHED_PROTOCOL_READ_EVENT; + } + } + + if (client->root->callback->post_execute != NULL) + { + client->root->callback->post_execute(client, NULL); + } + + /* Move past \n */ + ++end; + *length -= end - ptr; + ptr= end; + } while (*length > 0); + + *endptr= ptr; + return MEMCACHED_PROTOCOL_READ_EVENT; +} diff --git a/libmemcachedprotocol/ascii_handler.h b/libmemcachedprotocol/ascii_handler.h new file mode 100644 index 0000000..02f8831 --- /dev/null +++ b/libmemcachedprotocol/ascii_handler.h @@ -0,0 +1,40 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +LIBMEMCACHED_LOCAL +memcached_protocol_event_t memcached_ascii_protocol_process_data(memcached_protocol_client_st *client, ssize_t *length, void **endptr); diff --git a/libmemcachedprotocol/binary_handler.c b/libmemcachedprotocol/binary_handler.c new file mode 100644 index 0000000..d720424 --- /dev/null +++ b/libmemcachedprotocol/binary_handler.c @@ -0,0 +1,1198 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +#include +#include +#include +#include +#include +#include + +/* +** ********************************************************************** +** INTERNAL INTERFACE +** ********************************************************************** +*/ + +/** + * Send a preformatted packet back to the client. If the connection is in + * pedantic mode, it will validate the packet and refuse to send it if it + * breaks the specification. + * + * @param cookie client identification + * @param request the original request packet + * @param response the packet to send + * @return The status of the operation + */ +static protocol_binary_response_status raw_response_handler(const void *cookie, + protocol_binary_request_header *request, + protocol_binary_response_header *response) +{ + memcached_protocol_client_st *client= (void*)cookie; + + if (client->root->pedantic && + !memcached_binary_protocol_pedantic_check_response(request, response)) + { + return PROTOCOL_BINARY_RESPONSE_EINVAL; + } + + if (client->root->drain(client) == false) + { + return PROTOCOL_BINARY_RESPONSE_EINTERNAL; + } + + size_t len= sizeof(protocol_binary_response_header) + htonl(response->response.bodylen); + size_t offset= 0; + char *ptr= (void*)response; + + if (client->output == NULL) + { + /* I can write directly to the socket.... */ + do + { + size_t num_bytes= len - offset; + ssize_t nw= client->root->send(client, + client->sock, + ptr + offset, + num_bytes); + if (nw == -1) + { + if (get_socket_errno() == EWOULDBLOCK) + { + break; + } + else if (get_socket_errno() != EINTR) + { + client->error= errno; + return PROTOCOL_BINARY_RESPONSE_EINTERNAL; + } + } + else + { + offset += (size_t)nw; + } + } while (offset < len); + } + + return client->root->spool(client, ptr, len - offset); +} + +static void print_cmd(protocol_binary_command cmd) +{ + switch (cmd) + { + case PROTOCOL_BINARY_CMD_GET: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_GET\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_SET: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_SET\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_ADD: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_ADD\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_REPLACE: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_REPLACE\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_DELETE: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_DELETE\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_INCREMENT: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_INCREMENT\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_DECREMENT: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_DECREMENT\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_QUIT: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_QUIT\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_FLUSH: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_FLUSH\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_GETQ: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_GETQ\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_NOOP: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_NOOP\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_VERSION: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_VERSION\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_GETK: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_GETK\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_GETKQ: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_GETKQ\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_APPEND: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_APPEND\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_PREPEND: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_PREPEND\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_STAT: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_STAT\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_SETQ: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_SETQ\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_ADDQ: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_ADDQ\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_REPLACEQ: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_REPLACEQ\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_DELETEQ: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_DELETEQ\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_INCREMENTQ: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_INCREMENTQ\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_DECREMENTQ: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_DECREMENTQ\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_QUITQ: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_QUITQ\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_FLUSHQ: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_FLUSHQ\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_APPENDQ: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_APPENDQ\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_PREPENDQ: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_PREPENDQ\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_VERBOSITY: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_VERBOSITY\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_TOUCH: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_TOUCH\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_GAT: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_GAT\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_GATQ: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_GATQ\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_SASL_LIST_MECHS: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_SASL_LIST_MECHS\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_SASL_AUTH: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_SASL_AUTH\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_SASL_STEP: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_SASL_STEP\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_RGET: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_RGET\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_RSET: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_RSET\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_RSETQ: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_RSETQ\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_RAPPEND: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_RAPPEND\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_RAPPENDQ: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_RAPPENDQ\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_RPREPEND: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_RPREPEND\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_RPREPENDQ: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_RPREPENDQ\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_RDELETE: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_RDELETE\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_RDELETEQ: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_RDELETEQ\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_RINCR: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_RINCR\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_RINCRQ: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_RINCRQ\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_RDECR: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_RDECR\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_RDECRQ: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_RDECRQ\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_SET_VBUCKET: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_SET_VBUCKET\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_GET_VBUCKET: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_GET_VBUCKET\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_DEL_VBUCKET: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_DEL_VBUCKET\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_TAP_CONNECT: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_TAP_CONNECT\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_TAP_MUTATION: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_TAP_MUTATION\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_TAP_DELETE: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_TAP_DELETE\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_TAP_FLUSH: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_TAP_FLUSH\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_TAP_OPAQUE: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_TAP_OPAQUE\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_TAP_VBUCKET_SET: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_TAP_VBUCKET_SET\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_TAP_CHECKPOINT_START: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_TAP_CHECKPOINT_START\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_TAP_CHECKPOINT_END: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_TAP_CHECKPOINT_END\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_LAST_RESERVED: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_LAST_RESERVED\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_GATK: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_GATK\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_GATKQ: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_GATKQ\n", __FILE__, __LINE__); return; + case PROTOCOL_BINARY_CMD_SCRUB: fprintf(stderr, "%s:%d PROTOCOL_BINARY_CMD_SCRUB\n", __FILE__, __LINE__); return; + default: + abort(); + } +} + +/* + * Version 0 of the interface is really low level and protocol specific, + * while the version 1 of the interface is more API focused. We need a + * way to translate between the command codes on the wire and the + * application level interface in V1, so let's just use the V0 of the + * interface as a map instead of creating a huuuge switch :-) + */ + +/** + * Callback for the GET/GETQ/GETK and GETKQ responses + * @param cookie client identifier + * @param key the key for the item + * @param keylen the length of the key + * @param body the length of the body + * @param bodylen the length of the body + * @param flags the flags for the item + * @param cas the CAS id for the item + */ +static protocol_binary_response_status get_response_handler(const void *cookie, + const void *key, + uint16_t keylen, + const void *body, + uint32_t bodylen, + uint32_t flags, + uint64_t cas) +{ + memcached_protocol_client_st *client= (void*)cookie; + uint8_t opcode= client->current_command->request.opcode; + + if (opcode == PROTOCOL_BINARY_CMD_GET || opcode == PROTOCOL_BINARY_CMD_GETQ) + { + keylen= 0; + } + + protocol_binary_response_get response= { + .message.header.response= { + .magic= PROTOCOL_BINARY_RES, + .opcode= opcode, + .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS), + .opaque= client->current_command->request.opaque, + .cas= memcached_htonll(cas), + .keylen= htons(keylen), + .extlen= 4, + .bodylen= htonl(bodylen + keylen + 4), + }, + }; + + response.message.body.flags= htonl(flags); + + protocol_binary_response_status rval; + const protocol_binary_response_status success= PROTOCOL_BINARY_RESPONSE_SUCCESS; + if ((rval= client->root->spool(client, response.bytes, sizeof(response.bytes))) != success || + (rval= client->root->spool(client, key, keylen)) != success || + (rval= client->root->spool(client, body, bodylen)) != success) + { + return rval; + } + + return PROTOCOL_BINARY_RESPONSE_SUCCESS; +} + +/** + * Callback for the STAT responses + * @param cookie client identifier + * @param key the key for the item + * @param keylen the length of the key + * @param body the length of the body + * @param bodylen the length of the body + */ +static protocol_binary_response_status stat_response_handler(const void *cookie, + const void *key, + uint16_t keylen, + const void *body, + uint32_t bodylen) +{ + + memcached_protocol_client_st *client= (void*)cookie; + + protocol_binary_response_no_extras response= { + .message.header.response= { + .magic= PROTOCOL_BINARY_RES, + .opcode= client->current_command->request.opcode, + .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS), + .opaque= client->current_command->request.opaque, + .keylen= htons(keylen), + .bodylen= htonl(bodylen + keylen), + .cas= 0 + }, + }; + + protocol_binary_response_status rval; + const protocol_binary_response_status success= PROTOCOL_BINARY_RESPONSE_SUCCESS; + if ((rval= client->root->spool(client, response.bytes, sizeof(response.bytes))) != success || + (rval= client->root->spool(client, key, keylen)) != success || + (rval= client->root->spool(client, body, bodylen)) != success) + { + return rval; + } + + return PROTOCOL_BINARY_RESPONSE_SUCCESS; +} + +/** + * Callback for the VERSION responses + * @param cookie client identifier + * @param text the length of the body + * @param textlen the length of the body + */ +static protocol_binary_response_status version_response_handler(const void *cookie, + const void *text, + uint32_t textlen) +{ + + memcached_protocol_client_st *client= (void*)cookie; + + protocol_binary_response_no_extras response= { + .message.header.response= { + .magic= PROTOCOL_BINARY_RES, + .opcode= client->current_command->request.opcode, + .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS), + .opaque= client->current_command->request.opaque, + .bodylen= htonl(textlen), + .cas= 0 + }, + }; + + protocol_binary_response_status rval; + const protocol_binary_response_status success= PROTOCOL_BINARY_RESPONSE_SUCCESS; + if ((rval= client->root->spool(client, response.bytes, sizeof(response.bytes))) != success || + (rval= client->root->spool(client, text, textlen)) != success) + { + return rval; + } + + return PROTOCOL_BINARY_RESPONSE_SUCCESS; +} + +/** + * Callback for ADD and ADDQ + * @param cookie the calling client + * @param header the add/addq command + * @param response_handler not used + * @return the result of the operation + */ +static protocol_binary_response_status +add_command_handler(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler) +{ + protocol_binary_response_status rval; + + memcached_protocol_client_st *client= (void*)cookie; + if (client->root->callback->interface.v1.add != NULL) + { + uint16_t keylen= ntohs(header->request.keylen); + uint32_t datalen= ntohl(header->request.bodylen) - keylen - 8; + protocol_binary_request_add *request= (void*)header; + uint32_t flags= ntohl(request->message.body.flags); + uint32_t timeout= ntohl(request->message.body.expiration); + char *key= ((char*)header) + sizeof(*header) + 8; + char *data= key + keylen; + uint64_t cas; + + rval= client->root->callback->interface.v1.add(cookie, key, keylen, + data, datalen, flags, + timeout, &cas); + + if (rval == PROTOCOL_BINARY_RESPONSE_SUCCESS && + header->request.opcode == PROTOCOL_BINARY_CMD_ADD) + { + /* Send a positive request */ + protocol_binary_response_no_extras response= { + .message= { + .header.response= { + .magic= PROTOCOL_BINARY_RES, + .opcode= PROTOCOL_BINARY_CMD_ADD, + .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS), + .opaque= header->request.opaque, + .cas= memcached_ntohll(cas) + } + } + }; + rval= response_handler(cookie, header, (void*)&response); + } + } + else + { + rval= PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND; + } + + return rval; +} + +/** + * Callback for DECREMENT and DECREMENTQ + * @param cookie the calling client + * @param header the command + * @param response_handler not used + * @return the result of the operation + */ +static protocol_binary_response_status +decrement_command_handler(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler) +{ + (void)response_handler; + protocol_binary_response_status rval; + + memcached_protocol_client_st *client= (void*)cookie; + if (client->root->callback->interface.v1.decrement != NULL) + { + uint16_t keylen= ntohs(header->request.keylen); + protocol_binary_request_decr *request= (void*)header; + uint64_t init= memcached_ntohll(request->message.body.initial); + uint64_t delta= memcached_ntohll(request->message.body.delta); + uint32_t timeout= ntohl(request->message.body.expiration); + void *key= request->bytes + sizeof(request->bytes); + uint64_t result; + uint64_t cas; + + rval= client->root->callback->interface.v1.decrement(cookie, key, keylen, + delta, init, timeout, + &result, &cas); + if (rval == PROTOCOL_BINARY_RESPONSE_SUCCESS && + header->request.opcode == PROTOCOL_BINARY_CMD_DECREMENT) + { + /* Send a positive request */ + protocol_binary_response_decr response= { + .message= { + .header.response= { + .magic= PROTOCOL_BINARY_RES, + .opcode= PROTOCOL_BINARY_CMD_DECREMENT, + .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS), + .opaque= header->request.opaque, + .cas= memcached_ntohll(cas), + .bodylen= htonl(8) + }, + .body.value= memcached_htonll(result) + } + }; + rval= response_handler(cookie, header, (void*)&response); + } + } + else + { + rval= PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND; + } + + return rval; +} + +/** + * Callback for DELETE and DELETEQ + * @param cookie the calling client + * @param header the command + * @param response_handler not used + * @return the result of the operation + */ +static protocol_binary_response_status delete_command_handler(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler) +{ + (void)response_handler; + protocol_binary_response_status rval; + + memcached_protocol_client_st *client= (void*)cookie; + if (client->root->callback->interface.v1.delete_object != NULL) + { + uint16_t keylen= ntohs(header->request.keylen); + void *key= (header +1); + uint64_t cas= memcached_ntohll(header->request.cas); + rval= client->root->callback->interface.v1.delete_object(cookie, key, keylen, cas); + if (rval == PROTOCOL_BINARY_RESPONSE_SUCCESS && + header->request.opcode == PROTOCOL_BINARY_CMD_DELETE) + { + /* Send a positive request */ + protocol_binary_response_no_extras response= { + .message= { + .header.response= { + .magic= PROTOCOL_BINARY_RES, + .opcode= PROTOCOL_BINARY_CMD_DELETE, + .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS), + .opaque= header->request.opaque, + } + } + }; + rval= response_handler(cookie, header, (void*)&response); + } + } + else + { + rval= PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND; + } + + return rval; +} + +/** + * Callback for FLUSH and FLUSHQ + * @param cookie the calling client + * @param header the command + * @param response_handler not used + * @return the result of the operation + */ +static protocol_binary_response_status +flush_command_handler(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler) +{ + (void)response_handler; + protocol_binary_response_status rval; + + memcached_protocol_client_st *client= (void*)cookie; + if (client->root->callback->interface.v1.flush_object != NULL) + { + protocol_binary_request_flush *flush_object= (void*)header; + uint32_t timeout= 0; + if (htonl(header->request.bodylen) == 4) + { + timeout= ntohl(flush_object->message.body.expiration); + } + + rval= client->root->callback->interface.v1.flush_object(cookie, timeout); + if (rval == PROTOCOL_BINARY_RESPONSE_SUCCESS && + header->request.opcode == PROTOCOL_BINARY_CMD_FLUSH) + { + /* Send a positive request */ + protocol_binary_response_no_extras response= { + .message= { + .header.response= { + .magic= PROTOCOL_BINARY_RES, + .opcode= PROTOCOL_BINARY_CMD_FLUSH, + .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS), + .opaque= header->request.opaque, + } + } + }; + rval= response_handler(cookie, header, (void*)&response); + } + } + else + { + rval= PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND; + } + + return rval; +} + +/** + * Callback for GET, GETK, GETQ, GETKQ + * @param cookie the calling client + * @param header the command + * @param response_handler not used + * @return the result of the operation + */ +static protocol_binary_response_status +get_command_handler(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler) +{ + (void)response_handler; + protocol_binary_response_status rval; + + memcached_protocol_client_st *client= (void*)cookie; + if (client->root->callback->interface.v1.get != NULL) + { + uint16_t keylen= ntohs(header->request.keylen); + void *key= (header + 1); + rval= client->root->callback->interface.v1.get(cookie, key, keylen, + get_response_handler); + + if (rval == PROTOCOL_BINARY_RESPONSE_KEY_ENOENT && + (header->request.opcode == PROTOCOL_BINARY_CMD_GETQ || + header->request.opcode == PROTOCOL_BINARY_CMD_GETKQ)) + { + /* Quiet commands shouldn't respond on cache misses */ + rval= PROTOCOL_BINARY_RESPONSE_SUCCESS; + } + } + else + { + rval= PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND; + } + + return rval; +} + +/** + * Callback for INCREMENT and INCREMENTQ + * @param cookie the calling client + * @param header the command + * @param response_handler not used + * @return the result of the operation + */ +static protocol_binary_response_status +increment_command_handler(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler) +{ + (void)response_handler; + protocol_binary_response_status rval; + + memcached_protocol_client_st *client= (void*)cookie; + if (client->root->callback->interface.v1.increment != NULL) + { + uint16_t keylen= ntohs(header->request.keylen); + protocol_binary_request_incr *request= (void*)header; + uint64_t init= memcached_ntohll(request->message.body.initial); + uint64_t delta= memcached_ntohll(request->message.body.delta); + uint32_t timeout= ntohl(request->message.body.expiration); + void *key= request->bytes + sizeof(request->bytes); + uint64_t cas; + uint64_t result; + + rval= client->root->callback->interface.v1.increment(cookie, key, keylen, + delta, init, timeout, + &result, &cas); + if (rval == PROTOCOL_BINARY_RESPONSE_SUCCESS && + header->request.opcode == PROTOCOL_BINARY_CMD_INCREMENT) + { + /* Send a positive request */ + protocol_binary_response_incr response= { + .message= { + .header.response= { + .magic= PROTOCOL_BINARY_RES, + .opcode= PROTOCOL_BINARY_CMD_INCREMENT, + .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS), + .opaque= header->request.opaque, + .cas= memcached_ntohll(cas), + .bodylen= htonl(8) + }, + .body.value= memcached_htonll(result) + } + }; + + rval= response_handler(cookie, header, (void*)&response); + } + } + else + { + rval= PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND; + } + + return rval; +} + +/** + * Callback for noop. Inform the v1 interface about the noop packet, and + * create and send a packet back to the client + * + * @param cookie the calling client + * @param header the command + * @param response_handler the response handler + * @return the result of the operation + */ +static protocol_binary_response_status +noop_command_handler(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler) +{ + memcached_protocol_client_st *client= (void*)cookie; + if (client->root->callback->interface.v1.noop != NULL) + { + client->root->callback->interface.v1.noop(cookie); + } + + protocol_binary_response_no_extras response= { + .message= { + .header.response= { + .magic= PROTOCOL_BINARY_RES, + .opcode= PROTOCOL_BINARY_CMD_NOOP, + .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS), + .opaque= header->request.opaque, + } + } + }; + + return response_handler(cookie, header, (void*)&response); +} + +/** + * Callback for APPEND and APPENDQ + * @param cookie the calling client + * @param header the command + * @param response_handler not used + * @return the result of the operation + */ +static protocol_binary_response_status +append_command_handler(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler) +{ + (void)response_handler; + protocol_binary_response_status rval; + + memcached_protocol_client_st *client= (void*)cookie; + if (client->root->callback->interface.v1.append != NULL) + { + uint16_t keylen= ntohs(header->request.keylen); + uint32_t datalen= ntohl(header->request.bodylen) - keylen; + char *key= (void*)(header +1); + char *data= key +keylen; + uint64_t cas= memcached_ntohll(header->request.cas); + uint64_t result_cas; + + rval= client->root->callback->interface.v1.append(cookie, key, keylen, + data, datalen, cas, + &result_cas); + if (rval == PROTOCOL_BINARY_RESPONSE_SUCCESS && + header->request.opcode == PROTOCOL_BINARY_CMD_APPEND) + { + /* Send a positive request */ + protocol_binary_response_no_extras response= { + .message= { + .header.response= { + .magic= PROTOCOL_BINARY_RES, + .opcode= PROTOCOL_BINARY_CMD_APPEND, + .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS), + .opaque= header->request.opaque, + .cas= memcached_ntohll(result_cas), + }, + } + }; + rval= response_handler(cookie, header, (void*)&response); + } + } + else + { + rval= PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND; + } + + return rval; +} + +/** + * Callback for PREPEND and PREPENDQ + * @param cookie the calling client + * @param header the command + * @param response_handler not used + * @return the result of the operation + */ +static protocol_binary_response_status +prepend_command_handler(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler) +{ + (void)response_handler; + protocol_binary_response_status rval; + + memcached_protocol_client_st *client= (void*)cookie; + if (client->root->callback->interface.v1.prepend != NULL) + { + uint16_t keylen= ntohs(header->request.keylen); + uint32_t datalen= ntohl(header->request.bodylen) - keylen; + char *key= (char*)(header + 1); + char *data= key + keylen; + uint64_t cas= memcached_ntohll(header->request.cas); + uint64_t result_cas; + rval= client->root->callback->interface.v1.prepend(cookie, key, keylen, + data, datalen, cas, + &result_cas); + if (rval == PROTOCOL_BINARY_RESPONSE_SUCCESS && + header->request.opcode == PROTOCOL_BINARY_CMD_PREPEND) + { + /* Send a positive request */ + protocol_binary_response_no_extras response= { + .message= { + .header.response= { + .magic= PROTOCOL_BINARY_RES, + .opcode= PROTOCOL_BINARY_CMD_PREPEND, + .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS), + .opaque= header->request.opaque, + .cas= memcached_ntohll(result_cas), + }, + } + }; + rval= response_handler(cookie, header, (void*)&response); + } + } + else + { + rval= PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND; + } + + return rval; +} + +/** + * Callback for QUIT and QUITQ. Notify the client and shut down the connection + * @param cookie the calling client + * @param header the command + * @param response_handler not used + * @return the result of the operation + */ +static protocol_binary_response_status +quit_command_handler(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler) +{ + memcached_protocol_client_st *client= (void*)cookie; + if (client->root->callback->interface.v1.quit != NULL) + { + client->root->callback->interface.v1.quit(cookie); + } + + protocol_binary_response_no_extras response= { + .message= { + .header.response= { + .magic= PROTOCOL_BINARY_RES, + .opcode= PROTOCOL_BINARY_CMD_QUIT, + .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS), + .opaque= header->request.opaque + } + } + }; + + if (header->request.opcode == PROTOCOL_BINARY_CMD_QUIT) + { + response_handler(cookie, header, (void*)&response); + } + + /* I need a better way to signal to close the connection */ + return PROTOCOL_BINARY_RESPONSE_EINTERNAL; +} + +/** + * Callback for REPLACE and REPLACEQ + * @param cookie the calling client + * @param header the command + * @param response_handler not used + * @return the result of the operation + */ +static protocol_binary_response_status +replace_command_handler(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler) +{ + (void)response_handler; + protocol_binary_response_status rval; + + memcached_protocol_client_st *client= (void*)cookie; + if (client->root->callback->interface.v1.replace != NULL) + { + uint16_t keylen= ntohs(header->request.keylen); + uint32_t datalen= ntohl(header->request.bodylen) - keylen - 8; + protocol_binary_request_replace *request= (void*)header; + uint32_t flags= ntohl(request->message.body.flags); + uint32_t timeout= ntohl(request->message.body.expiration); + char *key= ((char*)header) + sizeof(*header) + 8; + char *data= key + keylen; + uint64_t cas= memcached_ntohll(header->request.cas); + uint64_t result_cas; + + rval= client->root->callback->interface.v1.replace(cookie, key, keylen, + data, datalen, flags, + timeout, cas, + &result_cas); + if (rval == PROTOCOL_BINARY_RESPONSE_SUCCESS && + header->request.opcode == PROTOCOL_BINARY_CMD_REPLACE) + { + /* Send a positive request */ + protocol_binary_response_no_extras response= { + .message= { + .header.response= { + .magic= PROTOCOL_BINARY_RES, + .opcode= PROTOCOL_BINARY_CMD_REPLACE, + .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS), + .opaque= header->request.opaque, + .cas= memcached_ntohll(result_cas), + }, + } + }; + rval= response_handler(cookie, header, (void*)&response); + } + } + else + { + rval= PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND; + } + + return rval; +} + +/** + * Callback for SET and SETQ + * @param cookie the calling client + * @param header the command + * @param response_handler not used + * @return the result of the operation + */ +static protocol_binary_response_status set_command_handler(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler) +{ + (void)response_handler; + protocol_binary_response_status rval; + + memcached_protocol_client_st *client= (void*)cookie; + if (client->root->callback->interface.v1.set != NULL) + { + uint16_t keylen= ntohs(header->request.keylen); + uint32_t datalen= ntohl(header->request.bodylen) - keylen - 8; + protocol_binary_request_replace *request= (void*)header; + uint32_t flags= ntohl(request->message.body.flags); + uint32_t timeout= ntohl(request->message.body.expiration); + char *key= ((char*)header) + sizeof(*header) + 8; + char *data= key + keylen; + uint64_t cas= memcached_ntohll(header->request.cas); + uint64_t result_cas; + + + rval= client->root->callback->interface.v1.set(cookie, key, keylen, + data, datalen, flags, + timeout, cas, &result_cas); + if (rval == PROTOCOL_BINARY_RESPONSE_SUCCESS && + header->request.opcode == PROTOCOL_BINARY_CMD_SET) + { + /* Send a positive request */ + protocol_binary_response_no_extras response= { + .message= { + .header.response= { + .magic= PROTOCOL_BINARY_RES, + .opcode= PROTOCOL_BINARY_CMD_SET, + .status= htons(PROTOCOL_BINARY_RESPONSE_SUCCESS), + .opaque= header->request.opaque, + .cas= memcached_ntohll(result_cas), + }, + } + }; + rval= response_handler(cookie, header, (void*)&response); + } + } + else + { + rval= PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND; + } + + return rval; +} + +/** + * Callback for STAT + * @param cookie the calling client + * @param header the command + * @param response_handler not used + * @return the result of the operation + */ +static protocol_binary_response_status +stat_command_handler(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler) +{ + (void)response_handler; + protocol_binary_response_status rval; + + memcached_protocol_client_st *client= (void*)cookie; + if (client->root->callback->interface.v1.stat != NULL) + { + uint16_t keylen= ntohs(header->request.keylen); + + rval= client->root->callback->interface.v1.stat(cookie, + (void*)(header + 1), + keylen, + stat_response_handler); + } + else + { + rval= PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND; + } + + return rval; +} + +/** + * Callback for VERSION + * @param cookie the calling client + * @param header the command + * @param response_handler not used + * @return the result of the operation + */ +static protocol_binary_response_status +version_command_handler(const void *cookie, + protocol_binary_request_header *header, + memcached_binary_protocol_raw_response_handler response_handler) +{ + (void)response_handler; + (void)header; + protocol_binary_response_status rval; + + memcached_protocol_client_st *client= (void*)cookie; + if (client->root->callback->interface.v1.version != NULL) + { + rval= client->root->callback->interface.v1.version(cookie, + version_response_handler); + } + else + { + rval= PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND; + } + + return rval; +} + +/** + * The map to remap between the com codes and the v1 logical setting + */ +static memcached_binary_protocol_command_handler comcode_v0_v1_remap[256]= { + [PROTOCOL_BINARY_CMD_ADDQ]= add_command_handler, + [PROTOCOL_BINARY_CMD_ADD]= add_command_handler, + [PROTOCOL_BINARY_CMD_APPENDQ]= append_command_handler, + [PROTOCOL_BINARY_CMD_APPEND]= append_command_handler, + [PROTOCOL_BINARY_CMD_DECREMENTQ]= decrement_command_handler, + [PROTOCOL_BINARY_CMD_DECREMENT]= decrement_command_handler, + [PROTOCOL_BINARY_CMD_DELETEQ]= delete_command_handler, + [PROTOCOL_BINARY_CMD_DELETE]= delete_command_handler, + [PROTOCOL_BINARY_CMD_FLUSHQ]= flush_command_handler, + [PROTOCOL_BINARY_CMD_FLUSH]= flush_command_handler, + [PROTOCOL_BINARY_CMD_GETKQ]= get_command_handler, + [PROTOCOL_BINARY_CMD_GETK]= get_command_handler, + [PROTOCOL_BINARY_CMD_GETQ]= get_command_handler, + [PROTOCOL_BINARY_CMD_GET]= get_command_handler, + [PROTOCOL_BINARY_CMD_INCREMENTQ]= increment_command_handler, + [PROTOCOL_BINARY_CMD_INCREMENT]= increment_command_handler, + [PROTOCOL_BINARY_CMD_NOOP]= noop_command_handler, + [PROTOCOL_BINARY_CMD_PREPENDQ]= prepend_command_handler, + [PROTOCOL_BINARY_CMD_PREPEND]= prepend_command_handler, + [PROTOCOL_BINARY_CMD_QUITQ]= quit_command_handler, + [PROTOCOL_BINARY_CMD_QUIT]= quit_command_handler, + [PROTOCOL_BINARY_CMD_REPLACEQ]= replace_command_handler, + [PROTOCOL_BINARY_CMD_REPLACE]= replace_command_handler, + [PROTOCOL_BINARY_CMD_SETQ]= set_command_handler, + [PROTOCOL_BINARY_CMD_SET]= set_command_handler, + [PROTOCOL_BINARY_CMD_STAT]= stat_command_handler, + [PROTOCOL_BINARY_CMD_VERSION]= version_command_handler, +}; + +/** + * Try to execute a command. Fire the pre/post functions and the specialized + * handler function if it's set. If not, the unknown probe should be fired + * if it's present. + * @param client the client connection to operate on + * @param header the command to execute + * @return true if success or false if a fatal error occured so that the + * connection should be shut down. + */ +static protocol_binary_response_status execute_command(memcached_protocol_client_st *client, protocol_binary_request_header *header) +{ + if (client->root->pedantic && + memcached_binary_protocol_pedantic_check_request(header)) + { + /* @todo return invalid command packet */ + } + + /* we got all data available, execute the callback! */ + if (client->root->callback->pre_execute != NULL) + { + client->root->callback->pre_execute(client, header); + } + + protocol_binary_response_status rval= PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND; + uint8_t cc= header->request.opcode; + + if (client->is_verbose) + { + print_cmd(cc); + } + + switch (client->root->callback->interface_version) + { + case 0: + if (client->root->callback->interface.v0.comcode[cc] != NULL) + { + rval= client->root->callback->interface.v0.comcode[cc](client, header, raw_response_handler); + } + break; + + case 1: + if (comcode_v0_v1_remap[cc] != NULL) + { + rval= comcode_v0_v1_remap[cc](client, header, raw_response_handler); + } + break; + + default: + /* Unknown interface. + * It should be impossible to get here so I'll just call abort + * to avoid getting a compiler warning :-) + */ + abort(); + } + + + if (rval == PROTOCOL_BINARY_RESPONSE_UNKNOWN_COMMAND && + client->root->callback->unknown != NULL) + { + rval= client->root->callback->unknown(client, header, raw_response_handler); + } + + if (rval != PROTOCOL_BINARY_RESPONSE_SUCCESS && + rval != PROTOCOL_BINARY_RESPONSE_EINTERNAL && + rval != PROTOCOL_BINARY_RESPONSE_NOT_SUPPORTED) + { + protocol_binary_response_no_extras response= { + .message= { + .header.response= { + .magic= PROTOCOL_BINARY_RES, + .opcode= cc, + .status= htons(rval), + .opaque= header->request.opaque, + }, + } + }; + rval= raw_response_handler(client, header, (void*)&response); + } + + if (client->root->callback->post_execute != NULL) + { + client->root->callback->post_execute(client, header); + } + + return rval; +} + +/* +** ********************************************************************** +** "PROTOECTED" INTERFACE +** ********************************************************************** +*/ +memcached_protocol_event_t memcached_binary_protocol_process_data(memcached_protocol_client_st *client, ssize_t *length, void **endptr) +{ + /* try to parse all of the received packets */ + protocol_binary_request_header *header; + header= (void*)client->root->input_buffer; + if (header->request.magic != (uint8_t)PROTOCOL_BINARY_REQ) + { + client->error= EINVAL; + return MEMCACHED_PROTOCOL_ERROR_EVENT; + } + ssize_t len= *length; + + while (len >= (ssize_t)sizeof(*header) && + (len >= (ssize_t)(sizeof(*header) + ntohl(header->request.bodylen)))) + { + /* I have the complete package */ + client->current_command= header; + protocol_binary_response_status rv= execute_command(client, header); + + if (rv == PROTOCOL_BINARY_RESPONSE_EINTERNAL) + { + *length= len; + *endptr= (void*)header; + return MEMCACHED_PROTOCOL_ERROR_EVENT; + } + else if (rv == PROTOCOL_BINARY_RESPONSE_NOT_SUPPORTED) + { + return MEMCACHED_PROTOCOL_PAUSE_EVENT; + } + + ssize_t total= (ssize_t)(sizeof(*header) + ntohl(header->request.bodylen)); + len -= total; + if (len > 0) + { + intptr_t ptr= (intptr_t)header; + ptr += total; + if ((ptr % 8) == 0) + { + header= (void*)ptr; + } + else + { + /* Fix alignment */ + memmove(client->root->input_buffer, (void*)ptr, (size_t)len); + header= (void*)client->root->input_buffer; + } + } + *length= len; + *endptr= (void*)header; + } + + return MEMCACHED_PROTOCOL_READ_EVENT; +} + +/* +** ********************************************************************** +** PUBLIC INTERFACE +** ********************************************************************** +*/ +memcached_binary_protocol_callback_st *memcached_binary_protocol_get_callbacks(memcached_protocol_st *instance) +{ + return instance->callback; +} + +void memcached_binary_protocol_set_callbacks(memcached_protocol_st *instance, memcached_binary_protocol_callback_st *callback) +{ + instance->callback= callback; +} + +memcached_binary_protocol_raw_response_handler memcached_binary_protocol_get_raw_response_handler(const void *cookie) +{ + (void)cookie; + return raw_response_handler; +} + +void memcached_binary_protocol_set_pedantic(memcached_protocol_st *instance, bool enable) +{ + instance->pedantic= enable; +} + +bool memcached_binary_protocol_get_pedantic(memcached_protocol_st *instance) +{ + return instance->pedantic; +} + diff --git a/libmemcachedprotocol/binary_handler.h b/libmemcachedprotocol/binary_handler.h new file mode 100644 index 0000000..d5a74e7 --- /dev/null +++ b/libmemcachedprotocol/binary_handler.h @@ -0,0 +1,47 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +LIBMEMCACHED_LOCAL +bool memcached_binary_protocol_pedantic_check_request(const protocol_binary_request_header *request); + +LIBMEMCACHED_LOCAL +bool memcached_binary_protocol_pedantic_check_response(const protocol_binary_request_header *request, + const protocol_binary_response_header *response); + +LIBMEMCACHED_LOCAL +memcached_protocol_event_t memcached_binary_protocol_process_data(memcached_protocol_client_st *client, ssize_t *length, void **endptr); diff --git a/libmemcachedprotocol/cache.c b/libmemcachedprotocol/cache.c new file mode 100644 index 0000000..67c72ea --- /dev/null +++ b/libmemcachedprotocol/cache.c @@ -0,0 +1,189 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ +#include "mem_config.h" + +#include +#include +#include + +#ifndef NDEBUG +#include +#endif + +#include + +#ifndef NDEBUG +const uint64_t redzone_pattern = 0xdeadbeefcafebabe; +int cache_error = 0; +#endif + +const size_t initial_pool_size = 64; + +cache_t* cache_create(const char *name, size_t bufsize, size_t align, + cache_constructor_t* constructor, + cache_destructor_t* destructor) { + cache_t* ret = calloc(1, sizeof(cache_t)); + size_t name_length= strlen(name); + char* nm= calloc(1, (sizeof(char) * name_length) +1); + memcpy(nm, name, name_length); + void** ptr = calloc(initial_pool_size, bufsize); + if (ret == NULL || nm == NULL || ptr == NULL || + pthread_mutex_init(&ret->mutex, NULL) == -1) { + free(ret); + free(nm); + free(ptr); + return NULL; + } + + ret->name = nm; + ret->ptr = ptr; + ret->freetotal = initial_pool_size; + ret->constructor = constructor; + ret->destructor = destructor; + +#ifndef NDEBUG + ret->bufsize = bufsize + 2 * sizeof(redzone_pattern); +#else + ret->bufsize = bufsize; +#endif + + (void)align; + + return ret; +} + +static inline void* get_object(void *ptr) { +#ifndef NDEBUG + uint64_t *pre = ptr; + return pre + 1; +#else + return ptr; +#endif +} + +void cache_destroy(cache_t *cache) { + while (cache->freecurr > 0) { + void *ptr = cache->ptr[--cache->freecurr]; + if (cache->destructor) { + cache->destructor(get_object(ptr), NULL); + } + free(ptr); + } + free(cache->name); + free(cache->ptr); + pthread_mutex_destroy(&cache->mutex); +} + +void* cache_alloc(cache_t *cache) { + void *ret; + void *object; + pthread_mutex_lock(&cache->mutex); + if (cache->freecurr > 0) { + ret = cache->ptr[--cache->freecurr]; + object = get_object(ret); + } else { + object = ret = malloc(cache->bufsize); + if (ret != NULL) { + object = get_object(ret); + + if (cache->constructor != NULL && + cache->constructor(object, NULL, 0) != 0) { + free(ret); + object = NULL; + } + } + } + pthread_mutex_unlock(&cache->mutex); + +#ifndef NDEBUG + if (object != NULL) { + /* add a simple form of buffer-check */ + uint64_t *pre = ret; + *pre = redzone_pattern; + ret = pre+1; + memcpy(((char*)ret) + cache->bufsize - (2 * sizeof(redzone_pattern)), + &redzone_pattern, sizeof(redzone_pattern)); + } +#endif + + return object; +} + +void cache_free(cache_t *cache, void *ptr) { + pthread_mutex_lock(&cache->mutex); + +#ifndef NDEBUG + /* validate redzone... */ + if (memcmp(((char*)ptr) + cache->bufsize - (2 * sizeof(redzone_pattern)), + &redzone_pattern, sizeof(redzone_pattern)) != 0) { + raise(SIGABRT); + cache_error = 1; + pthread_mutex_unlock(&cache->mutex); + return; + } + uint64_t *pre = ptr; + --pre; + if (*pre != redzone_pattern) { + raise(SIGABRT); + cache_error = -1; + pthread_mutex_unlock(&cache->mutex); + return; + } + ptr = pre; +#endif + if (cache->freecurr < cache->freetotal) { + cache->ptr[cache->freecurr++] = ptr; + } else { + /* try to enlarge free connections array */ + size_t newtotal = cache->freetotal * 2; + void **new_free = realloc(cache->ptr, sizeof(char *) * newtotal); + if (new_free) { + cache->freetotal = newtotal; + cache->ptr = new_free; + cache->ptr[cache->freecurr++] = ptr; + } else { + if (cache->destructor) { + cache->destructor(ptr, NULL); + } + free(ptr); + + } + } + pthread_mutex_unlock(&cache->mutex); +} + diff --git a/libmemcachedprotocol/cache.h b/libmemcachedprotocol/cache.h new file mode 100644 index 0000000..6f84fea --- /dev/null +++ b/libmemcachedprotocol/cache.h @@ -0,0 +1,148 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */ +#pragma once + +#include + +#ifdef HAVE_UMEM_H +# include +# define cache_t umem_cache_t +# define cache_alloc(a) umem_cache_alloc(a, UMEM_DEFAULT) +# define cache_free(a, b) umem_cache_free(a, b) +# define cache_create(a,b,c,d,e) umem_cache_create((char*)a, b, c, d, e, NULL, NULL, NULL, 0) +# define cache_destroy(a) umem_cache_destroy(a); +#else +# ifndef NDEBUG +/* may be used for debug purposes */ +extern int cache_error; +# endif + +/** + * Constructor used to initialize allocated objects + * + * @param obj pointer to the object to initialized. + * @param notused1 This parameter is currently not used. + * @param notused2 This parameter is currently not used. + * @return you should return 0, but currently this is not checked + */ +typedef int cache_constructor_t(void* obj, void* notused1, int notused2); +/** + * Destructor used to clean up allocated objects before they are + * returned to the operating system. + * + * @param obj pointer to the object to initialized. + * @param notused1 This parameter is currently not used. + * @param notused2 This parameter is currently not used. + * @return you should return 0, but currently this is not checked + */ +typedef void cache_destructor_t(void* obj, void* notused); + +/** + * Definition of the structure to keep track of the internal details of + * the cache allocator. Touching any of these variables results in + * undefined behavior. + */ +typedef struct { + /** Mutex to protect access to the structure */ + pthread_mutex_t mutex; + /** Name of the cache objects in this cache (provided by the caller) */ + char *name; + /** List of pointers to available buffers in this cache */ + void **ptr; + /** The size of each element in this cache */ + size_t bufsize; + /** The capacity of the list of elements */ + size_t freetotal; + /** The current number of free elements */ + size_t freecurr; + /** The constructor to be called each time we allocate more memory */ + cache_constructor_t* constructor; + /** The destructor to be called each time before we release memory */ + cache_destructor_t* destructor; +} cache_t; + +/** + * Create an object cache. + * + * The object cache will let you allocate objects of the same size. It is fully + * MT safe, so you may allocate objects from multiple threads without having to + * do any syncrhonization in the application code. + * + * @param name the name of the object cache. This name may be used for debug purposes + * and may help you track down what kind of object you have problems with + * (buffer overruns, leakage etc) + * @param bufsize the size of each object in the cache + * @param align the alignment requirements of the objects in the cache. + * @param constructor the function to be called to initialize memory when we need + * to allocate more memory from the os. + * @param destructor the function to be called before we release the memory back + * to the os. + * @return a handle to an object cache if successful, NULL otherwise. + */ +cache_t* cache_create(const char* name, size_t bufsize, size_t align, + cache_constructor_t* constructor, + cache_destructor_t* destructor); +/** + * Destroy an object cache. + * + * Destroy and invalidate an object cache. You should return all buffers allocated + * with cache_alloc by using cache_free before calling this function. Not doing + * so results in undefined behavior (the buffers may or may not be invalidated) + * + * @param handle the handle to the object cache to destroy. + */ +void cache_destroy(cache_t* handle); +/** + * Allocate an object from the cache. + * + * @param handle the handle to the object cache to allocate from + * @return a pointer to an initialized object from the cache, or NULL if + * the allocation cannot be satisfied. + */ +void* cache_alloc(cache_t* handle); +/** + * Return an object back to the cache. + * + * The caller should return the object in an initialized state so that + * the object may be returned in an expected state from cache_alloc. + * + * @param handle handle to the object cache to return the object to + * @param ptr pointer to the object to return. + */ +void cache_free(cache_t* handle, void* ptr); +#endif // HAVE_UMEM_H diff --git a/libmemcachedprotocol/common.h b/libmemcachedprotocol/common.h new file mode 100644 index 0000000..a4ddc2c --- /dev/null +++ b/libmemcachedprotocol/common.h @@ -0,0 +1,162 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include "mem_config.h" +#include + +#include +#include +#include +#include + +/* + * I don't really need the following two functions as function pointers + * in the instance handle, but I don't want to put them in the global + * namespace for those linking statically (personally I don't like that, + * but some people still do). If it ever shows up as a performance thing + * I'll look into optimizing this ;-) + */ +typedef bool (*drain_func)(memcached_protocol_client_st *client); +typedef protocol_binary_response_status (*spool_func)(memcached_protocol_client_st *client, + const void *data, + size_t length); + +/** + * Definition of the per instance structure. + */ +struct memcached_protocol_st { + memcached_binary_protocol_callback_st *callback; + memcached_protocol_recv_func recv; + memcached_protocol_send_func send; + + /* + * I really don't need these as funciton pointers, but I don't want + * to clutter the namespace if someone links statically. + */ + drain_func drain; + spool_func spool; + + /* + * To avoid keeping a buffer in each client all the time I have a + * bigger buffer in the instance that I read to initially, and then + * I try to parse and execute as much from the buffer. If I wasn't able + * to process all data I'll keep that in a per-connection buffer until + * the next time I can read from the socket. + */ + uint8_t *input_buffer; + size_t input_buffer_size; + + bool pedantic; + /* @todo use multiple sized buffers */ + cache_t *buffer_cache; +}; + +struct chunk_st { + /* Pointer to the data */ + char *data; + /* The offset to the first byte into the buffer that is used */ + size_t offset; + /* The offset into the buffer for the first free byte */ + size_t nbytes; + /* The number of bytes in the buffer */ + size_t size; + /* Pointer to the next buffer in the chain */ + struct chunk_st *next; +}; + +#define CHUNK_BUFFERSIZE 2048 + +typedef memcached_protocol_event_t (*process_data)(struct memcached_protocol_client_st *client, ssize_t *length, void **endptr); + +enum ascii_cmd { + GET_CMD, + GETS_CMD, + SET_CMD, + ADD_CMD, + REPLACE_CMD, + CAS_CMD, + APPEND_CMD, + PREPEND_CMD, + DELETE_CMD, + INCR_CMD, + DECR_CMD, + STATS_CMD, + FLUSH_ALL_CMD, + VERSION_CMD, + QUIT_CMD, + VERBOSITY_CMD, + UNKNOWN_CMD +}; + +struct memcached_protocol_client_st { + bool is_verbose; + memcached_protocol_st *root; + memcached_socket_t sock; + int error; + + /* Linked list of data to send */ + struct chunk_st *output; + struct chunk_st *output_tail; + + /* + * While we process input data, this is where we spool incomplete commands + * if we need to receive more data.... + * @todo use the buffercace + */ + uint8_t *input_buffer; + size_t input_buffer_size; + size_t input_buffer_offset; + + /* The callback to the protocol handler to use (ascii or binary) */ + process_data work; + + /* + * Should the spool data discard the data to send or not? (aka noreply in + * the ascii protocol.. + */ + bool mute; + + /* Members used by the binary protocol */ + protocol_binary_request_header *current_command; + + /* Members used by the ascii protocol */ + enum ascii_cmd ascii_command; +}; + +#include "ascii_handler.h" +#include "binary_handler.h" diff --git a/libmemcachedprotocol/handler.c b/libmemcachedprotocol/handler.c new file mode 100644 index 0000000..afd7086 --- /dev/null +++ b/libmemcachedprotocol/handler.c @@ -0,0 +1,441 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */ +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +/* +** ********************************************************************** +** INTERNAL INTERFACE +** ********************************************************************** +*/ + +/** + * The default function to receive data from the client. This function + * just wraps the recv function to receive from a socket. + * See man -s3socket recv for more information. + * + * @param cookie cookie indentifying a client, not used + * @param sock socket to read from + * @param buf the destination buffer + * @param nbytes the number of bytes to read + * @return the number of bytes transferred of -1 upon error + */ +static ssize_t default_recv(const void *cookie, + memcached_socket_t sock, + void *buf, + size_t nbytes) +{ + (void)cookie; + return recv(sock, buf, nbytes, 0); +} + +/** + * The default function to send data to the server. This function + * just wraps the send function to send through a socket. + * See man -s3socket send for more information. + * + * @param cookie cookie indentifying a client, not used + * @param sock socket to send to + * @param buf the source buffer + * @param nbytes the number of bytes to send + * @return the number of bytes transferred of -1 upon error + */ +static ssize_t default_send(const void *cookie, + memcached_socket_t fd, + const void *buf, + size_t nbytes) +{ + (void)cookie; + return send(fd, buf, nbytes, MSG_NOSIGNAL); +} + +/** + * Try to drain the output buffers without blocking + * + * @param client the client to drain + * @return false if an error occured (connection should be shut down) + * true otherwise (please note that there may be more data to + * left in the buffer to send) + */ +static bool drain_output(struct memcached_protocol_client_st *client) +{ + if (client->is_verbose) + { + fprintf(stderr, "%s:%d %s mute:%d output:%s length:%d\n", __FILE__, __LINE__, __func__, (int)client->mute, + client->output ? "yes" : "no", + client->output ? (int)(client->output->nbytes - client->output->offset) : 0); + } + + /* Do we have pending data to send? */ + while (client->output != NULL) + { + ssize_t len= client->root->send(client, + client->sock, + client->output->data + client->output->offset, + client->output->nbytes - client->output->offset); + + if (len == -1) + { + if (get_socket_errno() == EWOULDBLOCK) + { + return true; + } + else if (get_socket_errno() != EINTR) + { + client->error= get_socket_errno(); + return false; + } + } + else + { + client->output->offset += (size_t)len; + if (client->output->offset == client->output->nbytes) + { + /* This was the complete buffer */ + struct chunk_st *old= client->output; + client->output= client->output->next; + if (client->output == NULL) + { + client->output_tail= NULL; + } + cache_free(client->root->buffer_cache, old); + } + } + } + + return true; +} + +/** + * Allocate an output buffer and chain it into the output list + * + * @param client the client that needs the buffer + * @return pointer to the new chunk if the allocation succeeds, NULL otherwise + */ +static struct chunk_st *allocate_output_chunk(struct memcached_protocol_client_st *client) +{ + struct chunk_st *ret= cache_alloc(client->root->buffer_cache); + + if (ret == NULL) + { + return NULL; + } + + ret->offset= ret->nbytes= 0; + ret->next= NULL; + ret->size= CHUNK_BUFFERSIZE; + ret->data= (void*)(ret + 1); + if (client->output == NULL) + { + client->output= client->output_tail= ret; + } + else + { + client->output_tail->next= ret; + client->output_tail= ret; + } + + return ret; +} + +/** + * Spool data into the send-buffer for a client. + * + * @param client the client to spool the data for + * @param data the data to spool + * @param length the number of bytes of data to spool + * @return PROTOCOL_BINARY_RESPONSE_SUCCESS if success, + * PROTOCOL_BINARY_RESPONSE_ENOMEM if we failed to allocate memory + */ +static protocol_binary_response_status spool_output(struct memcached_protocol_client_st *client, + const void *data, + size_t length) +{ + if (client->is_verbose) + { + fprintf(stderr, "%s:%d %s mute:%d length:%d\n", __FILE__, __LINE__, __func__, (int)client->mute, (int)length); + } + + if (client->mute) + { + return PROTOCOL_BINARY_RESPONSE_SUCCESS; + } + + size_t offset= 0; + + struct chunk_st *chunk= client->output; + while (offset < length) + { + if (chunk == NULL || (chunk->size - chunk->nbytes) == 0) + { + if ((chunk= allocate_output_chunk(client)) == NULL) + { + return PROTOCOL_BINARY_RESPONSE_ENOMEM; + } + } + + size_t bulk= length - offset; + if (bulk > chunk->size - chunk->nbytes) + { + bulk= chunk->size - chunk->nbytes; + } + + memcpy(chunk->data + chunk->nbytes, data, bulk); + chunk->nbytes += bulk; + offset += bulk; + } + + return PROTOCOL_BINARY_RESPONSE_SUCCESS; +} + +/** + * Try to determine the protocol used on this connection. + * If the first byte contains the magic byte PROTOCOL_BINARY_REQ we should + * be using the binary protocol on the connection. I implemented the support + * for the ASCII protocol by wrapping into the simple interface (aka v1), + * so the implementors needs to provide an implementation of that interface + * + */ +static memcached_protocol_event_t determine_protocol(struct memcached_protocol_client_st *client, ssize_t *length, void **endptr) +{ + if (*client->root->input_buffer == (uint8_t)PROTOCOL_BINARY_REQ) + { + if (client->is_verbose) + { + fprintf(stderr, "%s:%d PROTOCOL: memcached_binary_protocol_process_data\n", __FILE__, __LINE__); + } + client->work= memcached_binary_protocol_process_data; + } + else if (client->root->callback->interface_version == 1) + { + if (client->is_verbose) + { + fprintf(stderr, "%s:%d PROTOCOL: memcached_ascii_protocol_process_data\n", __FILE__, __LINE__); + } + + /* + * The ASCII protocol can only be used if the implementors provide + * an implementation for the version 1 of the interface.. + * + * @todo I should allow the implementors to provide an implementation + * for version 0 and 1 at the same time and set the preferred + * interface to use... + */ + client->work= memcached_ascii_protocol_process_data; + } + else + { + if (client->is_verbose) + { + fprintf(stderr, "%s:%d PROTOCOL: Unsupported protocol\n", __FILE__, __LINE__); + } + + /* Let's just output a warning the way it is supposed to look like + * in the ASCII protocol... + */ + const char *err= "CLIENT_ERROR: Unsupported protocol\r\n"; + client->root->spool(client, err, strlen(err)); + client->root->drain(client); + + return MEMCACHED_PROTOCOL_ERROR_EVENT; /* Unsupported protocol */ + } + + return client->work(client, length, endptr); +} + +/* +** ********************************************************************** +** * PUBLIC INTERFACE +** * See protocol_handler.h for function description +** ********************************************************************** +*/ +struct memcached_protocol_st *memcached_protocol_create_instance(void) +{ + struct memcached_protocol_st *ret= calloc(1, sizeof(*ret)); + if (ret != NULL) + { + ret->recv= default_recv; + ret->send= default_send; + ret->drain= drain_output; + ret->spool= spool_output; + ret->input_buffer_size= 1 * 1024 * 1024; + ret->input_buffer= malloc(ret->input_buffer_size); + if (ret->input_buffer == NULL) + { + free(ret); + ret= NULL; + + return NULL; + } + + ret->buffer_cache= cache_create("protocol_handler", + CHUNK_BUFFERSIZE + sizeof(struct chunk_st), + 0, NULL, NULL); + if (ret->buffer_cache == NULL) + { + free(ret->input_buffer); + free(ret); + ret= NULL; + } + } + + return ret; +} + +void memcached_protocol_destroy_instance(struct memcached_protocol_st *instance) +{ + cache_destroy(instance->buffer_cache); + free(instance->input_buffer); + free(instance); +} + +struct memcached_protocol_client_st *memcached_protocol_create_client(struct memcached_protocol_st *instance, memcached_socket_t sock) +{ + struct memcached_protocol_client_st *ret= calloc(1, sizeof(memcached_protocol_client_st)); + if (ret != NULL) + { + ret->root= instance; + ret->sock= sock; + ret->work= determine_protocol; + } + + return ret; +} + +void memcached_protocol_client_destroy(struct memcached_protocol_client_st *client) +{ + free(client); +} + +void memcached_protocol_client_set_verbose(struct memcached_protocol_client_st *client, bool arg) +{ + if (client) + { + client->is_verbose= arg; + } +} + +memcached_protocol_event_t memcached_protocol_client_work(struct memcached_protocol_client_st *client) +{ + /* Try to send data and read from the socket */ + bool more_data= true; + do + { + ssize_t len= client->root->recv(client, + client->sock, + client->root->input_buffer + client->input_buffer_offset, + client->root->input_buffer_size - client->input_buffer_offset); + + if (len > 0) + { + /* Do we have the complete packet? */ + if (client->input_buffer_offset > 0) + { + memcpy(client->root->input_buffer, client->input_buffer, + client->input_buffer_offset); + len += (ssize_t)client->input_buffer_offset; + + /* @todo use buffer-cache! */ + free(client->input_buffer); + client->input_buffer_offset= 0; + } + + void *endptr; + memcached_protocol_event_t events= client->work(client, &len, &endptr); + if (events == MEMCACHED_PROTOCOL_ERROR_EVENT) + { + return MEMCACHED_PROTOCOL_ERROR_EVENT; + } + + if (len > 0) + { + /* save the data for later on */ + /* @todo use buffer-cache */ + client->input_buffer= malloc((size_t)len); + if (client->input_buffer == NULL) + { + client->error= ENOMEM; + return MEMCACHED_PROTOCOL_ERROR_EVENT; + } + memcpy(client->input_buffer, endptr, (size_t)len); + client->input_buffer_offset= (size_t)len; + more_data= false; + } + } + else if (len == 0) + { + /* Connection closed */ + drain_output(client); + return MEMCACHED_PROTOCOL_ERROR_EVENT; + } + else + { + if (get_socket_errno() != EWOULDBLOCK) + { + client->error= get_socket_errno(); + /* mark this client as terminated! */ + return MEMCACHED_PROTOCOL_ERROR_EVENT; + } + more_data= false; + } + } while (more_data); + + if (!drain_output(client)) + { + return MEMCACHED_PROTOCOL_ERROR_EVENT; + } + + memcached_protocol_event_t ret= MEMCACHED_PROTOCOL_READ_EVENT; + if (client->output) + { + ret|= MEMCACHED_PROTOCOL_READ_EVENT; + } + + return ret; +} diff --git a/libmemcachedprotocol/include.am b/libmemcachedprotocol/include.am new file mode 100644 index 0000000..6a00459 --- /dev/null +++ b/libmemcachedprotocol/include.am @@ -0,0 +1,36 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + + +lib_LTLIBRARIES+= libmemcached/libmemcachedprotocol.la + +noinst_HEADERS+= libmemcachedprotocol/ascii_handler.h +noinst_HEADERS+= libmemcachedprotocol/binary_handler.h +noinst_HEADERS+= libmemcachedprotocol/cache.h +noinst_HEADERS+= libmemcachedprotocol/common.h + +libmemcached_libmemcachedprotocol_la_SOURCES= +libmemcached_libmemcachedprotocol_la_SOURCES+= libmemcached/byteorder.cc +libmemcached_libmemcachedprotocol_la_SOURCES+= libmemcachedprotocol/ascii_handler.c +libmemcached_libmemcachedprotocol_la_SOURCES+= libmemcachedprotocol/binary_handler.c +libmemcached_libmemcachedprotocol_la_SOURCES+= libmemcachedprotocol/cache.c +libmemcached_libmemcachedprotocol_la_SOURCES+= libmemcachedprotocol/handler.c +libmemcached_libmemcachedprotocol_la_SOURCES+= libmemcachedprotocol/pedantic.c + +libmemcached_libmemcachedprotocol_la_CFLAGS= +libmemcached_libmemcachedprotocol_la_CFLAGS+= ${AM_CFLAGS} +libmemcached_libmemcachedprotocol_la_CFLAGS+= ${NO_CONVERSION} +libmemcached_libmemcachedprotocol_la_CFLAGS+= -DBUILDING_LIBMEMCACHED +libmemcached_libmemcachedprotocol_la_CFLAGS+= @PTHREAD_CFLAGS@ + +libmemcached_libmemcachedprotocol_la_CXXFLAGS= +libmemcached_libmemcachedprotocol_la_CXXFLAGS+= ${AM_CXXFLAGS} +libmemcached_libmemcachedprotocol_la_CXXFLAGS+= -DBUILDING_LIBMEMCACHED +libmemcached_libmemcachedprotocol_la_CXXFLAGS+= @PTHREAD_CFLAGS@ + +libmemcached_libmemcachedprotocol_la_LIBADD= +libmemcached_libmemcachedprotocol_la_LIBADD+= @LIBEVENT_LIB@ +libmemcached_libmemcachedprotocol_la_LIBADD+= @PTHREAD_LIBS@ +libmemcached_libmemcachedprotocol_la_LDFLAGS= ${AM_LDFLAGS} +libmemcached_libmemcachedprotocol_la_LDFLAGS+= -version-info ${MEMCACHED_PROTOCAL_LIBRARY_VERSION} diff --git a/libmemcachedprotocol/pedantic.c b/libmemcachedprotocol/pedantic.c new file mode 100644 index 0000000..54a2add --- /dev/null +++ b/libmemcachedprotocol/pedantic.c @@ -0,0 +1,237 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* -*- Mode: C; tab-width: 2; c-basic-offset: 2; indent-tabs-mode: nil -*- */ +#include + +#include + +#define ensure(a) if (!(a)) { return false; } + +bool memcached_binary_protocol_pedantic_check_request(const protocol_binary_request_header *request) +{ + ensure(request->request.magic == PROTOCOL_BINARY_REQ); + ensure(request->request.datatype == PROTOCOL_BINARY_RAW_BYTES); + + ensure(request->bytes[6] == 0); + ensure(request->bytes[7] == 0); + + uint8_t opcode= request->request.opcode; + uint16_t keylen= ntohs(request->request.keylen); + uint8_t extlen= request->request.extlen; + uint32_t bodylen= ntohl(request->request.bodylen); + + ensure(bodylen >= (keylen + extlen)); + + switch (opcode) { + case PROTOCOL_BINARY_CMD_GET: + case PROTOCOL_BINARY_CMD_GETK: + case PROTOCOL_BINARY_CMD_GETKQ: + case PROTOCOL_BINARY_CMD_GETQ: + ensure(extlen == 0); + ensure(keylen > 0); + ensure(keylen == bodylen); + ensure(request->request.cas == 0); + break; + + case PROTOCOL_BINARY_CMD_ADD: + case PROTOCOL_BINARY_CMD_ADDQ: + /* it makes no sense to run add with a cas value */ + ensure(request->request.cas == 0); + /* FALLTHROUGH */ + case PROTOCOL_BINARY_CMD_SET: + case PROTOCOL_BINARY_CMD_SETQ: + case PROTOCOL_BINARY_CMD_REPLACE: + case PROTOCOL_BINARY_CMD_REPLACEQ: + ensure(keylen > 0); + ensure(extlen == 8); + break; + + case PROTOCOL_BINARY_CMD_DELETE: + case PROTOCOL_BINARY_CMD_DELETEQ: + ensure(extlen == 0); + ensure(keylen > 0); + ensure(keylen == bodylen); + break; + + case PROTOCOL_BINARY_CMD_INCREMENT: + case PROTOCOL_BINARY_CMD_INCREMENTQ: + case PROTOCOL_BINARY_CMD_DECREMENT: + case PROTOCOL_BINARY_CMD_DECREMENTQ: + ensure(extlen == 20); + ensure(keylen > 0); + ensure(keylen + extlen == bodylen); + break; + + case PROTOCOL_BINARY_CMD_QUIT: + case PROTOCOL_BINARY_CMD_QUITQ: + case PROTOCOL_BINARY_CMD_NOOP: + case PROTOCOL_BINARY_CMD_VERSION: + ensure(extlen == 0); + ensure(keylen == 0); + ensure(bodylen == 0); + break; + + case PROTOCOL_BINARY_CMD_FLUSH: + case PROTOCOL_BINARY_CMD_FLUSHQ: + ensure(extlen == 0 || extlen == 4); + ensure(keylen == 0); + ensure(bodylen == extlen); + break; + + case PROTOCOL_BINARY_CMD_STAT: + ensure(extlen == 0); + /* May have key, but not value */ + ensure(keylen == bodylen); + break; + + case PROTOCOL_BINARY_CMD_APPEND: + case PROTOCOL_BINARY_CMD_APPENDQ: + case PROTOCOL_BINARY_CMD_PREPEND: + case PROTOCOL_BINARY_CMD_PREPENDQ: + ensure(extlen == 0); + ensure(keylen > 0); + break; + default: + /* Unknown command */ + ; + } + + return true; +} + +bool memcached_binary_protocol_pedantic_check_response(const protocol_binary_request_header *request, + const protocol_binary_response_header *response) +{ + ensure(response->response.magic == PROTOCOL_BINARY_RES); + ensure(response->response.datatype == PROTOCOL_BINARY_RAW_BYTES); + ensure(response->response.opaque == request->request.opaque); + + uint16_t status= ntohs(response->response.status); + uint8_t opcode= response->response.opcode; + + if (status == PROTOCOL_BINARY_RESPONSE_SUCCESS) + { + switch (opcode) { + case PROTOCOL_BINARY_CMD_ADDQ: + case PROTOCOL_BINARY_CMD_APPENDQ: + case PROTOCOL_BINARY_CMD_DECREMENTQ: + case PROTOCOL_BINARY_CMD_DELETEQ: + case PROTOCOL_BINARY_CMD_FLUSHQ: + case PROTOCOL_BINARY_CMD_INCREMENTQ: + case PROTOCOL_BINARY_CMD_PREPENDQ: + case PROTOCOL_BINARY_CMD_QUITQ: + case PROTOCOL_BINARY_CMD_REPLACEQ: + case PROTOCOL_BINARY_CMD_SETQ: + /* Quiet command shouldn't return on success */ + return false; + default: + break; + } + + switch (opcode) { + case PROTOCOL_BINARY_CMD_ADD: + case PROTOCOL_BINARY_CMD_REPLACE: + case PROTOCOL_BINARY_CMD_SET: + case PROTOCOL_BINARY_CMD_APPEND: + case PROTOCOL_BINARY_CMD_PREPEND: + ensure(response->response.keylen == 0); + ensure(response->response.extlen == 0); + ensure(response->response.bodylen == 0); + ensure(response->response.cas != 0); + break; + case PROTOCOL_BINARY_CMD_FLUSH: + case PROTOCOL_BINARY_CMD_NOOP: + case PROTOCOL_BINARY_CMD_QUIT: + case PROTOCOL_BINARY_CMD_DELETE: + ensure(response->response.keylen == 0); + ensure(response->response.extlen == 0); + ensure(response->response.bodylen == 0); + ensure(response->response.cas == 0); + break; + + case PROTOCOL_BINARY_CMD_DECREMENT: + case PROTOCOL_BINARY_CMD_INCREMENT: + ensure(response->response.keylen == 0); + ensure(response->response.extlen == 0); + ensure(ntohl(response->response.bodylen) == 8); + ensure(response->response.cas != 0); + break; + + case PROTOCOL_BINARY_CMD_STAT: + ensure(response->response.extlen == 0); + /* key and value exists in all packets except in the terminating */ + ensure(response->response.cas == 0); + break; + + case PROTOCOL_BINARY_CMD_VERSION: + ensure(response->response.keylen == 0); + ensure(response->response.extlen == 0); + ensure(response->response.bodylen != 0); + ensure(response->response.cas == 0); + break; + + case PROTOCOL_BINARY_CMD_GET: + case PROTOCOL_BINARY_CMD_GETQ: + ensure(response->response.keylen == 0); + ensure(response->response.extlen == 4); + ensure(response->response.cas != 0); + break; + + case PROTOCOL_BINARY_CMD_GETK: + case PROTOCOL_BINARY_CMD_GETKQ: + ensure(response->response.keylen != 0); + ensure(response->response.extlen == 4); + ensure(response->response.cas != 0); + break; + + default: + /* Undefined command code */ + break; + } + } + else + { + ensure(response->response.cas == 0); + ensure(response->response.extlen == 0); + if (opcode != PROTOCOL_BINARY_CMD_GETK) + { + ensure(response->response.keylen == 0); + } + } + + return true; +} diff --git a/libmemcachedutil-1.0/flush.h b/libmemcachedutil-1.0/flush.h new file mode 100644 index 0000000..dd7e779 --- /dev/null +++ b/libmemcachedutil-1.0/flush.h @@ -0,0 +1,50 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API +bool libmemcached_util_flush(const char *hostname, in_port_t port, memcached_return_t *ret); + +#ifdef __cplusplus +} +#endif + diff --git a/libmemcachedutil-1.0/include.am b/libmemcachedutil-1.0/include.am new file mode 100644 index 0000000..39a1593 --- /dev/null +++ b/libmemcachedutil-1.0/include.am @@ -0,0 +1,13 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + + +nobase_include_HEADERS+= \ + libmemcachedutil-1.0/flush.h \ + libmemcachedutil-1.0/ostream.hpp \ + libmemcachedutil-1.0/pid.h \ + libmemcachedutil-1.0/ping.h \ + libmemcachedutil-1.0/pool.h \ + libmemcachedutil-1.0/util.h \ + libmemcachedutil-1.0/version.h diff --git a/libmemcachedutil-1.0/ostream.hpp b/libmemcachedutil-1.0/ostream.hpp new file mode 100644 index 0000000..cce7bfc --- /dev/null +++ b/libmemcachedutil-1.0/ostream.hpp @@ -0,0 +1,50 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +static inline std::ostream& operator<<(std::ostream& output, const enum memcached_return_t &arg) +{ + output << memcached_strerror(NULL, arg); + return output; +} + +static inline std::ostream& operator<<(std::ostream& output, const memcached_st &arg) +{ + output << " query_id: " << memcached_query_id(&arg); + output << " error: " << memcached_last_error_message(&arg); + return output; +} diff --git a/libmemcachedutil-1.0/pid.h b/libmemcachedutil-1.0/pid.h new file mode 100644 index 0000000..3ce0131 --- /dev/null +++ b/libmemcachedutil-1.0/pid.h @@ -0,0 +1,58 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifndef _WIN32 +# include +#endif + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API +pid_t libmemcached_util_getpid(const char *hostname, in_port_t port, memcached_return_t *ret); + +LIBMEMCACHED_API +pid_t libmemcached_util_getpid2(const char *hostname, in_port_t port, const char *username, const char *password, memcached_return_t *ret); + +#ifdef __cplusplus +} +#endif + diff --git a/libmemcachedutil-1.0/ping.h b/libmemcachedutil-1.0/ping.h new file mode 100644 index 0000000..faea8b2 --- /dev/null +++ b/libmemcachedutil-1.0/ping.h @@ -0,0 +1,52 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API +bool libmemcached_util_ping(const char *hostname, in_port_t port, memcached_return_t *ret); + +LIBMEMCACHED_API +bool libmemcached_util_ping2(const char *hostname, in_port_t port, const char *username, const char *password, memcached_return_t *ret); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcachedutil-1.0/pool.h b/libmemcachedutil-1.0/pool.h new file mode 100644 index 0000000..a11117c --- /dev/null +++ b/libmemcachedutil-1.0/pool.h @@ -0,0 +1,83 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct memcached_pool_st; +typedef struct memcached_pool_st memcached_pool_st; + +LIBMEMCACHED_API +memcached_pool_st *memcached_pool_create(memcached_st* mmc, uint32_t initial, uint32_t max); + +LIBMEMCACHED_API +memcached_pool_st *memcached_pool(const char *option_string, size_t option_string_length); + +LIBMEMCACHED_API +memcached_st* memcached_pool_destroy(memcached_pool_st* pool); + +LIBMEMCACHED_API +memcached_st* memcached_pool_pop(memcached_pool_st* pool, + bool block, + memcached_return_t* rc); +LIBMEMCACHED_API + memcached_return_t memcached_pool_push(memcached_pool_st* pool, + memcached_st* mmc); +LIBMEMCACHED_API + memcached_return_t memcached_pool_release(memcached_pool_st* pool, memcached_st* mmc); + +LIBMEMCACHED_API +memcached_st* memcached_pool_fetch(memcached_pool_st*, struct timespec* relative_time, memcached_return_t* rc); + +LIBMEMCACHED_API +memcached_return_t memcached_pool_behavior_set(memcached_pool_st *ptr, + memcached_behavior_t flag, + uint64_t data); +LIBMEMCACHED_API +memcached_return_t memcached_pool_behavior_get(memcached_pool_st *ptr, + memcached_behavior_t flag, + uint64_t *value); + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/libmemcachedutil-1.0/util.h b/libmemcachedutil-1.0/util.h new file mode 100644 index 0000000..d362098 --- /dev/null +++ b/libmemcachedutil-1.0/util.h @@ -0,0 +1,46 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2006-2009 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include + +#include +#include +#include +#include +#include diff --git a/libmemcachedutil-1.0/version.h b/libmemcachedutil-1.0/version.h new file mode 100644 index 0000000..372283a --- /dev/null +++ b/libmemcachedutil-1.0/version.h @@ -0,0 +1,53 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + + +#ifdef __cplusplus +extern "C" { +#endif + +LIBMEMCACHED_API + bool libmemcached_util_version_check(memcached_st *memc, + uint8_t major_version, + uint8_t minor_version, + uint8_t micro_version); + +#ifdef __cplusplus +} +#endif diff --git a/libmemcachedutil/common.h b/libmemcachedutil/common.h new file mode 100644 index 0000000..5e39354 --- /dev/null +++ b/libmemcachedutil/common.h @@ -0,0 +1,49 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached Utility library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Summary: connects to a host, and then flushes it (memcached_flush(3)). + * + */ + +#pragma once + +#include "mem_config.h" + +#include +#include +#include + +#include "libmemcachedutil-1.0/util.h" +#include "libmemcached/assert.hpp" +#include "libmemcached/backtrace.hpp" diff --git a/libmemcachedutil/flush.cc b/libmemcachedutil/flush.cc new file mode 100644 index 0000000..6a99603 --- /dev/null +++ b/libmemcachedutil/flush.cc @@ -0,0 +1,60 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Summary: connects to a host, and then flushes it (memcached_flush(3)). + * + */ + +#include + + +bool libmemcached_util_flush(const char *hostname, in_port_t port, memcached_return_t *ret) +{ + memcached_st *memc_ptr= memcached_create(NULL); + + memcached_return_t rc= memcached_server_add(memc_ptr, hostname, port); + if (memcached_success(rc)) + { + rc= memcached_flush(memc_ptr, 0); + } + + memcached_free(memc_ptr); + + if (ret) + { + *ret= rc; + } + + return memcached_success(rc); +} diff --git a/libmemcachedutil/include.am b/libmemcachedutil/include.am new file mode 100644 index 0000000..c105ee6 --- /dev/null +++ b/libmemcachedutil/include.am @@ -0,0 +1,26 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +lib_LTLIBRARIES+= libmemcached/libmemcachedutil.la + +noinst_HEADERS+= libmemcachedutil/common.h + +libmemcached_libmemcachedutil_la_SOURCES= \ + libmemcached/backtrace.cc \ + libmemcachedutil/flush.cc \ + libmemcachedutil/pid.cc \ + libmemcachedutil/ping.cc \ + libmemcachedutil/pool.cc \ + libmemcachedutil/version.cc +libmemcached_libmemcachedutil_la_LIBADD= +libmemcached_libmemcachedutil_la_LDFLAGS= +libmemcached_libmemcachedutil_la_CXXFLAGS= +libmemcached_libmemcachedutil_la_CXXFLAGS+= \ + ${AM_CXXFLAGS} \ + ${NO_CONVERSION} \ + -DBUILDING_LIBMEMCACHED +libmemcached_libmemcachedutil_la_CXXFLAGS+= @PTHREAD_CFLAGS@ +libmemcached_libmemcachedutil_la_LDFLAGS+= ${AM_LDFLAGS} -version-info ${MEMCACHED_UTIL_LIBRARY_VERSION} +libmemcached_libmemcachedutil_la_LIBADD+= libmemcached/libmemcached.la +libmemcached_libmemcachedutil_la_LIBADD+= @PTHREAD_LIBS@ diff --git a/libmemcachedutil/pid.cc b/libmemcachedutil/pid.cc new file mode 100644 index 0000000..3465611 --- /dev/null +++ b/libmemcachedutil/pid.cc @@ -0,0 +1,161 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Summary: connects to a host, and determines what its pid is + * + */ + +#include + + +// Never look at the stat object directly. + + +pid_t libmemcached_util_getpid(const char *hostname, in_port_t port, memcached_return_t *ret) +{ + pid_t pid= -1; + + memcached_return_t unused; + if (ret == NULL) + { + ret= &unused; + } + + memcached_st *memc_ptr= memcached_create(NULL); + if (memc_ptr == NULL) + { + *ret= MEMCACHED_MEMORY_ALLOCATION_FAILURE; + return -1; + } + + memcached_return_t rc= memcached_server_add(memc_ptr, hostname, port); + if (memcached_success(rc)) + { + memcached_stat_st *stat= memcached_stat(memc_ptr, NULL, &rc); + if (memcached_success(rc) and stat and stat->pid != -1) + { + pid= stat->pid; + } + else if (memcached_success(rc)) + { + rc= MEMCACHED_UNKNOWN_STAT_KEY; // Something went wrong if this happens + } + else if (rc == MEMCACHED_SOME_ERRORS) // Generic answer, we will now find the specific reason (if one exists) + { + const memcached_instance_st * instance= memcached_server_instance_by_position(memc_ptr, 0); + + assert_msg(instance and memcached_server_error(instance), " "); + if (instance and memcached_server_error(instance)) + { + rc= memcached_server_error_return(instance); + } + } + + memcached_stat_free(memc_ptr, stat); + } + memcached_free(memc_ptr); + + *ret= rc; + + return pid; +} + +pid_t libmemcached_util_getpid2(const char *hostname, in_port_t port, const char *username, const char *password, memcached_return_t *ret) +{ + if (username == NULL) + { + return libmemcached_util_getpid(hostname, port, ret); + } + + pid_t pid= -1; + + memcached_return_t unused; + if (not ret) + ret= &unused; + + if (LIBMEMCACHED_WITH_SASL_SUPPORT == 0) + { + *ret= MEMCACHED_NOT_SUPPORTED; + return pid; + } + + memcached_st *memc_ptr= memcached_create(NULL); + if (not memc_ptr) + { + *ret= MEMCACHED_MEMORY_ALLOCATION_FAILURE; + return -1; + } + + if (memcached_failed(*ret= memcached_set_sasl_auth_data(memc_ptr, username, password))) + { + memcached_free(memc_ptr); + return false; + } + + + memcached_return_t rc= memcached_server_add(memc_ptr, hostname, port); + if (memcached_success(rc)) + { + memcached_stat_st *stat= memcached_stat(memc_ptr, NULL, &rc); + if (memcached_success(rc) and stat and stat->pid != -1) + { + pid= stat->pid; + } + else if (memcached_success(rc)) + { + rc= MEMCACHED_UNKNOWN_STAT_KEY; // Something went wrong if this happens + } + else if (rc == MEMCACHED_SOME_ERRORS) // Generic answer, we will now find the specific reason (if one exists) + { + const memcached_instance_st * instance= + memcached_server_instance_by_position(memc_ptr, 0); + +#if 0 + assert_msg(instance and instance->error_messages, " "); +#endif + if (instance and memcached_server_error(instance)) + { + rc= memcached_server_error_return(instance); + } + } + + memcached_stat_free(memc_ptr, stat); + } + memcached_free(memc_ptr); + + *ret= rc; + + return pid; +} diff --git a/libmemcachedutil/ping.cc b/libmemcachedutil/ping.cc new file mode 100644 index 0000000..a867c56 --- /dev/null +++ b/libmemcachedutil/ping.cc @@ -0,0 +1,136 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Summary: connects to a host, and makes sure it is alive. + * + */ + +#include + +bool libmemcached_util_ping(const char *hostname, in_port_t port, memcached_return_t *ret) +{ + memcached_return_t unused; + if (ret == NULL) + { + ret= &unused; + } + + memcached_st *memc_ptr= memcached_create(NULL); + if (memc_ptr == NULL) + { + *ret= MEMCACHED_MEMORY_ALLOCATION_FAILURE; + return false; + } + + if (memcached_success((*ret= memcached_behavior_set(memc_ptr, MEMCACHED_BEHAVIOR_CONNECT_TIMEOUT, 400000)))) + { + memcached_return_t rc= memcached_server_add(memc_ptr, hostname, port); + if (memcached_success(rc)) + { + rc= memcached_version(memc_ptr); + } + + if (memcached_failed(rc) and rc == MEMCACHED_SOME_ERRORS) + { + const memcached_instance_st * instance= + memcached_server_instance_by_position(memc_ptr, 0); + + assert_msg(instance and memcached_server_error(instance), " "); + if (instance and memcached_server_error(instance)) + { + rc= memcached_server_error_return(instance); + } + } + + *ret= rc; + } + memcached_free(memc_ptr); + + return memcached_success(*ret); +} + +bool libmemcached_util_ping2(const char *hostname, in_port_t port, const char *username, const char *password, memcached_return_t *ret) +{ + if (username == NULL) + { + return libmemcached_util_ping(hostname, port, ret); + } + + memcached_return_t unused; + if (not ret) + ret= &unused; + + if (LIBMEMCACHED_WITH_SASL_SUPPORT == 0) + { + *ret= MEMCACHED_NOT_SUPPORTED; + return false; + } + + memcached_st *memc_ptr= memcached_create(NULL); + if (not memc_ptr) + { + *ret= MEMCACHED_MEMORY_ALLOCATION_FAILURE; + return false; + } + + if (memcached_failed(*ret= memcached_set_sasl_auth_data(memc_ptr, username, password))) + { + memcached_free(memc_ptr); + return false; + } + + memcached_return_t rc= memcached_server_add(memc_ptr, hostname, port); + if (memcached_success(rc)) + { + rc= memcached_version(memc_ptr); + } + + if (memcached_failed(rc) and rc == MEMCACHED_SOME_ERRORS) + { + const memcached_instance_st * instance= + memcached_server_instance_by_position(memc_ptr, 0); + + assert_msg(instance and memcached_server_error(instance), " "); + if (instance and memcached_server_error(instance)) + { + rc= memcached_server_error_return(instance); + } + } + memcached_free(memc_ptr); + + *ret= rc; + + return memcached_success(rc); +} diff --git a/libmemcachedutil/pool.cc b/libmemcachedutil/pool.cc new file mode 100644 index 0000000..8d76024 --- /dev/null +++ b/libmemcachedutil/pool.cc @@ -0,0 +1,523 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#include + +#include +#include +#include +#include + +struct memcached_pool_st +{ + pthread_mutex_t mutex; + pthread_cond_t cond; + memcached_st *master; + memcached_st **server_pool; + int firstfree; + const uint32_t size; + uint32_t current_size; + bool _owns_master; + struct timespec _timeout; + + memcached_pool_st(memcached_st *master_arg, size_t max_arg) : + master(master_arg), + server_pool(NULL), + firstfree(-1), + size(uint32_t(max_arg)), + current_size(0), + _owns_master(false) + { + pthread_mutex_init(&mutex, NULL); + pthread_cond_init(&cond, NULL); + _timeout.tv_sec= 5; + _timeout.tv_nsec= 0; + } + + const struct timespec& timeout() const + { + return _timeout; + } + + bool release(memcached_st*, memcached_return_t& rc); + + memcached_st *fetch(memcached_return_t& rc); + memcached_st *fetch(const struct timespec&, memcached_return_t& rc); + + bool init(uint32_t initial); + + ~memcached_pool_st() + { + for (int x= 0; x <= firstfree; ++x) + { + memcached_free(server_pool[x]); + server_pool[x]= NULL; + } + + int error; + if ((error= pthread_mutex_destroy(&mutex)) != 0) + { + assert_vmsg(error != 0, "pthread_mutex_destroy() %s(%d)", strerror(error), error); + } + + if ((error= pthread_cond_destroy(&cond)) != 0) + { + assert_vmsg(error != 0, "pthread_cond_destroy() %s", strerror(error)); + } + + delete [] server_pool; + if (_owns_master) + { + memcached_free(master); + } + } + + void increment_version() + { + ++master->configure.version; + } + + bool compare_version(const memcached_st *arg) const + { + return (arg->configure.version == version()); + } + + int32_t version() const + { + return master->configure.version; + } +}; + + +/** + * Grow the connection pool by creating a connection structure and clone the + * original memcached handle. + */ +static bool grow_pool(memcached_pool_st* pool) +{ + assert(pool); + + memcached_st *obj; + if (not (obj= memcached_clone(NULL, pool->master))) + { + return false; + } + + pool->server_pool[++pool->firstfree]= obj; + pool->current_size++; + obj->configure.version= pool->version(); + + return true; +} + +bool memcached_pool_st::init(uint32_t initial) +{ + server_pool= new (std::nothrow) memcached_st *[size]; + if (server_pool == NULL) + { + return false; + } + + /* + Try to create the initial size of the pool. An allocation failure at + this time is not fatal.. + */ + for (unsigned int x= 0; x < initial; ++x) + { + if (grow_pool(this) == false) + { + break; + } + } + + return true; +} + + +static inline memcached_pool_st *_pool_create(memcached_st* master, uint32_t initial, uint32_t max) +{ + if (initial == 0 or max == 0 or (initial > max)) + { + return NULL; + } + + memcached_pool_st *object= new (std::nothrow) memcached_pool_st(master, max); + if (object == NULL) + { + return NULL; + } + + /* + Try to create the initial size of the pool. An allocation failure at + this time is not fatal.. + */ + if (not object->init(initial)) + { + delete object; + return NULL; + } + + return object; +} + +memcached_pool_st *memcached_pool_create(memcached_st* master, uint32_t initial, uint32_t max) +{ + return _pool_create(master, initial, max); +} + +memcached_pool_st * memcached_pool(const char *option_string, size_t option_string_length) +{ + memcached_st *memc= memcached(option_string, option_string_length); + + if (memc == NULL) + { + return NULL; + } + + memcached_pool_st *self= memcached_pool_create(memc, memc->configure.initial_pool_size, memc->configure.max_pool_size); + if (self == NULL) + { + memcached_free(memc); + return NULL; + } + + self->_owns_master= true; + + return self; +} + +memcached_st* memcached_pool_destroy(memcached_pool_st* pool) +{ + if (pool == NULL) + { + return NULL; + } + + // Legacy that we return the original structure + memcached_st *ret= NULL; + if (pool->_owns_master) + { } + else + { + ret= pool->master; + } + + delete pool; + + return ret; +} + +memcached_st* memcached_pool_st::fetch(memcached_return_t& rc) +{ + static struct timespec relative_time= { 0, 0 }; + return fetch(relative_time, rc); +} + +memcached_st* memcached_pool_st::fetch(const struct timespec& relative_time, memcached_return_t& rc) +{ + rc= MEMCACHED_SUCCESS; + + int error; + if ((error= pthread_mutex_lock(&mutex)) != 0) + { + rc= MEMCACHED_IN_PROGRESS; + return NULL; + } + + memcached_st *ret= NULL; + do + { + if (firstfree > -1) + { + ret= server_pool[firstfree--]; + } + else if (current_size == size) + { + if (relative_time.tv_sec == 0 and relative_time.tv_nsec == 0) + { + error= pthread_mutex_unlock(&mutex); + rc= MEMCACHED_NOTFOUND; + + return NULL; + } + + struct timespec time_to_wait= {0, 0}; + time_to_wait.tv_sec= time(NULL) +relative_time.tv_sec; + time_to_wait.tv_nsec= relative_time.tv_nsec; + + int thread_ret; + if ((thread_ret= pthread_cond_timedwait(&cond, &mutex, &time_to_wait)) != 0) + { + int unlock_error; + if ((unlock_error= pthread_mutex_unlock(&mutex)) != 0) + { + assert_vmsg(error != 0, "pthread_mutex_unlock() %s", strerror(error)); + } + + if (thread_ret == ETIMEDOUT) + { + rc= MEMCACHED_TIMEOUT; + } + else + { + errno= thread_ret; + rc= MEMCACHED_ERRNO; + } + + return NULL; + } + } + else if (grow_pool(this) == false) + { + int unlock_error; + if ((unlock_error= pthread_mutex_unlock(&mutex)) != 0) + { + assert_vmsg(error != 0, "pthread_mutex_unlock() %s", strerror(error)); + } + + return NULL; + } + } while (ret == NULL); + + if ((error= pthread_mutex_unlock(&mutex)) != 0) + { + assert_vmsg(error != 0, "pthread_mutex_unlock() %s", strerror(error)); + } + + return ret; +} + +bool memcached_pool_st::release(memcached_st *released, memcached_return_t& rc) +{ + rc= MEMCACHED_SUCCESS; + if (released == NULL) + { + rc= MEMCACHED_INVALID_ARGUMENTS; + return false; + } + + int error; + if ((error= pthread_mutex_lock(&mutex))) + { + rc= MEMCACHED_IN_PROGRESS; + return false; + } + + /* + Someone updated the behavior on the object, so we clone a new memcached_st with the new settings. If we fail to clone, we keep the old one around. + */ + if (compare_version(released) == false) + { + memcached_st *memc; + if ((memc= memcached_clone(NULL, master))) + { + memcached_free(released); + released= memc; + } + } + + server_pool[++firstfree]= released; + + if (firstfree == 0 and current_size == size) + { + /* we might have people waiting for a connection.. wake them up :-) */ + if ((error= pthread_cond_broadcast(&cond)) != 0) + { + assert_vmsg(error != 0, "pthread_cond_broadcast() %s", strerror(error)); + } + } + + if ((error= pthread_mutex_unlock(&mutex)) != 0) + { + } + + return true; +} + +memcached_st* memcached_pool_fetch(memcached_pool_st* pool, struct timespec* relative_time, memcached_return_t* rc) +{ + if (pool == NULL) + { + return NULL; + } + + memcached_return_t unused; + if (rc == NULL) + { + rc= &unused; + } + + if (relative_time == NULL) + { + return pool->fetch(*rc); + } + + return pool->fetch(*relative_time, *rc); +} + +memcached_st* memcached_pool_pop(memcached_pool_st* pool, + bool block, + memcached_return_t *rc) +{ + if (pool == NULL) + { + return NULL; + } + + memcached_return_t unused; + if (rc == NULL) + { + rc= &unused; + } + + memcached_st *memc; + if (block) + { + memc= pool->fetch(pool->timeout(), *rc); + } + else + { + memc= pool->fetch(*rc); + } + + return memc; +} + +memcached_return_t memcached_pool_release(memcached_pool_st* pool, memcached_st *released) +{ + if (pool == NULL) + { + return MEMCACHED_INVALID_ARGUMENTS; + } + + memcached_return_t rc; + + (void) pool->release(released, rc); + + return rc; +} + +memcached_return_t memcached_pool_push(memcached_pool_st* pool, memcached_st *released) +{ + return memcached_pool_release(pool, released); +} + + +memcached_return_t memcached_pool_behavior_set(memcached_pool_st *pool, + memcached_behavior_t flag, + uint64_t data) +{ + if (pool == NULL) + { + return MEMCACHED_INVALID_ARGUMENTS; + } + + int error; + if ((error= pthread_mutex_lock(&pool->mutex))) + { + return MEMCACHED_IN_PROGRESS; + } + + /* update the master */ + memcached_return_t rc= memcached_behavior_set(pool->master, flag, data); + if (memcached_failed(rc)) + { + if ((error= pthread_mutex_unlock(&pool->mutex)) != 0) + { + assert_vmsg(error != 0, "pthread_mutex_unlock() %s", strerror(error)); + } + return rc; + } + + pool->increment_version(); + /* update the clones */ + for (int xx= 0; xx <= pool->firstfree; ++xx) + { + if (memcached_success(memcached_behavior_set(pool->server_pool[xx], flag, data))) + { + pool->server_pool[xx]->configure.version= pool->version(); + } + else + { + memcached_st *memc; + if ((memc= memcached_clone(NULL, pool->master))) + { + memcached_free(pool->server_pool[xx]); + pool->server_pool[xx]= memc; + /* I'm not sure what to do in this case.. this would happen + if we fail to push the server list inside the client.. + I should add a testcase for this, but I believe the following + would work, except that you would add a hole in the pool list.. + in theory you could end up with an empty pool.... + */ + } + } + } + + if ((error= pthread_mutex_unlock(&pool->mutex)) != 0) + { + assert_vmsg(error != 0, "pthread_mutex_unlock() %s", strerror(error)); + } + + return rc; +} + +memcached_return_t memcached_pool_behavior_get(memcached_pool_st *pool, + memcached_behavior_t flag, + uint64_t *value) +{ + if (pool == NULL) + { + return MEMCACHED_INVALID_ARGUMENTS; + } + + int error; + if ((error= pthread_mutex_lock(&pool->mutex))) + { + return MEMCACHED_IN_PROGRESS; + } + + *value= memcached_behavior_get(pool->master, flag); + + if ((error= pthread_mutex_unlock(&pool->mutex)) != 0) + { + assert_vmsg(error != 0, "pthread_mutex_unlock() %s", strerror(error)); + } + + return MEMCACHED_SUCCESS; +} diff --git a/libmemcachedutil/version.cc b/libmemcachedutil/version.cc new file mode 100644 index 0000000..0fcfb5c --- /dev/null +++ b/libmemcachedutil/version.cc @@ -0,0 +1,88 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Libmemcached library + * + * Copyright (C) 2011 Data Differential, http://datadifferential.com/ + * Copyright (C) 2010 Brian Aker All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#include +#include + +struct local_context +{ + uint8_t major_version; + uint8_t minor_version; + uint8_t micro_version; + + bool truth; +}; + +static memcached_return_t check_server_version(const memcached_st *, + const memcached_instance_st * instance, + void *context) +{ + /* Do Nothing */ + struct local_context *check= (struct local_context *)context; + + if (memcached_server_major_version(instance) != UINT8_MAX && + memcached_server_major_version(instance) >= check->major_version and + memcached_server_minor_version(instance) >= check->minor_version and + memcached_server_micro_version(instance) >= check->micro_version ) + { + return MEMCACHED_SUCCESS; + } + + check->truth= false; + + return MEMCACHED_FAILURE; +} + +bool libmemcached_util_version_check(memcached_st *memc, + uint8_t major_version, + uint8_t minor_version, + uint8_t micro_version) +{ + if (memcached_failed(memcached_version(memc))) + { + return false; + } + + struct local_context check= { major_version, minor_version, micro_version, true }; + + memcached_server_fn callbacks[1]; + callbacks[0]= check_server_version; + memcached_server_cursor(memc, callbacks, (void *)&check, 1); + + return check.truth; +} diff --git a/libtest/abort.cc b/libtest/abort.cc new file mode 100644 index 0000000..117c431 --- /dev/null +++ b/libtest/abort.cc @@ -0,0 +1,47 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +int main(void) +{ + if (1) + { + abort(); + } + + return 0; +} diff --git a/libtest/alarm.cc b/libtest/alarm.cc new file mode 100644 index 0000000..6193fbb --- /dev/null +++ b/libtest/alarm.cc @@ -0,0 +1,102 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" + +#include + +#include +#include + +namespace libtest { + +static const struct timeval default_it_value= { 600, 0 }; +static const struct timeval default_it_interval= { 0, 0 }; +static const struct itimerval defualt_timer= { default_it_interval, default_it_value }; + +static const struct itimerval cancel_timer= { default_it_interval, default_it_interval }; + + +void set_alarm() +{ + if (setitimer(ITIMER_VIRTUAL, &defualt_timer, NULL) == -1) + { + Error << "setitimer() failed"; + } +} + +void set_alarm(long tv_sec, long tv_usec) +{ + // For the moment use any value to YATL_ALARM to cancel alarming. + if (getenv("YATL_ALARM")) + { + errno= 0; + tv_sec= strtol(getenv("YATL_ALARM"), (char **) NULL, 10); + + if (errno != 0) + { + FATAL("Bad value for YATL_ALARM"); + } + else if (tv_sec == 0) + { + cancel_alarm(); + } + } + +#ifdef __APPLE__ + struct timeval it_value= { time_t(tv_sec), suseconds_t(tv_usec) }; +#else + struct timeval it_value= { tv_sec, tv_usec }; +#endif + + struct itimerval timer= { default_it_interval, it_value }; + + if (setitimer(ITIMER_VIRTUAL, &timer, NULL) == -1) + { + Error << "setitimer() failed"; + } +} + +void cancel_alarm() +{ + if (setitimer(ITIMER_VIRTUAL, &cancel_timer, NULL) == -1) + { + Error << "setitimer() failed"; + } +} + +} // namespace libtest + diff --git a/libtest/alarm.h b/libtest/alarm.h new file mode 100644 index 0000000..f675c58 --- /dev/null +++ b/libtest/alarm.h @@ -0,0 +1,46 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +namespace libtest { + +void set_alarm(long tv_sec, long tv_usec); +void set_alarm(); +void cancel_alarm(); + +} // namespace libtest + diff --git a/libtest/backtrace_test.cc b/libtest/backtrace_test.cc new file mode 100644 index 0000000..d4af451 --- /dev/null +++ b/libtest/backtrace_test.cc @@ -0,0 +1,123 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include +#include +#include +#include + +#include "libmemcached/backtrace.hpp" + +class Test { +public: + Test() + { + } + + void call_backtrace() + { + std::cerr << __func__ << std::endl; + custom_backtrace(); + } +}; + +void SIGSEGV_handler(int sig_num, siginfo_t* info, void* ucontext) +{ + std::cerr << __func__ << std::endl; + (void)sig_num; + (void)info; + (void)ucontext; + + custom_backtrace(); +} + +int raise_SIGSEGV() +{ + std::cerr << std::endl << "Calling backtrace()" << std::endl; + custom_backtrace(); + std::cerr << std::endl << "Calling raise()" << std::endl; + return raise(SIGSEGV); +} + +int layer4() +{ + return raise_SIGSEGV(); +} + +int layer3() +{ + return layer4(); +} + +int layer2() +{ + return layer3(); +} + +int layer1() +{ + return layer2(); +} + +int main(int, char **) +{ + Test t; + + t.call_backtrace(); + + struct sigaction sigact; + + sigact.sa_sigaction= SIGSEGV_handler; + sigact.sa_flags= SA_RESTART | SA_SIGINFO; + + if (sigaction(SIGSEGV, &sigact, (struct sigaction *)NULL) != 0) + { + std::cerr << "error setting signal handler for " << strsignal(SIGSEGV) << "(" << SIGSEGV << ")" << std::endl; + + exit(EXIT_FAILURE); + } + + int ret= layer1(); + if (ret) + { + std::cerr << "raise() " << strerror(errno) << std::endl; + exit(EXIT_FAILURE); + } + + exit(EXIT_SUCCESS); +} diff --git a/libtest/binaries.cc b/libtest/binaries.cc new file mode 100644 index 0000000..9adfb89 --- /dev/null +++ b/libtest/binaries.cc @@ -0,0 +1,41 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" + +namespace libtest { + +} diff --git a/libtest/binaries.h b/libtest/binaries.h new file mode 100644 index 0000000..7829f3f --- /dev/null +++ b/libtest/binaries.h @@ -0,0 +1,41 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +namespace libtest { + +} // namespace libtest diff --git a/libtest/blobslap_worker.cc b/libtest/blobslap_worker.cc new file mode 100644 index 0000000..5100a38 --- /dev/null +++ b/libtest/blobslap_worker.cc @@ -0,0 +1,165 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#include "libtest/yatlcon.h" +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef __INTEL_COMPILER +#pragma GCC diagnostic ignored "-Wold-style-cast" +#endif + +namespace libtest { + +class BlobslapWorker : public Server +{ +private: +public: + BlobslapWorker(in_port_t port_arg) : + Server("localhost", port_arg, "benchmark/blobslap_worker", true) + { + set_pid_file(); + } + + pid_t get_pid(bool error_is_ok) + { + if (pid_file().empty()) + { + Error << "pid_file was empty"; + return -1; + } + + Wait wait(pid_file(), 0); + + if (error_is_ok and not wait.successful()) + { + Error << "Pidfile was not found:" << pid_file(); + return -1; + } + + std::stringstream error_message; + pid_t ret= get_pid_from_file(pid_file(), error_message); + + if (error_is_ok and is_pid_valid(ret) == false) + { + Error << error_message.str(); + } + + return ret; + } + + bool ping() + { + if (pid_file().empty()) + { + Error << "No pid file available"; + return false; + } + + Wait wait(pid_file(), 0); + if (not wait.successful()) + { + Error << "Pidfile was not found:" << pid_file(); + return false; + } + + std::stringstream error_message; + pid_t local_pid= get_pid_from_file(pid_file(), error_message); + if (is_pid_valid(local_pid) == false) + { + Error << error_message.str(); + return false; + } + + // Use kill to determine is the process exist + if (::kill(local_pid, 0) == 0) + { + return true; + } + + return false; + } + + const char *name() + { + return "blobslap_worker"; + }; + + bool has_port_option() const + { + return true; + } + + bool has_log_file_option() const + { + return true; + } + + bool is_libtool() + { + return true; + } + + bool build(); +}; + + +#include + +bool BlobslapWorker::build() +{ + return true; +} + +Server *build_blobslap_worker(in_port_t try_port) +{ + return new BlobslapWorker(try_port); +} + +} // namespace libtest diff --git a/libtest/blobslap_worker.h b/libtest/blobslap_worker.h new file mode 100644 index 0000000..907ae6e --- /dev/null +++ b/libtest/blobslap_worker.h @@ -0,0 +1,43 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +namespace libtest { + +Server *build_blobslap_worker(in_port_t try_port); + +} diff --git a/libtest/callbacks.h b/libtest/callbacks.h new file mode 100644 index 0000000..1e617b4 --- /dev/null +++ b/libtest/callbacks.h @@ -0,0 +1,52 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void* (test_callback_create_fn)(libtest::server_startup_st&, test_return_t&); +typedef bool test_callback_destroy_fn(void *); +typedef enum test_return_t (test_callback_fn)(void *); +typedef enum test_return_t (test_callback_runner_fn)(test_callback_fn*, void *); +typedef enum test_return_t (test_callback_error_fn)(const test_return_t, void *); + +#ifdef __cplusplus +} +#endif + diff --git a/libtest/client.cc b/libtest/client.cc new file mode 100644 index 0000000..c536e9d --- /dev/null +++ b/libtest/client.cc @@ -0,0 +1,389 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" +#include + +#include +#include +#include +#include + +#ifdef HAVE_POLL_H +# include +#endif + +#ifndef HAVE_MSG_NOSIGNAL +# define MSG_NOSIGNAL 0 +#endif + +namespace libtest { + +SimpleClient::SimpleClient(const std::string& hostname_, in_port_t port_) : + _is_connected(false), + _hostname(hostname_), + _port(port_), + sock_fd(INVALID_SOCKET), + requested_message(1) + { + } + +bool SimpleClient::ready(int event_) +{ + struct pollfd fds[1]; + fds[0].fd= sock_fd; + fds[0].events= event_; + fds[0].revents= 0; + + int timeout= 5000; + if (_is_connected == false) + { + timeout= timeout * 30; + } + + int ready_fds= poll(fds, 1, timeout); + + if (ready_fds == -1) + { + _error= strerror(errno); + return false; + } + else if (ready_fds == 1) + { + if (fds[0].revents & (POLLERR | POLLHUP | POLLNVAL)) + { + int err; + socklen_t len= sizeof (err); + // We replace errno with err if getsockopt() passes, but err has been + // set. + if (getsockopt(fds[0].fd, SOL_SOCKET, SO_ERROR, &err, &len) == 0) + { + // We check the value to see what happened wth the socket. + if (err == 0) + { + _error= "getsockopt() returned no error but poll() indicated one existed"; + return false; + } + errno= err; + } + _error= strerror(errno); + + return false; + } + + _is_connected= true; + if (fds[0].revents & event_) + { + return true; + } + } + + fatal_assert(ready_fds == 0); + _error= "TIMEOUT"; + + return false; +} + +struct addrinfo* SimpleClient::lookup() +{ + struct addrinfo *ai= NULL; + struct addrinfo hints; + memset(&hints, 0, sizeof(struct addrinfo)); + hints.ai_socktype= SOCK_STREAM; + hints.ai_protocol= IPPROTO_TCP; + + libtest::vchar_t service; + service.resize(NI_MAXSERV); + (void)snprintf(&service[0], service.size(), "%d", _port); + + int getaddrinfo_error; + if ((getaddrinfo_error= getaddrinfo(_hostname.c_str(), &service[0], &hints, &ai)) != 0) + { + if (getaddrinfo_error != EAI_SYSTEM) + { + _error= gai_strerror(getaddrinfo_error); + return NULL; + } + else + { + _error= strerror(getaddrinfo_error); + return NULL; + } + } + + return ai; +} + +SimpleClient::~SimpleClient() +{ + close_socket(); +} + +void SimpleClient::close_socket() +{ + if (sock_fd != INVALID_SOCKET) + { + close(sock_fd); + sock_fd= INVALID_SOCKET; + } +} + +bool SimpleClient::instance_connect() +{ + _is_connected= false; + struct addrinfo *ai; + if ((ai= lookup())) + { + { + struct addrinfo* address_info_next= ai; + + while (address_info_next and sock_fd == INVALID_SOCKET) + { + if ((sock_fd= socket(address_info_next->ai_family, address_info_next->ai_socktype, address_info_next->ai_protocol)) != SOCKET_ERROR) + { + if (connect(sock_fd, address_info_next->ai_addr, address_info_next->ai_addrlen) == SOCKET_ERROR) + { + switch (errno) + { + case EINTR: + close_socket(); + continue; + + case EINPROGRESS: // nonblocking mode - first return + case EALREADY: // nonblocking mode - subsequent returns + continue; // Jump to while() and continue on + + + case ECONNREFUSED: + default: + break; + } + + close_socket(); + _error= strerror(errno); + } + } + else + { + FATAL(strerror(errno)); + } + address_info_next= address_info_next->ai_next; + } + + freeaddrinfo(ai); + } + + if (sock_fd == INVALID_SOCKET) + { + fatal_assert(_error.size()); + } + + return bool(sock_fd != INVALID_SOCKET); + } + + return false; +} + +bool SimpleClient::is_valid() +{ + _error.clear(); + if (sock_fd == INVALID_SOCKET) + { + return instance_connect(); + } + + return true; +} + +bool SimpleClient::message(const char* ptr, const size_t len) +{ + if (is_valid()) + { + if (ready(POLLOUT)) + { + off_t offset= 0; + do + { + ssize_t nw= send(sock_fd, ptr + offset, len - offset, MSG_NOSIGNAL); + if (nw == -1) + { + if (errno != EINTR) + { + _error= strerror(errno); + return false; + } + } + else + { + offset += nw; + } + } while (offset < ssize_t(len)); + + return true; + } + } + + fatal_assert(_error.size()); + + return false; +} + +bool SimpleClient::send_message(const std::string& arg) +{ + if (message(arg.c_str(), arg.size()) == true) + { + return message("\r\n", 2); + } + + return false; +} + +bool SimpleClient::send_data(const libtest::vchar_t& message_, libtest::vchar_t& response_) +{ + requested_message++; + if (message(&message_[0], message_.size())) + { + return response(response_); + } + + return false; +} + +bool SimpleClient::send_message(const std::string& message_, std::string& response_) +{ + requested_message++; + if (send_message(message_)) + { + return response(response_); + } + + return false; +} + +bool SimpleClient::response(libtest::vchar_t& response_) +{ + response_.clear(); + + if (is_valid()) + { + if (ready(POLLIN)) + { + bool more= true; + char buffer[2]; + buffer[1]= 0; + do + { + ssize_t nr= recv(sock_fd, buffer, 1, MSG_NOSIGNAL); + if (nr == -1) + { + if (errno != EINTR) + { + _error= strerror(errno); + return false; + } + } + else if (nr == 0) + { + close_socket(); + more= false; + } + else + { + response_.reserve(response_.size() + nr +1); + fatal_assert(nr == 1); + if (buffer[0] == '\n') + { + more= false; + } + response_.insert(response_.end(), buffer, buffer +nr); + } + } while (more); + + return response_.size(); + } + } + + fatal_assert(_error.size()); + return false; +} + +bool SimpleClient::response(std::string& response_) +{ + response_.clear(); + + if (is_valid()) + { + if (ready(POLLIN)) + { + bool more= true; + char buffer[2]; + buffer[1]= 0; + do + { + ssize_t nr= recv(sock_fd, buffer, 1, MSG_NOSIGNAL); + if (nr == -1) + { + if (errno != EINTR) + { + _error= strerror(errno); + return false; + } + } + else if (nr == 0) + { + close_socket(); + more= false; + } + else + { + fatal_assert(nr == 1); + if (buffer[0] == '\n') + { + more= false; + } + response_.append(buffer); + } + } while (more); + + return response_.size(); + } + } + + fatal_assert(_error.size()); + return false; +} + +} // namespace libtest diff --git a/libtest/client.hpp b/libtest/client.hpp new file mode 100644 index 0000000..979a532 --- /dev/null +++ b/libtest/client.hpp @@ -0,0 +1,80 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +namespace libtest { + +class SimpleClient { +public: + SimpleClient(const std::string& hostname_, in_port_t port_); + ~SimpleClient(); + + bool send_data(const libtest::vchar_t&, libtest::vchar_t&); + bool send_message(const std::string&); + bool send_message(const std::string&, std::string&); + bool response(std::string&); + bool response(libtest::vchar_t&); + + bool is_valid(); + + const std::string& error() const + { + return _error; + } + + bool is_error() const + { + return _error.size() ? true : false; + } + +private: // Methods + void close_socket(); + bool instance_connect(); + struct addrinfo* lookup(); + bool message(const char* ptr, const size_t len); + bool ready(int event_); + +private: + bool _is_connected; + std::string _hostname; + in_port_t _port; + int sock_fd; + std::string _error; + int requested_message; +}; + +} // namespace libtest diff --git a/libtest/cmdline.cc b/libtest/cmdline.cc new file mode 100644 index 0000000..29a22de --- /dev/null +++ b/libtest/cmdline.cc @@ -0,0 +1,837 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012-2013 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" + +#include "libtest/common.h" + +using namespace libtest; + +#include +#include +#include +#include +#include +#include +#ifdef HAVE_POLL_H +# include +#endif +#ifdef HAVE_SPAWN_H +# include +#endif +#include +#include +#include +#include +#include + +#include +#include + +#ifndef __USE_GNU +static char **environ= NULL; +#endif + +#ifndef FD_CLOEXEC +# define FD_CLOEXEC 0 +#endif + +namespace { + + std::string print_argv(libtest::vchar_ptr_t& built_argv) + { + std::stringstream arg_buffer; + + for (vchar_ptr_t::iterator iter= built_argv.begin(); + iter != built_argv.end(); + ++iter) + { + if (*iter) + { + arg_buffer << *iter << " "; + } + } + + return arg_buffer.str(); + } + +#if 0 + std::string print_argv(char** argv) + { + std::stringstream arg_buffer; + + for (char** ptr= argv; *ptr; ++ptr) + { + arg_buffer << *ptr << " "; + } + + return arg_buffer.str(); + } +#endif + + static Application::error_t int_to_error_t(int arg) + { + switch (arg) + { + case 127: + return Application::INVALID_POSIX_SPAWN; + + case 0: + return Application::SUCCESS; + + case 1: + return Application::FAILURE; + + default: + return Application::UNKNOWN; + } + } +} + +namespace libtest { + +Application::Application(const std::string& arg, const bool _use_libtool_arg) : + _use_libtool(_use_libtool_arg), + _use_valgrind(false), + _use_gdb(false), + _use_ptrcheck(false), + _will_fail(false), + _argc(0), + _exectuble(arg), + stdin_fd(STDIN_FILENO), + stdout_fd(STDOUT_FILENO), + stderr_fd(STDERR_FILENO), + _pid(-1), + _status(0), + _app_exit_state(UNINITIALIZED) + { + if (_use_libtool) + { + if (libtool() == NULL) + { + FATAL("libtool requested, but know libtool was found"); + } + } + + // Find just the name of the application with no path + { + size_t found= arg.find_last_of("/\\"); + if (found) + { + _exectuble_name= arg.substr(found +1); + } + else + { + _exectuble_name= arg; + } + } + + if (_use_libtool and getenv("PWD")) + { + _exectuble_with_path+= getenv("PWD"); + _exectuble_with_path+= "/"; + } + _exectuble_with_path+= _exectuble; + } + +Application::~Application() +{ + murder(); + delete_argv(); +} + +Application::error_t Application::run(const char *args[]) +{ + stdin_fd.reset(); + stdout_fd.reset(); + stderr_fd.reset(); + _stdout_buffer.clear(); + _stderr_buffer.clear(); + + posix_spawn_file_actions_t file_actions; + posix_spawn_file_actions_init(&file_actions); + + stdin_fd.dup_for_spawn(file_actions); + stdout_fd.dup_for_spawn(file_actions); + stderr_fd.dup_for_spawn(file_actions); + + posix_spawnattr_t spawnattr; + posix_spawnattr_init(&spawnattr); + + short flags= 0; + + // Child should not block signals + flags |= POSIX_SPAWN_SETSIGMASK; + + sigset_t mask; + sigemptyset(&mask); + + fatal_assert(posix_spawnattr_setsigmask(&spawnattr, &mask) == 0); + +#if defined(POSIX_SPAWN_USEVFORK) || defined(__linux__) + // Use USEVFORK on linux + flags |= POSIX_SPAWN_USEVFORK; +#endif + + flags |= POSIX_SPAWN_SETPGROUP; + fatal_assert(posix_spawnattr_setpgroup(&spawnattr, 0) == 0); + + fatal_assert(posix_spawnattr_setflags(&spawnattr, flags) == 0); + + create_argv(args); + + int spawn_ret; + if (_use_gdb) + { + std::string gdb_run_file= create_tmpfile(_exectuble_name); + std::fstream file_stream; + file_stream.open(gdb_run_file.c_str(), std::fstream::out | std::fstream::trunc); + + _gdb_filename= create_tmpfile(_exectuble_name); + file_stream + << "set logging redirect on" << std::endl + << "set logging file " << _gdb_filename << std::endl + << "set logging overwrite on" << std::endl + << "set logging on" << std::endl + << "set environment LIBTEST_IN_GDB=1" << std::endl + << "run " << arguments() << std::endl + << "thread apply all bt" << std::endl + << "quit" << std::endl; + + fatal_assert(file_stream.good()); + file_stream.close(); + + if (_use_libtool) + { + // libtool --mode=execute gdb -f -x binary + char *argv[]= { + const_cast(libtool()), + const_cast("--mode=execute"), + const_cast("gdb"), + const_cast("-batch"), + const_cast("-f"), + const_cast("-x"), + const_cast(gdb_run_file.c_str()), + const_cast(_exectuble_with_path.c_str()), + 0}; + + spawn_ret= posix_spawnp(&_pid, libtool(), &file_actions, &spawnattr, argv, environ); + } + else + { + // gdb binary + char *argv[]= { + const_cast("gdb"), + const_cast("-batch"), + const_cast("-f"), + const_cast("-x"), + const_cast(gdb_run_file.c_str()), + const_cast(_exectuble_with_path.c_str()), + 0}; + spawn_ret= posix_spawnp(&_pid, "gdb", &file_actions, &spawnattr, argv, environ); + } + } + else + { + spawn_ret= posix_spawn(&_pid, built_argv[0], &file_actions, &spawnattr, &built_argv[0], NULL); + } + + posix_spawn_file_actions_destroy(&file_actions); + posix_spawnattr_destroy(&spawnattr); + + stdin_fd.close(Application::Pipe::READ); + stdout_fd.close(Application::Pipe::WRITE); + stderr_fd.close(Application::Pipe::WRITE); + + if (spawn_ret != 0) + { + if (_will_fail == false) + { + Error << strerror(spawn_ret) << "(" << spawn_ret << ")"; + } + _pid= -1; + return Application::INVALID_POSIX_SPAWN; + } + + assert(_pid != -1); + if (_pid == -1) + { + return Application::INVALID_POSIX_SPAWN; + } + +#if 0 + app_thread_st* _app_thread= new app_thread_st(_pid, _status, built_argv[0], _app_exit_state); + int error; + if ((error= pthread_create(&_thread, NULL, &app_thread, _app_thread)) != 0) + { + Error << "pthread_create() died during pthread_create(" << strerror(error) << ")"; + return Application::FAILURE; + } +#endif + + return Application::SUCCESS; +} + +bool Application::check() const +{ + if (_pid > 1 and kill(_pid, 0) == 0) + { + return true; + } + + return false; +} + +void Application::murder() +{ + if (check()) + { + int count= 5; + while ((count--) > 0 and check()) + { + if (kill(_pid, SIGTERM) == 0) + { + join(); + } + else + { + Error << "kill(pid, SIGTERM) failed after kill with error of " << strerror(errno); + continue; + } + + break; + } + + // If for whatever reason it lives, kill it hard + if (check()) + { + Error << "using SIGKILL, things will likely go poorly from this point"; + (void)kill(_pid, SIGKILL); + } + } + slurp(); +} + +// false means that no data was returned +bool Application::slurp() +{ + struct pollfd fds[2]; + fds[0].fd= stdout_fd.fd(); + fds[0].events= POLLRDNORM; + fds[0].revents= 0; + fds[1].fd= stderr_fd.fd(); + fds[1].events= POLLRDNORM; + fds[1].revents= 0; + + int active_fd; + if ((active_fd= poll(fds, 2, 0)) == -1) + { + int error; + switch ((error= errno)) + { +#ifdef __linux + case ERESTART: +#endif + case EINTR: + break; + + case EFAULT: + case ENOMEM: + FATAL(strerror(error)); + break; + + case EINVAL: + FATAL("RLIMIT_NOFILE exceeded, or if OSX the timeout value was invalid"); + break; + + default: + FATAL(strerror(error)); + break; + } + + return false; + } + + if (active_fd == 0) + { + return false; + } + + bool data_was_read= false; + if (fds[0].revents & POLLRDNORM) + { + if (stdout_fd.read(_stdout_buffer) == true) + { + data_was_read= true; + } + } + + if (fds[1].revents & POLLRDNORM) + { + if (stderr_fd.read(_stderr_buffer) == true) + { + data_was_read= true; + } + } + + return data_was_read; +} + +Application::error_t Application::join() +{ + pid_t waited_pid= waitpid(_pid, &_status, WUNTRACED); + slurp(); + if (waited_pid == _pid and WIFEXITED(_status) == false) + { + /* + What we are looking for here is how the exit status happened. + - 127 means that posix_spawn() itself had an error. + - If WEXITSTATUS is positive we need to see if it is a signal that we sent to kill the process. If not something bad happened in the process itself. + - Finally something has happened that we don't currently understand. + */ + if (WEXITSTATUS(_status) == 127) + { + _app_exit_state= Application::INVALID_POSIX_SPAWN; + std::string error_string("posix_spawn() failed pid:"); + error_string+= _pid; + error_string+= " name:"; + error_string+= print_argv(built_argv); + if (stderr_result_length()) + { + error_string+= " stderr: "; + error_string+= stderr_c_str(); + } + throw std::logic_error(error_string); + } + else if (WIFSIGNALED(_status)) + { + if (WTERMSIG(_status) != SIGTERM and WTERMSIG(_status) != SIGHUP) + { + slurp(); + _app_exit_state= Application::INVALID_POSIX_SPAWN; + std::string error_string(print_argv(built_argv)); + error_string+= " was killed by signal "; + error_string+= strsignal(WTERMSIG(_status)); + + if (stdout_result_length()) + { + error_string+= " stdout: "; + error_string+= stdout_c_str(); + } + + if (stderr_result_length()) + { + error_string+= " stderr: "; + error_string+= stderr_c_str(); + } + + throw std::runtime_error(error_string); + } + + // If we terminted it on purpose then it counts as a success. +#if defined(DEBUG) + if (DEBUG) + { + Out << "waitpid() application terminated at request" + << " pid:" << _pid + << " name:" << built_argv[0]; + } +#endif + } + else + { + _app_exit_state= Application::UNKNOWN; + Error << "Unknown logic state at exit:" << WEXITSTATUS(_status) + << " pid:" << _pid + << " name:" << built_argv[0]; + } + } + else if (waited_pid == _pid and WIFEXITED(_status)) + { + _app_exit_state= int_to_error_t(WEXITSTATUS(_status)); + } + else if (waited_pid == -1) + { + std::string error_string; + if (stdout_result_length()) + { + error_string+= " stdout: "; + error_string+= stdout_c_str(); + } + + if (stderr_result_length()) + { + error_string+= " stderr: "; + error_string+= stderr_c_str(); + } + Error << "waitpid() returned errno:" << strerror(errno) << " " << error_string; + _app_exit_state= Application::UNKNOWN; + } + else + { + _app_exit_state= Application::UNKNOWN; + throw std::logic_error("waitpid() returned an unknown value"); + } + + return _app_exit_state; +} + +void Application::add_long_option(const std::string& name, const std::string& option_value) +{ + std::string arg(name); + arg+= option_value; + _options.push_back(std::make_pair(arg, std::string())); +} + +void Application::add_option(const std::string& arg) +{ + _options.push_back(std::make_pair(arg, std::string())); +} + +void Application::add_option(const std::string& name, const std::string& value) +{ + _options.push_back(std::make_pair(name, value)); +} + +Application::Pipe::Pipe(int arg) : + _std_fd(arg) +{ + _pipe_fd[READ]= -1; + _pipe_fd[WRITE]= -1; + _open[READ]= false; + _open[WRITE]= false; +} + +int Application::Pipe::Pipe::fd() +{ + if (_std_fd == STDOUT_FILENO) + { + return _pipe_fd[READ]; + } + else if (_std_fd == STDERR_FILENO) + { + return _pipe_fd[READ]; + } + + return _pipe_fd[WRITE]; // STDIN_FILENO +} + + +bool Application::Pipe::read(libtest::vchar_t& arg) +{ + fatal_assert(_std_fd == STDOUT_FILENO or _std_fd == STDERR_FILENO); + + bool data_was_read= false; + + libtest::vchar_t buffer; + buffer.resize(1024); + ssize_t read_length; + while ((read_length= ::read(_pipe_fd[READ], &buffer[0], buffer.size()))) + { + if (read_length == -1) + { + switch(errno) + { + case EAGAIN: + break; + + default: + Error << strerror(errno); + break; + } + + break; + } + + data_was_read= true; + arg.reserve(read_length +1); + for (size_t x= 0; x < size_t(read_length); ++x) + { + arg.push_back(buffer[x]); + } + // @todo Suck up all errput code here + } + + return data_was_read; +} + +void Application::Pipe::nonblock() +{ + int flags; + do + { + flags= fcntl(_pipe_fd[READ], F_GETFL, 0); + } while (flags == -1 and (errno == EINTR or errno == EAGAIN)); + + if (flags == -1) + { + Error << "fcntl(F_GETFL) " << strerror(errno); + throw strerror(errno); + } + + int rval; + do + { + rval= fcntl(_pipe_fd[READ], F_SETFL, flags | O_NONBLOCK); + } while (rval == -1 and (errno == EINTR or errno == EAGAIN)); + + if (rval == -1) + { + Error << "fcntl(F_SETFL) " << strerror(errno); + throw strerror(errno); + } +} + +void Application::Pipe::reset() +{ + close(READ); + close(WRITE); + +#ifdef HAVE_PIPE2 + if (pipe2(_pipe_fd, O_NONBLOCK|O_CLOEXEC) == -1) +#endif + { + if (pipe(_pipe_fd) == -1) + { + FATAL(strerror(errno)); + } + + // Since either pipe2() was not found/called we set the pipe directly + nonblock(); + cloexec(); + } + _open[0]= true; + _open[1]= true; +} + +void Application::Pipe::cloexec() +{ + //if (SOCK_CLOEXEC == 0) + { + if (FD_CLOEXEC) + { + int flags; + do + { + flags= fcntl(_pipe_fd[WRITE], F_GETFD, 0); + } while (flags == -1 and (errno == EINTR or errno == EAGAIN)); + + if (flags == -1) + { + Error << "fcntl(F_GETFD) " << strerror(errno); + throw strerror(errno); + } + + int rval; + do + { + rval= fcntl(_pipe_fd[WRITE], F_SETFD, flags | FD_CLOEXEC); + } while (rval == -1 && (errno == EINTR or errno == EAGAIN)); + + if (rval == -1) + { + Error << "fcntl(F_SETFD) " << strerror(errno); + throw strerror(errno); + } + } + } +} + +Application::Pipe::~Pipe() +{ + if (_pipe_fd[0] != -1) + { + ::close(_pipe_fd[0]); + } + + if (_pipe_fd[1] != -1) + { + ::close(_pipe_fd[1]); + } +} + +void Application::Pipe::dup_for_spawn(posix_spawn_file_actions_t& file_actions) +{ + int type= STDIN_FILENO == _std_fd ? 0 : 1; + + int ret; + if ((ret= posix_spawn_file_actions_adddup2(&file_actions, _pipe_fd[type], _std_fd )) < 0) + { + FATAL("posix_spawn_file_actions_adddup2(%s)", strerror(ret)); + } + + if ((ret= posix_spawn_file_actions_addclose(&file_actions, _pipe_fd[type])) < 0) + { + FATAL("posix_spawn_file_actions_addclose(%s)", strerror(ret)); + } +} + +void Application::Pipe::close(const close_t& arg) +{ + int type= int(arg); + + if (_open[type]) + { + if (::close(_pipe_fd[type]) == -1) + { + Error << "close(" << strerror(errno) << ")"; + } + _open[type]= false; + _pipe_fd[type]= -1; + } +} + +void Application::create_argv(const char *args[]) +{ + delete_argv(); + if (_use_libtool) + { + assert(libtool()); + vchar::append(built_argv, libtool()); + vchar::append(built_argv, "--mode=execute"); + } + + if (_use_valgrind) + { + /* + valgrind --error-exitcode=1 --leak-check=yes --track-fds=yes --malloc-fill=A5 --free-fill=DE + */ + vchar::append(built_argv, "valgrind"); + vchar::append(built_argv, "--error-exitcode=1"); + vchar::append(built_argv, "--leak-check=yes"); +#if 0 + vchar::append(built_argv, "--show-reachable=yes")); +#endif + vchar::append(built_argv, "--track-fds=yes"); +#if 0 + built_argv[x++]= strdup("--track-origin=yes"); +#endif + vchar::append(built_argv, "--malloc-fill=A5"); + vchar::append(built_argv, "--free-fill=DE"); + + std::string log_file= create_tmpfile("valgrind"); + libtest::vchar_t buffer; + buffer.resize(1024); + int length= snprintf(&buffer[0], buffer.size(), "--log-file=%s", log_file.c_str()); + fatal_assert(length > 0 and size_t(length) < buffer.size()); + vchar::append(built_argv, &buffer[0]); + } + else if (_use_ptrcheck) + { + /* + valgrind --error-exitcode=1 --tool=exp-ptrcheck --log-file= + */ + vchar::append(built_argv, "valgrind"); + vchar::append(built_argv, "--error-exitcode=1"); + vchar::append(built_argv, "--tool=exp-ptrcheck"); + std::string log_file= create_tmpfile("ptrcheck"); + libtest::vchar_t buffer; + buffer.resize(1024); + int length= snprintf(&buffer[0], buffer.size(), "--log-file=%s", log_file.c_str()); + fatal_assert(length > 0 and size_t(length) < buffer.size()); + vchar::append(built_argv, &buffer[0]); + } + else if (_use_gdb) + { + vchar::append(built_argv, "gdb"); + } + + vchar::append(built_argv, _exectuble_with_path.c_str()); + + for (Options::const_iterator iter= _options.begin(); iter != _options.end(); ++iter) + { + vchar::append(built_argv, (*iter).first.c_str()); + if ((*iter).second.empty() == false) + { + vchar::append(built_argv, (*iter).second.c_str()); + } + } + + if (args) + { + for (const char **ptr= args; *ptr; ++ptr) + { + vchar::append(built_argv, *ptr); + } + } + built_argv.push_back(NULL); +} + +std::string Application::print() +{ + return print_argv(built_argv); +} + +std::string Application::arguments() +{ + std::stringstream arg_buffer; + + // Skip printing out the libtool reference + for (size_t x= _use_libtool ? 2 : 0; x < _argc; ++x) + { + if (built_argv[x]) + { + arg_buffer << built_argv[x] << " "; + } + } + + return arg_buffer.str(); +} + +void Application::delete_argv() +{ + std::for_each(built_argv.begin(), built_argv.end(), FreeFromVector()); + + built_argv.clear(); + _argc= 0; +} + + +int exec_cmdline(const std::string& command, const char *args[], bool use_libtool) +{ + Application app(command, use_libtool); + + Application::error_t ret= app.run(args); + + if (ret != Application::SUCCESS) + { + return int(ret); + } + + return int(app.join()); +} + +} // namespace exec_cmdline diff --git a/libtest/cmdline.h b/libtest/cmdline.h new file mode 100644 index 0000000..368daae --- /dev/null +++ b/libtest/cmdline.h @@ -0,0 +1,248 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include + +// http://www.gnu.org/software/automake/manual/automake.html#Using-the-TAP-test-protocol +#ifndef EXIT_SKIP +# define EXIT_SKIP 77 +#endif + +#ifndef EXIT_FATAL +# define EXIT_FATAL 99 +#endif + +#ifndef EX_NOEXEC +# define EX_NOEXEC 126 +#endif + +#ifndef EX_NOTFOUND +# define EX_NOTFOUND 127 +#endif + +namespace libtest { + +class Application { +private: + typedef std::vector< std::pair > Options; + +public: + + enum error_t { + SUCCESS= EXIT_SUCCESS, + FAILURE= EXIT_FAILURE, + UNINITIALIZED, + SIGTERM_KILLED, + UNKNOWN, + UNKNOWN_SIGNAL, + INVALID_POSIX_SPAWN= 127 + }; + + static const char* toString(error_t arg) + { + switch (arg) + { + case Application::SUCCESS: + return "EXIT_SUCCESS"; + + case Application::UNINITIALIZED: + return "UNINITIALIZED"; + + case Application::SIGTERM_KILLED: + return "Exit happened via SIGTERM"; + + case Application::FAILURE: + return "EXIT_FAILURE"; + + case Application::UNKNOWN_SIGNAL: + return "Exit happened via a signal which was not SIGTERM"; + + case Application::INVALID_POSIX_SPAWN: + return "127: Invalid call to posix_spawn()"; + + case Application::UNKNOWN: + default: + break; + } + + return "EXIT_UNKNOWN"; + } + + class Pipe { + public: + Pipe(int); + ~Pipe(); + + int fd(); + + enum close_t { + READ= 0, + WRITE= 1 + }; + + void reset(); + void close(const close_t& arg); + void dup_for_spawn(posix_spawn_file_actions_t& file_actions); + + void nonblock(); + void cloexec(); + bool read(libtest::vchar_t&); + + private: + const int _std_fd; + int _pipe_fd[2]; + bool _open[2]; + }; + +public: + Application(const std::string& arg, const bool _use_libtool_arg= false); + + virtual ~Application(); + + void add_option(const std::string&); + void add_option(const std::string&, const std::string&); + void add_long_option(const std::string& option_name, const std::string& option_value); + error_t run(const char *args[]= NULL); + Application::error_t join(); + + libtest::vchar_t stdout_result() const + { + return _stdout_buffer; + } + + size_t stdout_result_length() const + { + return _stdout_buffer.size(); + } + + const char* stdout_c_str() const + { + return &_stdout_buffer[0]; + } + + libtest::vchar_t stderr_result() const + { + return _stderr_buffer; + } + + const char* stderr_c_str() const + { + return &_stderr_buffer[0]; + } + + size_t stderr_result_length() const + { + return _stderr_buffer.size(); + } + + std::string print(); + + void use_valgrind(bool arg) + { + _use_valgrind= arg; + } + + bool check() const; + + bool slurp(); + void murder(); + + void use_gdb(bool arg) + { + _use_gdb= arg; + } + + void use_ptrcheck(bool arg) + { + _use_ptrcheck= arg; + } + + std::string arguments(); + + std::string gdb_filename() + { + return _gdb_filename; + } + + pid_t pid() const + { + return _pid; + } + + void will_fail() + { + _will_fail= true; + } + +private: + void create_argv(const char *args[]); + void delete_argv(); + void add_to_build_argv(const char*); + +private: + const bool _use_libtool; + bool _use_valgrind; + bool _use_gdb; + bool _use_ptrcheck; + bool _will_fail; + size_t _argc; + std::string _exectuble_name; + std::string _exectuble; + std::string _exectuble_with_path; + std::string _gdb_filename; + Options _options; + Pipe stdin_fd; + Pipe stdout_fd; + Pipe stderr_fd; + libtest::vchar_ptr_t built_argv; + pid_t _pid; + libtest::vchar_t _stdout_buffer; + libtest::vchar_t _stderr_buffer; + int _status; + pthread_t _thread; + error_t _app_exit_state; +}; + +static inline std::ostream& operator<<(std::ostream& output, const enum Application::error_t &arg) +{ + return output << Application::toString(arg); +} + +int exec_cmdline(const std::string& executable, const char *args[], bool use_libtool= false); + +} diff --git a/libtest/collection.cc b/libtest/collection.cc new file mode 100644 index 0000000..2f1cba3 --- /dev/null +++ b/libtest/collection.cc @@ -0,0 +1,191 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" + +#include + +// @todo possibly have this code fork off so if it fails nothing goes bad +static test_return_t runner_code(libtest::Framework* frame, + test_st* run, + libtest::Timer& _timer) +{ // Runner Code + + assert(frame->runner()); + assert(run->test_fn); + + test_return_t return_code; + try + { + _timer.reset(); + assert(frame); + assert(frame->runner()); + assert(run->test_fn); + return_code= frame->runner()->main(run->test_fn, frame->creators_ptr()); + } + // Special case where check for the testing of the exception + // system. + catch (const libtest::fatal& e) + { + if (libtest::fatal::is_disabled()) + { + libtest::fatal::increment_disabled_counter(); + return_code= TEST_SUCCESS; + } + else + { + throw; + } + } + + _timer.sample(); + + return return_code; +} + +namespace libtest { + +Collection::Collection(Framework* frame_arg, + collection_st* arg) : + _name(arg->name), + _pre(arg->pre), + _post(arg->post), + _tests(arg->tests), + _frame(frame_arg), + _success(0), + _skipped(0), + _failed(0), + _total(0), + _formatter(frame_arg->name(), _name) +{ + fatal_assert(arg); +} + +test_return_t Collection::exec() +{ + if (test_success(_frame->runner()->setup(_pre, _frame->creators_ptr()))) + { + for (test_st *run= _tests; run->name; run++) + { + formatter()->push_testcase(run->name); + if (_frame->match(run->name)) + { + formatter()->skipped(); + continue; + } + _total++; + + test_return_t return_code; + try + { + if (run->requires_flush) + { + if (test_failed(_frame->runner()->flush(_frame->creators_ptr()))) + { + Error << "frame->runner()->flush(creators_ptr)"; + _skipped++; + formatter()->skipped(); + continue; + } + } + + set_alarm(); + + try + { + return_code= runner_code(_frame, run, _timer); + } + catch (...) + { + cancel_alarm(); + + throw; + } + libtest::cancel_alarm(); + } + catch (const libtest::fatal& e) + { + stream::cerr(e.file(), e.line(), e.func()) << e.what(); + _failed++; + formatter()->failed(); + throw; + } + + switch (return_code) + { + case TEST_SUCCESS: + _success++; + formatter()->success(_timer); + break; + + case TEST_FAILURE: + _failed++; + formatter()->failed(); + break; + + case TEST_SKIPPED: + _skipped++; + formatter()->skipped(); + break; + + default: + FATAL("invalid return code"); + } +#if 0 + @TODO add code here to allow for a collection to define a method to reset to allow tests to continue. +#endif + } + + (void) _frame->runner()->teardown(_post, _frame->creators_ptr()); + } + + if (_failed == 0 and _skipped == 0 and _success) + { + return TEST_SUCCESS; + } + + if (_failed) + { + return TEST_FAILURE; + } + + fatal_assert(_skipped or _success == 0); + + return TEST_SKIPPED; +} + +} // namespace libtest + diff --git a/libtest/collection.h b/libtest/collection.h new file mode 100644 index 0000000..a9f9cba --- /dev/null +++ b/libtest/collection.h @@ -0,0 +1,112 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include + +#include + +namespace { class Framework; } + + +/** + A structure which describes a collection of test cases. +*/ +struct collection_st { + const char *name; + test_callback_fn *pre; + test_callback_fn *post; + struct test_st *tests; +}; + +namespace libtest { + +class Collection { +public: + Collection(libtest::Framework*, collection_st*); + + test_return_t exec(); + + const char* name() + { + return _name.c_str(); + } + + uint32_t success() + { + return _success; + } + + uint32_t skipped() + { + return _skipped; + } + + uint32_t failed() + { + return _failed; + } + + uint32_t total() + { + return _total; + } + + libtest::Formatter* formatter() + { + return &_formatter; + } + +private: + std::string _name; + test_callback_fn *_pre; + test_callback_fn *_post; + struct test_st *_tests; + libtest::Framework* _frame; + uint32_t _success; + uint32_t _skipped; + uint32_t _failed; + uint32_t _total; + libtest::Timer _timer; + libtest::Formatter _formatter; + +private: + Collection( const Collection& ); + const Collection& operator=( const Collection& ); +}; + +} // namespace libtest diff --git a/libtest/common.h b/libtest/common.h new file mode 100644 index 0000000..90d8b6a --- /dev/null +++ b/libtest/common.h @@ -0,0 +1,121 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ +/* + Common include file for libtest +*/ + +#pragma once + +#include +#include +#include +#include +#include + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + +#ifdef HAVE_SYS_TIME_H +# include +#endif + +#ifdef HAVE_SYS_WAIT_H +# include +#endif + +#ifdef HAVE_SYS_RESOURCE_H +# include +#endif + +#ifdef HAVE_FNMATCH_H +# include +#endif + +#ifdef HAVE_ARPA_INET_H +# include +#endif + +#if defined(WIN32) +# include "win32/wrappers.h" +# define get_socket_errno() WSAGetLastError() +#else +# ifdef HAVE_UNISTD_H +# include +# endif +# define INVALID_SOCKET -1 +# define SOCKET_ERROR -1 +# define closesocket(a) close(a) +# define get_socket_errno() errno +#endif + +#include + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +struct FreeFromVector +{ + template + void operator() ( T* ptr) const + { + if (ptr) + { + free(ptr); + ptr= NULL; + } + } +}; + +struct DeleteFromVector +{ + template + void operator() ( T* ptr) const + { + delete ptr; + ptr= NULL; + } +}; diff --git a/libtest/comparison.cc b/libtest/comparison.cc new file mode 100644 index 0000000..c0c2193 --- /dev/null +++ b/libtest/comparison.cc @@ -0,0 +1,87 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" +#include + +namespace libtest { + +bool jenkins_is_caller(void) +{ + if (bool(getenv("JENKINS_HOME"))) + { + return true; + } + + return false; +} + +bool gdb_is_caller(void) +{ + if (bool(getenv("LOG_COMPILER")) and strstr(getenv("LOG_COMPILER"), "gdb")) + { + return true; + } + + if (bool(getenv("LIBTEST_IN_GDB"))) + { + return true; + } + + return false; +} + +bool helgrind_is_caller(void) +{ + if (bool(getenv("LOG_COMPILER")) and strstr(getenv("LOG_COMPILER"), "helgrind")) + { + return true; + } + + return false; +} + +bool _in_valgrind(const char*, int, const char*) +{ + if (valgrind_is_caller()) + { + return true; + } + + return false; +} + +} // namespace libtest diff --git a/libtest/comparison.hpp b/libtest/comparison.hpp new file mode 100644 index 0000000..c67bc33 --- /dev/null +++ b/libtest/comparison.hpp @@ -0,0 +1,160 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include + +#if defined(HAVE_LIBMEMCACHED) && HAVE_LIBMEMCACHED +#include +#include +#include +#endif + +#if defined(HAVE_LIBGEARMAN) && HAVE_LIBGEARMAN +#include +#endif + +namespace libtest { + +LIBTEST_API +bool jenkins_is_caller(void); + +LIBTEST_API +bool gdb_is_caller(void); + +LIBTEST_API +bool _in_valgrind(const char *file, int line, const char *func); + +LIBTEST_API +bool helgrind_is_caller(void); + +template +bool _compare_truth(const char *file, int line, const char *func, T_comparable __expected, const char *assertation_label) +{ + if (__expected == false) + { + libtest::stream::make_cerr(file, line, func) << "Assertation \"" << assertation_label << "\""; + return false; + } + + return true; +} + +template +bool _compare(const char *file, int line, const char *func, const T1_comparable& __expected, const T2_comparable& __actual, bool use_io) +{ + if (__expected != __actual) + { + if (use_io) + { + libtest::stream::make_cerr(file, line, func) << "Expected \"" << __expected << "\" got \"" << __actual << "\""; + } + + return false; + } + + return true; +} + +template +bool _compare_strcmp(const char *file, int line, const char *func, const T1_comparable& __expected, const T2_comparable& __actual) +{ + if (__expected == NULL) + { + FATAL("Expected value was NULL, programmer error"); + } + + if (__actual == NULL) + { + libtest::stream::make_cerr(file, line, func) << "Expected " << __expected << " but got NULL"; + return false; + } + + if (strncmp(__expected, __actual, strlen(__expected))) + { + libtest::stream::make_cerr(file, line, func) << "Expected " << __expected << " passed \"" << __actual << "\""; + return false; + } + + return true; +} + +template +bool _compare_zero(const char *file, int line, const char *func, T_comparable __actual) +{ + if (T_comparable(0) != __actual) + { + libtest::stream::make_cerr(file, line, func) << "Expected 0 got \"" << __actual << "\""; + return false; + } + + return true; +} + +template +bool _ne_compare(const char *file, int line, const char *func, T1_comparable __expected, T2_comparable __actual, bool io_error= true) +{ + if (__expected == __actual) + { + if (io_error) + { + libtest::stream::make_cerr(file, line, func) << "Expected \"" << __expected << "\" got \"" << __actual << "\""; + } + + return false; + } + + return true; +} + +template +bool _assert_truth(const char *file, int line, const char *func, T_comparable __truth, T_expression_string __expression, const char* __explain= NULL) +{ + if (__truth) + { + return true; + } + + if (__explain) + { + libtest::stream::make_cerr(file, line, func) << "Assertion \"" << __expression << "\" warning:" << __explain; + } + + return false; +} + +} // namespace libtest diff --git a/libtest/core.cc b/libtest/core.cc new file mode 100644 index 0000000..2542f43 --- /dev/null +++ b/libtest/core.cc @@ -0,0 +1,66 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" +#include + + +namespace libtest { + +void create_core(void) +{ +#if defined(__APPLE__) && __APPLE__ + if (__APPLE__) + { + return; + } +#endif + if (getenv("YATL_COREDUMP")) + { + pid_t pid= fork(); + + if (pid == 0) + { + abort(); + } + else + { + while (waitpid(pid, NULL, 0) != pid) {}; + } + } +} + +} // namespace libtest diff --git a/libtest/core.h b/libtest/core.h new file mode 100644 index 0000000..654fcaf --- /dev/null +++ b/libtest/core.h @@ -0,0 +1,44 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +namespace libtest { + +LIBTEST_API +void create_core(void); + +} // namespace libtest diff --git a/libtest/core_count.cc b/libtest/core_count.cc new file mode 100644 index 0000000..36ebc22 --- /dev/null +++ b/libtest/core_count.cc @@ -0,0 +1,135 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" + +#include +#include +#include +#include +#include +#include +#include + +#include + +static void version_command(const char *command_name, int major_version, int minor_version) +{ + std::cout << command_name << " " << major_version << "." << minor_version << std::endl; +} + +static void help_command(const char *command_name, + int major_version, int minor_version, + const struct option *long_options) +{ + std::cout << command_name << " " << major_version << "." << minor_version << std::endl; + std::cout << "Prints the number of cores found on the local host." << std::endl << std::endl; + + for (uint32_t x= 0; long_options[x].name; x++) + { + std::cout << "\t --" << long_options[x].name << char(long_options[x].has_arg ? '=' : ' ') << std::endl; + } + + std::cout << std::endl; +} + +enum { + OPT_HELP, + OPT_VERSION +}; + +static void options_parse(int argc, char *argv[]) +{ + static struct option long_options[]= + { + { "version", no_argument, NULL, OPT_VERSION}, + { "help", no_argument, NULL, OPT_HELP}, + {0, 0, 0, 0}, + }; + + bool opt_version= false; + bool opt_help= false; + int option_index= 0; + + while (1) + { + int option_rv= getopt_long(argc, argv, "", long_options, &option_index); + if (option_rv == -1) + { + break; + } + + switch (option_rv) + { + case OPT_HELP: /* --help or -h */ + opt_help= true; + break; + + case OPT_VERSION: /* --version or -v */ + opt_version= true; + break; + + case '?': + /* getopt_long already printed an error message. */ + exit(EXIT_FAILURE); + + default: + help_command(argv[0], 1, 0, long_options); + exit(EXIT_FAILURE); + } + } + + if (opt_version) + { + version_command(argv[0], 1, 0); + exit(EXIT_SUCCESS); + } + + if (opt_help) + { + help_command(argv[0], 1, 0, long_options); + exit(EXIT_SUCCESS); + } +} + +int main(int argc, char *argv[]) +{ + options_parse(argc, argv); + + std::cout << libtest::number_of_cpus() << std::endl; + + return EXIT_SUCCESS; +} diff --git a/libtest/cpu.cc b/libtest/cpu.cc new file mode 100644 index 0000000..0ee8df6 --- /dev/null +++ b/libtest/cpu.cc @@ -0,0 +1,83 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" +#include + +#include + +#pragma GCC diagnostic ignored "-Wundef" + +#if defined(HAVE_SYS_SYSCTL_H) && HAVE_SYS_SYSCTL_H +#include +#endif + +namespace libtest { + +size_t number_of_cpus() +{ + size_t number_of_cpu= 1; +#if defined(__linux) && __linux + number_of_cpu= sysconf(_SC_NPROCESSORS_ONLN); +#elif defined(HAVE_SYS_SYSCTL_H) && defined(CTL_HW) && defined(HW_NCPU) && defined(HW_AVAILCPU) && defined(HW_NCPU) + int mib[4]; + size_t len= sizeof(number_of_cpu); + + /* set the mib for hw.ncpu */ + mib[0] = CTL_HW; + mib[1] = HW_AVAILCPU; // alternatively, try HW_NCPU; + + /* get the number of CPUs from the system */ + sysctl(mib, 2, &number_of_cpu, &len, NULL, 0); + + if (number_of_cpu < 1) + { + mib[1]= HW_NCPU; + sysctl(mib, 2, &number_of_cpu, &len, NULL, 0 ); + + if (number_of_cpu < 1 ) + { + number_of_cpu = 1; + } + } +#else + // Guessing number of CPU +#endif + + return number_of_cpu; +} + +} // namespace libtest diff --git a/libtest/cpu.hpp b/libtest/cpu.hpp new file mode 100644 index 0000000..4127709 --- /dev/null +++ b/libtest/cpu.hpp @@ -0,0 +1,43 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +namespace libtest { + +size_t number_of_cpus(); + +} // namespace libtest diff --git a/libtest/dns.cc b/libtest/dns.cc new file mode 100644 index 0000000..75a5bbf --- /dev/null +++ b/libtest/dns.cc @@ -0,0 +1,118 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" +#include + +#include +#include +#include + +namespace libtest { + +bool lookup(const char* host) +{ + bool success= false; + assert(host and host[0]); + if (host and host[0]) + { + struct addrinfo *addrinfo= NULL; + struct addrinfo hints; + memset(&hints, 0, sizeof(hints)); + hints.ai_socktype= SOCK_STREAM; + hints.ai_protocol= IPPROTO_TCP; + + int limit= 5; + while (--limit and success == false) + { + if (addrinfo) + { + freeaddrinfo(addrinfo); + addrinfo= NULL; + } + + int ret; + if ((ret= getaddrinfo(host, "echo", &hints, &addrinfo)) == 0) + { + success= true; + break; + } + + switch (ret) + { + case EAI_AGAIN: + continue; + + case EAI_NONAME: + default: + break; + } + + break; + } + + if (addrinfo) + { + freeaddrinfo(addrinfo); + } + } + + return success; +} + + +bool check_dns() +{ + if (valgrind_is_caller()) + { + return false; + } + + if (lookup("exist.gearman.info") == false) + { + return false; + } + + if (lookup("does_not_exist.gearman.info")) // This should fail, if it passes,... + { + fatal_assert("Your service provider sucks and is providing bogus DNS. You might be in an airport."); + } + + return true; +} + +} // namespace libtest + diff --git a/libtest/dns.hpp b/libtest/dns.hpp new file mode 100644 index 0000000..438a922 --- /dev/null +++ b/libtest/dns.hpp @@ -0,0 +1,44 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +namespace libtest { + +bool check_dns(); +bool lookup(const char*); + +} // namespace libtest diff --git a/libtest/dream.cc b/libtest/dream.cc new file mode 100644 index 0000000..42f9222 --- /dev/null +++ b/libtest/dream.cc @@ -0,0 +1,58 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" +#include + +namespace libtest { + +void dream(time_t tv_sec, long tv_nsec) +{ +#if defined(WIN32) + if (tv_sec == 0 and tv_nsec) + { + tv_sec++; + } + sleep(tv_sec); +#else + struct timespec requested; + requested.tv_sec= tv_sec; + requested.tv_nsec= tv_nsec; + nanosleep(&requested, NULL); +#endif +} + +} diff --git a/libtest/dream.h b/libtest/dream.h new file mode 100644 index 0000000..41cabaf --- /dev/null +++ b/libtest/dream.h @@ -0,0 +1,44 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +namespace libtest { + +void dream(time_t tv_sec, long tv_nsec= 0); + +} + diff --git a/libtest/drizzled.cc b/libtest/drizzled.cc new file mode 100644 index 0000000..3a93b66 --- /dev/null +++ b/libtest/drizzled.cc @@ -0,0 +1,210 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" +#include + +#include + +#include "util/instance.hpp" +#include "util/operation.hpp" + +using namespace datadifferential; +using namespace libtest; + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef __INTEL_COMPILER +#pragma GCC diagnostic ignored "-Wold-style-cast" +#endif + +#if defined(HAVE_LIBDRIZZLE) && HAVE_LIBDRIZZLE +# include +#endif + +using namespace libtest; + +namespace libtest { +bool ping_drizzled(const in_port_t _port) +{ + (void)(_port); +#if defined(HAVE_LIBDRIZZLE) && HAVE_LIBDRIZZLE + if (HAVE_LIBDRIZZLE) + { + drizzle_st *drizzle= drizzle_create(getenv("MYSQL_SERVER"), + getenv("MYSQL_PORT") ? atoi("MYSQL_PORT") : DRIZZLE_DEFAULT_TCP_PORT, + getenv("MYSQL_USER"), + getenv("MYSQL_PASSWORD"), + getenv("MYSQL_SCHEMA"), 0); + + if (drizzle == NULL) + { + return false; + } + + bool success= false; + + drizzle_return_t rc; + if ((rc= drizzle_connect(drizzle)) == DRIZZLE_RETURN_OK) + { + drizzle_result_st *result= drizzle_ping(drizzle, &rc); + success= bool(result); + drizzle_result_free(result); + } + + if (success == true) + { } + else if (rc != DRIZZLE_RETURN_OK) + { + Error << drizzle_error(drizzle) << " localhost:" << _port; + } + + drizzle_quit(drizzle); + + return success; + } +#endif + + return false; +} +} // namespace libtest + +class Drizzle : public libtest::Server +{ +private: +public: + Drizzle(const std::string& host_arg, in_port_t port_arg) : + libtest::Server(host_arg, port_arg, DRIZZLED_BINARY, false) + { + set_pid_file(); + } + + bool ping() + { + size_t limit= 5; + while (_app.check() and --limit) + { + if (ping_drizzled(_port)) + { + return true; + } + libtest::dream(1, 0); + } + + return false; + } + + const char *name() + { + return "drizzled"; + }; + + void log_file_option(Application&, const std::string&) + { + } + + bool has_log_file_option() const + { + return true; + } + + bool broken_pid_file() + { + return true; + } + + bool is_libtool() + { + return false; + } + + bool has_syslog() const + { + return true; + } + + bool has_port_option() const + { + return true; + } + + void port_option(Application& app, in_port_t arg) + { + if (arg > 0) + { + libtest::vchar_t buffer; + buffer.resize(1024); + snprintf(&buffer[1024], buffer.size(), "--drizzle-protocol.port=%d", int(arg)); + app.add_option(&buffer[1024]); + } + } + + bool build(); +}; + +bool Drizzle::build() +{ + if (getuid() == 0 or geteuid() == 0) + { + add_option("--user=root"); + } + + add_option("--verbose=INSPECT"); +#if 0 + add_option("--datadir=var/drizzle"); +#endif + + return true; +} + +namespace libtest { + +libtest::Server *build_drizzled(const char *hostname, in_port_t try_port) +{ + return new Drizzle(hostname, try_port); +} + +} diff --git a/libtest/drizzled.h b/libtest/drizzled.h new file mode 100644 index 0000000..c3e3055 --- /dev/null +++ b/libtest/drizzled.h @@ -0,0 +1,50 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include + +namespace libtest { struct Server; } + +namespace libtest { + +libtest::Server *build_drizzled(const char *hostname, in_port_t try_port); + +bool ping_drizzled(const in_port_t); + +} + diff --git a/libtest/error.h b/libtest/error.h new file mode 100644 index 0000000..f567d2a --- /dev/null +++ b/libtest/error.h @@ -0,0 +1,54 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +enum test_return_t { + TEST_SUCCESS, + TEST_FAILURE, + TEST_SKIPPED +}; + + +static inline bool test_success(test_return_t rc) +{ + return (rc == TEST_SUCCESS); +} + +static inline bool test_failed(test_return_t rc) +{ + return (rc != TEST_SUCCESS); +} diff --git a/libtest/exception.cc b/libtest/exception.cc new file mode 100644 index 0000000..0b18f77 --- /dev/null +++ b/libtest/exception.cc @@ -0,0 +1,108 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012-2013 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" +#include +#include + +namespace libtest { + +exception::exception(const char *file_arg, int line_arg, const char *func_arg): + std::exception(), + _line(line_arg), + _file(file_arg), + _func(func_arg), + _error_message(NULL), + _error_message_size(0) +{ +} + +#ifndef __INTEL_COMPILER +# pragma GCC diagnostic ignored "-Wformat-nonliteral" +#endif +void exception::init(va_list args_) +{ + const char *format= va_arg(args_, const char *); + int error_message_length= vasprintf(&_error_message, format, args_); + assert(error_message_length != -1); + if (error_message_length > 0) + { + _error_message_size= error_message_length +1; + } +} + +exception::~exception() throw() +{ + if (_error_message) + { + free(_error_message); + } +} + +void exception::what(size_t length_, const char* message_) +{ + if (length_ > 0 and message_) + { + char *ptr= (char*) realloc(_error_message, length_ +1); + if (ptr) + { + _error_message= ptr; + memcpy(_error_message, message_, length_); + _error_message[length_]= 0; + } + } +} + +exception::exception(const exception& other) : + std::exception(), + _line(other._line), + _file(other._file), + _func(other._func), + _error_message_size(0) +{ + if (other.length() > 0) + { + _error_message= (char*) malloc(other.length() +1); + if (_error_message) + { + memcpy(_error_message, other._error_message, other.length()); + _error_message_size= other.length(); + } + } +} + +} // namespace libtest + diff --git a/libtest/exception.hpp b/libtest/exception.hpp new file mode 100644 index 0000000..3d20e8b --- /dev/null +++ b/libtest/exception.hpp @@ -0,0 +1,94 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012-2013 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +namespace libtest { + +class exception : public std::exception +{ +public: + exception(const char *file, int line, const char *func); + + exception( const exception& ); + + virtual ~exception() throw(); + + virtual const char* what() const throw() + { + if (_error_message) + { + return _error_message; + } + + return ""; + } + + void what(size_t, const char*); + + size_t length() const + { + return _error_message_size; + } + + int line() const + { + return _line; + } + + const char* file() const + { + return _file; + } + + const char* func() const + { + return _func; + } + +protected: + void init(va_list); + +private: + int _line; + const char* _file; + const char* _func; + char* _error_message; + size_t _error_message_size; +}; + +} // namespace libtest + diff --git a/libtest/exception/disconnected.hpp b/libtest/exception/disconnected.hpp new file mode 100644 index 0000000..fb3a2ad --- /dev/null +++ b/libtest/exception/disconnected.hpp @@ -0,0 +1,62 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012-2013 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include "libtest/exception.hpp" + +namespace libtest { + +class disconnected : public libtest::exception +{ +public: + disconnected(const char *file, int line, const char *func, const std::string&, const in_port_t port, ...); + + disconnected(const disconnected&); + + // The following are just for unittesting the exception class + static bool is_disabled(); + static void disable(); + static void enable(); + static uint32_t disabled_counter(); + static void increment_disabled_counter(); + +private: + in_port_t _port; + char _instance[BUFSIZ]; +}; + +} // namespace libtest diff --git a/libtest/exception/fatal.cc b/libtest/exception/fatal.cc new file mode 100644 index 0000000..21a8ca7 --- /dev/null +++ b/libtest/exception/fatal.cc @@ -0,0 +1,119 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" +#include +#include "libtest/exception.hpp" +#include + +namespace libtest { + +#pragma GCC diagnostic ignored "-Wformat-nonliteral" + +fatal::fatal(const char *file_arg, int line_arg, const char *func_arg, ...) : + libtest::exception(file_arg, line_arg, func_arg) +{ + va_list args; + va_start(args, func_arg); + init(args); + va_end(args); +} + +fatal::fatal( const fatal& other ) : + libtest::exception(other) +{ +} + +static bool _disabled= false; +static uint32_t _counter= 0; + +bool fatal::is_disabled() throw() +{ + return _disabled; +} + +void fatal::disable() throw() +{ + _counter= 0; + _disabled= true; +} + +void fatal::enable() throw() +{ + _counter= 0; + _disabled= false; +} + +uint32_t fatal::disabled_counter() throw() +{ + return _counter; +} + +void fatal::increment_disabled_counter() throw() +{ + _counter++; +} + +#pragma GCC diagnostic ignored "-Wformat-nonliteral" +disconnected::disconnected(const char *file_arg, int line_arg, const char *func_arg, + const std::string& instance, const in_port_t port, ...) : + libtest::exception(file_arg, line_arg, func_arg), + _port(port) +{ + va_list args; + va_start(args, port); + const char *format= va_arg(args, const char *); + char last_error[BUFSIZ]; + (void)vsnprintf(last_error, sizeof(last_error), format, args); + va_end(args); + + char buffer_error[BUFSIZ]; + int error_length= snprintf(buffer_error, sizeof(buffer_error), "%s:%u %s", instance.c_str(), uint32_t(port), last_error); + + if (error_length > 0) + { + what(size_t(error_length), buffer_error); + } +} + +disconnected::disconnected(const disconnected& other): + libtest::exception(other), + _port(other._port) +{ + strncpy(_instance, other._instance, BUFSIZ); +} + +} // namespace libtest diff --git a/libtest/exception/fatal.hpp b/libtest/exception/fatal.hpp new file mode 100644 index 0000000..5ee1aac --- /dev/null +++ b/libtest/exception/fatal.hpp @@ -0,0 +1,87 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +namespace libtest { + +class fatal : public libtest::exception +{ +public: + fatal(const char *file, int line, const char *func, ...); + + fatal(const fatal&); + + // The following are just for unittesting the exception class + static bool is_disabled() throw(); + static void disable() throw(); + static void enable() throw(); + static uint32_t disabled_counter() throw(); + static void increment_disabled_counter() throw(); + + test_return_t return_code() const + { + return TEST_SKIPPED; + } + +private: +}; + +} // namespace libtest + +#define FATAL(...) \ +do \ +{ \ + throw libtest::fatal(LIBYATL_DEFAULT_PARAM, __VA_ARGS__); \ +} while (0) + +#define FATAL_IF(__expression, ...) \ +do \ +{ \ + if ((__expression)) { \ + throw libtest::fatal(LIBYATL_DEFAULT_PARAM, (#__expression)); \ + } \ +} while (0) + +#define FATAL_IF_(__expression, ...) \ +do \ +{ \ + if ((__expression)) { \ + throw libtest::fatal(LIBYATL_DEFAULT_PARAM, __VA_ARGS__); \ + } \ +} while (0) + +#define fatal_assert(__assert) if((__assert)) {} else { throw libtest::fatal(LIBYATL_DEFAULT_PARAM, #__assert); } diff --git a/libtest/formatter.cc b/libtest/formatter.cc new file mode 100644 index 0000000..7cb3ea0 --- /dev/null +++ b/libtest/formatter.cc @@ -0,0 +1,260 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" + +#include + +#include +#include +#include + +namespace libtest { + +std::string& escape4XML(std::string const& arg, std::string& escaped_string) +{ + escaped_string.clear(); + + escaped_string+= '"'; + for (std::string::const_iterator x= arg.begin(), end= arg.end(); x != end; ++x) + { + unsigned char c= *x; + if (c == '&') + { + escaped_string+= "&"; + } + else if (c == '>') + { + escaped_string+= ">"; + } + else if (c == '<') + { + escaped_string+= "<"; + } + else if (c == '\'') + { + escaped_string+= "'"; break; + } + else if (c == '"') + { + escaped_string+= """; + } + else if (c == ' ') + { + escaped_string+= ' '; + } + else if (isalnum(c)) + { + escaped_string+= c; + } + else + { + char const* const hexdig= "0123456789ABCDEF"; + escaped_string+= "&#x"; + escaped_string+= hexdig[c >> 4]; + escaped_string+= hexdig[c & 0xF]; + escaped_string+= ';'; + } + } + escaped_string+= '"'; + + return escaped_string; +} + +class TestCase { +public: + TestCase(const std::string& arg): + _name(arg), + _result(TEST_FAILURE) + { + } + + const std::string& name() const + { + return _name; + } + + test_return_t result() const + { + return _result; + } + + void result(test_return_t arg) + { + _result= arg; + } + + void result(test_return_t arg, const libtest::Timer& timer_) + { + _result= arg; + _timer= timer_; + } + + const libtest::Timer& timer() const + { + return _timer; + } + + void timer(libtest::Timer& arg) + { + _timer= arg; + } + +private: + std::string _name; + test_return_t _result; + libtest::Timer _timer; +}; + +Formatter::Formatter(const std::string& frame_name, const std::string& arg) +{ + _suite_name= frame_name; + _suite_name+= "."; + _suite_name+= arg; +} + +Formatter::~Formatter() +{ + std::for_each(_testcases.begin(), _testcases.end(), DeleteFromVector()); + _testcases.clear(); +} + +TestCase* Formatter::current() +{ + return _testcases.back(); +} + +void Formatter::skipped() +{ + current()->result(TEST_SKIPPED); + Out << name() << "." + << current()->name() + << "\t\t\t\t\t" + << "[ " << test_strerror(current()->result()) << " ]"; + + reset(); +} + +void Formatter::failed() +{ + assert(current()); + current()->result(TEST_FAILURE); + + Out << name() + << "." << current()->name() << "\t\t\t\t\t" + << "[ " << test_strerror(current()->result()) << " ]"; + + reset(); +} + +void Formatter::success(const libtest::Timer& timer_) +{ + assert(current()); + current()->result(TEST_SUCCESS, timer_); + std::string escaped_string; + + Out << name() << "." + << current()->name() + << "\t\t\t\t\t" + << current()->timer() + << " [ " << test_strerror(current()->result()) << " ]"; + + reset(); +} + +void Formatter::xml(libtest::Framework& framework_, std::ofstream& output) +{ + std::string escaped_string; + + output << "" << std::endl; + + for (Suites::iterator framework_iter= framework_.suites().begin(); + framework_iter != framework_.suites().end(); + ++framework_iter) + { + output << "\t" << std::endl; + + for (TestCases::iterator case_iter= (*framework_iter)->formatter()->testcases().begin(); + case_iter != (*framework_iter)->formatter()->testcases().end(); + ++case_iter) + { + output << "\t\ttimer().elapsed_milliseconds() + << "\""; + + switch ((*case_iter)->result()) + { + case TEST_SKIPPED: + output << ">" << std::endl; + output << "\t\t " << std::endl; + output << "\t\t" << std::endl; + break; + + case TEST_FAILURE: + output << ">" << std::endl; + output << "\t\t "<< std::endl; + output << "\t\t" << std::endl; + break; + + case TEST_SUCCESS: + output << "/>" << std::endl; + break; + } + } + output << "\t" << std::endl; + } + output << "" << std::endl; +} + +void Formatter::push_testcase(const std::string& arg) +{ + assert(_suite_name.empty() == false); + TestCase* _current_testcase= new TestCase(arg); + _testcases.push_back(_current_testcase); +} + +void Formatter::reset() +{ +} +} // namespace libtest diff --git a/libtest/formatter.hpp b/libtest/formatter.hpp new file mode 100644 index 0000000..10818d4 --- /dev/null +++ b/libtest/formatter.hpp @@ -0,0 +1,85 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include + +namespace libtest { class Framework; } + + +namespace libtest { + +class TestCase; +typedef std::vector TestCases; + +class Formatter { +public: + Formatter(const std::string& frame_name, const std::string& arg); + + ~Formatter(); + + void skipped(); + + void failed(); + + void success(const libtest::Timer&); + + void push_testcase(const std::string&); + + const std::string& name() const + { + return _suite_name; + } + + TestCases& testcases() + { + return _testcases; + } + + static void xml(libtest::Framework&, std::ofstream&); + +private: + void reset(); + + TestCase* current(); + +private: + std::string _suite_name; + TestCases _testcases; +}; + +} // namespace libtest diff --git a/libtest/framework.cc b/libtest/framework.cc new file mode 100644 index 0000000..2c9ba74 --- /dev/null +++ b/libtest/framework.cc @@ -0,0 +1,234 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" + +#include +#include +#include + +#include +#include +#include + +namespace libtest { + +Framework::Framework(libtest::SignalThread& signal_, + const std::string& name_, + const std::string& only_run_arg, + const std::string& wildcard_arg) : + _total(0), + _success(0), + _skipped(0), + _failed(0), + _create(NULL), + _destroy(NULL), + _on_error(NULL), + _runner(NULL), + _socket(false), + _creators_ptr(NULL), + _signal(signal_), + _only_run(only_run_arg), + _wildcard(wildcard_arg), + _name(name_) +{ + get_world(this); +} + +void Framework::collections(collection_st collections_[]) +{ + for (collection_st *next= collections_; next and next->name; next++) + { + _collection.push_back(new Collection(this, next)); + } +} + +Framework::~Framework() +{ + if (_destroy and _destroy(_creators_ptr)) + { + Error << "Failure in _destroy(), some resources may not have been cleaned up."; + } + + _servers.shutdown(); + + delete _runner; + + std::for_each(_collection.begin(), _collection.end(), DeleteFromVector()); + _collection.clear(); +} + +bool Framework::match(const char* arg) +{ + if (_wildcard.empty() == false and fnmatch(_wildcard.c_str(), arg, 0)) + { + return true; + } + + return false; +} + +void Framework::exec() +{ + for (std::vector::iterator iter= _collection.begin(); + iter != _collection.end() and (_signal.is_shutdown() == false); + ++iter) + { + if (*iter) + { + if (_only_run.empty() == false and + fnmatch(_only_run.c_str(), (*iter)->name(), 0)) + { + continue; + } + + _total++; + + try { + switch ((*iter)->exec()) + { + case TEST_FAILURE: + _failed++; + break; + + case TEST_SKIPPED: + _skipped++; + break; + + // exec() can return SUCCESS, but that doesn't mean that some tests did + // not fail or get skipped. + case TEST_SUCCESS: + _success++; + break; + } + } + catch (const libtest::fatal& e) + { + _failed++; + stream::cerr(e.file(), e.line(), e.func()) << e.what(); + } + catch (const libtest::disconnected& e) + { + _failed++; + Error << "Unhandled disconnection occurred:" << e.what(); + throw; + } + catch (...) + { + _failed++; + throw; + } + } + } + + void xml(const std::string& testsuites_name, std::ostream& output); +} + +uint32_t Framework::sum_total() +{ + uint32_t count= 0; + for (std::vector::iterator iter= _collection.begin(); + iter != _collection.end(); + ++iter) + { + count+= (*iter)->total(); + } + + return count; +} + +uint32_t Framework::sum_success() +{ + uint32_t count= 0; + for (std::vector::iterator iter= _collection.begin(); + iter != _collection.end(); + ++iter) + { + count+= (*iter)->success(); + } + + return count; +} + +uint32_t Framework::sum_skipped() +{ + uint32_t count= 0; + for (std::vector::iterator iter= _collection.begin(); + iter != _collection.end(); + ++iter) + { + count+= (*iter)->skipped(); + } + + return count; +} + +uint32_t Framework::sum_failed() +{ + uint32_t count= 0; + for (std::vector::iterator iter= _collection.begin(); + iter != _collection.end(); + ++iter) + { + count+= (*iter)->failed(); + } + + return count; +} + +libtest::Runner *Framework::runner() +{ + if (_runner == NULL) + { + _runner= new Runner; + } + _runner->set_servers(_servers); + + return _runner; +} + +test_return_t Framework::create() +{ + test_return_t rc= TEST_SUCCESS; + if (_create) + { + _creators_ptr= _create(_servers, rc); + } + + return rc; +} + +} // namespace libtest diff --git a/libtest/framework.h b/libtest/framework.h new file mode 100644 index 0000000..361779d --- /dev/null +++ b/libtest/framework.h @@ -0,0 +1,200 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include + +/** + Framework is the structure which is passed to the test implementation to be filled. + This must be implemented in order for the test framework to load the tests. We call + get_world() in order to fill this structure. +*/ + +#include + +namespace { class Collection; } +typedef std::vector Suites; + +namespace libtest { + +class Framework { +public: + +public: + test_return_t create(); + + const std::string& name() const + { + return _name; + } + + void create(test_callback_create_fn* arg) + { + _create= arg; + } + + void destroy(test_callback_destroy_fn* arg) + { + _destroy= arg; + } + + void collections(collection_st arg[]); + + void set_on_error(test_callback_error_fn *arg) + { + _on_error= arg; + } + + test_return_t on_error(const enum test_return_t, void *); + + void set_socket() + { + _servers.set_socket(); + } + + void set_sasl(const std::string& username_arg, const std::string& password_arg) + { + _servers.set_sasl(username_arg, password_arg); + } + + libtest::server_startup_st& servers() + { + return _servers; + } + + void set_runner(libtest::Runner *arg) + { + _runner= arg; + } + + libtest::Runner *runner(); + + void exec(); + + libtest::Collection& collection(); + + virtual ~Framework(); + + Framework(libtest::SignalThread&, + const std::string&, + const std::string&, + const std::string&); + + bool match(const char* arg); + + void *creators_ptr() + { + return _creators_ptr; + } + + libtest::SignalThread& signal() + { + return _signal; + } + + uint32_t sum_total(); + uint32_t sum_success(); + uint32_t sum_skipped(); + uint32_t sum_failed(); + + size_t size() + { + return _collection.size(); + } + + uint32_t total() const + { + return _total; + } + + uint32_t success() const + { + return _success; + } + + uint32_t skipped() const + { + return _skipped; + } + + uint32_t failed() const + { + return _failed; + } + + Suites& suites() + { + return _collection; + } + +private: + uint32_t _total; + uint32_t _success; + uint32_t _skipped; + uint32_t _failed; + + /* These methods are called outside of any collection call. */ + test_callback_create_fn *_create; + test_callback_destroy_fn *_destroy; + + /** + If an error occurs during the test, this is called. + */ + test_callback_error_fn *_on_error; + + /** + Runner represents the callers for the tests. If not implemented we will use + a set of default implementations. + */ + libtest::Runner *_runner; + + libtest::server_startup_st _servers; + bool _socket; + void *_creators_ptr; + unsigned long int _servers_to_run; + Suites _collection; + libtest::SignalThread& _signal; + std::string _only_run; + std::string _wildcard; + std::string _name; + +private: + Framework( const Framework& ); + const Framework& operator=( const Framework& ); +}; + +} // namespace libtest diff --git a/libtest/gearmand.cc b/libtest/gearmand.cc new file mode 100644 index 0000000..852cf19 --- /dev/null +++ b/libtest/gearmand.cc @@ -0,0 +1,178 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" +#include + +#include + +using namespace libtest; + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef __INTEL_COMPILER +#pragma GCC diagnostic ignored "-Wold-style-cast" +#endif + +using namespace libtest; + +class Gearmand : public libtest::Server +{ +private: +public: + Gearmand(const std::string& host_arg, in_port_t port_arg, bool libtool_, const char* binary); + + bool ping() + { + reset_error(); + + if (out_of_ban_killed()) + { + return false; + } + + SimpleClient client(_hostname, _port); + + std::string response; + bool ret= client.send_message("version", response); + + if (client.is_error()) + { + error(client.error()); + } + + return ret; + } + + const char *name() + { + return "gearmand"; + }; + + void log_file_option(Application& app, const std::string& arg) + { + if (arg.empty() == false) + { + std::string buffer("--log-file="); + buffer+= arg; + app.add_option("--verbose=DEBUG"); + app.add_option(buffer); + } + } + + bool has_log_file_option() const + { + return true; + } + + bool is_libtool() + { + return true; + } + + bool has_syslog() const + { + return false; // --syslog.errmsg-enable + } + + bool has_port_option() const + { + return true; + } + + bool build(); +}; + +Gearmand::Gearmand(const std::string& host_arg, in_port_t port_arg, bool libtool_, const char* binary_arg) : + libtest::Server(host_arg, port_arg, binary_arg, libtool_) +{ + set_pid_file(); +} + +bool Gearmand::build() +{ + if (getuid() == 0 or geteuid() == 0) + { + add_option("-u", "root"); + } + + add_option("--listen=localhost"); + + return true; +} + +namespace libtest { + +libtest::Server *build_gearmand(const char *hostname, in_port_t try_port, const char* binary) +{ + if (binary == NULL) + { +#if defined(HAVE_GEARMAND_BINARY) +# if defined(GEARMAND_BINARY) + if (HAVE_GEARMAND_BINARY) + { + binary= GEARMAND_BINARY; + } +# endif +#endif + } + + if (binary == NULL) + { + return NULL; + } + + bool is_libtool_script= true; + + if (binary[0] == '/') + { + is_libtool_script= false; + } + + return new Gearmand(hostname, try_port, is_libtool_script, binary); +} + +} diff --git a/libtest/gearmand.h b/libtest/gearmand.h new file mode 100644 index 0000000..41317d7 --- /dev/null +++ b/libtest/gearmand.h @@ -0,0 +1,45 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +namespace libtest { struct Server; } + +namespace libtest { + +libtest::Server *build_gearmand(const char *hostname, in_port_t try_port, const char* binary= NULL); + +} diff --git a/libtest/get.h b/libtest/get.h new file mode 100644 index 0000000..e21ac0a --- /dev/null +++ b/libtest/get.h @@ -0,0 +1,51 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + + /* How we make all of this work :) */ + LIBTEST_API + void get_world(libtest::Framework *world); + +#ifdef __cplusplus +} +#endif + + diff --git a/libtest/has.cc b/libtest/has.cc new file mode 100644 index 0000000..2d9abf6 --- /dev/null +++ b/libtest/has.cc @@ -0,0 +1,226 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012-2013 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" +#include + +#include +#include +#include + +namespace libtest { + +bool has_libmemcached_sasl(void) +{ + return false; +} + +bool has_libmemcached(void) +{ +#if defined(HAVE_LIBMEMCACHED) && HAVE_LIBMEMCACHED + if (HAVE_LIBMEMCACHED) + { + return true; + } +#endif + + return false; +} + +bool has_libdrizzle(void) +{ +#if defined(HAVE_LIBDRIZZLE) && HAVE_LIBDRIZZLE + if (HAVE_LIBDRIZZLE) + { + return true; + } +#endif + + return false; +} + +bool has_postgres_support(void) +{ + char *getenv_ptr; + if (bool((getenv_ptr= getenv("POSTGES_IS_RUNNING_AND_SETUP")))) + { + (void)(getenv_ptr); + if (HAVE_LIBPQ) + { + return true; + } + } + + return false; +} + + +bool has_gearmand() +{ +#if defined(GEARMAND_BINARY) && defined(HAVE_GEARMAND_BINARY) && HAVE_GEARMAND_BINARY + if (HAVE_GEARMAND_BINARY) + { + std::stringstream arg_buffer; + + char *getenv_ptr; + if (bool((getenv_ptr= getenv("PWD"))) and + ((strcmp(GEARMAND_BINARY, "./gearmand/gearmand") == 0) or (strcmp(GEARMAND_BINARY, "gearmand/gearmand") == 0))) + { + arg_buffer << getenv_ptr; + arg_buffer << "/"; + } + arg_buffer << GEARMAND_BINARY; + + if (access(arg_buffer.str().c_str(), X_OK) == 0) + { + return true; + } + } +#endif + + return false; +} + +bool has_drizzled() +{ +#if defined(DRIZZLED_BINARY) && defined(HAVE_DRIZZLED_BINARY) && HAVE_DRIZZLED_BINARY + if (HAVE_DRIZZLED_BINARY) + { + if (access(DRIZZLED_BINARY, X_OK) == 0) + { + return true; + } + } +#endif + + return false; +} + +bool has_mysqld() +{ +#if defined(MYSQLD_BINARY) && defined(HAVE_MYSQLD_BUILD) && HAVE_MYSQLD_BUILD + if (HAVE_MYSQLD_BUILD) + { + if (access(MYSQLD_BINARY, X_OK) == 0) + { + return true; + } + } +#endif + + return false; +} + +static char memcached_binary_path[FILENAME_MAX]; + +static void initialize_memcached_binary_path() +{ + memcached_binary_path[0]= 0; + +#if defined(MEMCACHED_BINARY) && defined(HAVE_MEMCACHED_BINARY) && HAVE_MEMCACHED_BINARY + if (HAVE_MEMCACHED_BINARY) + { + std::stringstream arg_buffer; + + char *getenv_ptr; + if (bool((getenv_ptr= getenv("PWD"))) and strcmp(MEMCACHED_BINARY, "memcached/memcached") == 0) + { + arg_buffer << getenv_ptr; + arg_buffer << "/"; + } + arg_buffer << MEMCACHED_BINARY; + + if (access(arg_buffer.str().c_str(), X_OK) == 0) + { + strncpy(memcached_binary_path, arg_buffer.str().c_str(), FILENAME_MAX); + } + } +#endif +} + +static pthread_once_t memcached_binary_once= PTHREAD_ONCE_INIT; +static void initialize_memcached_binary(void) +{ + int ret; + if ((ret= pthread_once(&memcached_binary_once, initialize_memcached_binary_path)) != 0) + { + FATAL(strerror(ret)); + } +} + +bool has_memcached() +{ + initialize_memcached_binary(); + + if (memcached_binary_path[0] and (strlen(memcached_binary_path) > 0)) + { + return true; + } + + return false; +} + +const char* memcached_binary() +{ + initialize_memcached_binary(); + + if (memcached_binary_path[0]) + { + return memcached_binary_path; + } + + return NULL; +} + +const char *gearmand_binary() +{ +#if defined(GEARMAND_BINARY) + return GEARMAND_BINARY; +#else + return NULL; +#endif +} + +const char *drizzled_binary() +{ +#if defined(DRIZZLED_BINARY) + return DRIZZLED_BINARY; +#else + return NULL; +#endif +} + +} // namespace libtest diff --git a/libtest/has.hpp b/libtest/has.hpp new file mode 100644 index 0000000..59ee88f --- /dev/null +++ b/libtest/has.hpp @@ -0,0 +1,76 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012-2013 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +namespace libtest { + +LIBTEST_API +bool has_libmemcached_sasl(void); + +LIBTEST_API +bool has_libmemcached(); + +LIBTEST_API +bool has_libdrizzle(); + +LIBTEST_API +bool has_postgres_support(); + +LIBTEST_API +bool has_memcached(); + +LIBTEST_API +bool has_memcached_sasl(); + +LIBTEST_API +bool has_gearmand(); + +LIBTEST_API +bool has_drizzled(); + +LIBTEST_API +bool has_mysqld(); + +LIBTEST_API +const char* memcached_binary(); + +LIBTEST_API +const char *gearmand_binary(); + +LIBTEST_API +const char *drizzled_binary(); +} // namespace libtest diff --git a/libtest/http.cc b/libtest/http.cc new file mode 100644 index 0000000..29873dc --- /dev/null +++ b/libtest/http.cc @@ -0,0 +1,217 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" + +#include + +#if defined(HAVE_LIBCURL) && HAVE_LIBCURL +#include +#else +class CURL; +#endif + + +static void cleanup_curl(void) +{ +#if defined(HAVE_LIBCURL) && HAVE_LIBCURL + curl_global_cleanup(); +#endif +} + +static void initialize_curl_startup() +{ +#if defined(HAVE_LIBCURL) && HAVE_LIBCURL + if (curl_global_init(CURL_GLOBAL_ALL)) + { + FATAL("curl_global_init(CURL_GLOBAL_ALL) failed"); + } +#endif + + if (atexit(cleanup_curl)) + { + FATAL("atexit() failed"); + } +} + +static pthread_once_t start_key_once= PTHREAD_ONCE_INIT; +static void initialize_curl(void) +{ + int ret; + if ((ret= pthread_once(&start_key_once, initialize_curl_startup)) != 0) + { + FATAL(strerror(ret)); + } +} + +namespace libtest { +namespace http { + +#define YATL_USERAGENT "YATL/1.0" + +static size_t http_get_result_callback(void *ptr, size_t size, size_t nmemb, void *data) +{ + vchar_t *_body= (vchar_t*)data; + + _body->resize(size * nmemb); + memcpy(&_body[0], ptr, _body->size()); + + return _body->size(); +} + +static void init(CURL *curl, const std::string& url) +{ + (void)http_get_result_callback; + (void)curl; + (void)url; +#if defined(HAVE_LIBCURL) && HAVE_LIBCURL + if (HAVE_LIBCURL) + { + assert(curl); + curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); + curl_easy_setopt(curl, CURLOPT_USERAGENT, YATL_USERAGENT); + } +#endif +} + +HTTP::HTTP(const std::string& url_arg) : + _url(url_arg), + _response(0) +{ + initialize_curl(); +} + +bool GET::execute() +{ + (void)init; + +#if defined(HAVE_LIBCURL) && HAVE_LIBCURL + if (HAVE_LIBCURL) + { + CURL *curl= curl_easy_init(); + + init(curl, url()); + + curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, http_get_result_callback); + curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&_body); + + CURLcode retref= curl_easy_perform(curl); + curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, _response); + + curl_easy_cleanup(curl); + + return bool(retref == CURLE_OK); + } +#endif + + return false; +} + +bool POST::execute() +{ +#if defined(HAVE_LIBCURL) && HAVE_LIBCURL + if (HAVE_LIBCURL) + { + CURL *curl= curl_easy_init();; + + init(curl, url()); + + curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, _body.size()); + curl_easy_setopt(curl, CURLOPT_POSTFIELDS, (void *)&_body[0]); + + CURLcode retref= curl_easy_perform(curl); + curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, _response); + + curl_easy_cleanup(curl); + + return bool(retref == CURLE_OK); + } +#endif + + return false; +} + +bool TRACE::execute() +{ +#if defined(HAVE_LIBCURL) && HAVE_LIBCURL + if (HAVE_LIBCURL) + { + CURL *curl= curl_easy_init();; + + init(curl, url()); + + curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "TRACE"); + curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, http_get_result_callback); + curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&_body[0]); + + CURLcode retref= curl_easy_perform(curl); + curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, _response); + + curl_easy_cleanup(curl); + + return retref == CURLE_OK; + } +#endif + + return false; +} + +bool HEAD::execute() +{ +#if defined(HAVE_LIBCURL) && HAVE_LIBCURL + if (HAVE_LIBCURL) + { + CURL *curl= curl_easy_init(); + + init(curl, url()); + + curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "HEAD"); + curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, http_get_result_callback); + + CURLcode retref= curl_easy_perform(curl); + curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, _response); + + curl_easy_cleanup(curl); + + return retref == CURLE_OK; + } +#endif + + return false; +} + +} // namespace http +} // namespace libtest diff --git a/libtest/http.hpp b/libtest/http.hpp new file mode 100644 index 0000000..6827821 --- /dev/null +++ b/libtest/http.hpp @@ -0,0 +1,132 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include + +namespace libtest { +namespace http { + +class HTTP { +public: + + HTTP(const std::string& url_arg); + + virtual bool execute()= 0; + + virtual ~HTTP() + { } + + const std::string& url() const + { + return _url; + } + + long response() + { + return _response; + } + +private: + std::string _url; + +protected: + long _response; +}; + +class GET: public HTTP { +public: + + GET(const std::string& url_arg) : + HTTP(url_arg) + { + } + + bool execute(); + +private: + libtest::vchar_t _body; +}; + +class POST: public HTTP { +public: + + POST(const std::string& url_arg, + const vchar_t& post_arg) : + HTTP(url_arg), + _post(post_arg) + { + } + + bool execute(); + +private: + libtest::vchar_t _post; + libtest::vchar_t _body; +}; + +class TRACE: public HTTP { +public: + + TRACE(const std::string& url_arg, + const vchar_t& body_arg) : + HTTP(url_arg), + _body(body_arg) + { + } + + bool execute(); + +private: + libtest::vchar_t _body; +}; + +class HEAD: public HTTP { +public: + + HEAD(const std::string& url_arg) : + HTTP(url_arg) + { + } + + bool execute(); + +private: +}; + +} // namespace http +} // namespace libtest diff --git a/libtest/include.am b/libtest/include.am new file mode 100644 index 0000000..0e5efc7 --- /dev/null +++ b/libtest/include.am @@ -0,0 +1,256 @@ +# vim:ft=automake +# +# included from Top Level Makefile.am +# All paths should be given relative to the root +# + +LIBTOOL_COMMAND= ${abs_top_builddir}/libtool --mode=execute +VALGRIND_EXEC_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=memcheck --error-exitcode=1 --leak-check=yes --track-fds=yes --malloc-fill=A5 --free-fill=DE +SGCHECK_EXEC_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=exp-sgcheck --error-exitcode=1 +VALGRIND_COMMAND= LOG_COMPILER="valgrind" $(VALGRIND_EXEC_COMMAND) +HELGRIND_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=helgrind --read-var-info=yes --error-exitcode=1 --read-var-info=yes +DRD_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=drd --free-is-write=yes --error-exitcode=1 +SGCHECK_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=exp-sgcheck --error-exitcode=1 +MASSIF_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=massif +GDB_COMMAND= $(LIBTOOL_COMMAND) gdb -f -x libtest/run.gdb +PTRCHECK_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=exp-ptrcheck --error-exitcode=1 +PAHOLE_COMMAND= $(LIBTOOL_COMMAND) --mode=execute pahole +VALGRIND_SUPRESSION= $(LIBTOOL_COMMAND) valgrind --leak-check=full --show-reachable=yes --error-limit=no --gen-suppressions=all --log-file=minimalraw.log + +export LIBTOOL_COMMAND +export VALGRIND_COMMAND +export HELGRIND_COMMAND +export DRD_COMMAND +export SGCHECK_COMMAND +export GDB_COMMAND + +valgrind: + @echo make check LOG_COMPILER="\"$(VALGRIND_EXEC_COMMAND)\"" + +sgcheck: + @echo make check LOG_COMPILER="\"$(SGCHECK_EXEC_COMMAND)\"" + +valgrind-supressions: + @echo make check LOG_COMPILER="\"$(VALGRIND_SUPRESSION)\"" + +gdb: + @echo make check LOG_COMPILER="\"$(GDB_COMMAND)\"" + +helgrind: + @echo make check LOG_COMPILER="\"$(HELGRIND_COMMAND)\"" + +drd: + @echo make check LOG_COMPILER="\"$(DRD_COMMAND)\"" + +EXTRA_DIST+= libtest/run.gdb +EXTRA_DIST+= libtest/version.h + +BUILT_SOURCES+= libtest/version.h + +.PHONY: clean-libtest-check +clean-libtest-check: + -rm -rf tmp_chroot + +noinst_HEADERS+= libtest/client.hpp +noinst_HEADERS+= libtest/formatter.hpp +noinst_HEADERS+= libtest/timer.hpp +noinst_HEADERS+= libtest/alarm.h +noinst_HEADERS+= libtest/binaries.h +noinst_HEADERS+= libtest/cpu.hpp +noinst_HEADERS+= libtest/blobslap_worker.h +noinst_HEADERS+= libtest/callbacks.h +noinst_HEADERS+= libtest/dns.hpp +noinst_HEADERS+= libtest/cmdline.h +noinst_HEADERS+= libtest/collection.h +noinst_HEADERS+= libtest/common.h +noinst_HEADERS+= libtest/comparison.hpp +noinst_HEADERS+= libtest/core.h +noinst_HEADERS+= libtest/dream.h +noinst_HEADERS+= libtest/error.h +noinst_HEADERS+= libtest/exception.hpp +noinst_HEADERS+= libtest/exception/disconnected.hpp +noinst_HEADERS+= libtest/exception/fatal.hpp +noinst_HEADERS+= libtest/framework.h +noinst_HEADERS+= libtest/gearmand.h +noinst_HEADERS+= libtest/drizzled.h +noinst_HEADERS+= libtest/get.h +noinst_HEADERS+= libtest/has.hpp +noinst_HEADERS+= libtest/http.hpp +noinst_HEADERS+= libtest/is_pid.hpp +noinst_HEADERS+= libtest/is_local.hpp +noinst_HEADERS+= libtest/killpid.h +noinst_HEADERS+= libtest/libtool.hpp +noinst_HEADERS+= libtest/memcached.h +noinst_HEADERS+= libtest/memcached.hpp +noinst_HEADERS+= libtest/poll_error.hpp +noinst_HEADERS+= libtest/port.h +noinst_HEADERS+= libtest/result.hpp +noinst_HEADERS+= libtest/result/base.hpp +noinst_HEADERS+= libtest/result/fail.hpp +noinst_HEADERS+= libtest/result/skip.hpp +noinst_HEADERS+= libtest/result/success.hpp +noinst_HEADERS+= libtest/runner.h +noinst_HEADERS+= libtest/server.h +noinst_HEADERS+= libtest/server_container.h +noinst_HEADERS+= libtest/signal.h +noinst_HEADERS+= libtest/socket.hpp +noinst_HEADERS+= libtest/stream.h +noinst_HEADERS+= libtest/strerror.h +noinst_HEADERS+= libtest/string.hpp +noinst_HEADERS+= libtest/test.h +noinst_HEADERS+= libtest/test.hpp +noinst_HEADERS+= libtest/thread.hpp +noinst_HEADERS+= libtest/tmpfile.hpp +noinst_HEADERS+= libtest/lite.h +noinst_HEADERS+= libtest/valgrind.h +noinst_HEADERS+= libtest/vchar.hpp +noinst_HEADERS+= libtest/version.h +noinst_HEADERS+= libtest/visibility.h +noinst_HEADERS+= libtest/wait.h +noinst_HEADERS+= libtest/yatl.h + +check_LTLIBRARIES+= libtest/libtest.la + +libtest_libtest_la_CXXFLAGS= +EXTRA_libtest_libtest_la_DEPENDENCIES= +libtest_libtest_la_LIBADD= +libtest_libtest_la_SOURCES= + +libtest_libtest_la_SOURCES+= libtest/alarm.cc +libtest_libtest_la_SOURCES+= libtest/binaries.cc +libtest_libtest_la_SOURCES+= libtest/cmdline.cc +libtest_libtest_la_SOURCES+= libtest/collection.cc +libtest_libtest_la_SOURCES+= libtest/comparison.cc +libtest_libtest_la_SOURCES+= libtest/core.cc +libtest_libtest_la_SOURCES+= libtest/cpu.cc +libtest_libtest_la_SOURCES+= libtest/dns.cc +libtest_libtest_la_SOURCES+= libtest/dream.cc +libtest_libtest_la_SOURCES+= libtest/drizzled.cc +libtest_libtest_la_SOURCES+= libtest/exception.cc +libtest_libtest_la_SOURCES+= libtest/exception/fatal.cc +libtest_libtest_la_SOURCES+= libtest/formatter.cc +libtest_libtest_la_SOURCES+= libtest/client.cc +libtest_libtest_la_SOURCES+= libtest/framework.cc +libtest_libtest_la_SOURCES+= libtest/has.cc +libtest_libtest_la_SOURCES+= libtest/http.cc +libtest_libtest_la_SOURCES+= libtest/is_local.cc +libtest_libtest_la_SOURCES+= libtest/killpid.cc +libtest_libtest_la_SOURCES+= libtest/libtool.cc +libtest_libtest_la_SOURCES+= libtest/main.cc +libtest_libtest_la_SOURCES+= libtest/port.cc +libtest_libtest_la_SOURCES+= libtest/result.cc +libtest_libtest_la_SOURCES+= libtest/runner.cc +libtest_libtest_la_SOURCES+= libtest/server.cc +libtest_libtest_la_SOURCES+= libtest/server_container.cc +libtest_libtest_la_SOURCES+= libtest/signal.cc +libtest_libtest_la_SOURCES+= libtest/socket.cc +libtest_libtest_la_SOURCES+= libtest/strerror.cc +libtest_libtest_la_SOURCES+= libtest/timer.cc +libtest_libtest_la_SOURCES+= libtest/tmpfile.cc +libtest_libtest_la_SOURCES+= libtest/vchar.cc + +libtest_libtest_la_CXXFLAGS+= -DBUILDING_LIBTEST +libtest_libtest_la_CXXFLAGS+= @PTHREAD_CFLAGS@ +libtest_libtest_la_CXXFLAGS+= -DLIBTEST_TEMP="\"tmp_chroot\"" +libtest_libtest_la_CXXFLAGS+= $(CURL_CFLAGS) + +libtest_libtest_la_LIBADD+= @PTHREAD_LIBS@ +libtest_libtest_la_LIBADD+= $(CURL_LIBS) +libtest_libtest_la_LIBADD+= @RT_LIB@ + +EXTRA_libtest_libtest_la_DEPENDENCIES+= libtest_tmp_dir +EXTRA_libtest_libtest_la_DEPENDENCIES+= libtest/abort +EXTRA_libtest_libtest_la_DEPENDENCIES+= libtest/wait + +# Declare unittest so that we can append to it +libtest_unittest_CXXFLAGS= +libtest_unittest_LDADD= +libtest_libtest_la_LDFLAGS= + +# We are either building in tree, or with +libtest_libtest_la_SOURCES+= libtest/memcached.cc + +if HAVE_LIBDRIZZLE +libtest_libtest_la_LDFLAGS+= @LIBDRIZZLE_LDFLAGS@ +libtest_libtest_la_LIBADD+= @LIBDRIZZLE_LIB@ +endif + +libtest_libtest_la_SOURCES+= libtest/gearmand.cc + +if BUILDING_GEARMAN +libtest_libtest_la_SOURCES+= libtest/blobslap_worker.cc +endif + +TMP_DIR := tmp_chroot/etc tmp_chroot/var/log tmp_chroot/var/tmp tmp_chroot/var/run tmp_chroot/var/drizzle + +.PHONY: libtest_tmp_dir +libtest_tmp_dir: | $(TMP_DIR) + +$(TMP_DIR): + @$(mkdir_p) $(TMP_DIR) + +libtest_unittest_LDADD+= libtest/libtest.la +libtest_unittest_SOURCES= libtest/unittest.cc +check_PROGRAMS+= libtest/unittest +noinst_PROGRAMS+= libtest/unittest +test-unittest: libtest/unittest + @libtest/unittest + +valgrind-unittest: libtest/unittest + @$(VALGRIND_COMMAND) libtest/unittest + +gdb-unittest: libtest/unittest + @$(GDB_COMMAND) libtest/unittest + +helgrind-unittest: libtest/unittest + @$(HELGRIND_COMMAND) libtest/unittest + +drd-unittest: libtest/unittest + @$(DRD_COMMAND) libtest/unittest + +sgcheck-unittest: libtest/unittest + echo $(SGCHECK_COMMAND) + @$(SGCHECK_COMMAND) libtest/unittest + +libtest_skiptest_LDADD= libtest/libtest.la +libtest_skiptest_SOURCES= libtest/skiptest.cc +check_PROGRAMS+= libtest/skiptest +noinst_PROGRAMS+= libtest/skiptest + +test-skiptest: libtest/skiptest + @libtest/skiptest + +valgrind-skiptest: libtest/skiptest + @$(VALGRIND_COMMAND) libtest/skiptest + +helgrind-skiptest: libtest/skiptest + @$(HELGRIND_COMMAND) libtest/skiptest + +drd-skiptest: libtest/skiptest + @$(DRD_COMMAND) libtest/skiptest + +libtest_wait_SOURCES= +libtest_wait_SOURCES+= libtest/wait.cc +libtest_wait_SOURCES+= libtest/dream.cc +noinst_PROGRAMS+= libtest/wait + +libtest_core_count_SOURCES= +libtest_core_count_SOURCES+= libtest/cpu.cc +libtest_core_count_SOURCES+= libtest/core_count.cc +noinst_PROGRAMS+= libtest/core-count + +libtest_abort_SOURCES= libtest/abort.cc +noinst_PROGRAMS+= libtest/abort + +libtest_backtrace_SOURCES= +libtest_backtrace_LDADD= +libtest_backtrace_SOURCES+= libtest/backtrace_test.cc +libtest_backtrace_SOURCES+= libmemcached/backtrace.cc +libtest_backtrace_LDADD+= @lt_cv_dlopen_libs@ +noinst_PROGRAMS+= libtest/backtrace +test-backtrace: libtest/backtrace + @libtest/backtrace + +gdb-backtrace: libtest/backtrace + @$(GDB_COMMAND) libtest/backtrace + diff --git a/libtest/is_local.cc b/libtest/is_local.cc new file mode 100644 index 0000000..ef4059c --- /dev/null +++ b/libtest/is_local.cc @@ -0,0 +1,60 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" +#include + + +namespace libtest { + +bool test_is_local() +{ + return (getenv("LIBTEST_LOCAL")); +} + +static bool _is_massive= false; +void is_massive(bool arg) +{ + _is_massive= arg; +} + +bool is_massive() +{ + return _is_massive; +} + +} // namespace libtest + diff --git a/libtest/is_local.hpp b/libtest/is_local.hpp new file mode 100644 index 0000000..0835553 --- /dev/null +++ b/libtest/is_local.hpp @@ -0,0 +1,50 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +namespace libtest { + +LIBTEST_API +bool test_is_local(); + +LIBTEST_API +void is_massive(bool); + +LIBTEST_API +bool is_massive(); + +} // namespace libtest diff --git a/libtest/is_pid.hpp b/libtest/is_pid.hpp new file mode 100644 index 0000000..3c514a9 --- /dev/null +++ b/libtest/is_pid.hpp @@ -0,0 +1,43 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +static inline bool is_pid_valid(const pid_t pid) +{ + return (pid > 1) ? true : false; +} + diff --git a/libtest/killpid.cc b/libtest/killpid.cc new file mode 100644 index 0000000..2cefff2 --- /dev/null +++ b/libtest/killpid.cc @@ -0,0 +1,225 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" +#include + +#include +#include +#include +#include +#include +#include +#include +#include + + +#include +#include + +using namespace libtest; + +bool kill_pid(pid_t pid_arg) +{ + assert(pid_arg > 0); + if (pid_arg < 1) + { + Error << "Invalid pid:" << pid_arg; + return false; + } + + if ((::kill(pid_arg, SIGTERM) == -1)) + { + switch (errno) + { + case EPERM: + Error << "Does someone else have a process running locally for " << int(pid_arg) << "?"; + return false; + + case ESRCH: + Error << "Process " << int(pid_arg) << " not found."; + return false; + + default: + case EINVAL: + Error << "kill() " << strerror(errno); + return false; + } + } + + { + uint32_t this_wait= 0; + uint32_t timeout= 20; // This number should be high enough for valgrind startup (which is slow) + uint32_t waited; + uint32_t retry; + + for (waited= 0, retry= 1; ; retry++, waited+= this_wait) + { + int status= 0; + if (waitpid(pid_arg, &status, WNOHANG) == 0) + { + break; + } + else if (errno == ECHILD) + { + // Server has already gone away + break; + } + else if (waited >= timeout) + { + // Timeout failed + kill(pid_arg, SIGKILL); + break; + } + + this_wait= retry * retry / 3 + 1; + libtest::dream(this_wait, 0); + } + } + + return true; +} + +bool check_pid(const std::string &filename) +{ + if (filename.empty()) + { + return false; + } + + FILE *fp; + if ((fp= fopen(filename.c_str(), "r"))) + { + libtest::vchar_t pid_buffer; + pid_buffer.resize(1024); + + char *ptr= fgets(&pid_buffer[0], int(pid_buffer.size()), fp); + fclose(fp); + + if (ptr) + { + pid_t pid= (pid_t)atoi(&pid_buffer[0]); + if (pid > 0) + { + return (::kill(pid, 0) == 0); + } + } + } + + return false; +} + + +bool kill_file(const std::string &filename) +{ + if (filename.empty()) + { + return true; + } + + FILE *fp; + if ((fp= fopen(filename.c_str(), "r"))) + { + libtest::vchar_t pid_buffer; + pid_buffer.resize(1024); + + char *ptr= fgets(&pid_buffer[0], int(pid_buffer.size()), fp); + fclose(fp); + + if (ptr) + { + pid_t pid= (pid_t)atoi(&pid_buffer[0]); + if (pid != 0) + { + bool ret= kill_pid(pid); + unlink(filename.c_str()); // If this happens we may be dealing with a dead server that left its pid file. + + return ret; + } + } + } + + return false; +} + +#define STRINGIFY(x) #x +#define TOSTRING(x) STRINGIFY(x) +#define LIBTEST_AT __FILE__ ":" TOSTRING(__LINE__) + +pid_t get_pid_from_file(const std::string &filename, std::stringstream& error_message) +{ + pid_t ret= -1; + + if (filename.empty()) + { + error_message << LIBTEST_AT << " empty pid file"; + return ret; + } + + FILE *fp; + if ((fp= fopen(filename.c_str(), "r"))) + { + libtest::vchar_t pid_buffer; + pid_buffer.resize(1024); + + char *ptr= fgets(&pid_buffer[0], int(pid_buffer.size()), fp); + if (ptr) + { + ret= (pid_t)atoi(&pid_buffer[0]); + if (ret < 1) + { + error_message << LIBTEST_AT << " Invalid pid was read from file " << filename; + } + } + else + { + error_message << LIBTEST_AT << " File " << filename << " was empty "; + } + + fclose(fp); + + return ret; + } + else + { + libtest::vchar_t buffer; + buffer.resize(1024); + char *current_directory= getcwd(&buffer[0], buffer.size()); + error_message << "Error while opening " << current_directory << "/" << filename << " " << strerror(errno); + } + + return ret; +} diff --git a/libtest/killpid.h b/libtest/killpid.h new file mode 100644 index 0000000..6bf5dee --- /dev/null +++ b/libtest/killpid.h @@ -0,0 +1,51 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + + +bool kill_pid(pid_t pid_arg); + +bool kill_file(const std::string &filename); + +bool check_pid(const std::string &filename); + +pid_t get_pid_from_file(const std::string &filename, std::stringstream& error_message); + +static inline bool check_pid(pid_t pid_arg) +{ + return (pid_arg > 1); +} diff --git a/libtest/libtool.cc b/libtest/libtool.cc new file mode 100644 index 0000000..9d4b0f5 --- /dev/null +++ b/libtest/libtool.cc @@ -0,0 +1,73 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" +#include +#include + +char _libtool[1024]= { 0 }; + +namespace libtest { + +const char *libtool(void) +{ + if (_libtool[0] == 0) + { + std::string libtool_buffer; + if (getenv("PWD")) + { + libtool_buffer+= getenv("PWD"); + libtool_buffer+= "/"; + } + else + { + libtool_buffer+= "./"; + } + + libtool_buffer+= "libtool"; + if (access(libtool_buffer.c_str(), R_OK | W_OK | X_OK)) + { + Error << "Could not find libtool via access(" << libtool_buffer << ") :" << strerror(errno); + return NULL; + } + + snprintf(_libtool, sizeof(_libtool), "%s", libtool_buffer.c_str()); + } + + return _libtool; +} + +} // namespace libtest diff --git a/libtest/libtool.hpp b/libtest/libtool.hpp new file mode 100644 index 0000000..925b55d --- /dev/null +++ b/libtest/libtool.hpp @@ -0,0 +1,43 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +namespace libtest { + +const char *libtool(void); + +} diff --git a/libtest/lite.h b/libtest/lite.h new file mode 100644 index 0000000..36f873e --- /dev/null +++ b/libtest/lite.h @@ -0,0 +1,413 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#ifdef __cplusplus +# include +# include +# include +# include +# include +#else +# include +# include +# include +# include +# include +# include +#endif + +#if defined(WIN32) +# include +#else +# include +#endif + +#ifndef __PRETTY_FUNCTION__ +# define __PRETTY_FUNCTION__ __func__ +#endif + +#ifndef EXIT_SKIP +# define EXIT_SKIP 77 +#endif + +#ifndef YATL_FULL +# define YATL_FULL 0 +#endif + +#ifndef FAIL +# define FAIL(__message_format, ...) +#endif + +#ifndef SKIP +# define SKIP(__message_format, ...) +#endif + +#include + +static inline size_t yatl_strlen(const char *s) +{ + if (s) + { + return strlen(s); + } + + return (size_t)(0); +} + +static inline int yatl_strcmp(const char *s1, const char *s2, size_t *s1_length, size_t *s2_length) +{ + *s1_length= yatl_strlen(s1); + *s2_length= yatl_strlen(s2); + + if (*s1_length == 0 && *s1_length == *s2_length) + { + return 0; + } + + if (*s1_length == 0 && *s2_length) + { + return 1; + } + + if (*s1_length && *s2_length == 0) + { + return 1; + } + + return strcmp(s1, s2); +} + +#define SKIP_IF(__expression) \ +do \ +{ \ + if ((__expression)) { \ + if (YATL_FULL) { \ + SKIP(#__expression); \ + } \ + fprintf(stdout, "\n%s:%d: %s SKIP '!(%s)'\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, #__expression); \ + exit(EXIT_SKIP); \ + } \ +} while (0) + +#define SKIP_IF_(__expression, ...) \ +do \ +{ \ + if ((__expression)) { \ + size_t ask= snprintf(0, 0, __VA_ARGS__); \ + ask++; \ + char *buffer= (char*)alloca(sizeof(char) * ask); \ + snprintf(buffer, ask, __VA_ARGS__); \ + if (YATL_FULL) { \ + SKIP(#__expression, buffer); \ + } \ + fprintf(stdout, "\n%s:%d: %s SKIP '%s' [ %s ]\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, #__expression, buffer); \ + exit(EXIT_SKIP); \ + } \ +} while (0) + +#define SKIP_UNLESS(__expression) \ +do \ +{ \ + if (! (__expression)) { \ + if (YATL_FULL) { \ + SKIP(#__expression); \ + } \ + fprintf(stdout, "\n%s:%d: %s SKIP '(%s)'\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, #__expression); \ + exit(EXIT_SKIP); \ + } \ +} while (0) + +#define SKIP_UNLESS_(__expression, ...) \ +do \ +{ \ + if (! (__expression)) { \ + size_t ask= snprintf(0, 0, __VA_ARGS__); \ + ask++; \ + char *buffer= (char*)alloca(sizeof(char) * ask); \ + snprintf(buffer, ask, __VA_ARGS__); \ + if (YATL_FULL) { \ + SKIP(#__expression, buffer); \ + } \ + fprintf(stdout, "\n%s:%d: %s SKIP '%s' [ %s ]\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, #__expression, buffer); \ + exit(EXIT_SKIP); \ + } \ +} while (0) + +#define ASSERT_TRUE(__expression) \ +do \ +{ \ + if (! (__expression)) { \ + if (YATL_FULL) { \ + FAIL("Assertion '%s'", #__expression); \ + } \ + fprintf(stderr, "\n%s:%d: %s Assertion '%s'\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, #__expression);\ + exit(EXIT_FAILURE); \ + } \ +} while (0) + +#define ASSERT_FALSE(__expression) \ +do \ +{ \ + if ((__expression)) { \ + if (YATL_FULL) { \ + FAIL("Assertion '!%s'", #__expression); \ + } \ + fprintf(stderr, "\n%s:%d: %s Assertion '!%s'\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, #__expression);\ + exit(EXIT_FAILURE); \ + } \ +} while (0) + +#define ASSERT_NULL_(__expression, ...) \ +do \ +{ \ + if ((__expression) != NULL) { \ + size_t ask= snprintf(0, 0, __VA_ARGS__); \ + ask++; \ + char *buffer= (char*)alloca(sizeof(char) * ask); \ + snprintf(buffer, ask, __VA_ARGS__); \ + if (YATL_FULL) { \ + FAIL("Assertion '%s' != NULL [ %s ]", #__expression, buffer);\ + } \ + fprintf(stderr, "\n%s:%d: %s Assertion '%s' != NULL [ %s ]\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, #__expression, buffer);\ + exit(EXIT_FAILURE); \ + } \ +} while (0) + +#define ASSERT_NOT_NULL(__expression) \ +do \ +{ \ + if ((__expression) == NULL) { \ + if (YATL_FULL) { \ + FAIL("Assertion '%s' == NULL", #__expression,);\ + } \ + fprintf(stderr, "\n%s:%d: %s Assertion '%s' == NULL\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, #__expression,);\ + exit(EXIT_FAILURE); \ + } \ +} while (0) + +#define ASSERT_NOT_NULL_(__expression, ...) \ +do \ +{ \ + if ((__expression) == NULL) { \ + size_t ask= snprintf(0, 0, __VA_ARGS__); \ + ask++; \ + char *buffer= (char*)alloca(sizeof(char) * ask); \ + snprintf(buffer, ask, __VA_ARGS__); \ + if (YATL_FULL) { \ + FAIL("Assertion '%s' == NULL [ %s ]", #__expression, buffer);\ + } \ + fprintf(stderr, "\n%s:%d: %s Assertion '%s' == NULL [ %s ]\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, #__expression, buffer);\ + exit(EXIT_FAILURE); \ + } \ +} while (0) + +#define ASSERT_TRUE_(__expression, ...) \ +do \ +{ \ + if (! (__expression)) { \ + size_t ask= snprintf(0, 0, __VA_ARGS__); \ + ask++; \ + char *buffer= (char*)alloca(sizeof(char) * ask); \ + snprintf(buffer, ask, __VA_ARGS__); \ + if (YATL_FULL) { \ + FAIL("Assertion '%s' [ %s ]", #__expression, buffer); \ + } \ + fprintf(stderr, "\n%s:%d: %s Assertion '%s' [ %s ]\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, #__expression, buffer); \ + exit(EXIT_FAILURE); \ + } \ +} while (0) + +#define ASSERT_EQ(__expected, __actual) \ +do \ +{ \ + if ((__expected) != (__actual)) { \ + if (YATL_FULL) { \ + FAIL("Assertion '%s' != '%s'", #__expected, #__actual); \ + } \ + fprintf(stderr, "\n%s:%d: %s Assertion '%s' != '%s'\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, #__expected, #__actual); \ + exit(EXIT_FAILURE); \ + } \ +} while (0) + +#define ASSERT_EQ_(__expected, __actual, ...) \ +do \ +{ \ + if ((__expected) != (__actual)) { \ + size_t ask= snprintf(0, 0, __VA_ARGS__); \ + ask++; \ + char *buffer= (char*)alloca(sizeof(char) * ask); \ + snprintf(buffer, ask, __VA_ARGS__); \ + if (YATL_FULL) { \ + FAIL("Assertion '%s' != '%s' [ %s ]", #__expected, #__actual, buffer); \ + } \ + fprintf(stderr, "\n%s:%d: %s Assertion '%s' != '%s' [ %s ]\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, #__expected, #__actual, buffer); \ + exit(EXIT_FAILURE); \ + } \ +} while (0) + +#define ASSERT_STREQ(__expected_str, __actual_str) \ +do \ +{ \ + size_t __expected_length; \ + size_t __actual_length; \ + int ret= yatl_strcmp(__expected_str, __actual_str, &__expected_length, &__actual_length); \ + if (ret) { \ + if (YATL_FULL) { \ + FAIL("Assertion '%.*s' != '%.*s'\n", \ + (int)(__expected_length), (__expected_str), \ + (int)__actual_length, (__actual_str)) ; \ + } \ + fprintf(stderr, "\n%s:%d: %s Assertion '%.*s' != '%.*s'\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, \ + (int)(__expected_length), (__expected_str), \ + (int)__actual_length, (__actual_str)) ; \ + exit(EXIT_FAILURE); \ + } \ +} while (0) + +#define ASSERT_STREQ_(__expected_str, __actual_str, ...) \ +do \ +{ \ + size_t __expected_length; \ + size_t __actual_length; \ + int ret= yatl_strcmp(__expected_str, __actual_str, &__expected_length, &__actual_length); \ + if (ret) { \ + size_t ask= snprintf(0, 0, __VA_ARGS__); \ + ask++; \ + char *buffer= (char*)alloca(sizeof(char) * ask); \ + ask= snprintf(buffer, ask, __VA_ARGS__); \ + if (YATL_FULL) { \ + FAIL("Assertion '%.*s' != '%.*s' [ %.*s ]", \ + (int)(__expected_length), (__expected_str), \ + (int)(__actual_length), (__actual_str), \ + (int)(ask), buffer); \ + } \ + fprintf(stderr, "\n%s:%d: %s Assertion '%.*s' != '%.*s' [ %.*s ]\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, \ + (int)(__expected_length), (__expected_str), \ + (int)(__actual_length), (__actual_str), \ + (int)(ask), buffer); \ + exit(EXIT_FAILURE); \ + } \ +} while (0) + +#define ASSERT_STRNE(__expected_str, __actual_str) \ +do \ +{ \ + size_t __expected_length; \ + size_t __actual_length; \ + int ret= yatl_strcmp(__expected_str, __actual_str, &__expected_length, &__actual_length); \ + if (ret == 0) { \ + if (YATL_FULL) { \ + FAIL("Assertion '%.*s' == '%.*s'", \ + (int)(__expected_length), (__expected_str), \ + (int)__actual_length, (__actual_str)) ; \ + } \ + fprintf(stderr, "\n%s:%d: %s Assertion '%.*s' == '%.*s'\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, \ + (int)(__expected_length), (__expected_str), \ + (int)__actual_length, (__actual_str)) ; \ + exit(EXIT_FAILURE); \ + } \ +} while (0) + +#define ASSERT_STRNE_(__expected_str, __actual_str, ...) \ +do \ +{ \ + size_t __expected_length; \ + size_t __actual_length; \ + int ret= yatl_strcmp(__expected_str, __actual_str, &__expected_length, &__actual_length); \ + if (ret == 0) { \ + size_t ask= snprintf(0, 0, __VA_ARGS__); \ + ask++; \ + char *buffer= (char*)alloca(sizeof(char) * ask); \ + ask= snprintf(buffer, ask, __VA_ARGS__); \ + if (YATL_FULL) { \ + FAIL("Assertion '%.*s' == '%.*s' [ %.*s ]", \ + (int)(__expected_length), (__expected_str), \ + (int)(__actual_length), (__actual_str), \ + (int)(ask), buffer); \ + } \ + fprintf(stderr, "\n%s:%d: %s Assertion '%.*s' == '%.*s' [ %.*s ]\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, \ + (int)(__expected_length), (__expected_str), \ + (int)(__actual_length), (__actual_str), \ + (int)(ask), buffer); \ + exit(EXIT_FAILURE); \ + } \ +} while (0) + +#define ASSERT_NEQ(__expected, __actual) \ +do \ +{ \ + if ((__expected) == (__actual)) { \ + if (YATL_FULL) { \ + FAIL("Assertion '%s' == '%s'", #__expected, #__actual); \ + } \ + fprintf(stderr, "\n%s:%d: %s Assertion '%s' == '%s'\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, #__expected, #__actual); \ + exit(EXIT_FAILURE); \ + } \ +} while (0) + +#define ASSERT_NEQ_(__expected, __actual, ...) \ +do \ +{ \ + if ((__expected) == (__actual)) { \ + size_t ask= snprintf(0, 0, __VA_ARGS__); \ + ask++; \ + char *buffer= (char*)alloca(sizeof(char) * ask); \ + snprintf(buffer, ask, __VA_ARGS__); \ + if (YATL_FULL) { \ + FAIL("Assertion '%s' == '%s' [ %s ]", #__expected, #__actual, buffer); \ + } \ + fprintf(stderr, "\n%s:%d: %s Assertion '%s' == '%s' [ %s ]\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, #__expected, #__actual, buffer); \ + exit(EXIT_FAILURE); \ + } \ +} while (0) + +#define ASSERT_FALSE_(__expression, ...) \ +do \ +{ \ + if ((__expression)) { \ + size_t ask= snprintf(0, 0, __VA_ARGS__); \ + ask++; \ + char *buffer= (char*)alloca(sizeof(char) * ask); \ + snprintf(buffer, ask, __VA_ARGS__); \ + if (YATL_FULL) { \ + FAIL("Assertion '!%s' [ %s ]", #__expression, buffer); \ + } \ + fprintf(stderr, "\n%s:%d: %s Assertion '!%s' [ %s ]\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, #__expression, buffer); \ + exit(EXIT_FAILURE); \ + } \ +} while (0) diff --git a/libtest/m4/ax_lib_mysql.m4 b/libtest/m4/ax_lib_mysql.m4 new file mode 100644 index 0000000..53888bd --- /dev/null +++ b/libtest/m4/ax_lib_mysql.m4 @@ -0,0 +1,151 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_lib_mysql.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_LIB_MYSQL([MINIMUM-VERSION]) +# +# DESCRIPTION +# +# This macro provides tests of availability of MySQL client library of +# particular version or newer. +# +# AX_LIB_MYSQL macro takes only one argument which is optional. If there +# is no required version passed, then macro does not run version test. +# +# The --with-mysql option takes one of three possible values: +# +# no - do not check for MySQL client library +# +# yes - do check for MySQL library in standard locations (mysql_config +# should be in the PATH) +# +# path - complete path to mysql_config utility, use this option if +# mysql_config can't be found in the PATH +# +# This macro calls: +# +# AC_SUBST(MYSQL_INCLUDE) +# AC_SUBST(MYSQL_CFLAGS) +# AC_SUBST(MYSQL_LDFLAGS) +# AC_SUBST(MYSQL_VERSION) +# +# And sets: +# +# HAVE_MYSQL +# +# LICENSE +# +# Copyright (c) 2008 Mateusz Loskot +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 13 + +AC_DEFUN([AX_LIB_MYSQL], +[ + AC_ARG_WITH([mysql], + AS_HELP_STRING([--with-mysql=@<:@ARG@:>@], + [use MySQL client library @<:@default=yes@:>@, optionally specify path to mysql_config] + ), + [ + if test "$withval" = "no"; then + want_mysql="no" + elif test "$withval" = "yes"; then + want_mysql="yes" + else + want_mysql="yes" + MYSQL_CONFIG="$withval" + fi + ], + [want_mysql="yes"] + ) + AC_ARG_VAR([MYSQL_CONFIG], [Full path to mysql_config program]) + + MYSQL_INCLUDE="" + MYSQL_CFLAGS="" + MYSQL_LDFLAGS="" + MYSQL_VERSION="" + + dnl + dnl Check MySQL libraries + dnl + + if test "$want_mysql" = "yes"; then + + if test -z "$MYSQL_CONFIG" ; then + AC_PATH_PROGS([MYSQL_CONFIG], [mysql_config mysql_config5], [no]) + fi + + if test "$MYSQL_CONFIG" != "no"; then + MYSQL_INCLUDE="`$MYSQL_CONFIG --include`" + MYSQL_CFLAGS="`$MYSQL_CONFIG --cflags`" + MYSQL_LDFLAGS="`$MYSQL_CONFIG --libs`" + + MYSQL_VERSION=`$MYSQL_CONFIG --version` + + found_mysql="yes" + else + found_mysql="no" + fi + fi + + dnl + dnl Check if required version of MySQL is available + dnl + + + mysql_version_req=ifelse([$1], [], [], [$1]) + + if test "$found_mysql" = "yes" -a -n "$mysql_version_req"; then + + AC_MSG_CHECKING([if MySQL version is >= $mysql_version_req]) + + dnl Decompose required version string of MySQL + dnl and calculate its number representation + mysql_version_req_major=`expr $mysql_version_req : '\([[0-9]]*\)'` + mysql_version_req_minor=`expr $mysql_version_req : '[[0-9]]*\.\([[0-9]]*\)'` + mysql_version_req_micro=`expr $mysql_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` + if test "x$mysql_version_req_micro" = "x"; then + mysql_version_req_micro="0" + fi + + mysql_version_req_number=`expr $mysql_version_req_major \* 1000000 \ + \+ $mysql_version_req_minor \* 1000 \ + \+ $mysql_version_req_micro` + + dnl Decompose version string of installed MySQL + dnl and calculate its number representation + mysql_version_major=`expr $MYSQL_VERSION : '\([[0-9]]*\)'` + mysql_version_minor=`expr $MYSQL_VERSION : '[[0-9]]*\.\([[0-9]]*\)'` + mysql_version_micro=`expr $MYSQL_VERSION : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` + if test "x$mysql_version_micro" = "x"; then + mysql_version_micro="0" + fi + + mysql_version_number=`expr $mysql_version_major \* 1000000 \ + \+ $mysql_version_minor \* 1000 \ + \+ $mysql_version_micro` + + mysql_version_check=`expr $mysql_version_number \>\= $mysql_version_req_number` + if test "$mysql_version_check" = "1"; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + fi + + if test "$found_mysql" = "yes" ; then + AC_DEFINE([HAVE_MYSQL], [1], + [Define to 1 if MySQL libraries are available]) + fi + + AC_SUBST([MYSQL_VERSION]) + AC_SUBST([MYSQL_INCLUDE]) + AC_SUBST([MYSQL_CFLAGS]) + AC_SUBST([MYSQL_LDFLAGS]) +]) diff --git a/libtest/m4/ax_prog_mysqld.m4 b/libtest/m4/ax_prog_mysqld.m4 new file mode 100644 index 0000000..7ecd366 --- /dev/null +++ b/libtest/m4/ax_prog_mysqld.m4 @@ -0,0 +1,58 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_prog_mysqld.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_PROG_MYSQLD +# +# DESCRIPTION +# +# Check for the program 'mysqld' let script continue if exists & works +# pops up error message if not. +# +# Besides checking existence, this macro also set these environment +# variables upon completion: +# +# MYSQLD = which mysqld +# +# LICENSE +# +# Copyright (c) 2008 Gleen Salmon +# +# This program 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 the License, or (at your +# option) any later version. +# +# This program 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 . +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 6 + +AU_ALIAS([AC_PROG_MYSQLD], [AX_PROG_MYSQLD]) +AC_DEFUN([AX_PROG_MYSQLD],[ +AC_REQUIRE([AC_EXEEXT])dnl +AC_PATH_PROG(MYSQLD, mysqld$EXEEXT, nocommand) +if test "$MYSQLD" = nocommand; then + AC_MSG_WARN([mysqld not found in $PATH]) +fi;dnl +]) diff --git a/libtest/m4/mysql.m4 b/libtest/m4/mysql.m4 new file mode 100644 index 0000000..5775f0d --- /dev/null +++ b/libtest/m4/mysql.m4 @@ -0,0 +1,24 @@ +m4_include([libtest/m4/ax_lib_mysql.m4]) +m4_include([libtest/m4/ax_prog_mysqld.m4]) + +#serial 1 + + AC_DEFUN([YATL_MYSQL], [ + AC_REQUIRE([AX_PROG_MYSQLD]) + + AX_LIB_MYSQL([5.0]) + AM_CONDITIONAL(HAVE_LIBMYSQL, test "x${found_mysql}" = "xyes") + AS_IF([test "x${found_mysql}" = "xyes"],[ + AC_DEFINE([HAVE_LIBMYSQL_BUILD], [1], [Define to 1 if MySQL libraries are available]) + ],[ + AC_DEFINE([HAVE_LIBMYSQL_BUILD], [0], [Define to 1 if MySQL libraries are available]) + ]) + + AS_IF([test -f "$ac_cv_path_MYSQLD"],[ + AC_DEFINE([HAVE_MYSQLD_BUILD], [1], [Define to 1 if MySQLD binary is available]) + AC_DEFINE_UNQUOTED([MYSQLD_BINARY], "$ac_cv_path_MYSQLD", [Name of the mysqld binary used in make test]) + ],[ + AC_DEFINE([HAVE_MYSQLD_BUILD], [0], [Define to 1 if MySQLD binary is available]) + AC_DEFINE([MYSQLD_BINARY], [0], [Name of the mysqld binary used in make test]) + ]) + ]) diff --git a/libtest/main.cc b/libtest/main.cc new file mode 100644 index 0000000..3084ca4 --- /dev/null +++ b/libtest/main.cc @@ -0,0 +1,396 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012-2013 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" +#include + +#include +#include +#include +#include +#include +#include +#ifdef HAVE_STRINGS_H +# include +#endif +#include +#include +#include +#include +#include +#include +#include + +#include + +#ifndef __INTEL_COMPILER +#pragma GCC diagnostic ignored "-Wold-style-cast" +#endif + +using namespace libtest; + +static void stats_print(libtest::Framework *frame) +{ + if (frame->failed() == 0 and frame->success() == 0) + { + return; + } + + Outn(); + Out << "Collections\t\t\t\t\t" << frame->total(); + Out << "\tFailed\t\t\t\t\t" << frame->failed(); + Out << "\tSkipped\t\t\t\t\t" << frame->skipped(); + Out << "\tSucceeded\t\t\t\t" << frame->success(); + Outn(); + Out << "Tests\t\t\t\t\t" << frame->sum_total(); + Out << "\tFailed\t\t\t\t" << frame->sum_failed(); + Out << "\tSkipped\t\t\t\t" << frame->sum_skipped(); + Out << "\tSucceeded\t\t\t" << frame->sum_success(); +} + +#include +#include + +int main(int argc, char *argv[]) +{ + bool opt_massive= false; + unsigned long int opt_repeat= 1; // Run all tests once + bool opt_quiet= false; + std::string collection_to_run; + std::string wildcard; + std::string binary_name; + + const char *just_filename= rindex(argv[0], '/'); + if (just_filename) + { + just_filename++; + } + else + { + just_filename= argv[0]; + } + + if (just_filename[0] == 'l' and just_filename[1] == 't' and just_filename[2] == '-') + { + just_filename+= 3; + } + binary_name.append(just_filename); + + /* + Valgrind does not currently work reliably, or sometimes at all, on OSX + - Fri Jun 15 11:24:07 EDT 2012 + */ +#if defined(__APPLE__) && __APPLE__ + if (valgrind_is_caller()) + { + return EXIT_SKIP; + } +#endif + + // Options parsing + { + enum long_option_t { + OPT_LIBYATL_VERSION, + OPT_LIBYATL_MATCH_COLLECTION, + OPT_LIBYATL_MASSIVE, + OPT_LIBYATL_QUIET, + OPT_LIBYATL_MATCH_WILDCARD, + OPT_LIBYATL_REPEAT + }; + + static struct option long_options[]= + { + { "version", no_argument, NULL, OPT_LIBYATL_VERSION }, + { "quiet", no_argument, NULL, OPT_LIBYATL_QUIET }, + { "repeat", required_argument, NULL, OPT_LIBYATL_REPEAT }, + { "collection", required_argument, NULL, OPT_LIBYATL_MATCH_COLLECTION }, + { "wildcard", required_argument, NULL, OPT_LIBYATL_MATCH_WILDCARD }, + { "massive", no_argument, NULL, OPT_LIBYATL_MASSIVE }, + { 0, 0, 0, 0 } + }; + + int option_index= 0; + while (1) + { + int option_rv= getopt_long(argc, argv, "", long_options, &option_index); + if (option_rv == -1) + { + break; + } + + switch (option_rv) + { + case OPT_LIBYATL_VERSION: + break; + + case OPT_LIBYATL_QUIET: + opt_quiet= true; + break; + + case OPT_LIBYATL_REPEAT: + errno= 0; + opt_repeat= strtoul(optarg, (char **) NULL, 10); + if (errno != 0) + { + Error << "unknown value passed to --repeat: `" << optarg << "`"; + exit(EXIT_FAILURE); + } + break; + + case OPT_LIBYATL_MATCH_COLLECTION: + collection_to_run= optarg; + break; + + case OPT_LIBYATL_MATCH_WILDCARD: + wildcard= optarg; + break; + + case OPT_LIBYATL_MASSIVE: + opt_massive= true; + break; + + case '?': + /* getopt_long already printed an error message. */ + Error << "unknown option to getopt_long()"; + exit(EXIT_FAILURE); + + default: + break; + } + } + } + + srandom((unsigned int)time(NULL)); + + errno= 0; + if (bool(getenv("YATL_REPEAT"))) + { + errno= 0; + opt_repeat= strtoul(getenv("YATL_REPEAT"), (char **) NULL, 10); + if (errno != 0) + { + Error << "ENV YATL_REPEAT passed an invalid value: `" << getenv("YATL_REPEAT") << "`"; + exit(EXIT_FAILURE); + } + } + + if ((bool(getenv("YATL_QUIET")) and (strcmp(getenv("YATL_QUIET"), "0") == 0)) or opt_quiet) + { + opt_quiet= true; + } + else if (getenv("JENKINS_URL")) + { + if (bool(getenv("YATL_QUIET")) and (strcmp(getenv("YATL_QUIET"), "1") == 0)) + { } + else + { + opt_quiet= true; + } + } + + if ((bool(getenv("YATL_RUN_MASSIVE_TESTS"))) or opt_massive) + { + opt_massive= true; + } + + if (opt_quiet) + { + close(STDOUT_FILENO); + } + + if (opt_massive) + { + is_massive(opt_massive); + } + + libtest::vchar_t tmp_directory; + tmp_directory.resize(1024); + if (getenv("LIBTEST_TMP")) + { + snprintf(&tmp_directory[0], tmp_directory.size(), "%s", getenv("LIBTEST_TMP")); + } + else + { + snprintf(&tmp_directory[0], tmp_directory.size(), "%s", LIBTEST_TEMP); + } + + if (chdir(&tmp_directory[0]) == -1) + { + libtest::vchar_t getcwd_buffer; + getcwd_buffer.resize(1024); + char *dir= getcwd(&getcwd_buffer[0], getcwd_buffer.size()); + + Error << "Unable to chdir() from " << dir << " to " << &tmp_directory[0] << " errno:" << strerror(errno); + return EXIT_FAILURE; + } + + if (libtest::libtool() == NULL) + { + Error << "Failed to locate libtool"; + return EXIT_FAILURE; + } + + if (getenv("YATL_COLLECTION_TO_RUN")) + { + if (strlen(getenv("YATL_COLLECTION_TO_RUN"))) + { + collection_to_run= getenv("YATL_COLLECTION_TO_RUN"); + } + } + + if (collection_to_run.compare("none") == 0) + { + return EXIT_SUCCESS; + } + + if (collection_to_run.empty() == false) + { + Out << "Only testing " << collection_to_run; + } + + int exit_code; + + try + { + do + { + exit_code= EXIT_SUCCESS; + fatal_assert(sigignore(SIGPIPE) == 0); + + libtest::SignalThread signal; + if (signal.setup() == false) + { + Error << "Failed to setup signals"; + return EXIT_FAILURE; + } + + std::auto_ptr frame(new libtest::Framework(signal, binary_name, collection_to_run, wildcard)); + + // Run create(), bail on error. + { + switch (frame->create()) + { + case TEST_SUCCESS: + break; + + case TEST_SKIPPED: + SKIP("SKIP was returned from framework create()"); + break; + + case TEST_FAILURE: + std::cerr << "Could not call frame->create()" << std::endl; + return EXIT_FAILURE; + } + } + + frame->exec(); + + if (signal.is_shutdown() == false) + { + signal.set_shutdown(SHUTDOWN_GRACEFUL); + } + + shutdown_t status= signal.get_shutdown(); + if (status == SHUTDOWN_FORCED) + { + Out << "Tests were aborted."; + exit_code= EXIT_FAILURE; + } + else if (frame->failed()) + { + Out << "Some test failed."; + exit_code= EXIT_FAILURE; + } + else if (frame->skipped() and frame->failed() and frame->success()) + { + Out << "Some tests were skipped."; + } + else if (frame->success() and (frame->failed() == 0)) + { + Out; + Out << "All tests completed successfully."; + } + + stats_print(frame.get()); + + std::ofstream xml_file; + std::string file_name; + file_name.append(&tmp_directory[0]); + file_name.append(frame->name()); + file_name.append(".xml"); + xml_file.open(file_name.c_str(), std::ios::trunc); + libtest::Formatter::xml(*frame, xml_file); + + Outn(); // Generate a blank to break up the messages if make check/test has been run + } while (exit_code == EXIT_SUCCESS and --opt_repeat); + } + catch (const libtest::__skipped& e) + { + return EXIT_SKIP; + } + catch (const libtest::__failure& e) + { + libtest::stream::make_cout(e.file(), e.line(), e.func()) << e.what(); + exit_code= EXIT_FAILURE; + } + catch (const libtest::fatal& e) + { + std::cerr << "FATAL:" << e.what() << std::endl; + exit_code= EXIT_FAILURE; + } + catch (const libtest::disconnected& e) + { + std::cerr << "Unhandled disconnection occurred:" << e.what() << std::endl; + exit_code= EXIT_FAILURE; + } + catch (const std::exception& e) + { + std::cerr << "std::exception:" << e.what() << std::endl; + exit_code= EXIT_FAILURE; + } + catch (char const* s) + { + std::cerr << "Exception:" << s << std::endl; + exit_code= EXIT_FAILURE; + } + catch (...) + { + std::cerr << "Unknown exception halted execution." << std::endl; + exit_code= EXIT_FAILURE; + } + + return exit_code; +} diff --git a/libtest/memcached.cc b/libtest/memcached.cc new file mode 100644 index 0000000..15fcbff --- /dev/null +++ b/libtest/memcached.cc @@ -0,0 +1,239 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" + +#include "libtest/common.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#ifndef __INTEL_COMPILER +#pragma GCC diagnostic ignored "-Wold-style-cast" +#endif + +namespace libtest { + +class Memcached : public libtest::Server +{ + std::string _username; + std::string _password; + +public: + Memcached(const std::string& host_arg, + const in_port_t port_arg, + const bool is_socket_arg, + const std::string& username_arg, + const std::string& password_arg) : + libtest::Server(host_arg, port_arg, + memcached_binary(), false, is_socket_arg), + _username(username_arg), + _password(password_arg) + { } + + Memcached(const std::string& host_arg, const in_port_t port_arg, const bool is_socket_arg) : + libtest::Server(host_arg, port_arg, + memcached_binary(), false, is_socket_arg) + { + set_pid_file(); + } + + virtual const char *sasl() const + { + return NULL; + } + + const std::string& password() const + { + return _password; + } + + const std::string& username() const + { + return _username; + } + + bool wait_for_pidfile() const + { + Wait wait(pid(), 4); + + return wait.successful(); + } + + bool ping() + { + if (out_of_ban_killed()) + { + return false; + } + + if (is_socket()) + { + return _app.check(); + } + + SimpleClient client(_hostname, _port); + + std::string response; + return client.send_message("version", response); + } + + const char *name() + { + return "memcached"; + }; + + const char *executable() + { + return memcached_binary(); + } + + bool is_libtool() + { + return false; + } + + virtual void pid_file_option(Application& app, const std::string& arg) + { + if (arg.empty() == false) + { + app.add_option("-P", arg); + } + } + + const char *socket_file_option() const + { + return "-s "; + } + + virtual void port_option(Application& app, in_port_t arg) + { + char buffer[30]; + snprintf(buffer, sizeof(buffer), "%d", int(arg)); + app.add_option("-p", buffer); + } + + bool has_port_option() const + { + return true; + } + + bool has_socket_file_option() const + { + return has_socket(); + } + + void socket_file_option(Application& app, const std::string& socket_arg) + { + if (socket_arg.empty() == false) + { + app.add_option("-s", socket_arg); + } + } + + bool broken_socket_cleanup() + { + return true; + } + + // Memcached's pidfile is broken + bool broken_pid_file() + { + return true; + } + + bool build(); +}; + + +#include + +bool Memcached::build() +{ + if (getuid() == 0 or geteuid() == 0) + { + add_option("-u", "root"); + } + + add_option("-l", "localhost"); +#ifdef __APPLE__ +#else + add_option("-m", "128"); + add_option("-M"); +#endif + + if (sasl()) + { + add_option(sasl()); + } + + return true; +} + +libtest::Server *build_memcached(const std::string& hostname, const in_port_t try_port) +{ + if (has_memcached()) + { + return new Memcached(hostname, try_port, false); + } + + return NULL; +} + +libtest::Server *build_memcached_socket(const std::string& socket_file, const in_port_t try_port) +{ + if (has_memcached()) + { + return new Memcached(socket_file, try_port, true); + } + + return NULL; +} + +} // namespace libtest diff --git a/libtest/memcached.h b/libtest/memcached.h new file mode 100644 index 0000000..195ce7a --- /dev/null +++ b/libtest/memcached.h @@ -0,0 +1,46 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +namespace libtest { + +libtest::Server *build_memcached(const std::string& hostname, const in_port_t try_port); + +libtest::Server *build_memcached_socket(const std::string& socket_file, const in_port_t try_port); + +} + diff --git a/libtest/memcached.hpp b/libtest/memcached.hpp new file mode 100644 index 0000000..5d010fa --- /dev/null +++ b/libtest/memcached.hpp @@ -0,0 +1,100 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#if defined(HAVE_LIBMEMCACHED) && HAVE_LIBMEMCACHED +inline bool operator== (const memcached_st& memc, const memcached_return_t rc) +{ + if (memcached_last_error(const_cast(&memc)) == rc) + { + return true; + } + + return false; +} + +inline bool operator!= (const memcached_st& memc, memcached_return_t rc) +{ + if (memcached_last_error(const_cast(&memc)) != rc) + { + return true; + } + + return false; +} + +inline bool operator== (memcached_st* const memc, memcached_return_t rc) +{ + if (memcached_last_error(memc) == rc) + { + return true; + } + + return false; +} + +inline bool operator!= (memcached_st* const memc, memcached_return_t rc) +{ + if (memcached_last_error(memc) != rc) + { + return true; + } + + return false; +} + +inline bool operator!= (memcached_return_t rc, const memcached_st& memc) +{ + if (memcached_last_error(const_cast(&memc)) != rc) + { + return true; + } + + return false; +} + +inline bool operator!= (memcached_return_t rc, memcached_st* const memc) +{ + if (memcached_last_error(memc) != rc) + { + return true; + } + + return false; +} +#endif + diff --git a/libtest/poll_error.hpp b/libtest/poll_error.hpp new file mode 100644 index 0000000..b75066f --- /dev/null +++ b/libtest/poll_error.hpp @@ -0,0 +1,100 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* + Structures for generic tests. +*/ + +#include +#include + +void print_poll(pollfd& fds) +{ + if (fds.revents & POLLERR) + { + fprintf(stderr, "\tPOLLERR\n"); + } + + if (fds.revents & POLLHUP) + { + fprintf(stderr, "\tPOLLHUP\n"); + } + + if (fds.revents & POLLIN) + { + fprintf(stderr, "\tPOLLIN\n"); + } + + if (fds.revents & POLLIN) + { + fprintf(stderr, "\tPOLLIN\n"); + } + + if (fds.revents & POLLNVAL) + { + fprintf(stderr, "\tPOLLNVAL\n"); + } + + if (fds.revents & POLLOUT) + { + fprintf(stderr, "\tPOLLOUT\n"); + } + + if (fds.revents & POLLPRI) + { + fprintf(stderr, "\tPOLLPRI\n"); + } + + if (fds.revents & POLLRDBAND) + { + fprintf(stderr, "\tPOLLPRI\n"); + } + + if (fds.revents & POLLRDNORM) + { + fprintf(stderr, "\tPOLLRDNORM\n"); + } + + if (fds.revents & POLLWRBAND) + { + fprintf(stderr, "\tPOLLWRBAND\n"); + } + + if (fds.revents & POLLWRNORM) + { + fprintf(stderr, "\tPOLLWRNORM\n"); + } +} diff --git a/libtest/port.cc b/libtest/port.cc new file mode 100644 index 0000000..d8e8c12 --- /dev/null +++ b/libtest/port.cc @@ -0,0 +1,231 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include + +#ifndef SOCK_CLOEXEC +# define SOCK_CLOEXEC 0 +#endif + +#ifndef SOCK_NONBLOCK +# define SOCK_NONBLOCK 0 +#endif + +#ifndef FD_CLOEXEC +# define FD_CLOEXEC 0 +#endif + +#ifndef __INTEL_COMPILER +#pragma GCC diagnostic ignored "-Wold-style-cast" +#endif + +using namespace libtest; + +struct socket_st { + typedef std::vector< std::pair< int, in_port_t> > socket_port_t; + socket_port_t _pair; + in_port_t last_port; + + socket_st(): + last_port(0) + { } + + void release(in_port_t _arg) + { + for (socket_port_t::iterator iter= _pair.begin(); + iter != _pair.end(); + ++iter) + { + if ((*iter).second == _arg) + { + shutdown((*iter).first, SHUT_RDWR); + close((*iter).first); + } + } + } + + ~socket_st() + { + for (socket_port_t::iterator iter= _pair.begin(); + iter != _pair.end(); + ++iter) + { + shutdown((*iter).first, SHUT_RDWR); + close((*iter).first); + } + } +}; + +static socket_st all_socket_fd; + +static in_port_t global_port= 0; + +namespace libtest { + +in_port_t default_port() +{ + if (global_port == 0) + { + global_port= get_free_port(); + } + + return global_port; +} + +void release_port(in_port_t arg) +{ + all_socket_fd.release(arg); +} + +in_port_t get_free_port() +{ + const in_port_t default_port= in_port_t(-1); + + int retries= 1024; + + in_port_t ret_port; + while (--retries) + { + ret_port= default_port; + int sd; + if ((sd= socket(AF_INET, SOCK_STREAM, 0)) != SOCKET_ERROR) + { + int optval= 1; + if (setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval)) != SOCKET_ERROR) + { + struct sockaddr_in sin; + sin.sin_port= 0; + sin.sin_addr.s_addr= 0; + sin.sin_addr.s_addr= INADDR_ANY; + sin.sin_family= AF_INET; + + int bind_ret; + do + { + if ((bind_ret= bind(sd, (struct sockaddr *)&sin, sizeof(struct sockaddr_in) )) != SOCKET_ERROR) + { + socklen_t addrlen= sizeof(sin); + + if (getsockname(sd, (struct sockaddr *)&sin, &addrlen) != -1) + { + ret_port= sin.sin_port; + } + } + else + { + if (errno != EADDRINUSE) + { + Error << strerror(errno); + } + } + + if (errno == EADDRINUSE) + { + libtest::dream(2, 0); + } + } while (bind_ret == -1 and errno == EADDRINUSE); + + all_socket_fd._pair.push_back(std::make_pair(sd, ret_port)); + } + else + { + Error << strerror(errno); + } + } + else + { + Error << strerror(errno); + } + + if (ret_port == default_port) + { + Error << "no ret_port set:" << strerror(errno); + } + else if (ret_port > 1024 and ret_port != all_socket_fd.last_port) + { + break; + } + } + + // We handle the case where if we max out retries, we still abort. + if (retries == 0) + { + FATAL("No port could be found, exhausted retry"); + } + + if (ret_port == 0) + { + FATAL("No port could be found"); + } + + if (ret_port == default_port) + { + FATAL("No port could be found"); + } + + if (ret_port <= 1024) + { + FATAL("No port could be found, though some where available below or at 1024"); + } + + all_socket_fd.last_port= ret_port; + release_port(ret_port); + + return ret_port; +} + +} // namespace libtest diff --git a/libtest/port.h b/libtest/port.h new file mode 100644 index 0000000..55cef53 --- /dev/null +++ b/libtest/port.h @@ -0,0 +1,56 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* + Structures for generic tests. +*/ + +#pragma once + +#define LIBTEST_FAIL_PORT 23 + +namespace libtest { + +LIBTEST_API +in_port_t default_port(); + +LIBTEST_API +in_port_t get_free_port(); + +LIBTEST_API +void release_port(in_port_t arg); + +} // namespace libtest diff --git a/libtest/result.cc b/libtest/result.cc new file mode 100644 index 0000000..3e4523d --- /dev/null +++ b/libtest/result.cc @@ -0,0 +1,82 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012-2013 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" +#include +#include + +namespace libtest { + +__test_result::__test_result(const char *file_arg, int line_arg, const char *func_arg): + libtest::exception(file_arg, line_arg, func_arg) + { + } + +__success::__success(const char *file_arg, int line_arg, const char *func_arg): + __test_result(file_arg, line_arg, func_arg) +{ +} + +__skipped::__skipped(const char *file_arg, int line_arg, const char *func_arg, ...): + __test_result(file_arg, line_arg, func_arg) +{ + va_list args; + va_start(args, func_arg); + init(args); + va_end(args); +} + +__skipped::__skipped(const __skipped& other) : + __test_result(other) +{ +} + +__failure::__failure(const char *file_arg, int line_arg, const char *func_arg, ...) : + __test_result(file_arg, line_arg, func_arg) +{ + va_list args; + va_start(args, func_arg); + init(args); + va_end(args); +} + +__failure::__failure(const __failure& other) : + __test_result(other) +{ +} + + +} // namespace libtest diff --git a/libtest/result.hpp b/libtest/result.hpp new file mode 100644 index 0000000..79acbb4 --- /dev/null +++ b/libtest/result.hpp @@ -0,0 +1,56 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include +#include +#include +#include + +#define _SUCCESS throw libtest::__success(LIBYATL_DEFAULT_PARAM) + +#define SKIP(...) \ +do \ +{ \ + throw libtest::__skipped(LIBYATL_DEFAULT_PARAM, __VA_ARGS__); \ +} while (0) + +#define FAIL(...) \ +do \ +{ \ + throw libtest::__failure(LIBYATL_DEFAULT_PARAM, __VA_ARGS__); \ +} while (0) diff --git a/libtest/result/base.hpp b/libtest/result/base.hpp new file mode 100644 index 0000000..5f093f8 --- /dev/null +++ b/libtest/result/base.hpp @@ -0,0 +1,54 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012-2013 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include "libtest/exception.hpp" +#include "libtest/error.h" + +namespace libtest { + +class __test_result : public libtest::exception +{ +public: + __test_result(const char *file, int line, const char *func); + + virtual test_return_t return_code() const= 0; + +private: +}; + +} // namespace libtest diff --git a/libtest/result/fail.hpp b/libtest/result/fail.hpp new file mode 100644 index 0000000..3aec9c1 --- /dev/null +++ b/libtest/result/fail.hpp @@ -0,0 +1,56 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +namespace libtest { + +class __failure : public __test_result +{ +public: + __failure(const char *file, int line, const char *func, ...); + + __failure(const __failure&); + + test_return_t return_code() const + { + return TEST_FAILURE; + } + +private: +}; + +} // namespace libtest diff --git a/libtest/result/skip.hpp b/libtest/result/skip.hpp new file mode 100644 index 0000000..7409d71 --- /dev/null +++ b/libtest/result/skip.hpp @@ -0,0 +1,54 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +namespace libtest { + +class __skipped : public __test_result +{ +public: + __skipped(const char *file, int line, const char *func, ...); + + __skipped(const __skipped&); + + test_return_t return_code() const + { + return TEST_SKIPPED; + } +}; + +} // namespace libtest diff --git a/libtest/result/success.hpp b/libtest/result/success.hpp new file mode 100644 index 0000000..a34e677 --- /dev/null +++ b/libtest/result/success.hpp @@ -0,0 +1,59 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +namespace libtest { + +class __success : public __test_result +{ +public: + __success(const char *file, int line, const char *func); + + const char* what() const throw() + { + return "SUCCESS"; + } + + test_return_t return_code() const + { + return TEST_SUCCESS; + } + +private: +}; + +} // namespace libtest diff --git a/libtest/run.gdb b/libtest/run.gdb new file mode 100644 index 0000000..c35ab76 --- /dev/null +++ b/libtest/run.gdb @@ -0,0 +1,7 @@ +set logging on +set logging overwrite on +set environment LIBTEST_IN_GDB=1 +#set ASAN_OPTIONS=abort_on_error=1 +handle SIGVTALRM stop +run +thread apply all bt diff --git a/libtest/runner.cc b/libtest/runner.cc new file mode 100644 index 0000000..2f94ad3 --- /dev/null +++ b/libtest/runner.cc @@ -0,0 +1,203 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" +#include + +namespace libtest { + +Runner::Runner() : + _servers(NULL) +{ +} + +test_return_t Runner::main(test_callback_fn* func, void *object) +{ + test_return_t ret; + try { + ret= run(func, object); + } + catch (const libtest::__skipped& e) + { + ret= TEST_SKIPPED; + } + catch (const libtest::__failure& e) + { + libtest::stream::make_cerr(e.file(), e.line(), e.func()) << e.what(); + ret= TEST_FAILURE; + } + catch (const libtest::__success&) + { + ret= TEST_SUCCESS; + } + catch (const libtest::fatal&) + { + throw; + } + catch (const std::exception& e) + { + libtest::stream::make_cerr(LIBYATL_DEFAULT_PARAM) << e.what(); + throw; + } + catch (...) + { + libtest::stream::make_cerr(LIBYATL_DEFAULT_PARAM) << "Unknown exception thrown"; + throw; + } + + return ret; +} + +test_return_t Runner::setup(test_callback_fn* func, void *object) +{ + test_return_t ret; + try { + ret= pre(func, object); + } + catch (const libtest::__skipped& e) + { + ret= TEST_SKIPPED; + } + catch (const libtest::__failure& e) + { + libtest::stream::make_cout(e.file(), e.line(), e.func()) << e.what(); + ret= TEST_FAILURE; + } + catch (const libtest::__success&) + { + ret= TEST_SUCCESS; + } + catch (const libtest::fatal& e) + { + throw; + } + catch (const std::exception& e) + { + libtest::stream::make_cerr(LIBYATL_DEFAULT_PARAM) << e.what(); + throw; + } + catch (...) + { + libtest::stream::make_cerr(LIBYATL_DEFAULT_PARAM) << "Unknown exception thrown"; + throw; + } + + return ret; +} + +test_return_t Runner::teardown(test_callback_fn* func, void *object) +{ + test_return_t ret; + try { + ret= post(func, object); + } + catch (const libtest::__skipped& e) + { + ret= TEST_SKIPPED; + } + catch (const libtest::__failure& e) + { + libtest::stream::make_cerr(LIBYATL_DEFAULT_PARAM) << e.what(); + ret= TEST_FAILURE; + } + catch (const libtest::__success&) + { + ret= TEST_SUCCESS; + } + catch (const libtest::fatal& e) + { + throw; + } + catch (const std::exception& e) + { + libtest::stream::make_cerr(LIBYATL_DEFAULT_PARAM) << e.what(); + throw; + } + catch (...) + { + libtest::stream::make_cerr(LIBYATL_DEFAULT_PARAM) << "Unknown exception thrown"; + throw; + } + + return ret; +} + +test_return_t Runner::flush(void*) +{ + return TEST_SUCCESS; +} + +test_return_t Runner::run(test_callback_fn* func, void *object) +{ + if (func) + { + return func(object); + } + + return TEST_SUCCESS; +} + +test_return_t Runner::pre(test_callback_fn* func, void *object) +{ + if (func) + { + return func(object); + } + + return TEST_SUCCESS; +} + +test_return_t Runner::post(test_callback_fn* func, void *object) +{ + if (func) + { + return func(object); + } + + return TEST_SUCCESS; +} + +void Runner::set_servers(libtest::server_startup_st& arg) +{ + _servers= &arg; +} + +bool Runner::check() +{ + return _servers ? _servers->check() : true; +} + +} // namespace libtest diff --git a/libtest/runner.h b/libtest/runner.h new file mode 100644 index 0000000..627a0a8 --- /dev/null +++ b/libtest/runner.h @@ -0,0 +1,73 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + + +namespace libtest { + +/** + Structure which houses the actual callers for the test cases contained in + the collections. +*/ +class Runner { +public: + test_return_t main(test_callback_fn* func, void *object); + test_return_t setup(test_callback_fn* func, void *object); + test_return_t teardown(test_callback_fn* func, void *object); + + Runner(); + + void set_servers(libtest::server_startup_st& arg); + + bool check(); + + virtual ~Runner() { } + + virtual test_return_t flush(void*); + virtual test_return_t run(test_callback_fn* func, void *object); + virtual test_return_t pre(test_callback_fn* func, void *object); + virtual test_return_t post(test_callback_fn* func, void *object); + +private: + libtest::server_startup_st* _servers; + +private: + Runner( const Runner& ); + const Runner& operator=( const Runner& ); +}; + +} // namespace Runner diff --git a/libtest/server.cc b/libtest/server.cc new file mode 100644 index 0000000..d024d05 --- /dev/null +++ b/libtest/server.cc @@ -0,0 +1,540 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +// trim from end +static inline std::string &rtrim(std::string &s) +{ + s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun(std::isspace))).base(), s.end()); + return s; +} + +#include +#include +#include + +namespace libtest { + +std::ostream& operator<<(std::ostream& output, const Server &arg) +{ + if (arg.is_socket()) + { + output << arg.hostname(); + } + else + { + output << arg.hostname() << ":" << arg.port(); + } + + if (arg.has_pid()) + { + output << " Pid:" << arg.pid(); + } + + if (arg.has_socket()) + { + output << " Socket:" << arg.socket(); + } + + if (arg.running().empty() == false) + { + output << " Exec:" << arg.running(); + } + + return output; // for multiple << operators +} + +#ifdef __GLIBC__ +namespace { + +class Buffer +{ +public: + Buffer(char *b) : b_(b) {} + ~Buffer() { if (b_) free(b_); } + char* buf() { return b_; } +private: + char *b_; +}; + +} +#endif // __GLIBC__ + +#define MAGIC_MEMORY 123570 + +Server::Server(const std::string& host_arg, const in_port_t port_arg, + const std::string& executable, const bool _is_libtool, + bool is_socket_arg) : + _magic(MAGIC_MEMORY), + _is_socket(is_socket_arg), + _port(port_arg), + _hostname(host_arg), + _app(executable, _is_libtool), + out_of_ban_killed_(false), + _timeout(40) +{ +} + +Server::~Server() +{ + kill(); +} + +bool Server::check() +{ + _app.slurp(); + _app.check(); + return true; +} + +bool Server::validate() +{ + return _magic == MAGIC_MEMORY; +} + +// If the server exists, kill it +bool Server::cycle() +{ + uint32_t limit= 3; + + // Try to ping, and kill the server #limit number of times + while (--limit and + is_pid_valid(_app.pid())) + { + if (kill()) + { + Log << "Killed existing server," << *this; + dream(0, 50000); + continue; + } + } + + // For whatever reason we could not kill it, and we reached limit + if (limit == 0) + { + Error << "Reached limit, could not kill server"; + return false; + } + + return true; +} + +bool Server::wait_for_pidfile() const +{ + Wait wait(pid_file(), 4); + + return wait.successful(); +} + +bool Server::init(const char *argv[]) +{ + if (argv) + { + for (const char **ptr= argv; *ptr ; ++ptr) + { + if (ptr) + { + add_option(*ptr); + } + } + } + + return build(); +} + +bool Server::has_pid() const +{ + return (_app.pid() > 1); +} + + +bool Server::start() +{ + // If we find that we already have a pid then kill it. + if (has_pid() == true) + { +#if 0 + fatal_message("has_pid() failed, programer error"); +#endif + } + + if (getenv("YATL_GDB_SERVER")) + { + _app.use_gdb(true); + } + + if (port() == LIBTEST_FAIL_PORT) + { + throw libtest::disconnected(LIBYATL_DEFAULT_PARAM, + hostname(), port(), "Called failure"); + } + + if (getenv("YATL_PTRCHECK_SERVER")) + { + _app.use_ptrcheck(true); + } + else if (getenv("YATL_VALGRIND_SERVER")) + { + _app.use_valgrind(true); + } + + out_of_ban_killed(false); + if (args(_app) == false) + { + throw libtest::disconnected(LIBYATL_DEFAULT_PARAM, + hostname(), port(), "Could not build command()"); + } + + libtest::release_port(_port); + + Application::error_t ret; + if (Application::SUCCESS != (ret= _app.run())) + { + throw libtest::disconnected(LIBYATL_DEFAULT_PARAM, + hostname(), port(), "Application::run() %s", libtest::Application::toString(ret)); + return false; + } + _running= _app.print(); + + if (valgrind_is_caller()) + { + dream(5, 50000); + } + + size_t repeat= 5; + _app.slurp(); + while (--repeat) + { + if (pid_file().empty() == false) + { + Wait wait(pid_file(), 8); + + if (wait.successful() == false) + { + if (_app.check()) + { + _app.slurp(); + continue; + } + +#ifdef __GLIBC__ + Buffer buf( get_current_dir_name()); + char *getcwd_buf= buf.buf(); +#else + libtest::vchar_t buf; + buf.resize(PATH_MAX); + char *getcwd_buf= getcwd(&buf[0], buf.size()); +#endif // __GLIBC__ + throw libtest::disconnected(LIBYATL_DEFAULT_PARAM, + hostname(), port(), + "Unable to open pidfile in %s for: %s stderr:%s", + getcwd_buf ? getcwd_buf : "", + _running.c_str(), + _app.stderr_c_str()); + } + } + } + + bool pinged= false; + uint32_t this_wait= 0; + { + uint32_t waited; + uint32_t retry; + + for (waited= 0, retry= 1; ; retry++, waited+= this_wait) + { + if (_app.check() == false) + { + break; + } + + if ((pinged= ping()) == true) + { + break; + } + else if (waited >= _timeout) + { + break; + } + + this_wait= retry * retry / 3 + 1; + libtest::dream(this_wait, 0); + } + } + + if (pinged == false) + { +#if 0 + Error << "Failed to ping(" << _app.pid() << ") wait: " << this_wait << " " << hostname() << ":" << port() << " run:" << _running << " " << error(); +#endif + + // If we happen to have a pid file, lets try to kill it + if ((pid_file().empty() == false) and (access(pid_file().c_str(), R_OK) == 0)) + { + _app.slurp(); + if (kill_file(pid_file()) == false) + { + throw libtest::disconnected(LIBYATL_DEFAULT_PARAM, + hostname(), port(), + "Failed to kill off server, waited: %u after startup occurred, when pinging failed: %.*s stderr:%.*s", + this_wait, + int(_running.size()), _running.c_str(), + int(_app.stderr_result_length()), _app.stderr_c_str()); + } + else + { + throw libtest::disconnected(LIBYATL_DEFAULT_PARAM, + hostname(), port(), + "Failed native ping(), pid: %d was alive: %s waited: %u server started, having pid_file. exec: %.*s stderr:%.*s", + int(_app.pid()), + _app.check() ? "true" : "false", + this_wait, + int(_running.size()), _running.c_str(), + int(_app.stderr_result_length()), _app.stderr_c_str()); + } + } + else + { + throw libtest::disconnected(LIBYATL_DEFAULT_PARAM, + hostname(), port(), + "Failed native ping(), pid: %d is alive: %s waited: %u server started. exec: %.*s stderr:%.*s", + int(_app.pid()), + _app.check() ? "true" : "false", + this_wait, + int(_running.size()), _running.c_str(), + int(_app.stderr_result_length()), _app.stderr_c_str()); + } + _running.clear(); + + return false; + } + + return has_pid(); +} + +void Server::reset_pid() +{ + _running.clear(); + _pid_file.clear(); +} + +pid_t Server::pid() const +{ + return _app.pid(); +} + +void Server::add_option(const std::string& arg) +{ + _options.push_back(std::make_pair(arg, std::string())); +} + +void Server::add_option(const std::string& name_, const std::string& value_) +{ + _options.push_back(std::make_pair(name_, value_)); +} + +bool Server::set_socket_file() +{ + libtest::vchar_t file_buffer; + file_buffer.resize(FILENAME_MAX); + file_buffer[0]= 0; + + if (broken_pid_file()) + { + snprintf(&file_buffer[0], file_buffer.size(), "/tmp/%s.socketXXXXXX", name()); + } + else + { + snprintf(&file_buffer[0], file_buffer.size(), "var/run/%s.socketXXXXXX", name()); + } + + int fd; + if ((fd= mkstemp(&file_buffer[0])) == -1) + { + perror(&file_buffer[0]); + return false; + } + close(fd); + unlink(&file_buffer[0]); + + _socket= &file_buffer[0]; + + return true; +} + +bool Server::set_pid_file() +{ + libtest::vchar_t file_buffer; + file_buffer.resize(FILENAME_MAX); + file_buffer[0]= 0; + + if (broken_pid_file()) + { + snprintf(&file_buffer[0], file_buffer.size(), "/tmp/%s.pidXXXXXX", name()); + } + else + { + snprintf(&file_buffer[0], file_buffer.size(), "var/run/%s.pidXXXXXX", name()); + } + + int fd; + if ((fd= mkstemp(&file_buffer[0])) == -1) + { + throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "mkstemp() failed on %s with %s", &file_buffer[0], strerror(errno)); + } + close(fd); + unlink(&file_buffer[0]); + + _pid_file= &file_buffer[0]; + + return true; +} + +bool Server::set_log_file() +{ + libtest::vchar_t file_buffer; + file_buffer.resize(FILENAME_MAX); + file_buffer[0]= 0; + + snprintf(&file_buffer[0], file_buffer.size(), "var/log/%s.logXXXXXX", name()); + int fd; + if ((fd= mkstemp(&file_buffer[0])) == -1) + { + throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "mkstemp() failed on %s with %s", &file_buffer[0], strerror(errno)); + } + close(fd); + + _log_file= &file_buffer[0]; + + return true; +} + +bool Server::args(Application& app) +{ + + // Set a log file if it was requested (and we can) + if (has_log_file_option()) + { + set_log_file(); + log_file_option(app, _log_file); + } + + if (getenv("LIBTEST_SYSLOG") and has_syslog()) + { + app.add_option("--syslog"); + } + + // Update pid_file + { + if (_pid_file.empty() and set_pid_file() == false) + { + return false; + } + + pid_file_option(app, pid_file()); + } + + if (has_socket_file_option()) + { + if (set_socket_file() == false) + { + return false; + } + + socket_file_option(app, _socket); + } + + if (has_port_option()) + { + port_option(app, _port); + } + + for (Options::const_iterator iter= _options.begin(); iter != _options.end(); ++iter) + { + if ((*iter).first.empty() == false) + { + if ((*iter).second.empty() == false) + { + app.add_option((*iter).first, (*iter).second); + } + else + { + app.add_option((*iter).first); + } + } + } + + return true; +} + +bool Server::kill() +{ + if (check_pid(_app.pid())) // If we kill it, reset + { + _app.murder(); + if (broken_pid_file() and pid_file().empty() == false) + { + unlink(pid_file().c_str()); + } + + if (broken_socket_cleanup() and has_socket() and not socket().empty()) + { + unlink(socket().c_str()); + } + + reset_pid(); + + return true; + } + + return false; +} + +} // namespace libtest diff --git a/libtest/server.h b/libtest/server.h new file mode 100644 index 0000000..bbebe95 --- /dev/null +++ b/libtest/server.h @@ -0,0 +1,297 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace libtest { + +struct Server { +private: + typedef std::vector< std::pair > Options; + +private: + uint64_t _magic; + bool _is_socket; + std::string _socket; + std::string _sasl; + std::string _pid_file; + std::string _log_file; + std::string _base_command; // executable command which include libtool, valgrind, gdb, etc + std::string _running; // Current string being used for system() + +protected: + in_port_t _port; + std::string _hostname; + std::string _extra_args; + +public: + Server(const std::string& hostname, const in_port_t port_arg, + const std::string& executable, const bool _is_libtool, + const bool is_socket_arg= false); + + virtual ~Server(); + + virtual const char *name()= 0; + virtual bool is_libtool()= 0; + + virtual bool has_socket_file_option() const + { + return false; + } + + virtual void socket_file_option(Application& app, const std::string& socket_arg) + { + if (socket_arg.empty() == false) + { + std::string buffer("--socket="); + buffer+= socket_arg; + app.add_option(buffer); + } + } + + virtual bool has_log_file_option() const + { + return false; + } + + virtual void log_file_option(Application& app, const std::string& arg) + { + if (arg.empty() == false) + { + std::string buffer("--log-file="); + buffer+= arg; + app.add_option(buffer); + } + } + + virtual void pid_file_option(Application& app, const std::string& arg) + { + if (arg.empty() == false) + { + std::string buffer("--pid-file="); + buffer+= arg; + app.add_option(buffer); + } + } + + virtual bool has_port_option() const + { + return false; + } + + virtual void port_option(Application& app, in_port_t arg) + { + if (arg > 0) + { + char buffer[1024]; + snprintf(buffer, sizeof(buffer), "--port=%d", int(arg)); + app.add_option(buffer); + } + } + + virtual bool broken_socket_cleanup() + { + return false; + } + + virtual bool broken_pid_file() + { + return false; + } + + const std::string& pid_file() const + { + return _pid_file; + } + + const std::string& base_command() const + { + return _base_command; + } + + const std::string& log_file() const + { + return _log_file; + } + + const std::string& hostname() const + { + return _hostname; + } + + const std::string& socket() const + { + return _socket; + } + + bool has_socket() const + { + return _is_socket; + } + + bool cycle(); + + virtual bool ping()= 0; + + bool init(const char *argv[]); + virtual bool build()= 0; + + void add_option(const std::string&); + void add_option(const std::string&, const std::string&); + + in_port_t port() const + { + return _port; + } + + bool has_port() const + { + return (_port != 0); + } + + virtual bool has_syslog() const + { + return false; + } + + // Reset a server if another process has killed the server + void reset() + { + _pid_file.clear(); + _log_file.clear(); + } + + pid_t pid() const; + + bool has_pid() const; + + virtual bool has_pid_file() const + { + return true; + } + + const std::string& error() + { + return _error; + } + + void error(std::string arg) + { + _error= arg; + } + + void reset_error() + { + _error.clear(); + } + + virtual bool wait_for_pidfile() const; + + bool check_pid(pid_t pid_arg) const + { + return (pid_arg > 1); + } + + bool is_socket() const + { + return _is_socket; + } + + const std::string running() const + { + return _running; + } + + bool check(); + + std::string log_and_pid(); + + bool kill(); + bool start(); + bool command(libtest::Application& app); + + bool validate(); + + void out_of_ban_killed(bool arg) + { + out_of_ban_killed_= arg; + } + + bool out_of_ban_killed() + { + return out_of_ban_killed_; + } + + void timeout(uint32_t timeout_) + { + _timeout= timeout_; + } + +protected: + bool set_pid_file(); + Options _options; + Application _app; + +private: + bool is_helgrind() const; + bool is_valgrind() const; + bool is_debug() const; + bool set_log_file(); + bool set_socket_file(); + void reset_pid(); + bool out_of_ban_killed_; + bool args(Application&); + + std::string _error; + uint32_t _timeout; // This number should be high enough for valgrind startup (which is slow) +}; + +std::ostream& operator<<(std::ostream& output, const libtest::Server &arg); + +} // namespace libtest + + diff --git a/libtest/server_container.cc b/libtest/server_container.cc new file mode 100644 index 0000000..4e73a0e --- /dev/null +++ b/libtest/server_container.cc @@ -0,0 +1,395 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" + +#include "libtest/common.h" + +#include +#include +#include + +#include +#include +#include + +// trim from end +static inline std::string &rtrim(std::string &s) +{ + s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun(std::isspace))).base(), s.end()); + return s; +} + +namespace libtest { + +Server* server_startup_st::last() +{ + return servers.back(); +} + +void server_startup_st::push_server(Server *arg) +{ + servers.push_back(arg); + + std::string server_config_string; + if (arg->has_socket()) + { + server_config_string+= "--socket="; + server_config_string+= '"'; + server_config_string+= arg->socket(); + server_config_string+= '"'; + server_config_string+= " "; + } + else + { + libtest::vchar_t port_str; + port_str.resize(NI_MAXSERV); + snprintf(&port_str[0], port_str.size(), "%u", int(arg->port())); + + server_config_string+= "--server="; + server_config_string+= arg->hostname(); + server_config_string+= ":"; + server_config_string+= &port_str[0]; + server_config_string+= " "; + } + + server_list+= server_config_string; +} + +Server* server_startup_st::pop_server() +{ + Server *tmp= servers.back(); + servers.pop_back(); + return tmp; +} + +// host_to_shutdown => host number to shutdown in array +bool server_startup_st::shutdown(uint32_t host_to_shutdown) +{ + if (servers.size() > host_to_shutdown) + { + Server* tmp= servers[host_to_shutdown]; + + if (tmp and tmp->kill() == false) + { } + else + { + return true; + } + } + + return false; +} + +void server_startup_st::clear() +{ + std::for_each(servers.begin(), servers.end(), DeleteFromVector()); + servers.clear(); +} + +bool server_startup_st::check() const +{ + bool success= true; + for (std::vector::const_iterator iter= servers.begin(); iter != servers.end(); ++iter) + { + if ((*iter)->check() == false) + { + success= false; + } + } + + return success; +} + +bool server_startup_st::shutdown() +{ + bool success= true; + for (std::vector::iterator iter= servers.begin(); iter != servers.end(); ++iter) + { + if ((*iter)->has_pid() and (*iter)->kill() == false) + { + Error << "Unable to kill:" << *(*iter); + success= false; + } + } + + return success; +} + +void server_startup_st::restart() +{ + for (std::vector::iterator iter= servers.begin(); iter != servers.end(); ++iter) + { + (*iter)->start(); + } +} + +#define MAGIC_MEMORY 123575 +server_startup_st::server_startup_st() : + _magic(MAGIC_MEMORY), + _socket(false), + _sasl(false), + udp(0), + _servers_to_run(5) +{ } + +server_startup_st::~server_startup_st() +{ + clear(); +} + +bool server_startup_st::validate() +{ + return _magic == MAGIC_MEMORY; +} + +bool server_startup(server_startup_st& construct, const std::string& server_type, in_port_t try_port, const char *argv[]) +{ + return construct.start_server(server_type, try_port, argv); +} + +libtest::Server* server_startup_st::create(const std::string& server_type, in_port_t try_port, const bool is_socket) +{ + libtest::Server *server= NULL; + + if (is_socket == false) + { + if (try_port <= 0) + { + throw libtest::fatal(LIBYATL_DEFAULT_PARAM, "was passed the invalid port number %d", int(try_port)); + } + } + + if (is_socket) + { + if (server_type.compare("memcached") == 0) + { + server= build_memcached_socket("localhost", try_port); + } + else + { + Error << "Socket is not support for server: " << server_type; + return NULL; + } + } + else if (server_type.compare("gearmand") == 0) + { + server= build_gearmand("localhost", try_port); + } + else if (server_type.compare("hostile-gearmand") == 0) + { + server= build_gearmand("localhost", try_port, "gearmand/hostile_gearmand"); + } + else if (server_type.compare("drizzled") == 0) + { + if (has_drizzled()) + { + if (has_libdrizzle()) + { + server= build_drizzled("localhost", try_port); + } + } + } + else if (server_type.compare("blobslap_worker") == 0) + { + if (has_gearmand()) + { +#ifdef GEARMAND_BLOBSLAP_WORKER + if (GEARMAND_BLOBSLAP_WORKER) + { + if (HAVE_LIBGEARMAN) + { + server= build_blobslap_worker(try_port); + } + } +#endif // GEARMAND_BLOBSLAP_WORKER + } + } + else if (server_type.compare("memcached") == 0) + { + if (has_memcached()) + { + server= build_memcached("localhost", try_port); + } + } + + return server; +} + +class ServerPtr { +public: + ServerPtr(libtest::Server* server_): + _server(server_) + { } + + ~ServerPtr() + { + delete _server; + } + + void reset() + { + delete _server; + _server= NULL; + } + + libtest::Server* release(libtest::Server* server_= NULL) + { + libtest::Server* tmp= _server; + _server= server_; + return tmp; + } + + libtest::Server* operator->() const + { + return _server; + } + + libtest::Server* operator&() const + { + return _server; + } + +private: + libtest::Server* _server; +}; + +bool server_startup_st::_start_server(const bool is_socket, + const std::string& server_type, + in_port_t try_port, + const char *argv[]) +{ + try { + ServerPtr server(create(server_type, try_port, is_socket)); + + if (&server == NULL) + { + Error << "Could not allocate server: " << server_type; + return false; + } + + /* + We will now cycle the server we have created. + */ + if (server->cycle() == false) + { + Error << "Could not start up server " << &server; + return false; + } + + server->init(argv); + +#if 0 + if (false) + { + Out << "Pausing for startup, hit return when ready."; + std::string gdb_command= server->base_command(); + getchar(); + } + else +#endif + + if (server->start() == false) + { + return false; + } + else + { + { +#ifdef DEBUG + if (DEBUG) + { + Outn(); + Out << "STARTING SERVER(pid:" << server->pid() << "): " << server->running(); + Outn(); + } +#endif + } + } + + push_server(server.release()); + + if (is_socket and &server) + { + set_default_socket(server->socket().c_str()); + } + } + catch (const libtest::disconnected& err) + { + if (fatal::is_disabled() == false and try_port != LIBTEST_FAIL_PORT) + { + stream::cerr(err.file(), err.line(), err.func()) << err.what(); + return false; + } + } + catch (const libtest::__test_result& err) + { + stream::cerr(err.file(), err.line(), err.func()) << err.what(); + return false; + } + catch (const std::exception& err) + { + Error << err.what(); + return false; + } + catch (...) + { + Error << "error occured while creating server: " << server_type; + return false; + } + + return true; +} + +bool server_startup_st::start_server(const std::string& server_type, in_port_t try_port, const char *argv[]) +{ + return _start_server(false, server_type, try_port, argv); +} + +bool server_startup_st::start_socket_server(const std::string& server_type, const in_port_t try_port, const char *argv[]) +{ + return _start_server(true, server_type, try_port, argv); +} + +std::string server_startup_st::option_string() const +{ + std::string temp= server_list; + rtrim(temp); + return temp; +} + + +} // namespace libtest diff --git a/libtest/server_container.h b/libtest/server_container.h new file mode 100644 index 0000000..88e4763 --- /dev/null +++ b/libtest/server_container.h @@ -0,0 +1,151 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace libtest { + +class server_startup_st +{ +private: + uint64_t _magic; + std::string server_list; + bool _socket; + bool _sasl; + std::string _username; + std::string _password; + +public: + + uint8_t udp; + std::vector servers; + + server_startup_st(); + ~server_startup_st(); + + bool validate(); + + bool start_socket_server(const std::string& server_type, const in_port_t try_port, const char *argv[]); + bool start_server(const std::string& server_type, const in_port_t try_port, const char *argv[]); + + uint32_t count() const + { + return uint32_t(servers.size()); + } + + void restart(); + + std::string option_string() const; + + const std::string& password() const + { + return _password; + } + + const std::string& username() const + { + return _username; + } + + bool socket() + { + return _socket; + } + + bool sasl() + { + return _sasl; + } + + void set_socket() + { + _socket= true; + } + + void set_sasl(const std::string& username_arg, const std::string& password_arg) + { + _sasl= true; + _username= username_arg; + _password= password_arg; + } + + + // Just remove everything after shutdown + void clear(); + + bool shutdown(); + bool shutdown(uint32_t number_of_host); + + bool check() const; + + void push_server(Server *); + Server* last(); + Server *pop_server(); + + Server* create(const std::string& server_type, in_port_t try_port, const bool is_socket); + + unsigned long int servers_to_run() const + { + return _servers_to_run; + } + + void set_servers_to_run(unsigned long int arg) + { + _servers_to_run= arg; + } + +private: + bool _start_server(const bool is_socket, + const std::string& server_type, + const in_port_t try_port, + const char *argv[]); + +private: + unsigned long int _servers_to_run; +}; + +bool server_startup(server_startup_st&, const std::string&, in_port_t try_port, const char *argv[]); + +} // namespace libtest diff --git a/libtest/signal.cc b/libtest/signal.cc new file mode 100644 index 0000000..70012f1 --- /dev/null +++ b/libtest/signal.cc @@ -0,0 +1,259 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" +#include + +#include + +#include + +using namespace libtest; + +#define MAGIC_MEMORY 123569 + +bool SignalThread::is_shutdown() +{ + bool ret; + pthread_mutex_lock(&shutdown_mutex); + ret= bool(__shutdown != SHUTDOWN_RUNNING); + pthread_mutex_unlock(&shutdown_mutex); + + return ret; +} + +void SignalThread::set_shutdown(shutdown_t arg) +{ + pthread_mutex_lock(&shutdown_mutex); + __shutdown= arg; + pthread_mutex_unlock(&shutdown_mutex); + + if (arg == SHUTDOWN_GRACEFUL) + { + if (pthread_kill(thread, SIGUSR2) == 0) + { + void *retval; + pthread_join(thread, &retval); + } + } +} + +shutdown_t SignalThread::get_shutdown() +{ + shutdown_t local; + pthread_mutex_lock(&shutdown_mutex); + local= __shutdown; + pthread_mutex_unlock(&shutdown_mutex); + + return local; +} + +void SignalThread::post() +{ + sem_post(&lock); +} + +void SignalThread::test() +{ + assert(magic_memory == MAGIC_MEMORY); + if (bool(getenv("LIBTEST_IN_GDB")) == false) + { + assert(sigismember(&set, SIGALRM)); + assert(sigismember(&set, SIGABRT)); + assert(sigismember(&set, SIGQUIT)); + assert(sigismember(&set, SIGINT)); + assert(sigismember(&set, SIGVTALRM)); + } + assert(sigismember(&set, SIGUSR2)); +} + +bool SignalThread::unblock() +{ + int error; + if ((error= pthread_sigmask(SIG_UNBLOCK, &set, NULL)) != 0) + { + Error << "While trying to reset signal mask to original set, pthread_sigmask() died during pthread_sigmask(" << strerror(error) << ")"; + return false; + } + + return true; +} + +SignalThread::~SignalThread() +{ + if (is_shutdown() == false) + { + set_shutdown(SHUTDOWN_GRACEFUL); + } + +#if 0 + if (pthread_equal(thread, pthread_self()) != 0 and (pthread_kill(thread, 0) == ESRCH) == true) + { + void *retval; + pthread_join(thread, &retval); + } +#endif + sem_destroy(&lock); + + unblock(); +} + +extern "C" { + +static void *sig_thread(void *arg) +{ + SignalThread *context= (SignalThread*)arg; + + context->test(); + context->post(); + + while (context->get_shutdown() == SHUTDOWN_RUNNING) + { + int sig; + + if (context->wait(sig) == -1) + { + Error << "sigwait() returned errno:" << strerror(errno); + continue; + } + + switch (sig) + { + case SIGALRM: + case SIGVTALRM: + Error << strsignal(sig); + if (gdb_is_caller()) + { + abort(); + } + exit(EXIT_FAILURE); + + case SIGABRT: + case SIGUSR2: + case SIGINT: + case SIGQUIT: + if (context->is_shutdown() == false) + { + context->set_shutdown(SHUTDOWN_FORCED); + } + break; + case SIGPIPE: + { + Error << "Ignoring SIGPIPE"; + } + break; + + case 0: + Error << "Inside of gdb"; + break; + + default: + Error << "Signal handling thread got unexpected signal " << strsignal(sig); + break; + } + } + + return NULL; +} + +} + +SignalThread::SignalThread() : + magic_memory(MAGIC_MEMORY), + thread(pthread_self()) +{ + pthread_mutex_init(&shutdown_mutex, NULL); + sigemptyset(&set); + if (bool(getenv("LIBTEST_IN_GDB")) == false) + { + sigaddset(&set, SIGALRM); + sigaddset(&set, SIGABRT); + sigaddset(&set, SIGQUIT); + sigaddset(&set, SIGINT); + sigaddset(&set, SIGVTALRM); + } + sigaddset(&set, SIGPIPE); + + sigaddset(&set, SIGUSR2); + + sem_init(&lock, 0, 0); + + sigemptyset(&original_set); + pthread_sigmask(SIG_BLOCK, NULL, &original_set); +} + + +bool SignalThread::setup() +{ + set_shutdown(SHUTDOWN_RUNNING); + + if (sigismember(&original_set, SIGQUIT)) + { + Error << strsignal(SIGQUIT) << " has been previously set."; + } + + if (sigismember(&original_set, SIGINT)) + { + Error << strsignal(SIGINT) << " has been previously set."; + } + + if (sigismember(&original_set, SIGVTALRM)) + { + Error << strsignal(SIGVTALRM) << " has been previously set."; + } + + if (sigismember(&original_set, SIGUSR2)) + { + Error << strsignal(SIGUSR2) << " has been previously set."; + } + + int error; + if ((error= pthread_sigmask(SIG_BLOCK, &set, NULL)) != 0) + { + Error << "pthread_sigmask() died during pthread_sigmask(" << strerror(error) << ")"; + return false; + } + + if ((error= pthread_create(&thread, NULL, &sig_thread, this)) != 0) + { + Error << "pthread_create() died during pthread_create(" << strerror(error) << ")"; + return false; + } + + sem_wait(&lock); + + return true; +} diff --git a/libtest/signal.h b/libtest/signal.h new file mode 100644 index 0000000..6e68bb3 --- /dev/null +++ b/libtest/signal.h @@ -0,0 +1,80 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include +#include +#include + +enum shutdown_t { + SHUTDOWN_RUNNING, + SHUTDOWN_GRACEFUL, + SHUTDOWN_FORCED +}; + +namespace libtest { + +class SignalThread { + sigset_t set; + sem_t lock; + uint64_t magic_memory; + volatile shutdown_t __shutdown; + pthread_mutex_t shutdown_mutex; + pthread_t thread; + sigset_t original_set; + +public: + + SignalThread(); + ~SignalThread(); + + void test(); + void post(); + bool setup(); + bool unblock(); + + int wait(int& sig) + { + return sigwait(&set, &sig); + } + + void set_shutdown(shutdown_t arg); + bool is_shutdown(); + shutdown_t get_shutdown(); +}; + +} // namespace libtest diff --git a/libtest/skiptest.cc b/libtest/skiptest.cc new file mode 100644 index 0000000..098a575 --- /dev/null +++ b/libtest/skiptest.cc @@ -0,0 +1,57 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" + +#include + +#include +#include + +using namespace libtest; + + +static void *world_create(server_startup_st&, test_return_t& rc) +{ + rc= TEST_SKIPPED; + + return NULL; +} + +void get_world(libtest::Framework *world) +{ + world->create(world_create); +} diff --git a/libtest/socket.cc b/libtest/socket.cc new file mode 100644 index 0000000..76ac5bf --- /dev/null +++ b/libtest/socket.cc @@ -0,0 +1,62 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "libtest/yatlcon.h" +#include + +static char global_socket[1024]= { 0 }; + +namespace libtest { + +const char *default_socket() +{ + if (global_socket[0] == 0) + { + return NULL; + } + + return global_socket; +} + +void set_default_socket(const char *socket) +{ + if (socket) + { + strncpy(global_socket, socket, strlen(socket)); + } +} + +} diff --git a/libtest/socket.hpp b/libtest/socket.hpp new file mode 100644 index 0000000..9d13c34 --- /dev/null +++ b/libtest/socket.hpp @@ -0,0 +1,47 @@ + +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +namespace libtest { + +const char *default_socket(); + +void set_default_socket(const char *socket); + +} // namespace libtest + diff --git a/libtest/stream.h b/libtest/stream.h new file mode 100644 index 0000000..081c2bf --- /dev/null +++ b/libtest/stream.h @@ -0,0 +1,223 @@ +/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab: + * + * Data Differential YATL (i.e. libtest) library + * + * Copyright (C) 2012 Data Differential, http://datadifferential.com/ + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * The names of its contributors may not be used to endorse or + * promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#pragma once + +#include +#include +#include +#include +#include + +namespace libtest { +namespace stream { + +namespace detail { + +template + class channel { + private: + + public: + typedef std::basic_ostringstream stream_buffer; + + public: + void operator()(const stream_buffer& s, std::ostream& _out, + const char* filename, int line_number, const char* func) + { + if (filename) + { + _out + << filename + << ":" + << line_number + << ": in " + << func << "() " + << s.str() + << std::endl; + } + else + { + _out + << s.str() + << std::endl; + } + } + }; + +template + class channelln { + private: + + public: + typedef std::basic_ostringstream stream_buffer; + + public: + void operator()(const stream_buffer& s, std::ostream& _out, + const char* filename, int line_number, const char* func) + { + if (filename) + { + _out + << std::endl + << filename + << ":" + << line_number + << ": in " + << func << "() " + << s.str() + << std::endl; + } + else + { + _out + << std::endl + << s.str() + << std::endl; + } + } + }; + +template